summaryrefslogtreecommitdiffstats
path: root/WebCore/bindings/js/ScriptController.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/bindings/js/ScriptController.cpp')
-rw-r--r--WebCore/bindings/js/ScriptController.cpp5
1 files changed, 5 insertions, 0 deletions
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());