Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/heap_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class JSGraph : public EmbedderGraph {
}

Node* V8Node(const Local<v8::Value>& value) override {
return V8Node(value.As<v8::Data>());
return V8Node(Local<v8::Data>(value));
}

Node* AddNode(std::unique_ptr<Node> node) override {
Expand Down
2 changes: 1 addition & 1 deletion src/node_main_instance.cc
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ NodeMainInstance::~NodeMainInstance() {
// This should only be done on a main instance that owns its isolate.
// IsolateData must be freed before UnregisterIsolate() is called.
isolate_data_.reset();
platform_->UnregisterIsolate(isolate_);
}
isolate_->Dispose();
platform_->UnregisterIsolate(isolate_);
}

ExitCode NodeMainInstance::Run() {
Expand Down
2 changes: 1 addition & 1 deletion src/node_worker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,8 @@ class WorkerThreadData {
// new Isolate at the same address can successfully be registered with
// the platform.
// (Refs: https://github.com/nodejs/node/issues/30846)
w_->platform_->UnregisterIsolate(isolate);
isolate->Dispose();
w_->platform_->UnregisterIsolate(isolate);

// Wait until the platform has cleaned up all relevant resources.
while (!platform_finished) {
Expand Down
2 changes: 1 addition & 1 deletion src/util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -748,8 +748,8 @@ RAIIIsolateWithoutEntering::RAIIIsolateWithoutEntering(const SnapshotData* data)
}

RAIIIsolateWithoutEntering::~RAIIIsolateWithoutEntering() {
per_process::v8_platform.Platform()->UnregisterIsolate(isolate_);
isolate_->Dispose();
per_process::v8_platform.Platform()->UnregisterIsolate(isolate_);
}

RAIIIsolate::RAIIIsolate(const SnapshotData* data)
Expand Down
2 changes: 1 addition & 1 deletion test/cctest/node_test_fixture.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ class NodeTestFixture : public NodeZeroIsolateTestFixture {
void TearDown() override {
platform->DrainTasks(isolate_);
isolate_->Exit();
platform->UnregisterIsolate(isolate_);
isolate_->Dispose();
platform->UnregisterIsolate(isolate_);
isolate_ = nullptr;
NodeZeroIsolateTestFixture::TearDown();
}
Expand Down
2 changes: 1 addition & 1 deletion test/cctest/test_cppgc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ TEST_F(NodeZeroIsolateTestFixture, ExistingCppHeapTest) {
platform->DrainTasks(isolate);
}

platform->UnregisterIsolate(isolate);
isolate->Dispose();
platform->UnregisterIsolate(isolate);

// Check that all the objects are created and destroyed properly.
EXPECT_EQ(CppGCed::kConstructCount, 100);
Expand Down
4 changes: 2 additions & 2 deletions test/cctest/test_environment.cc
Original file line number Diff line number Diff line change
Expand Up @@ -543,8 +543,8 @@ TEST_F(EnvironmentTest, InspectorMultipleEmbeddedEnvironments) {
node::FreeIsolateData(isolate_data);
}

data->platform->UnregisterIsolate(isolate);
isolate->Dispose();
data->platform->UnregisterIsolate(isolate);
uv_run(&loop, UV_RUN_DEFAULT);
CHECK_EQ(uv_loop_close(&loop), 0);

Expand Down Expand Up @@ -673,8 +673,8 @@ TEST_F(NodeZeroIsolateTestFixture, CtrlCWithOnlySafeTerminationTest) {
}

// Cleanup.
platform->UnregisterIsolate(isolate);
isolate->Dispose();
platform->UnregisterIsolate(isolate);
}
#endif // _WIN32

Expand Down
2 changes: 1 addition & 1 deletion test/cctest/test_platform.cc
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ TEST_F(NodeZeroIsolateTestFixture, IsolatePlatformDelegateTest) {

// Graceful shutdown
delegate->Shutdown();
platform->UnregisterIsolate(isolate);
isolate->Dispose();
platform->UnregisterIsolate(isolate);
}

TEST_F(PlatformTest, TracingControllerNullptr) {
Expand Down
2 changes: 1 addition & 1 deletion test/fuzzers/fuzz_env.cc
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ class FuzzerFixtureHelper {
void Teardown() {
platform->DrainTasks(isolate_);
isolate_->Exit();
platform->UnregisterIsolate(isolate_);
isolate_->Dispose();
platform->UnregisterIsolate(isolate_);
isolate_ = nullptr;
}
};
Expand Down
2 changes: 1 addition & 1 deletion test/fuzzers/fuzz_strings.cc
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ class FuzzerFixtureHelper {
void Teardown() {
platform->DrainTasks(isolate_);
isolate_->Exit();
platform->UnregisterIsolate(isolate_);
isolate_->Dispose();
platform->UnregisterIsolate(isolate_);
isolate_ = nullptr;
}
};
Expand Down
Loading