Commit a67879c5 authored by japhet@chromium.org's avatar japhet@chromium.org

2010-03-02 Nate Chapin <japhet@chromium.org>

        Reviewed by Dimitri Glazkov.

        [V8] Fail gracefully if NPN_GetProperty tries to retrieve a property that doesn't exist.

        https://bugs.webkit.org/show_bug.cgi?id=35588

        Required for passing LayoutTests/plugins/netscape-plugin-property-access-exception.html on Chromium.

        * bindings/v8/NPV8Object.cpp:
        (_NPN_GetProperty): If the result is empty, don't try to convert it to an NPVariant and return false.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55417 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent f2d96631
2010-03-02 Nate Chapin <japhet@chromium.org>
Reviewed by Dimitri Glazkov.
[V8] Fail gracefully if NPN_GetProperty tries to retrieve a property that doesn't exist.
https://bugs.webkit.org/show_bug.cgi?id=35588
Required for passing LayoutTests/plugins/netscape-plugin-property-access-exception.html on Chromium.
* bindings/v8/NPV8Object.cpp:
(_NPN_GetProperty): If the result is empty, don't try to convert it to an NPVariant and return false.
2010-03-02 Jian Li <jianli@chromium.org>
Reviewed by Nate Chapin.
......
......@@ -299,6 +299,9 @@ bool _NPN_GetProperty(NPP npp, NPObject* npObject, NPIdentifier propertyName, NP
v8::Handle<v8::Object> obj(object->v8Object);
v8::Local<v8::Value> v8result = obj->Get(npIdentifierToV8Identifier(propertyName));
if (v8result.IsEmpty())
return false;
convertV8ObjectToNPVariant(v8result, npObject, result);
return true;
......
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