Commit 19e418b5 authored by eric@webkit.org's avatar eric@webkit.org

2010-02-09 Anton Muhin <antonm@chromium.org>

        Reviewed by Nate Chapin.

        [v8] Check if returned wrapper is empty before operating on it.
        https://bugs.webkit.org/show_bug.cgi?id=34746

        * bindings/v8/custom/V8DocumentCustom.cpp:
        (WebCore::toV8):
        * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
        (WebCore::toV8):
        * bindings/v8/custom/V8SVGDocumentCustom.cpp:
        (WebCore::toV8):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54581 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 6cf0f98c
2010-02-09 Anton Muhin <antonm@chromium.org>
Reviewed by Nate Chapin.
[v8] Check if returned wrapper is empty before operating on it.
https://bugs.webkit.org/show_bug.cgi?id=34746
* bindings/v8/custom/V8DocumentCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8HTMLDocumentCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8SVGDocumentCustom.cpp:
(WebCore::toV8):
2010-02-09 Mikhail Naganov <mnaganov@chromium.org>
Reviewed by Pavel Feldman.
......
......@@ -145,6 +145,8 @@ v8::Handle<v8::Value> toV8(Document* impl, bool forceNewObject)
if (impl->isSVGDocument())
return toV8(static_cast<SVGDocument*>(impl), forceNewObject);
v8::Handle<v8::Value> wrapper = V8Document::wrap(impl, forceNewObject);
if (wrapper.IsEmpty())
return wrapper;
if (!V8IsolatedContext::getEntered()) {
if (V8Proxy* proxy = V8Proxy::retrieve(impl->frame()))
proxy->windowShell()->updateDocumentWrapper(wrapper);
......
......@@ -204,6 +204,8 @@ v8::Handle<v8::Value> toV8(HTMLDocument* impl, bool forceNewObject)
if (!impl)
return v8::Null();
v8::Handle<v8::Object> wrapper = V8HTMLDocument::wrap(impl, forceNewObject);
if (wrapper.IsEmpty())
return wrapper;
if (!V8IsolatedContext::getEntered()) {
if (V8Proxy* proxy = V8Proxy::retrieve(impl->frame()))
proxy->windowShell()->updateDocumentWrapper(wrapper);
......
......@@ -41,6 +41,8 @@ v8::Handle<v8::Value> toV8(SVGDocument* impl, bool forceNewObject)
if (!impl)
return v8::Null();
v8::Handle<v8::Object> wrapper = V8SVGDocument::wrap(impl, forceNewObject);
if (wrapper.IsEmpty())
return wrapper;
if (!V8IsolatedContext::getEntered()) {
if (V8Proxy* proxy = V8Proxy::retrieve(impl->frame()))
proxy->windowShell()->updateDocumentWrapper(wrapper);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment