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

Unified Diff: Source/bindings/core/v8/NPV8Object.cpp

Issue 456683002: bindings: Introduces type-check for the internal pointers. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Synced. Created 6 years, 4 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 | « Source/bindings/core/v8/NPV8Object.h ('k') | Source/bindings/core/v8/ScriptWrappable.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/core/v8/NPV8Object.cpp
diff --git a/Source/bindings/core/v8/NPV8Object.cpp b/Source/bindings/core/v8/NPV8Object.cpp
index 2713a73b59f37236f54110740957ca815beca5c5..c398d129e9b440839b77c9a11be5580264315834 100644
--- a/Source/bindings/core/v8/NPV8Object.cpp
+++ b/Source/bindings/core/v8/NPV8Object.cpp
@@ -112,7 +112,7 @@ static v8::Local<v8::String> npIdentifierToV8Identifier(NPIdentifier name, v8::I
NPObject* v8ObjectToNPObject(v8::Handle<v8::Object> object)
{
- return reinterpret_cast<NPObject*>(object->GetAlignedPointerFromInternalField(v8DOMWrapperObjectIndex));
+ return reinterpret_cast<NPObject*>(toInternalPointer(object));
}
bool isWrappedNPObject(v8::Handle<v8::Object> object)
@@ -177,6 +177,11 @@ V8NPObject* npObjectToV8NPObject(NPObject* npObject)
return v8NpObject;
}
+ScriptWrappableBase* npObjectToInternalPointer(NPObject* npObject)
+{
+ return reinterpret_cast<ScriptWrappableBase*>(npObject);
+}
+
void disposeUnderlyingV8Object(NPObject* npObject, v8::Isolate* isolate)
{
ASSERT(npObject);
« no previous file with comments | « Source/bindings/core/v8/NPV8Object.h ('k') | Source/bindings/core/v8/ScriptWrappable.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698