Skip to content
Permalink
Browse files
2010-03-04 John Abd-El-Malek <jam@chromium.org>
        Reviewed by Adam Barth.

        Fix incorrect setup of DateExtension.
        https://bugs.webkit.org/show_bug.cgi?id=35710

        * fast/dom/Window/resources/slow_unload_handler1.html:
2010-03-04  John Abd-El-Malek  <jam@chromium.org>

        Reviewed by Adam Barth.

        Fix incorrect setup of DateExtension.
        https://bugs.webkit.org/show_bug.cgi?id=35710

        * bindings/v8/DateExtension.cpp:
        (WebCore::DateExtension::setAllowSleep):

Canonical link: https://commits.webkit.org/46810@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@55513 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
eseidel committed Mar 4, 2010
1 parent 28dcef8 commit 75467bc8f500cb7bced0f032e9027fbf8b092a9e
Showing 4 changed files with 46 additions and 5 deletions.
@@ -1,3 +1,12 @@
2010-03-04 John Abd-El-Malek <jam@chromium.org>

Reviewed by Adam Barth.

Fix incorrect setup of DateExtension.
https://bugs.webkit.org/show_bug.cgi?id=35710

* fast/dom/Window/resources/slow_unload_handler1.html:

2010-03-04 Oliver Hunt <oliver@apple.com>

Reviewed by Maciej Stachowiak.
@@ -1,8 +1,13 @@
<html>
<head>
<script>
function pause(milliseconds) {
window.addEventListener('unload', nopause1, false);
window.addEventListener('unload', nopause2, false);
window.addEventListener('unload', pause, false);

function pause() {
var now = new Date();
var exitTime = now.getTime() + milliseconds;
var exitTime = now.getTime() + 10000;
while (true) {
now = new Date();
if (now.getTime() > exitTime)
@@ -12,7 +17,24 @@
if (layoutTestController)
layoutTestController.notifyDone();
}

function nopause() {
try {
var time1 = (new Date()).getTime();
} catch(e) {
parent.document.getElementById("results").appendChild(document.createTextNode("FAIL"));
if (layoutTestController)
layoutTestController.notifyDone();
}
}
function nopause1() {
nopause();
}

function nopause2() {
nopause();
}
</script>
<body onunload="pause(10000);">
</body>
</head>
<body></body>
</html>
@@ -1,3 +1,13 @@
2010-03-04 John Abd-El-Malek <jam@chromium.org>

Reviewed by Adam Barth.

Fix incorrect setup of DateExtension.
https://bugs.webkit.org/show_bug.cgi?id=35710

* bindings/v8/DateExtension.cpp:
(WebCore::DateExtension::setAllowSleep):

2010-03-04 Oliver Hunt <oliver@apple.com>

Reviewed by Maciej Stachowiak.
@@ -88,7 +88,7 @@ void DateExtension::setAllowSleep(bool allow)
return;

v8::Handle<v8::Value> argv[1];
argv[0] = v8::String::New(allow ? "false" : "true");
argv[0] = v8::Boolean::New(!allow);
v8::Handle<v8::Function>::Cast(sleepFunctionHandle)->Call(v8::Object::New(), 1, argv);
}

0 comments on commit 75467bc

Please sign in to comment.