mirror of https://github.com/axmolengine/axmol.git
closed #3856: Crash when Firefox connects to JSB application.
This commit is contained in:
parent
5b9f1697d3
commit
04f2cc48a2
|
@ -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