Skip to content

Commit 6d6b07a

Browse files
committed
Prevent crashes from invoking signal handler in ~Isolate (2)
1 parent 9ea4031 commit 6d6b07a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

bindings/profilers/wall.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1240,6 +1240,10 @@ NAN_METHOD(WallProfiler::Dispose) {
12401240
}
12411241

12421242
double GetAsyncIdNoGC(v8::Isolate* isolate) {
1243+
if (!isolate->IsInUse()) {
1244+
// Must not try to create a handle scope if isolate is not in use.
1245+
return -1;
1246+
}
12431247
#if NODE_MAJOR_VERSION >= 24
12441248
HandleScope scope(isolate);
12451249
auto context = isolate->GetEnteredOrMicrotaskContext();

0 commit comments

Comments
 (0)