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
+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.
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;