Changeset 54581 in webkit


Ignore:
Timestamp:
Feb 9, 2010 7:09:25 PM (14 years ago)
Author:
eric@webkit.org
Message:

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):
Location:
trunk/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r54576 r54581  
     12010-02-09  Anton Muhin  <antonm@chromium.org>
     2
     3        Reviewed by Nate Chapin.
     4
     5        [v8] Check if returned wrapper is empty before operating on it.
     6        https://bugs.webkit.org/show_bug.cgi?id=34746
     7
     8        * bindings/v8/custom/V8DocumentCustom.cpp:
     9        (WebCore::toV8):
     10        * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
     11        (WebCore::toV8):
     12        * bindings/v8/custom/V8SVGDocumentCustom.cpp:
     13        (WebCore::toV8):
     14
    1152010-02-09  Mikhail Naganov  <mnaganov@chromium.org>
    216
  • trunk/WebCore/bindings/v8/custom/V8DocumentCustom.cpp

    r54305 r54581  
    146146        return toV8(static_cast<SVGDocument*>(impl), forceNewObject);
    147147    v8::Handle<v8::Value> wrapper = V8Document::wrap(impl, forceNewObject);
     148    if (wrapper.IsEmpty())
     149        return wrapper;
    148150    if (!V8IsolatedContext::getEntered()) {
    149151        if (V8Proxy* proxy = V8Proxy::retrieve(impl->frame()))
  • trunk/WebCore/bindings/v8/custom/V8HTMLDocumentCustom.cpp

    r54305 r54581  
    205205        return v8::Null();
    206206    v8::Handle<v8::Object> wrapper = V8HTMLDocument::wrap(impl, forceNewObject);
     207    if (wrapper.IsEmpty())
     208        return wrapper;
    207209    if (!V8IsolatedContext::getEntered()) {
    208210        if (V8Proxy* proxy = V8Proxy::retrieve(impl->frame()))
  • trunk/WebCore/bindings/v8/custom/V8SVGDocumentCustom.cpp

    r54153 r54581  
    4242        return v8::Null();
    4343    v8::Handle<v8::Object> wrapper = V8SVGDocument::wrap(impl, forceNewObject);
     44    if (wrapper.IsEmpty())
     45        return wrapper;
    4446    if (!V8IsolatedContext::getEntered()) {
    4547        if (V8Proxy* proxy = V8Proxy::retrieve(impl->frame()))
Note: See TracChangeset for help on using the changeset viewer.