Changeset 54718 in webkit


Ignore:
Timestamp:
Feb 12, 2010 3:03:03 AM (14 years ago)
Author:
eric@webkit.org
Message:

2010-02-12 Anton Muhin <antonm@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):
Location:
trunk/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r54716 r54718  
     12010-02-12  Anton Muhin  <antonm@chromium.org>
     2
     3        Reviewed by Adam Barth.
     4
     5        [v8] handle to the document can only own Objects, not Values
     6        https://bugs.webkit.org/show_bug.cgi?id=34854
     7
     8        * bindings/v8/V8DOMWindowShell.cpp:
     9        (WebCore::V8DOMWindowShell::updateDocumentWrapper):
     10        (WebCore::V8DOMWindowShell::updateDocumentWrapperCache):
     11        * bindings/v8/V8DOMWindowShell.h:
     12        * bindings/v8/custom/V8DocumentCustom.cpp:
     13        (WebCore::toV8):
     14
    1152010-02-12  Simon Hausmann  <simon.hausmann@nokia.com>
    216
  • trunk/WebCore/bindings/v8/V8DOMWindowShell.cpp

    r54629 r54718  
    384384}
    385385
    386 void V8DOMWindowShell::updateDocumentWrapper(v8::Handle<v8::Value> wrapper)
     386void V8DOMWindowShell::updateDocumentWrapper(v8::Handle<v8::Object> wrapper)
    387387{
    388388    clearDocumentWrapper();
    389389
    390390    ASSERT(m_document.IsEmpty());
    391     m_document = v8::Persistent<v8::Value>::New(wrapper);
     391    m_document = v8::Persistent<v8::Object>::New(wrapper);
    392392#ifndef NDEBUG
    393393    V8GCController::registerGlobalHandle(PROXY, this, m_document);
     
    431431        return;
    432432    }
     433    ASSERT(documentWrapper->IsObject());
    433434    m_context->Global()->ForceSet(v8::String::New("document"), documentWrapper, static_cast<v8::PropertyAttribute>(v8::ReadOnly | v8::DontDelete));
    434435}
  • trunk/WebCore/bindings/v8/V8DOMWindowShell.h

    r54349 r54718  
    6464
    6565    void initContextIfNeeded();
    66     void updateDocumentWrapper(v8::Handle<v8::Value> wrapper);
     66    void updateDocumentWrapper(v8::Handle<v8::Object> wrapper);
    6767
    6868    void clearForNavigation();
     
    114114    v8::Persistent<v8::Context> m_context;
    115115    v8::Persistent<v8::Object> m_global;
    116     v8::Persistent<v8::Value> m_document;
     116    v8::Persistent<v8::Object> m_document;
    117117};
    118118
  • trunk/WebCore/bindings/v8/custom/V8DocumentCustom.cpp

    r54650 r54718  
    147147        return toV8(static_cast<SVGDocument*>(impl), forceNewObject);
    148148#endif
    149     v8::Handle<v8::Value> wrapper = V8Document::wrap(impl, forceNewObject);
     149    v8::Handle<v8::Object> wrapper = V8Document::wrap(impl, forceNewObject);
    150150    if (wrapper.IsEmpty())
    151151        return wrapper;
Note: See TracChangeset for help on using the changeset viewer.