We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 31280ab commit 1572044Copy full SHA for 1572044
Lib/javascript/v8/javascriptrun.swg
@@ -20,7 +20,7 @@ typedef v8::PropertyCallbackInfo<v8::Value> SwigV8PropertyCallbackInfo;
20
#define SWIGV8_HANDLESCOPE_ESC() v8::EscapableHandleScope scope(v8::Isolate::GetCurrent());
21
#define SWIGV8_ESCAPE(val) return scope.Escape(val)
22
23
-#define SWIGV8_ADJUST_MEMORY(size) v8::Isolate::GetCurrent()->AdjustAmountOfExternalAllocatedMemory(size)
+#define SWIGV8_ADJUST_MEMORY(size) if (v8::Isolate::GetCurrent()) v8::Isolate::GetCurrent()->AdjustAmountOfExternalAllocatedMemory(size)
24
#define SWIGV8_CURRENT_CONTEXT() v8::Isolate::GetCurrent()->GetCurrentContext()
25
#define SWIGV8_THROW_EXCEPTION(err) v8::Isolate::GetCurrent()->ThrowException(err)
26
0 commit comments