diff options
author | fqian@google.com <fqian@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-13 23:00:41 +0000 |
---|---|---|
committer | fqian@google.com <fqian@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-13 23:00:41 +0000 |
commit | 7a64bcecf1febf468f3eaa39695a11e72d24b5dc (patch) | |
tree | b48f82e05098ad25e61c91abe5d238b38c24729e /webkit/port/bindings/v8/ScriptController.cpp | |
parent | de0db991e70385acee6bec418c7f0a72e147f20e (diff) | |
download | chromium_src-7a64bcecf1febf468f3eaa39695a11e72d24b5dc.zip chromium_src-7a64bcecf1febf468f3eaa39695a11e72d24b5dc.tar.gz chromium_src-7a64bcecf1febf468f3eaa39695a11e72d24b5dc.tar.bz2 |
Clean up the proxy code for handling frame navigation.
When a frame navigates to a new page, the old context handle is disposed, and the global proxy object is detached from
the old context. A new context is created using the global proxy object. However, the security token is not created
because, at this point, the security origin is not updated to new URL.
When the new document is ready, V8Proxy updates the security token using the security origin of the document.
Our code relies on the fact that ScriptController::clearWindowShell be called only when the frame loads a page, but not at closing time.
Review URL: http://codereview.chromium.org/10687
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5396 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/port/bindings/v8/ScriptController.cpp')
-rw-r--r-- | webkit/port/bindings/v8/ScriptController.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/webkit/port/bindings/v8/ScriptController.cpp b/webkit/port/bindings/v8/ScriptController.cpp index 60af17f..6521a4d 100644 --- a/webkit/port/bindings/v8/ScriptController.cpp +++ b/webkit/port/bindings/v8/ScriptController.cpp @@ -323,11 +323,6 @@ void ScriptController::finishedWithEvent(Event* evt) m_proxy->finishedWithEvent(evt); } -void ScriptController::clearDocumentWrapper() -{ - m_proxy->clearDocumentWrapper(); -} - // Create a V8 object with an interceptor of NPObjectPropertyGetter void ScriptController::BindToWindowObject(Frame* frame, const String& key, NPObject* object) { @@ -512,6 +507,9 @@ NPObject* ScriptController::createScriptObjectForPluginElement(HTMLPlugInElement void ScriptController::clearWindowShell() { + // V8 binding expects ScriptController::clearWindowShell only be called + // when a frame is loading a new page. V8Proxy::clearForNavigation + // creates a new context for the new page. m_proxy->clearForNavigation(); } @@ -522,9 +520,7 @@ void ScriptController::attachDebugger(void*) void ScriptController::updateDocument() { - // TODO(eseidel): Should update document property on current window object - // and all previous window objects which may still be alive. - notImplemented(); + m_proxy->updateDocument(); } |