Skip to content

Commit

Permalink
test: properly order freeing resources in cctest
Browse files Browse the repository at this point in the history
The `IsolateData` instance is created before the `Environment` instance,
so free in reverse order.

Fixes: nodejs#14206
  • Loading branch information
addaleax committed Aug 10, 2017
1 parent 5a0ee6d commit 682a951
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/cctest/test_environment.cc
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ class EnvironmentTest : public NodeTestFixture {
}

~Env() {
FreeIsolateData(isolate_data_);
environment_->CleanupHandles();
FreeEnvironment(environment_);
FreeIsolateData(isolate_data_);
}

Environment* operator*() const {
Expand Down

0 comments on commit 682a951

Please sign in to comment.