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

Unified Diff: webkit/port/bindings/v8/np_v8object.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 | « no previous file | webkit/port/bindings/v8/v8_custom.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/port/bindings/v8/np_v8object.cpp
===================================================================
--- webkit/port/bindings/v8/np_v8object.cpp (revision 6781)
+++ webkit/port/bindings/v8/np_v8object.cpp (working copy)
@@ -38,12 +38,14 @@
#include "npruntime_priv.h"
#include "PlatformString.h"
#include "ScriptController.h"
+#include "v8_custom.h"
#include "v8_helpers.h"
#include "v8_np_utils.h"
#include "v8_proxy.h"
#include "DOMWindow.h"
using WebCore::V8ClassIndex;
+using WebCore::V8Custom;
using WebCore::V8Proxy;
namespace {
@@ -100,9 +102,10 @@
NPObject* NPN_CreateScriptObject(NPP npp, v8::Handle<v8::Object> object,
WebCore::DOMWindow* root) {
// Check to see if this object is already wrapped.
- if (object->InternalFieldCount() == 3 &&
- object->GetInternalField(1)->IsNumber() &&
- object->GetInternalField(1)->Uint32Value() == V8ClassIndex::NPOBJECT) {
+ if (object->InternalFieldCount() == V8Custom::kNPObjectInternalFieldCount &&
+ object->GetInternalField(V8Custom::kDOMWrapperTypeIndex)->IsNumber() &&
+ object->GetInternalField(V8Custom::kDOMWrapperTypeIndex)->Uint32Value() ==
+ V8ClassIndex::NPOBJECT) {
NPObject* rv = V8Proxy::ToNativeObject<NPObject>(V8ClassIndex::NPOBJECT,
object);
NPN_RetainObject(rv);
« no previous file with comments | « no previous file | webkit/port/bindings/v8/v8_custom.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698