From 682a951315fe8fe72ba619506c4d3e33b0a44c46 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 --- 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 {