Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(782)

Unified Diff: webkit/port/bindings/v8/V8NPObject.cpp

Issue 56167: Second part of fix of issue http://code.google.com/p/chromium/issues/detail?i... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/port/bindings/v8/V8NPObject.cpp
===================================================================
--- webkit/port/bindings/v8/V8NPObject.cpp (revision 12862)
+++ webkit/port/bindings/v8/V8NPObject.cpp (working copy)
@@ -104,6 +104,13 @@
case INVOKE_DEFAULT:
if (npobject->_class->invokeDefault)
npobject->_class->invokeDefault(npobject, npArgs, argc, &result);
+ // The call might be a construct call on an NPObject.
+ // See http://code.google.com/p/chromium/issues/detail?id=3285
+ //
+ // TODO: when V8 passes in the correct flag args.is_construct_call_,
+ // make a separate NPN_Construct case.
+ else if (npobject->_class->construct)
+ npobject->_class->construct(npobject, npArgs, argc, &result);
break;
default:
break;
@@ -174,7 +181,11 @@
v8::Handle<v8::Value> rv = convertNPVariantToV8Object(&result, npobject);
NPN_ReleaseVariantValue(&result);
return rv;
- } else if (key->IsString() && npobject->_class->hasMethod && npobject->_class->hasMethod(npobject, ident)) {
+
+ } else if (key->IsString() &&
+ npobject->_class->hasMethod &&
+ npobject->_class->hasMethod(npobject, ident)) {
+
PrivateIdentifier* id = static_cast<PrivateIdentifier*>(ident);
v8::Persistent<v8::FunctionTemplate> desc = static_template_map.get(id);
// Cache templates using identifier as the key.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698