Skip to content

Commit 8af31f3

Browse files
committed
Isolate::GetCurrentContext() can be called when no context is entered.
1 parent eb2fdd4 commit 8af31f3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

graal-nodejs/deps/v8/src/graal/graal_isolate.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@ class GraalIsolate {
554554
}
555555

556556
inline v8::Local<v8::Context> GetCurrentContext() {
557-
return contexts.back();
557+
return ContextEntered() ? contexts.back() : nullptr;
558558
}
559559

560560
inline bool ContextEntered() {

0 commit comments

Comments
 (0)