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

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

Issue 525353002: [oilpan]: optimize the way we allocate persistent handles in wrappers. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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
Index: Source/bindings/core/v8/V8DOMWrapper.h
diff --git a/Source/bindings/core/v8/V8DOMWrapper.h b/Source/bindings/core/v8/V8DOMWrapper.h
index fcf2519daaac35c47393c9d31709d87edade0fd8..91ef7863e9520f59f479f8509f2ec1b5f3a6bda0 100644
--- a/Source/bindings/core/v8/V8DOMWrapper.h
+++ b/Source/bindings/core/v8/V8DOMWrapper.h
@@ -60,7 +60,7 @@ public:
static v8::Handle<v8::Object> associateObjectWithWrapperNonTemplate(Node*, const WrapperTypeInfo*, v8::Handle<v8::Object>, v8::Isolate*, WrapperConfiguration::Lifetime);
static void setNativeInfo(v8::Handle<v8::Object>, const WrapperTypeInfo*, ScriptWrappableBase* internalPointer);
static void setNativeInfoForHiddenWrapper(v8::Handle<v8::Object>, const WrapperTypeInfo*, ScriptWrappableBase* internalPointer);
- static void setNativeInfoWithPersistentHandle(v8::Handle<v8::Object>, const WrapperTypeInfo*, ScriptWrappableBase* internalPointer, PersistentNode*);
+ static void setNativeInfoWithPersistentHandle(v8::Handle<v8::Object>, const WrapperTypeInfo*, ScriptWrappableBase* internalPointer, WrapperPersistentNode*);
static void clearNativeInfo(v8::Handle<v8::Object>, const WrapperTypeInfo*);
static bool isDOMWrapper(v8::Handle<v8::Value>);
@@ -104,7 +104,7 @@ inline void V8DOMWrapper::setNativeInfoForHiddenWrapper(v8::Handle<v8::Object> w
wrapper->SetAlignedPointerInInternalField(v8DOMWrapperTypeIndex, const_cast<WrapperTypeInfo*>(wrapperTypeInfo));
}
-inline void V8DOMWrapper::setNativeInfoWithPersistentHandle(v8::Handle<v8::Object> wrapper, const WrapperTypeInfo* wrapperTypeInfo, ScriptWrappableBase* internalPointer, PersistentNode* handle)
+inline void V8DOMWrapper::setNativeInfoWithPersistentHandle(v8::Handle<v8::Object> wrapper, const WrapperTypeInfo* wrapperTypeInfo, ScriptWrappableBase* internalPointer, WrapperPersistentNode* handle)
{
ASSERT(wrapper->InternalFieldCount() >= 3);
ASSERT(internalPointer);
@@ -143,7 +143,7 @@ inline v8::Handle<v8::Object> V8DOMWrapper::associateObjectWithWrapper(PassRefPt
template<typename V8T, typename T>
inline v8::Handle<v8::Object> V8DOMWrapper::associateObjectWithWrapper(T* object, const WrapperTypeInfo* wrapperTypeInfo, v8::Handle<v8::Object> wrapper, v8::Isolate* isolate, WrapperConfiguration::Lifetime lifetime)
{
- setNativeInfoWithPersistentHandle(wrapper, wrapperTypeInfo, V8T::toInternalPointer(object), new Persistent<T>(object));
+ setNativeInfoWithPersistentHandle(wrapper, wrapperTypeInfo, V8T::toInternalPointer(object), new WrapperPersistent<T>(object));
ASSERT(isDOMWrapper(wrapper));
WrapperConfiguration configuration = buildWrapperConfiguration(object, lifetime);
DOMDataStore::setWrapper<V8T>(object, wrapper, isolate, configuration);

Powered by Google App Engine
This is Rietveld 408576698