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

Unified Diff: Source/bindings/core/v8/WrapperTypeInfo.h

Issue 670483003: Remove an unnecessary reinterpret_cast from a persistent to an handle (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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/ScriptProfiler.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/core/v8/WrapperTypeInfo.h
diff --git a/Source/bindings/core/v8/WrapperTypeInfo.h b/Source/bindings/core/v8/WrapperTypeInfo.h
index 49715ac4b9f6e93833ae9d0e9f6b8a1a536561e3..d4a9acc5859bbdf7805ed8cd2aed6a6aa38a6968 100644
--- a/Source/bindings/core/v8/WrapperTypeInfo.h
+++ b/Source/bindings/core/v8/WrapperTypeInfo.h
@@ -208,6 +208,11 @@ inline T* getInternalField(v8::Handle<v8::Object> wrapper)
return static_cast<T*>(wrapper->GetAlignedPointerFromInternalField(offset));
}
+inline ScriptWrappableBase* toScriptWrappableBase(const v8::Persistent<v8::Object>& wrapper)
+{
+ return getInternalField<ScriptWrappableBase, v8DOMWrapperObjectIndex>(wrapper);
+}
+
inline ScriptWrappableBase* toScriptWrappableBase(v8::Handle<v8::Object> wrapper)
{
return getInternalField<ScriptWrappableBase, v8DOMWrapperObjectIndex>(wrapper);
« no previous file with comments | « Source/bindings/core/v8/ScriptProfiler.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698