mirror of https://github.com/axmolengine/axmol.git
Merge pull request #5227 from dumganhar/iss3856-remote-debug-crash-mac
closed #3856: Crash when Firefox connects to JSB application.
This commit is contained in:
commit
6f45d9ca27
|
@ -1408,6 +1408,9 @@ void ScriptingCore::enableDebugger()
|
|||
JS_SetDebugMode(_cx, JS_TRUE);
|
||||
|
||||
_debugGlobal = NewGlobalObject(_cx, true);
|
||||
// Adds the debugger object to root, otherwise it may be collected by GC.
|
||||
JS_AddObjectRoot(_cx, &_debugGlobal);
|
||||
|
||||
JS_WrapObject(_cx, &_debugGlobal);
|
||||
JSAutoCompartment ac(_cx, _debugGlobal);
|
||||
// these are used in the debug program
|
||||
|
|
Loading…
Reference in New Issue