diff options
Diffstat (limited to 'src/api/environment.cc')
-rw-r--r-- | src/api/environment.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/api/environment.cc b/src/api/environment.cc index 6a56ddb511..cd3e3aefc2 100644 --- a/src/api/environment.cc +++ b/src/api/environment.cc @@ -23,6 +23,7 @@ using v8::MaybeLocal; using v8::Message; using v8::MicrotasksPolicy; using v8::ObjectTemplate; +using v8::SealHandleScope; using v8::String; using v8::Value; @@ -34,7 +35,9 @@ static bool AllowWasmCodeGenerationCallback(Local<Context> context, } static bool ShouldAbortOnUncaughtException(Isolate* isolate) { - HandleScope scope(isolate); +#ifdef DEBUG + SealHandleScope scope(isolate); +#endif Environment* env = Environment::GetCurrent(isolate); return env != nullptr && (env->is_main_thread() || !env->is_stopping_worker()) && |