[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

yurys at chromium.org yurys at chromium.org
Wed Dec 22 13:02:28 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit eae901de3660fa3f90fb684822010787243be254
Author: yurys at chromium.org <yurys at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Sep 6 07:12:43 2010 +0000

    2010-08-31  Yury Semikhatsky  <yurys at chromium.org>
    
            Reviewed by Joseph Pecoraro.
    
            Web Inspector: browser crashes on attempt to evaluate "alert(1)" while staying on a breakpoint
            https://bugs.webkit.org/show_bug.cgi?id=44943
    
            Test: inspector/debugger-suspend-active-dom-objects.html
    
            * page/PageGroupLoadDeferrer.cpp:
            (WebCore::PageGroupLoadDeferrer::PageGroupLoadDeferrer):
    
    2010-08-31  Yury Semikhatsky  <yurys at chromium.org>
    
            Reviewed by Joseph Pecoraro.
    
            Web Inspector: browser crashes on attempt to evaluate "alert(1)" while staying on a breakpoint
            https://bugs.webkit.org/show_bug.cgi?id=44943
    
            * inspector/debugger-suspend-active-dom-objects-expected.txt: Added.
            * inspector/debugger-suspend-active-dom-objects.html: Added.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@66813 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index c8c748f..85576f2 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,13 @@
+2010-08-31  Yury Semikhatsky  <yurys at chromium.org>
+
+        Reviewed by Joseph Pecoraro.
+
+        Web Inspector: browser crashes on attempt to evaluate "alert(1)" while staying on a breakpoint
+        https://bugs.webkit.org/show_bug.cgi?id=44943
+
+        * inspector/debugger-suspend-active-dom-objects-expected.txt: Added.
+        * inspector/debugger-suspend-active-dom-objects.html: Added.
+
 2010-09-05  Peter Kasting  <pkasting at google.com>
 
         Reviewed by Adam Barth.
diff --git a/LayoutTests/inspector/debugger-suspend-active-dom-objects-expected.txt b/LayoutTests/inspector/debugger-suspend-active-dom-objects-expected.txt
new file mode 100644
index 0000000..22bda7c
--- /dev/null
+++ b/LayoutTests/inspector/debugger-suspend-active-dom-objects-expected.txt
@@ -0,0 +1,10 @@
+ALERT: 1
+Tests that browser won't crash if user evaluates something in the console that would suspend active dom objects (e.g. if user attempts to show an alert) when script execution is paused on a breakpoint and all active dom objects are already suspended.
+
+Debugger was enabled.
+Set timer for test function.
+Script execution paused.
+Shown alert while staying on a breakpoint.
+Script execution resumed.
+Debugger was disabled.
+
diff --git a/LayoutTests/inspector/debugger-suspend-active-dom-objects.html b/LayoutTests/inspector/debugger-suspend-active-dom-objects.html
new file mode 100644
index 0000000..96e5ebf
--- /dev/null
+++ b/LayoutTests/inspector/debugger-suspend-active-dom-objects.html
@@ -0,0 +1,45 @@
+<html>
+<head>
+<script src="../http/tests/inspector/inspector-test2.js"></script>
+<script src="../http/tests/inspector/debugger-test2.js"></script>
+<script>
+
+function testFunction() {
+    setTimeout("void 0", 0); // Create a timer that will be suspended on a breakpoint.
+    debugger;
+}
+
+function test()
+{
+    WebInspector.showPanel("scripts");
+    InspectorTest.startDebuggerTest(startDebuggerTestCallback);
+
+    function startDebuggerTestCallback()
+    {
+        InspectorTest.evaluateInConsole("setTimeout(testFunction, 0)", function(result) {
+            InspectorTest.addResult("Set timer for test function.");
+        });
+
+        InspectorTest.waitUntilPaused(function(callFrames) {
+            InspectorTest.evaluateInConsole("alert(1)", function(result) {
+                InspectorTest.addResult("Shown alert while staying on a breakpoint.");
+                InspectorTest.completeDebuggerTest();
+            });
+        });
+    }
+
+}
+
+</script>
+</head>
+
+<body onload="runTest()">
+<p>
+Tests that browser won't crash if user evaluates something in the console
+that would suspend active dom objects (e.g. if user attempts to show an alert)
+when script execution is paused on a breakpoint and all active dom objects
+are already suspended.
+</p>
+
+</body>
+</html>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index e857a34..b00d37b 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,15 @@
+2010-08-31  Yury Semikhatsky  <yurys at chromium.org>
+
+        Reviewed by Joseph Pecoraro.
+
+        Web Inspector: browser crashes on attempt to evaluate "alert(1)" while staying on a breakpoint
+        https://bugs.webkit.org/show_bug.cgi?id=44943
+
+        Test: inspector/debugger-suspend-active-dom-objects.html
+
+        * page/PageGroupLoadDeferrer.cpp:
+        (WebCore::PageGroupLoadDeferrer::PageGroupLoadDeferrer):
+
 2010-09-05  Kenneth Russell  <kbr at google.com>
 
         Reviewed by Darin Fisher.
diff --git a/WebCore/page/PageGroupLoadDeferrer.cpp b/WebCore/page/PageGroupLoadDeferrer.cpp
index a01422f..79554cf 100644
--- a/WebCore/page/PageGroupLoadDeferrer.cpp
+++ b/WebCore/page/PageGroupLoadDeferrer.cpp
@@ -39,14 +39,15 @@ PageGroupLoadDeferrer::PageGroupLoadDeferrer(Page* page, bool deferSelf)
     for (HashSet<Page*>::const_iterator it = pages.begin(); it != end; ++it) {
         Page* otherPage = *it;
         if ((deferSelf || otherPage != page)) {
-            if (!otherPage->defersLoading())
+            if (!otherPage->defersLoading()) {
                 m_deferredFrames.append(otherPage->mainFrame());
 
-            // This code is not logically part of load deferring, but we do not want JS code executed beneath modal
-            // windows or sheets, which is exactly when PageGroupLoadDeferrer is used.
-            for (Frame* frame = otherPage->mainFrame(); frame; frame = frame->tree()->traverseNext()) {
-                frame->document()->suspendActiveDOMObjects();
-                frame->document()->asyncScriptRunner()->suspend();
+                // This code is not logically part of load deferring, but we do not want JS code executed beneath modal
+                // windows or sheets, which is exactly when PageGroupLoadDeferrer is used.
+                for (Frame* frame = otherPage->mainFrame(); frame; frame = frame->tree()->traverseNext()) {
+                    frame->document()->suspendActiveDOMObjects();
+                    frame->document()->asyncScriptRunner()->suspend();
+                }
             }
         }
     }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list