[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.15.1-1414-gc69ee75

eric at webkit.org eric at webkit.org
Thu Oct 29 20:34:17 UTC 2009


The following commit has been merged in the webkit-1.1 branch:
commit 7d959a09d339519b2ecbf7f52610f7184a7b23da
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Sep 25 16:36:57 2009 +0000

    2009-09-25  Adam Barth  <abarth at webkit.org>
    
            Reviewed by Dimitri Glazkov.
    
            [V8] Teach ScheduledAction::execute about isolated worlds
            https://bugs.webkit.org/show_bug.cgi?id=27703
    
            Test a strange error condition after clearing a setInterval
            timer.  The key point is not to crash on this test.
    
            * fast/dom/timer-clear-interval-in-handler-and-generate-error-expected.txt: Added.
            * fast/dom/timer-clear-interval-in-handler-and-generate-error.html: Added.
    2009-09-25  Adam Barth  <abarth at webkit.org>
    
            Reviewed by Dimitri Glazkov.
    
            [V8] Teach ScheduledAction::execute about isolated worlds
            https://bugs.webkit.org/show_bug.cgi?id=27703
    
            When setTimeout is called with a string argument in an isolated
            world, we now compile the string in the isolated world.
    
            Last time we tried this change, we got a lot of crashes.  This
            time we're using a fresh local handle as our context to avoid
            trouble if the peristent handle gets disposed before we leave
            the context.
    
            Test: fast/dom/timer-clear-interval-in-handler-and-generate-error.html
    
            * bindings/v8/ScheduledAction.cpp:
            (WebCore::ScheduledAction::execute):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48759 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index f0b1630..f209f18 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,16 @@
+2009-09-25  Adam Barth  <abarth at webkit.org>
+
+        Reviewed by Dimitri Glazkov.
+
+        [V8] Teach ScheduledAction::execute about isolated worlds
+        https://bugs.webkit.org/show_bug.cgi?id=27703
+
+        Test a strange error condition after clearing a setInterval
+        timer.  The key point is not to crash on this test.
+
+        * fast/dom/timer-clear-interval-in-handler-and-generate-error-expected.txt: Added.
+        * fast/dom/timer-clear-interval-in-handler-and-generate-error.html: Added.
+
 2009-09-24  Simon Fraser  <simon.fraser at apple.com>
 
         Reviewed by Dan Bernstein.
diff --git a/LayoutTests/fast/dom/timer-clear-interval-in-handler-and-generate-error-expected.txt b/LayoutTests/fast/dom/timer-clear-interval-in-handler-and-generate-error-expected.txt
new file mode 100644
index 0000000..c380917
--- /dev/null
+++ b/LayoutTests/fast/dom/timer-clear-interval-in-handler-and-generate-error-expected.txt
@@ -0,0 +1,2 @@
+CONSOLE MESSAGE: line 10: Error: NOT_FOUND_ERR: DOM Exception 8
+
diff --git a/LayoutTests/fast/dom/timer-clear-interval-in-handler-and-generate-error.html b/LayoutTests/fast/dom/timer-clear-interval-in-handler-and-generate-error.html
new file mode 100644
index 0000000..5be669a
--- /dev/null
+++ b/LayoutTests/fast/dom/timer-clear-interval-in-handler-and-generate-error.html
@@ -0,0 +1,25 @@
+<script>
+if (window.layoutTestController) {
+  layoutTestController.dumpAsText()
+  layoutTestController.waitUntilDone();
+}
+
+function log(msg) {
+  var elmt = document.createElement("div");
+  elmt.textContent = msg;
+  document.body.appendChild(msg);
+}
+
+var timer = setInterval(function() {
+  clearInterval(timer);
+  setTimeout(function() {
+    if (window.layoutTestController)
+      layoutTestController.notifyDone();
+  }, 10);
+
+  // This function tries to appendChild to body, but body doesn't exist
+  // yet, generating an error.  This test passes if we don't crash when
+  // trying to add the error message to the console.
+  log("PASS");
+}, 10);
+</script>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index f2fbeed..b9911ec 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,23 @@
+2009-09-25  Adam Barth  <abarth at webkit.org>
+
+        Reviewed by Dimitri Glazkov.
+
+        [V8] Teach ScheduledAction::execute about isolated worlds
+        https://bugs.webkit.org/show_bug.cgi?id=27703
+
+        When setTimeout is called with a string argument in an isolated
+        world, we now compile the string in the isolated world.
+
+        Last time we tried this change, we got a lot of crashes.  This
+        time we're using a fresh local handle as our context to avoid
+        trouble if the peristent handle gets disposed before we leave
+        the context.
+
+        Test: fast/dom/timer-clear-interval-in-handler-and-generate-error.html
+
+        * bindings/v8/ScheduledAction.cpp:
+        (WebCore::ScheduledAction::execute):
+
 2009-09-25  Paul Godavari  <paul at chromium.org>
 
         Reviewed by Darin Fisher.
diff --git a/WebCore/bindings/v8/ScheduledAction.cpp b/WebCore/bindings/v8/ScheduledAction.cpp
index 3188eb6..4f321cb 100644
--- a/WebCore/bindings/v8/ScheduledAction.cpp
+++ b/WebCore/bindings/v8/ScheduledAction.cpp
@@ -107,8 +107,7 @@ void ScheduledAction::execute(V8Proxy* proxy)
     ASSERT(proxy);
 
     v8::HandleScope handleScope;
-    // FIXME: Figure out why using m_context instead of proxy->context() here causes crashes in V8Proxy::getEnteredContext();
-    v8::Handle<v8::Context> v8Context = proxy->context();
+    v8::Handle<v8::Context> v8Context = v8::Local<v8::Context>::New(m_context.get());
     if (v8Context.IsEmpty())
         return; // JS may not be enabled.
 
@@ -136,8 +135,7 @@ void ScheduledAction::execute(WorkerContext* workerContext)
 
     if (!m_function.IsEmpty() && m_function->IsFunction()) {
         v8::HandleScope handleScope;
-        // FIXME: Figure out why using m_context instead of proxy->context() here causes crashes in V8Proxy::getEnteredContext();
-        v8::Handle<v8::Context> v8Context = scriptController->proxy()->context();
+        v8::Handle<v8::Context> v8Context = v8::Local<v8::Context>::New(m_context.get());
         ASSERT(!v8Context.IsEmpty());
         v8::Context::Scope scope(v8Context);
         m_function->Call(v8Context->Global(), m_argc, m_argv);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list