Changeset 53965 in webkit


Ignore:
Timestamp:
Jan 27, 2010 5:41:31 PM (14 years ago)
Author:
eric@webkit.org
Message:

2010-01-27 John Abd-El-Malek <jam@chromium.org>

Reviewed by Dimitri Glazkov.

Tests that when a page removes an iframe that sleeps in its unload handler and
terminates its JS execution, the outer page's JS continues running.

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

  • fast/dom/Window/slow-unload-handler-expected.txt: Copied from LayoutTests/fast/dom/Window/slow_unload_handler-expected.txt.
  • fast/dom/Window/slow-unload-handler-only-frame-is-stopped.html: Added.
  • fast/dom/Window/slow-unload-handler-only-frame-is-stopped-expected.txt: Added.
  • fast/dom/Window/slow-unload-handler.html: Copied from LayoutTests/fast/dom/Window/slow_unload_handler.html.
  • fast/dom/Window/slow_unload_handler-expected.txt: Removed.
  • fast/dom/Window/slow_unload_handler.html: Removed.
  • platform/gtk/Skipped:
  • platform/mac/Skipped:
  • platform/qt/Skipped:
  • platform/win/Skipped:

2010-01-27 John Abd-El-Malek <jam@chromium.org>

Reviewed by Dimitri Glazkov.

Tests that when a page removes an iframe that sleeps in its unload handler and
terminates its JS execution, the outer page's JS continues running.

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

Tests: fast/dom/Window/slow-unload-handler-only-frame-is-stopped.html

fast/dom/Window/slow-unload-handler.html

  • bindings/v8/DateExtension.cpp: (WebCore::DateExtension::OnSleepDetected):
