[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.21-584-g1e41756

eric at webkit.org eric at webkit.org
Fri Feb 26 22:18:40 UTC 2010


The following commit has been merged in the webkit-1.1 branch:
commit 8e1038ec82089f705ca04b7b0cef25d02e63aa03
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Feb 12 11:03:03 2010 +0000

    2010-02-12  Anton Muhin  <antonm at chromium.org>
    
            Reviewed by Adam Barth.
    
            [v8] handle to the document can only own Objects, not Values
            https://bugs.webkit.org/show_bug.cgi?id=34854
    
            * bindings/v8/V8DOMWindowShell.cpp:
            (WebCore::V8DOMWindowShell::updateDocumentWrapper):
            (WebCore::V8DOMWindowShell::updateDocumentWrapperCache):
            * bindings/v8/V8DOMWindowShell.h:
            * bindings/v8/custom/V8DocumentCustom.cpp:
            (WebCore::toV8):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54718 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 1f6ffd7..7de2f80 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,17 @@
+2010-02-12  Anton Muhin  <antonm at chromium.org>
+
+        Reviewed by Adam Barth.
+
+        [v8] handle to the document can only own Objects, not Values
+        https://bugs.webkit.org/show_bug.cgi?id=34854
+
+        * bindings/v8/V8DOMWindowShell.cpp:
+        (WebCore::V8DOMWindowShell::updateDocumentWrapper):
+        (WebCore::V8DOMWindowShell::updateDocumentWrapperCache):
+        * bindings/v8/V8DOMWindowShell.h:
+        * bindings/v8/custom/V8DocumentCustom.cpp:
+        (WebCore::toV8):
+
 2010-02-12  Simon Hausmann  <simon.hausmann at nokia.com>
 
         Reviewed by Holger Freyther.
diff --git a/WebCore/bindings/v8/V8DOMWindowShell.cpp b/WebCore/bindings/v8/V8DOMWindowShell.cpp
index f50c8d3..b059999 100644
--- a/WebCore/bindings/v8/V8DOMWindowShell.cpp
+++ b/WebCore/bindings/v8/V8DOMWindowShell.cpp
@@ -383,12 +383,12 @@ bool V8DOMWindowShell::installDOMWindow(v8::Handle<v8::Context> context, DOMWind
     return true;
 }
 
-void V8DOMWindowShell::updateDocumentWrapper(v8::Handle<v8::Value> wrapper)
+void V8DOMWindowShell::updateDocumentWrapper(v8::Handle<v8::Object> wrapper)
 {
     clearDocumentWrapper();
 
     ASSERT(m_document.IsEmpty());
-    m_document = v8::Persistent<v8::Value>::New(wrapper);
+    m_document = v8::Persistent<v8::Object>::New(wrapper);
 #ifndef NDEBUG
     V8GCController::registerGlobalHandle(PROXY, this, m_document);
 #endif
@@ -430,6 +430,7 @@ void V8DOMWindowShell::updateDocumentWrapperCache()
         clearDocumentWrapperCache();
         return;
     }
+    ASSERT(documentWrapper->IsObject());
     m_context->Global()->ForceSet(v8::String::New("document"), documentWrapper, static_cast<v8::PropertyAttribute>(v8::ReadOnly | v8::DontDelete));
 }
 
diff --git a/WebCore/bindings/v8/V8DOMWindowShell.h b/WebCore/bindings/v8/V8DOMWindowShell.h
index 3d30161..5114f7a 100644
--- a/WebCore/bindings/v8/V8DOMWindowShell.h
+++ b/WebCore/bindings/v8/V8DOMWindowShell.h
@@ -63,7 +63,7 @@ public:
     static bool installDOMWindow(v8::Handle<v8::Context> context, DOMWindow*);
 
     void initContextIfNeeded();
-    void updateDocumentWrapper(v8::Handle<v8::Value> wrapper);
+    void updateDocumentWrapper(v8::Handle<v8::Object> wrapper);
 
     void clearForNavigation();
     void clearForClose();
@@ -113,7 +113,7 @@ private:
 
     v8::Persistent<v8::Context> m_context;
     v8::Persistent<v8::Object> m_global;
-    v8::Persistent<v8::Value> m_document;
+    v8::Persistent<v8::Object> m_document;
 };
 
 } // namespace WebCore
diff --git a/WebCore/bindings/v8/custom/V8DocumentCustom.cpp b/WebCore/bindings/v8/custom/V8DocumentCustom.cpp
index 81b7aeb..e744881 100644
--- a/WebCore/bindings/v8/custom/V8DocumentCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8DocumentCustom.cpp
@@ -146,7 +146,7 @@ v8::Handle<v8::Value> toV8(Document* impl, bool forceNewObject)
     if (impl->isSVGDocument())
         return toV8(static_cast<SVGDocument*>(impl), forceNewObject);
 #endif
-    v8::Handle<v8::Value> wrapper = V8Document::wrap(impl, forceNewObject);
+    v8::Handle<v8::Object> wrapper = V8Document::wrap(impl, forceNewObject);
     if (wrapper.IsEmpty())
         return wrapper;
     if (!V8IsolatedContext::getEntered()) {

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list