void ScriptController::attachDebugger(JSDOMWindowShell* shell, JSC::Debugger* debugger) { if (!shell) return; JSDOMWindow* globalObject = shell->window(); if (debugger) debugger->attach(globalObject); else if (JSC::Debugger* currentDebugger = globalObject->debugger()) currentDebugger->detach(globalObject); }
void ScriptController::attachDebugger(JSDOMWindowShell* shell, JSC::Debugger* debugger) { if (!shell) return; JSDOMWindow* globalObject = shell->window(); JSLockHolder lock(globalObject->vm()); if (debugger) debugger->attach(globalObject); else if (JSC::Debugger* currentDebugger = globalObject->debugger()) currentDebugger->detach(globalObject, JSC::Debugger::TerminatingDebuggingSession); }