diff options
author | ager@chromium.org <ager@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-08 14:24:51 +0000 |
---|---|---|
committer | ager@chromium.org <ager@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-08 14:24:51 +0000 |
commit | 101f7fa7fa30edd654c53268d000d53364d680bd (patch) | |
tree | 4d585a15850d60fb567e80fc26dab85ea79b6727 /webkit/port | |
parent | 310d22f2945c901d8a68413382ce05b5c8d5b85d (diff) | |
download | chromium_src-101f7fa7fa30edd654c53268d000d53364d680bd.zip chromium_src-101f7fa7fa30edd654c53268d000d53364d680bd.tar.gz chromium_src-101f7fa7fa30edd654c53268d000d53364d680bd.tar.bz2 |
Revert r17853. Causes debug mode layout test failures.
TBR=kasperl@chromium.org
Review URL: http://codereview.chromium.org/119307
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17858 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/port')
-rw-r--r-- | webkit/port/bindings/v8/v8_proxy.cpp | 33 | ||||
-rw-r--r-- | webkit/port/bindings/v8/v8_proxy.h | 6 |
2 files changed, 4 insertions, 35 deletions
diff --git a/webkit/port/bindings/v8/v8_proxy.cpp b/webkit/port/bindings/v8/v8_proxy.cpp index e5db30c..85b963f 100644 --- a/webkit/port/bindings/v8/v8_proxy.cpp +++ b/webkit/port/bindings/v8/v8_proxy.cpp @@ -1791,24 +1791,6 @@ void V8Proxy::ClearDocumentWrapper() } -void V8Proxy::UpdateDocumentWrapperCache() -{ - v8::HandleScope handle_scope; - v8::Context::Scope context_scope(GetContext()); - v8::Handle<v8::Value> document_wrapper = NodeToV8Object(m_frame->document()); - m_context->Global()->ForceSet(v8::String::New("document"), - document_wrapper, - static_cast<v8::PropertyAttribute>(v8::ReadOnly | v8::DontDelete)); -} - - -void V8Proxy::ClearDocumentWrapperCache() -{ - ASSERT(!m_context.IsEmpty()); - m_context->Global()->ForceDelete(v8::String::New("document")); -} - - void V8Proxy::DisposeContextHandles() { if (!m_context.IsEmpty()) { m_context.Dispose(); @@ -1854,11 +1836,6 @@ void V8Proxy::clearForNavigation() v8::Context::Scope context_scope(m_context); - // Clear the document wrapper cache before turning on access checks on - // the old DOMWindow wrapper. This way, access to the document wrapper - // will be protected by the security checks on the DOMWindow wrapper. - ClearDocumentWrapperCache(); - // Turn on access check on the old DOMWindow wrapper. v8::Handle<v8::Object> wrapper = LookupDOMWrapper(V8ClassIndex::DOMWINDOW, m_global); @@ -1923,10 +1900,10 @@ void V8Proxy::updateDocument() return; } - // We have a new document and we need to update the cache. - UpdateDocumentWrapperCache(); - - updateSecurityOrigin(); + { + v8::HandleScope scope; + SetSecurityToken(); + } } void V8Proxy::updateSecurityOrigin() @@ -2204,8 +2181,6 @@ void V8Proxy::InitContextIfNeeded() v8::Handle<v8::Object> v8_global = context->Global(); v8_global->Set(implicit_proto_string, js_window); - updateDocument(); - SetSecurityToken(); m_frame->loader()->dispatchWindowObjectAvailable(); diff --git a/webkit/port/bindings/v8/v8_proxy.h b/webkit/port/bindings/v8/v8_proxy.h index 8538705..a00c5f9 100644 --- a/webkit/port/bindings/v8/v8_proxy.h +++ b/webkit/port/bindings/v8/v8_proxy.h @@ -502,12 +502,6 @@ class V8Proxy { void SetSecurityToken(); void ClearDocumentWrapper(); void UpdateDocumentWrapper(v8::Handle<v8::Value> wrapper); - // The JavaScript wrapper for the document object is cached on the global - // object for fast access. UpdateDocumentWrapperCache sets the wrapper - // for the current document on the global object. ClearDocumentWrapperCache - // deletes the document wrapper from the global object. - void UpdateDocumentWrapperCache(); - void ClearDocumentWrapperCache(); // Dispose global handles of m_contexts and friends. void DisposeContextHandles(); |