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: #14206
PR-URL: #14749
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
  • Loading branch information
addaleax committed Aug 10, 2017
1 parent 033773c commit 0bc3124
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 0bc3124

Please sign in to comment.