mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-25 20:54:15 +00:00
FS-10465: [mod_v8] Fix javascript failures when a session callback is called from another thread/leg.
This commit is contained in:
1 parent
f9d23ccadd
commit
105afc3f29
4 files changed
+44
-15
No files matched your search
@@ -130,6 +130,16 @@
|
||||
if (v8::V8::IsExecutionTerminating(info.GetIsolate())) return;\
|
||||
if (JSMain::GetScriptInstanceFromIsolate(info.GetIsolate()) && JSMain::GetScriptInstanceFromIsolate(info.GetIsolate())->GetForcedTermination()) return
|
||||
|
||||
/* Macro for easy unlocking an isolate on a long running c call */
|
||||
#define JS_EXECUTE_LONG_RUNNING_C_CALL_WITH_UNLOCKER(call) {\
|
||||
/* Unlock isolate on a long running c call to let another thread execute the callback */\
|
||||
info.GetIsolate()->Exit();\
|
||||
Unlocker unlock(info.GetIsolate());\
|
||||
call;\
|
||||
}\
|
||||
/* Lock it back */\
|
||||
info.GetIsolate()->Enter();
|
||||
|
||||
/* strdup function for all platforms */
|
||||
#ifdef NDEBUG
|
||||
#if (_MSC_VER >= 1500) // VC9+
|
||||
|
||||
Reference in new issue
Block a user