Commit 22edf579 authored by timothy@apple.com's avatar timothy@apple.com

Recompile the JavaScript functions when removing any listener, so functions that are

        not being debugged can resume normal speed again.

        https://bugs.webkit.org/show_bug.cgi?id=21715

        Reviewed by Geoffrey Garen.

        * bindings/js/JSDOMWindowBase.cpp:
        (WebCore::JSDOMWindowBase::globalExec): Changed an assert into an if check. This assert
        was firing when closing the window and having the recompile fire after. This was an
        overzelious assert now.
        * inspector/JavaScriptDebugServer.cpp:
        (WebCore::JavaScriptDebugServer::didRemoveListener): Start the recompile timer.
        (WebCore::JavaScriptDebugServer::didRemoveLastListener): Removed the recompile timer start.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37659 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 3bb925d9
2008-10-17 Timothy Hatcher <timothy@apple.com>
Recompile the JavaScript functions when removing any listener, so functions that are
not being debugged can resume normal speed again.
https://bugs.webkit.org/show_bug.cgi?id=21715
Reviewed by Geoffrey Garen.
* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::globalExec): Changed an assert into an if check. This assert
was firing when closing the window and having the recompile fire after. This was an
overzelious assert now.
* inspector/JavaScriptDebugServer.cpp:
(WebCore::JavaScriptDebugServer::didRemoveListener): Start the recompile timer.
(WebCore::JavaScriptDebugServer::didRemoveLastListener): Removed the recompile timer start.
2008-10-17 Timothy Hatcher <timothy@apple.com>
Fixes a regression where starting a debugging session in
......
......@@ -687,8 +687,8 @@ ExecState* JSDOMWindowBase::globalExec()
{
// We need to make sure that any script execution happening in this
// frame does not destroy it
ASSERT(impl()->frame());
impl()->frame()->keepAlive();
if (Frame *frame = impl()->frame())
frame->keepAlive();
return Base::globalExec();
}
......
......@@ -596,6 +596,8 @@ void JavaScriptDebugServer::didRemoveListener(Page* page)
if (hasGlobalListeners() || (page && hasListenersInterestedInPage(page)))
return;
m_recompileTimer.startOneShot(0);
if (page)
page->setDebugger(0);
else
......@@ -605,7 +607,6 @@ void JavaScriptDebugServer::didRemoveListener(Page* page)
void JavaScriptDebugServer::didRemoveLastListener()
{
m_doneProcessingDebuggerEvents = true;
m_recompileTimer.startOneShot(0);
}
} // namespace WebCore
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment