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

robert at webkit.org robert at webkit.org
Wed Dec 22 15:29:15 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 7206f092c20302b94e254e6ecc3285dfc99f15d5
Author: robert at webkit.org <robert at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Nov 4 20:41:43 2010 +0000

    2010-11-04  Robert Hogan  <robert at webkit.org>
    
            Reviewed by Darin Adler.
    
            Stale reference to JSDOMWindow in ScriptController::m_cacheableBindingObject
    
            Unskip fast/dom/nodesFromRect-basic.html on Qt.
    
            https://bugs.webkit.org/show_bug.cgi?id=48758
    
            * platform/qt/Skipped:
    2010-11-04  Robert Hogan  <robert at webkit.org>
    
            Reviewed by Darin Adler.
    
            Stale reference to JSDOMWindow in ScriptController::m_cacheableBindingObject
    
            After bug 37725 we need to update the globalObject() (i.e. JSDOMWindow)
            associated with the m_cacheablebindingRootObject every time we clear the
            frame and load a new page. This allows the runtime objects
            (e.g. LayoutTestController etc.) to persist between navigations as
            before but also ensures that when qt_runtime, or any other bridge,
            looks at the root->globalObject() of a cacheable binding object
            it gets the DOMWindow of the current page rather than the DOMWindow
            that was in place when m_cacheableBindingRootObject was created.
    
            Fixes fast/dom/nodesFromRect-basic.html on Qt.
    
            https://bugs.webkit.org/show_bug.cgi?id=48758
    
            * bindings/js/ScriptController.cpp:
            (WebCore::ScriptController::clearWindowShell):
            * bridge/runtime_root.cpp:
            (JSC::Bindings::RootObject::updateGlobalObject):
            * bridge/runtime_root.h:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71354 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 3707e8a..14a7ad5 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,15 @@
+2010-11-04  Robert Hogan  <robert at webkit.org>
+
+        Reviewed by Darin Adler.
+
+        Stale reference to JSDOMWindow in ScriptController::m_cacheableBindingObject
+
+        Unskip fast/dom/nodesFromRect-basic.html on Qt.
+
+        https://bugs.webkit.org/show_bug.cgi?id=48758
+
+        * platform/qt/Skipped:
+
 2010-11-04  Adam Roben  <aroben at apple.com>
 
         Add a timing-out test to the Windows Skipped file
diff --git a/LayoutTests/platform/qt/Skipped b/LayoutTests/platform/qt/Skipped
index 0017935..53922dd 100644
--- a/LayoutTests/platform/qt/Skipped
+++ b/LayoutTests/platform/qt/Skipped
@@ -5461,10 +5461,6 @@ fast/media/color-does-not-include-alpha.html
 # Requires WebP support.
 fast/images/webp-image-decoding.html
 
-# [Qt] DRT sideeffect revealed by r71004
-# https://bugs.webkit.org/show_bug.cgi?id=48758
-fast/dom/nodesFromRect-basic.html
-
 # [Qt] DRT sideeffect revealed by r71268
 # https://bugs.webkit.org/show_bug.cgi?id=48958
 svg/custom/text-zoom.xhtml
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index f70cca5..10f82fe 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,28 @@
+2010-11-04  Robert Hogan  <robert at webkit.org>
+
+        Reviewed by Darin Adler.
+
+        Stale reference to JSDOMWindow in ScriptController::m_cacheableBindingObject
+
+        After bug 37725 we need to update the globalObject() (i.e. JSDOMWindow)
+        associated with the m_cacheablebindingRootObject every time we clear the
+        frame and load a new page. This allows the runtime objects
+        (e.g. LayoutTestController etc.) to persist between navigations as
+        before but also ensures that when qt_runtime, or any other bridge,
+        looks at the root->globalObject() of a cacheable binding object
+        it gets the DOMWindow of the current page rather than the DOMWindow
+        that was in place when m_cacheableBindingRootObject was created.
+
+        Fixes fast/dom/nodesFromRect-basic.html on Qt.
+
+        https://bugs.webkit.org/show_bug.cgi?id=48758
+
+        * bindings/js/ScriptController.cpp:
+        (WebCore::ScriptController::clearWindowShell):
+        * bridge/runtime_root.cpp:
+        (JSC::Bindings::RootObject::updateGlobalObject):
+        * bridge/runtime_root.h:
+
 2010-11-04  Kenneth Rohde Christiansen  <kenneth at webkit.org>
 
         Reviewed by David Hyatt.
diff --git a/WebCore/bindings/js/ScriptController.cpp b/WebCore/bindings/js/ScriptController.cpp
index e03c822..cf55080 100644
--- a/WebCore/bindings/js/ScriptController.cpp
+++ b/WebCore/bindings/js/ScriptController.cpp
@@ -197,6 +197,11 @@ void ScriptController::clearWindowShell(bool goingIntoPageCache)
         windowShell->window()->willRemoveFromWindowShell();
         windowShell->setWindow(m_frame->domWindow());
 
+        // An m_cacheableBindingRootObject persists between page navigations
+        // so needs to know about the new JSDOMWindow.
+        if (m_cacheableBindingRootObject)
+            m_cacheableBindingRootObject->updateGlobalObject(windowShell->window());
+
         if (Page* page = m_frame->page()) {
             attachDebugger(windowShell, page->debugger());
             windowShell->window()->setProfileGroup(page->group().identifier());
diff --git a/WebCore/bridge/runtime_root.cpp b/WebCore/bridge/runtime_root.cpp
index 09fd43b..796354f 100644
--- a/WebCore/bridge/runtime_root.cpp
+++ b/WebCore/bridge/runtime_root.cpp
@@ -168,6 +168,11 @@ JSGlobalObject* RootObject::globalObject() const
     return m_globalObject;
 }
 
+void RootObject::updateGlobalObject(JSGlobalObject* globalObject)
+{
+    m_globalObject = globalObject;
+}
+
 void RootObject::addRuntimeObject(RuntimeObject* object)
 {
     ASSERT(m_isValid);
diff --git a/WebCore/bridge/runtime_root.h b/WebCore/bridge/runtime_root.h
index 04f382a..babd7ad 100644
--- a/WebCore/bridge/runtime_root.h
+++ b/WebCore/bridge/runtime_root.h
@@ -69,6 +69,7 @@ public:
 
     const void* nativeHandle() const;
     JSGlobalObject* globalObject() const;
+    void updateGlobalObject(JSGlobalObject*);
 
     void addRuntimeObject(RuntimeObject*);
     void removeRuntimeObject(RuntimeObject*);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list