Location:
trunk
Files:
1 added
7 edited
1 copied
2 moved

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r53964 r53965  
     12010-01-27  John Abd-El-Malek  <jam@chromium.org>
     2
     3        Reviewed by Dimitri Glazkov.
     4
     5        Tests that when a page removes an iframe that sleeps in its unload handler and
     6        terminates its JS execution, the outer page's JS continues running.
     7       
     8        https://bugs.webkit.org/show_bug.cgi?id=34226
     9
     10        * fast/dom/Window/slow-unload-handler-expected.txt: Copied from LayoutTests/fast/dom/Window/slow_unload_handler-expected.txt.
     11        * fast/dom/Window/slow-unload-handler-only-frame-is-stopped.html: Added.
     12        * fast/dom/Window/slow-unload-handler-only-frame-is-stopped-expected.txt: Added.
     13        * fast/dom/Window/slow-unload-handler.html: Copied from LayoutTests/fast/dom/Window/slow_unload_handler.html.
     14        * fast/dom/Window/slow_unload_handler-expected.txt: Removed.
     15        * fast/dom/Window/slow_unload_handler.html: Removed.
     16        * platform/gtk/Skipped:
     17        * platform/mac/Skipped:
     18        * platform/qt/Skipped:
     19        * platform/win/Skipped:
     20
    1212010-01-27  Kent Tamura  <tkent@chromium.org>
    222
  • trunk/LayoutTests/fast/dom/Window/slow-unload-handler-only-frame-is-stopped.html

    r53964 r53965  
    33<link rel="stylesheet" href="../../js/resources/js-test-style.css">
    44<script>
    5 
    65if (layoutTestController) {
    76    layoutTestController.waitUntilDone();
     
    1716}
    1817
    19 function loaded() {
    20     setTimeout("done()", 0);
    21     document.getElementById("theiframe").outerHTML='';
     18function removeFrame()
     19{
     20    var foo = document.getElementById('foo');
     21    foo.parentNode.removeChild(foo);
     22    done();
    2223}
    23 
    2424</script>
    25 </head>
    26 <body onload="setTimeout('loaded();', 0)">
     25<body>
    2726<p>
    28     This is a test for <a href="https://bugs.webkit.org/show_bug.cgi?id=29193">bug 29193</a>:
    29     <i>Need to prevent Javascript sleeps in unload handlers.</i> If successful, PASS should be printed below.
     27    This is a test for <a href="https://bugs.webkit.org/show_bug.cgi?id=34226">bug 34226</a>:
     28    <i>[v8]: Regression: onunload event handling</i>. If successful, PASS should be printed below.
    3029</p>
    3130<p id="results" class="pass"></p>
    32 <iframe id="theiframe" style="border: 0" src="resources/slow_unload_handler1.html">
     31<iframe id='foo' src="data:text/html,<body onunload='handleUnload()'><script>function handleUnload() {var now=new Date();var exitTime=now.getTime()+5000;while(true){now=new Date();if(now.getTime()>exitTime)break}}</script></body>" onload="removeFrame()"></iframe>
    3332</body>
    3433</html>
  • trunk/LayoutTests/platform/gtk/Skipped

    r53942 r53965  
    55985598
    55995599# This port doesn't support detecting slow unload handlers.
    5600 fast/dom/Window/slow_unload_handler.html
     5600fast/dom/Window/slow-unload-handler.html
     5601fast/dom/Window/slow-unload-handler-only-frame-is-stopped.html
    56015602
    56025603# Tests generating new results
  • trunk/LayoutTests/platform/mac/Skipped

    r53753 r53965  
    7474
    7575# This port doesn't support detecting slow unload handlers.
    76 fast/dom/Window/slow_unload_handler.html
     76fast/dom/Window/slow-unload-handler.html
     77fast/dom/Window/slow-unload-handler-only-frame-is-stopped.html
    7778
    7879# Skipped until we have a fix for <rdar://problem/6563117> WebKit should tell QuickTime to exclude the text importer
  • trunk/LayoutTests/platform/qt/Skipped

    r53956 r53965  
    48384838
    48394839# This port doesn't support detecting slow unload handlers.
    4840 fast/dom/Window/slow_unload_handler.html
     4840fast/dom/Window/slow-unload-handler.html
     4841fast/dom/Window/slow-unload-handler-only-frame-is-stopped.html
    48414842
    48424843# This port doesn't have a global history delegate yet
  • trunk/LayoutTests/platform/win/Skipped

    r53889 r53965  
    661661
    662662# This port doesn't support detecting slow unload handlers.
    663 fast/dom/Window/slow_unload_handler.html
     663fast/dom/Window/slow-unload-handler.html
     664fast/dom/Window/slow-unload-handler-only-frame-is-stopped.html
    664665
    665666# <https://bugs.webkit.org/show_bug.cgi?id=30348>
  • trunk/WebCore/ChangeLog

    r53964 r53965  
     12010-01-27  John Abd-El-Malek  <jam@chromium.org>
     2
     3        Reviewed by Dimitri Glazkov.
     4
     5        Tests that when a page removes an iframe that sleeps in its unload handler and
     6        terminates its JS execution, the outer page's JS continues running.
     7       
     8        https://bugs.webkit.org/show_bug.cgi?id=34226
     9
     10        Tests: fast/dom/Window/slow-unload-handler-only-frame-is-stopped.html
     11               fast/dom/Window/slow-unload-handler.html
     12
     13        * bindings/v8/DateExtension.cpp:
     14        (WebCore::DateExtension::OnSleepDetected):
     15
    1162010-01-27  Kent Tamura  <tkent@chromium.org>
    217
  • trunk/WebCore/bindings/v8/DateExtension.cpp

    r49949 r53965  
    117117v8::Handle<v8::Value> DateExtension::OnSleepDetected(const v8::Arguments&)
    118118{
    119     v8::V8::TerminateExecution();
     119    V8Proxy::throwError(V8Proxy::GeneralError, "Too much time spent in unload handler.");
    120120    return v8::Undefined();
    121121}
Note: See TracChangeset for help on using the changeset viewer.