Skip to content

Commit 2aab6e0

Browse files
committed
WIP(js-debugger):
1 parent 3a95495 commit 2aab6e0

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/modules/pythonmonkey/pythonmonkey.cc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -440,6 +440,14 @@ PyMODINIT_FUNC PyInit_pythonmonkey(void)
440440

441441
JS_SetGCCallback(GLOBAL_CX, handleSharedPythonMonkeyMemory, NULL);
442442

443+
JS::RootedObject debuggerGlobal(GLOBAL_CX, JS_NewGlobalObject(GLOBAL_CX, &globalClass, nullptr, JS::FireOnNewGlobalHook, options));
444+
{
445+
JSAutoRealm r(GLOBAL_CX, debuggerGlobal);
446+
}
447+
JS_DefineProperty(GLOBAL_CX, *global, "debuggerGlobal", debuggerGlobal, JSPROP_ENUMERATE);
448+
449+
JS_DefineDebuggerObject(GLOBAL_CX, *global);
450+
443451
// XXX: SpiderMonkey bug???
444452
// In https://hg.mozilla.org/releases/mozilla-esr102/file/3b574e1/js/src/jit/CacheIR.cpp#l317, trying to use the callback returned by `js::GetDOMProxyShadowsCheck()` even it's unset (nullptr)
445453
// Temporarily solved by explicitly setting the `domProxyShadowsCheck` callback here

0 commit comments

Comments
 (0)