From 0bc3124c801cc2741a10b2b5e0e8dc8d83d837ba Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Thu, 10 Aug 2017 20:50:27 +0200 Subject: [PATCH] test: properly order freeing resources in cctest The `IsolateData` instance is created before the `Environment` instance, so free in reverse order. Fixes: https://github.com/nodejs/node/issues/14206 PR-URL: https://github.com/nodejs/node/pull/14749 Reviewed-By: Refael Ackermann Reviewed-By: Ben Noordhuis Reviewed-By: Ben Noordhuis Reviewed-By: Daniel Bevenius --- test/cctest/test_environment.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/cctest/test_environment.cc b/test/cctest/test_environment.cc index db08743261c843..4ae9296c12e760 100644 --- a/test/cctest/test_environment.cc +++ b/test/cctest/test_environment.cc @@ -41,9 +41,9 @@ class EnvironmentTest : public NodeTestFixture { } ~Env() { - FreeIsolateData(isolate_data_); environment_->CleanupHandles(); FreeEnvironment(environment_); + FreeIsolateData(isolate_data_); } Environment* operator*() const {