From 2699f8c860084565a8b3748b3fdf1ebba204f3f7 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Tue, 5 Mar 2019 23:03:24 +0100 Subject: src: merge debug-only `SealHandleScope`s Instead of repeating the same `#ifdef DEBUG` + `SealHandleScope` pattern over and over, create an utility that does this for us. PR-URL: https://github.com/nodejs/node/pull/26459 Reviewed-By: Ben Noordhuis Reviewed-By: Ruben Bridgewater Reviewed-By: Colin Ihrig Reviewed-By: Joyee Cheung --- src/node_platform.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/node_platform.cc') diff --git a/src/node_platform.cc b/src/node_platform.cc index 115b59e356..b96d5d3a1a 100644 --- a/src/node_platform.cc +++ b/src/node_platform.cc @@ -12,7 +12,6 @@ using v8::Isolate; using v8::Local; using v8::Object; using v8::Platform; -using v8::SealHandleScope; using v8::Task; using node::tracing::TracingController; @@ -332,9 +331,7 @@ int NodePlatform::NumberOfWorkerThreads() { void PerIsolatePlatformData::RunForegroundTask(std::unique_ptr task) { Isolate* isolate = Isolate::GetCurrent(); -#ifdef DEBUG - SealHandleScope scope(isolate); -#endif + DebugSealHandleScope scope(isolate); Environment* env = Environment::GetCurrent(isolate); if (env != nullptr) { InternalCallbackScope cb_scope(env, Local(), { 0, 0 }, -- cgit v1.2.3