summaryrefslogtreecommitdiffstats
path: root/WebCore/bindings/js/ScriptDebugServer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/bindings/js/ScriptDebugServer.cpp')
-rw-r--r--WebCore/bindings/js/ScriptDebugServer.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/WebCore/bindings/js/ScriptDebugServer.cpp b/WebCore/bindings/js/ScriptDebugServer.cpp
index d1b5112..0a40f13 100644
--- a/WebCore/bindings/js/ScriptDebugServer.cpp
+++ b/WebCore/bindings/js/ScriptDebugServer.cpp
@@ -568,7 +568,11 @@ void ScriptDebugServer::recompileAllJSFunctionsSoon()
void ScriptDebugServer::recompileAllJSFunctions(Timer<ScriptDebugServer>*)
{
JSLock lock(SilenceAssertionsOnly);
- Debugger::recompileAllJSFunctions(JSDOMWindow::commonJSGlobalData());
+ // If JavaScript stack is not empty postpone recompilation.
+ if (JSDOMWindow::commonJSGlobalData()->dynamicGlobalObject)
+ recompileAllJSFunctionsSoon();
+ else
+ Debugger::recompileAllJSFunctions(JSDOMWindow::commonJSGlobalData());
}
void ScriptDebugServer::didAddListener(Page* page)