Skip to content

Commit 71527fb

Browse files
authored
Merge pull request #4 from medooze/dev/bcost/DIOS-5504-shutdowncrash
fix: [DIOS-5504] Prevent releasing to the V8 Isolate when it is shutting down
2 parents 177c186 + 1572044 commit 71527fb

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
@@ -16,7 +16,7 @@ typedef v8::PropertyCallbackInfo<v8::Value> SwigV8PropertyCallbackInfo;
1616
#define SWIGV8_HANDLESCOPE_ESC() v8::EscapableHandleScope scope(v8::Isolate::GetCurrent());
1717
#define SWIGV8_ESCAPE(val) return scope.Escape(val)
1818

19-
#define SWIGV8_ADJUST_MEMORY(size) v8::Isolate::GetCurrent()->AdjustAmountOfExternalAllocatedMemory(size)
19+
#define SWIGV8_ADJUST_MEMORY(size) if (v8::Isolate::GetCurrent()) v8::Isolate::GetCurrent()->AdjustAmountOfExternalAllocatedMemory(size)
2020
#define SWIGV8_CURRENT_CONTEXT() v8::Isolate::GetCurrent()->GetCurrentContext()
2121
#define SWIGV8_THROW_EXCEPTION(err) v8::Isolate::GetCurrent()->ThrowException(err)
2222

0 commit comments

Comments
 (0)