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

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

Issue 14031: Fix for http://code.google.com/p/chromium/issues/detail?id=5409.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years 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 | « webkit/port/bindings/v8/v8_helpers.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/port/bindings/v8/v8_npobject.cpp
===================================================================
--- webkit/port/bindings/v8/v8_npobject.cpp (revision 6781)
+++ webkit/port/bindings/v8/v8_npobject.cpp (working copy)
@@ -29,6 +29,7 @@
#include "config.h"
+#include "v8_custom.h"
#include "v8_helpers.h"
#include "v8_npobject.h"
#include "v8_np_utils.h"
@@ -72,7 +73,8 @@
} else {
// The holder object is not a subtype of HTMLPlugInElement, it
// must be an NPObject which has three internal fields.
- if (args.Holder()->InternalFieldCount() != 3) {
+ if (args.Holder()->InternalFieldCount() !=
+ V8Custom::kNPObjectInternalFieldCount) {
V8Proxy::ThrowError(V8Proxy::REFERENCE_ERROR,
"NPMethod called on non-NPObject");
return v8::Undefined();
@@ -329,7 +331,8 @@
if (np_object_desc.IsEmpty()) {
np_object_desc =
v8::Persistent<v8::FunctionTemplate>::New(v8::FunctionTemplate::New());
- np_object_desc->InstanceTemplate()->SetInternalFieldCount(3);
+ np_object_desc->InstanceTemplate()->SetInternalFieldCount(
+ V8Custom::kNPObjectInternalFieldCount);
np_object_desc->InstanceTemplate()->SetNamedPropertyHandler(
NPObjectNamedPropertyGetter, NPObjectNamedPropertySetter);
np_object_desc->InstanceTemplate()->SetIndexedPropertyHandler(
« no previous file with comments | « webkit/port/bindings/v8/v8_helpers.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698