diff options
Diffstat (limited to 'WebCore/bindings/v8/V8DOMWindowShell.cpp')
-rw-r--r-- | WebCore/bindings/v8/V8DOMWindowShell.cpp | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/WebCore/bindings/v8/V8DOMWindowShell.cpp b/WebCore/bindings/v8/V8DOMWindowShell.cpp index 99fea4c..c7c77d3 100644 --- a/WebCore/bindings/v8/V8DOMWindowShell.cpp +++ b/WebCore/bindings/v8/V8DOMWindowShell.cpp @@ -50,7 +50,6 @@ #include "V8DOMWindow.h" #include "V8Document.h" #include "V8GCForContextDispose.h" -#include "V8HTMLDocument.h" #include "V8HiddenPropertyName.h" #include "V8History.h" #include "V8Location.h" @@ -415,12 +414,6 @@ void V8DOMWindowShell::clearDocumentWrapper() } } -static void checkDocumentWrapper(v8::Handle<v8::Object> wrapper, Document* document) -{ - ASSERT(V8Document::toNative(wrapper) == document); - ASSERT(!document->isHTMLDocument() || (V8Document::toNative(v8::Handle<v8::Object>::Cast(wrapper->GetPrototype())) == document)); -} - void V8DOMWindowShell::updateDocumentWrapperCache() { v8::HandleScope handleScope; @@ -439,10 +432,6 @@ void V8DOMWindowShell::updateDocumentWrapperCache() } v8::Handle<v8::Value> documentWrapper = toV8(m_frame->document()); - ASSERT(documentWrapper == m_document || m_document.IsEmpty()); - if (m_document.IsEmpty()) - updateDocumentWrapper(v8::Handle<v8::Object>::Cast(documentWrapper)); - checkDocumentWrapper(m_document, m_frame->document()); // If instantiation of the document wrapper fails, clear the cache // and let the DOMWindow accessor handle access to the document. @@ -520,39 +509,6 @@ void V8DOMWindowShell::updateDocument() updateSecurityOrigin(); } -v8::Handle<v8::Value> getter(v8::Local<v8::String> property, const v8::AccessorInfo& info) -{ - // FIXME(antonm): consider passing AtomicStringImpl directly. - AtomicString name = v8StringToAtomicWebCoreString(property); - HTMLDocument* htmlDocument = V8HTMLDocument::toNative(info.Holder()); - ASSERT(htmlDocument); - return V8HTMLDocument::GetNamedProperty(htmlDocument, name); -} - -void V8DOMWindowShell::namedItemAdded(HTMLDocument* doc, const AtomicString& name) -{ - initContextIfNeeded(); - - v8::HandleScope handleScope; - v8::Context::Scope contextScope(m_context); - - ASSERT(!m_document.IsEmpty()); - checkDocumentWrapper(m_document, doc); - m_document->SetAccessor(v8String(name), getter); -} - -void V8DOMWindowShell::namedItemRemoved(HTMLDocument* doc, const AtomicString& name) -{ - initContextIfNeeded(); - - v8::HandleScope handleScope; - v8::Context::Scope contextScope(m_context); - - ASSERT(!m_document.IsEmpty()); - checkDocumentWrapper(m_document, doc); - m_document->Delete(v8String(name)); -} - void V8DOMWindowShell::updateSecurityOrigin() { v8::HandleScope scope; |