Title: [172006] trunk/Source/WebCore
Revision
172006
Author
[email protected]
Date
2014-08-04 14:57:27 -0700 (Mon, 04 Aug 2014)

Log Message

Always clear ConsoleClient when Page/WindowShell is destroyed
https://bugs.webkit.org/show_bug.cgi?id=135569

Patch by Joseph Pecoraro <[email protected]> on 2014-08-04
Reviewed by Mark Lam.

* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::~ScriptController):
Whenever a window shell goes away, clear the console client.
We did this in clearWindowShell but not before destroying.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (172005 => 172006)


--- trunk/Source/WebCore/ChangeLog	2014-08-04 21:56:08 UTC (rev 172005)
+++ trunk/Source/WebCore/ChangeLog	2014-08-04 21:57:27 UTC (rev 172006)
@@ -1,3 +1,15 @@
+2014-08-04  Joseph Pecoraro  <[email protected]>
+
+        Always clear ConsoleClient when Page/WindowShell is destroyed
+        https://bugs.webkit.org/show_bug.cgi?id=135569
+
+        Reviewed by Mark Lam.
+
+        * bindings/js/ScriptController.cpp:
+        (WebCore::ScriptController::~ScriptController):
+        Whenever a window shell goes away, clear the console client.
+        We did this in clearWindowShell but not before destroying.
+
 2014-08-04  Chris Fleizach  <[email protected]>
 
         AX: isWordEndMatch should allow for multiple word selections

Modified: trunk/Source/WebCore/bindings/js/ScriptController.cpp (172005 => 172006)


--- trunk/Source/WebCore/bindings/js/ScriptController.cpp	2014-08-04 21:56:08 UTC (rev 172005)
+++ trunk/Source/WebCore/bindings/js/ScriptController.cpp	2014-08-04 21:57:27 UTC (rev 172006)
@@ -94,8 +94,11 @@
 
     // It's likely that destroying m_windowShells will create a lot of garbage.
     if (!m_windowShells.isEmpty()) {
-        while (!m_windowShells.isEmpty())
-            destroyWindowShell(*m_windowShells.begin()->key);
+        while (!m_windowShells.isEmpty()) {
+            ShellMap::iterator iter = m_windowShells.begin();
+            iter->value->window()->setConsoleClient(nullptr);
+            destroyWindowShell(*iter->key);
+        }
         gcController().garbageCollectSoon();
     }
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to