summaryrefslogtreecommitdiffstats
path: root/webkit/port/bindings/v8/v8_proxy.h
diff options
context:
space:
mode:
authorfqian@google.com <fqian@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-13 23:00:41 +0000
committerfqian@google.com <fqian@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-13 23:00:41 +0000
commit7a64bcecf1febf468f3eaa39695a11e72d24b5dc (patch)
treeb48f82e05098ad25e61c91abe5d238b38c24729e /webkit/port/bindings/v8/v8_proxy.h
parentde0db991e70385acee6bec418c7f0a72e147f20e (diff)
downloadchromium_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/v8_proxy.h')
-rw-r--r--webkit/port/bindings/v8/v8_proxy.h17
1 files changed, 4 insertions, 13 deletions
diff --git a/webkit/port/bindings/v8/v8_proxy.h b/webkit/port/bindings/v8/v8_proxy.h
index 3f69153..4a1aa9f 100644
--- a/webkit/port/bindings/v8/v8_proxy.h
+++ b/webkit/port/bindings/v8/v8_proxy.h
@@ -164,11 +164,11 @@ class V8Proxy {
// Clear page-specific data, but keep the global object identify.
void clearForNavigation();
- // Clear data before closing the frame.
+ // Clear page-specific data before shutting down the proxy object.
void clearForClose();
- // Notify that a new DOMWindow object is ready.
- void domWindowReady();
+ // Update document object of the frame.
+ void updateDocument();
// Destroy the global object.
void DestroyGlobal();
@@ -189,9 +189,6 @@ class V8Proxy {
bool isEnabled();
- // Remove 'document' property from the global object.
- void clearDocumentWrapper();
-
// Find/Create/Remove event listener wrappers.
PassRefPtr<V8EventListener> FindV8EventListener(v8::Local<v8::Value> listener,
bool html);
@@ -421,6 +418,7 @@ class V8Proxy {
private:
void initContextIfNeeded();
void DisconnectEventListeners();
+ void SetSecurityToken();
static bool CanAccessPrivate(DOMWindow* target);
@@ -484,10 +482,6 @@ class V8Proxy {
static const char* GetSVGExceptionName(int exception_code);
#endif
- // Update m_document field, dispose old one and create a string reference
- // to the new one.
- void UpdateDocumentHandle(v8::Local<v8::Object> handle);
-
// Returns a local handle of the context.
v8::Local<v8::Context> GetContext() {
return v8::Local<v8::Context>::New(m_context);
@@ -497,9 +491,6 @@ class V8Proxy {
v8::Persistent<v8::Context> m_context;
v8::Persistent<v8::Object> m_global;
- // Special handling of document wrapper;
- v8::Persistent<v8::Object> m_document;
-
int m_handlerLineno;
// A list of event listeners created for this frame,