Title: [112818] trunk/Source/WebCore
- Revision
- 112818
- Author
- timo...@apple.com
- Date
- 2012-04-01 13:23:14 -0700 (Sun, 01 Apr 2012)
Log Message
Fix a crash when closing a tab/window while the Web Inspector is stopped in the debugger.
https://webkit.org/b/82846
rdar://problem/8133494
Reviewed by Yury Semikhatsky.
* bindings/js/PageScriptDebugServer.cpp:
(WebCore::PageScriptDebugServer::didPause): Added assert for page and early return. Also assert that
m_pausedPage is null.
(WebCore::PageScriptDebugServer::didContinue): Page can be null if we are continuing because the Page closed.
So add a null check before using it. Added an assert that the page is null or m_pausedPage.
(WebCore::PageScriptDebugServer::didRemoveLastListener): Added assert for page.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (112817 => 112818)
--- trunk/Source/WebCore/ChangeLog 2012-04-01 18:40:21 UTC (rev 112817)
+++ trunk/Source/WebCore/ChangeLog 2012-04-01 20:23:14 UTC (rev 112818)
@@ -1,3 +1,19 @@
+2012-04-01 Timothy Hatcher <timo...@apple.com>
+
+ Fix a crash when closing a tab/window while the Web Inspector is stopped in the debugger.
+
+ https://webkit.org/b/82846
+ rdar://problem/8133494
+
+ Reviewed by Yury Semikhatsky.
+
+ * bindings/js/PageScriptDebugServer.cpp:
+ (WebCore::PageScriptDebugServer::didPause): Added assert for page and early return. Also assert that
+ m_pausedPage is null.
+ (WebCore::PageScriptDebugServer::didContinue): Page can be null if we are continuing because the Page closed.
+ So add a null check before using it. Added an assert that the page is null or m_pausedPage.
+ (WebCore::PageScriptDebugServer::didRemoveLastListener): Added assert for page.
+
2012-04-01 Tony Tseung <tse...@apple.com>
Composite Font References is a new established standard (ISO/IEC 14496-28:2012) for specifying
Modified: trunk/Source/WebCore/bindings/js/PageScriptDebugServer.cpp (112817 => 112818)
--- trunk/Source/WebCore/bindings/js/PageScriptDebugServer.cpp 2012-04-01 18:40:21 UTC (rev 112817)
+++ trunk/Source/WebCore/bindings/js/PageScriptDebugServer.cpp 2012-04-01 20:23:14 UTC (rev 112818)
@@ -131,20 +131,34 @@
void PageScriptDebugServer::didPause(JSC::JSGlobalObject* globalObject)
{
+ ASSERT(!m_pausedPage);
+
Page* page = toPage(globalObject);
+ ASSERT(page);
+ if (!page)
+ return;
+
m_pausedPage = page;
+
setJavaScriptPaused(page->group(), true);
}
void PageScriptDebugServer::didContinue(JSC::JSGlobalObject* globalObject)
{
+ // Page can be null if we are continuing because the Page closed.
Page* page = toPage(globalObject);
+ ASSERT(!page || page == m_pausedPage);
+
m_pausedPage = 0;
- setJavaScriptPaused(page->group(), false);
+
+ if (page)
+ setJavaScriptPaused(page->group(), false);
}
void PageScriptDebugServer::didRemoveLastListener(Page* page)
{
+ ASSERT(page);
+
if (m_pausedPage == page)
m_doneProcessingDebuggerEvents = true;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes