[Webkit-unassigned] [Bug 48758] [Qt] DRT sideeffect revealed by r71004

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Nov 2 16:50:00 PDT 2010


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





--- Comment #11 from Robert Hogan <robert at webkit.org>  2010-11-02 16:50:00 PST ---
Looking at it a bit more this isn't the real fix.

The problem is that after bug 37725 we need to update the globalObject() (i.e. JSDOMWindow) associated with the cached bindingRootObject 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 looks at root->globalObject() it's referring to the DOMWindow of the current page.

--- a/WebCore/bindings/js/ScriptController.cpp
+++ b/WebCore/bindings/js/ScriptController.cpp
@@ -197,6 +198,9 @@ void ScriptController::clearWindowShell(bool goingIntoPageCache)
         windowShell->window()->willRemoveFromWindowShell();
         windowShell->setWindow(m_frame->domWindow());

+        if (m_cacheableBindingRootObject)
+            m_cacheableBindingRootObject->setGlobalObject(windowShell->window());
+
         if (Page* page = m_frame->page()) {
             attachDebugger(windowShell, page->debugger());
             windowShell->window()->setProfileGroup(page->group().identifier());

Hopefully this will still be right tomorrow - but that's what it looks like now, and it certainly fixes the DRT sideeffect as well as allowing the tests in 37725 to continue to pass.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list