summaryrefslogtreecommitdiff
path: root/src/node_platform.cc
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2019-03-05 23:03:24 +0100
committerRuben Bridgewater <ruben@bridgewater.de>2019-03-09 00:27:29 +0100
commit2699f8c860084565a8b3748b3fdf1ebba204f3f7 (patch)
tree35b317504f40d0e3b3a25e5b4205596c41a6b76c /src/node_platform.cc
parentc957b0517766729f931a1ef7ab134f75d6a01864 (diff)
downloadandroid-node-v8-2699f8c860084565a8b3748b3fdf1ebba204f3f7.tar.gz
android-node-v8-2699f8c860084565a8b3748b3fdf1ebba204f3f7.tar.bz2
android-node-v8-2699f8c860084565a8b3748b3fdf1ebba204f3f7.zip
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 <info@bnoordhuis.nl> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Diffstat (limited to 'src/node_platform.cc')
-rw-r--r--src/node_platform.cc5
1 files changed, 1 insertions, 4 deletions
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> 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<Object>(), { 0, 0 },