summaryrefslogtreecommitdiffstats
path: root/WebCore/inspector/JavaScriptDebugServer.cpp
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2009-08-11 17:01:47 +0100
committerBen Murdoch <benm@google.com>2009-08-11 18:21:02 +0100
commit0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5 (patch)
tree2943df35f62d885c89d01063cc528dd73b480fea /WebCore/inspector/JavaScriptDebugServer.cpp
parent7e7a70bfa49a1122b2597a1e6367d89eb4035eca (diff)
downloadexternal_webkit-0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5.zip
external_webkit-0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5.tar.gz
external_webkit-0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5.tar.bz2
Merge in WebKit r47029.
Diffstat (limited to 'WebCore/inspector/JavaScriptDebugServer.cpp')
-rw-r--r--WebCore/inspector/JavaScriptDebugServer.cpp23
1 files changed, 18 insertions, 5 deletions
diff --git a/WebCore/inspector/JavaScriptDebugServer.cpp b/WebCore/inspector/JavaScriptDebugServer.cpp
index bb6358c..10eff26 100644
--- a/WebCore/inspector/JavaScriptDebugServer.cpp
+++ b/WebCore/inspector/JavaScriptDebugServer.cpp
@@ -275,6 +275,19 @@ static Page* toPage(JSGlobalObject* globalObject)
return frame ? frame->page() : 0;
}
+void JavaScriptDebugServer::detach(JSGlobalObject* globalObject)
+{
+ // If we're detaching from the currently executing global object, manually tear down our
+ // stack, since we won't get further debugger callbacks to do so. Also, resume execution,
+ // since there's no point in staying paused once a window closes.
+ if (m_currentCallFrame && m_currentCallFrame->dynamicGlobalObject() == globalObject) {
+ m_currentCallFrame = 0;
+ m_pauseOnCallFrame = 0;
+ continueProgram();
+ }
+ Debugger::detach(globalObject);
+}
+
void JavaScriptDebugServer::sourceParsed(ExecState* exec, const SourceCode& source, int errorLine, const UString& errorMessage)
{
if (m_callingListeners)
@@ -387,12 +400,12 @@ void JavaScriptDebugServer::setJavaScriptPaused(FrameView* view, bool paused)
if (!view)
return;
- const HashSet<Widget*>* children = view->children();
+ const HashSet<RefPtr<Widget> >* children = view->children();
ASSERT(children);
- HashSet<Widget*>::const_iterator end = children->end();
- for (HashSet<Widget*>::const_iterator it = children->begin(); it != end; ++it) {
- Widget* widget = *it;
+ HashSet<RefPtr<Widget> >::const_iterator end = children->end();
+ for (HashSet<RefPtr<Widget> >::const_iterator it = children->begin(); it != end; ++it) {
+ Widget* widget = (*it).get();
if (!widget->isPluginView())
continue;
static_cast<PluginView*>(widget)->setJavaScriptPaused(paused);
@@ -541,7 +554,7 @@ void JavaScriptDebugServer::recompileAllJSFunctionsSoon()
void JavaScriptDebugServer::recompileAllJSFunctions(Timer<JavaScriptDebugServer>*)
{
- JSLock lock(false);
+ JSLock lock(SilenceAssertionsOnly);
JSGlobalData* globalData = JSDOMWindow::commonJSGlobalData();
// If JavaScript is running, it's not safe to recompile, since we'll end