Changeset 84328 in webkit


Ignore:
Timestamp:
Apr 19, 2011 7:12:51 PM (13 years ago)
Author:
rolandsteiner@chromium.org
Message:

2011-04-19 Dominic Cooney <dominicc@chromium.org>

Reviewed by Dimitri Glazkov.

Check the type of the wrapper when unwrapping NPObjects to native
Ranges and Elements
https://bugs.webkit.org/show_bug.cgi?id=58957

  • src/WebBindings.cpp: (WebKit::getRangeImpl): check HasInstance (WebKit::getElementImpl): check HasInstance
Location:
trunk/Source/WebKit/chromium
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/chromium/ChangeLog

    r84276 r84328  
     12011-04-19  Dominic Cooney  <dominicc@chromium.org>
     2
     3        Reviewed by Dimitri Glazkov.
     4
     5        Check the type of the wrapper when unwrapping NPObjects to native
     6        Ranges and Elements
     7        https://bugs.webkit.org/show_bug.cgi?id=58957
     8
     9        * src/WebBindings.cpp:
     10        (WebKit::getRangeImpl): check HasInstance
     11        (WebKit::getElementImpl): check HasInstance
     12
    1132011-04-19  Evan Martin  <evan@chromium.org>
    214
  • trunk/Source/WebKit/chromium/src/WebBindings.cpp

    r82469 r84328  
    213213        return false;
    214214
    215     Range* native = V8Range::toNative(v8Object);
     215    Range* native = V8Range::HasInstance(v8Object) ? V8Range::toNative(v8Object) : 0;
    216216    if (!native)
    217217        return false;
     
    228228    V8NPObject* v8NPObject = reinterpret_cast<V8NPObject*>(object);
    229229    v8::Handle<v8::Object> v8Object(v8NPObject->v8Object);
    230     Element* native = V8Element::toNative(v8Object);
     230    Element* native = V8Element::HasInstance(v8Object) ? V8Element::toNative(v8Object) : 0;
    231231    if (!native)
    232232        return false;
Note: See TracChangeset for help on using the changeset viewer.