File tree Expand file tree Collapse file tree 1 file changed +18
-13
lines changed Expand file tree Collapse file tree 1 file changed +18
-13
lines changed Original file line number Diff line number Diff line change @@ -116,6 +116,7 @@ using v8::Number;
116116using v8::Object;
117117using v8::ObjectTemplate;
118118using v8::PropertyCallbackInfo;
119+ using v8::SealHandleScope;
119120using v8::String;
120121using v8::TryCatch;
121122using v8::Uint32;
@@ -3769,19 +3770,23 @@ int Start(int argc, char** argv) {
37693770 if (use_debug_agent)
37703771 EnableDebug (env);
37713772
3772- bool more;
3773- do {
3774- more = uv_run (env->event_loop (), UV_RUN_ONCE);
3775- if (more == false ) {
3776- EmitBeforeExit (env);
3777-
3778- // Emit `beforeExit` if the loop became alive either after emitting
3779- // event, or after running some callbacks.
3780- more = uv_loop_alive (env->event_loop ());
3781- if (uv_run (env->event_loop (), UV_RUN_NOWAIT) != 0 )
3782- more = true ;
3783- }
3784- } while (more == true );
3773+ {
3774+ SealHandleScope seal (node_isolate);
3775+ bool more;
3776+ do {
3777+ more = uv_run (env->event_loop (), UV_RUN_ONCE);
3778+ if (more == false ) {
3779+ EmitBeforeExit (env);
3780+
3781+ // Emit `beforeExit` if the loop became alive either after emitting
3782+ // event, or after running some callbacks.
3783+ more = uv_loop_alive (env->event_loop ());
3784+ if (uv_run (env->event_loop (), UV_RUN_NOWAIT) != 0 )
3785+ more = true ;
3786+ }
3787+ } while (more == true );
3788+ }
3789+
37853790 code = EmitExit (env);
37863791 RunAtExit (env);
37873792
You can’t perform that action at this time.
0 commit comments