Skip to content

Commit 1572044

Browse files
committed
fix: [DIOS-5504] Prevent releasing to the V8 Isolate when it is shutting down
1 parent 31280ab commit 1572044

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/javascript/v8/javascriptrun.swg

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ typedef v8::PropertyCallbackInfo<v8::Value> SwigV8PropertyCallbackInfo;
2020
#define SWIGV8_HANDLESCOPE_ESC() v8::EscapableHandleScope scope(v8::Isolate::GetCurrent());
2121
#define SWIGV8_ESCAPE(val) return scope.Escape(val)
2222

23-
#define SWIGV8_ADJUST_MEMORY(size) v8::Isolate::GetCurrent()->AdjustAmountOfExternalAllocatedMemory(size)
23+
#define SWIGV8_ADJUST_MEMORY(size) if (v8::Isolate::GetCurrent()) v8::Isolate::GetCurrent()->AdjustAmountOfExternalAllocatedMemory(size)
2424
#define SWIGV8_CURRENT_CONTEXT() v8::Isolate::GetCurrent()->GetCurrentContext()
2525
#define SWIGV8_THROW_EXCEPTION(err) v8::Isolate::GetCurrent()->ThrowException(err)
2626

0 commit comments

Comments
 (0)