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

Side by Side Diff: Source/bindings/templates/interface.cpp

Issue 556823003: Revert "Revert of [oilpan]: optimize the way we allocate persistent handles in wrappers. (patchset … (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: review feedback Created 6 years, 3 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 unified diff | Download patch
OLDNEW
1 {% extends 'interface_base.cpp' %} 1 {% extends 'interface_base.cpp' %}
2 2
3 3
4 {##############################################################################} 4 {##############################################################################}
5 {% block constructor_getter %} 5 {% block constructor_getter %}
6 {% if has_constructor_attributes %} 6 {% if has_constructor_attributes %}
7 static void {{cpp_class}}ConstructorGetter(v8::Local<v8::String>, const v8::Prop ertyCallbackInfo<v8::Value>& info) 7 static void {{cpp_class}}ConstructorGetter(v8::Local<v8::String>, const v8::Prop ertyCallbackInfo<v8::Value>& info)
8 { 8 {
9 v8::Handle<v8::Value> data = info.Data(); 9 v8::Handle<v8::Value> data = info.Data();
10 ASSERT(data->IsExternal()); 10 ASSERT(data->IsExternal());
(...skipping 1228 matching lines...) Expand 10 before | Expand all | Expand 10 after
1239 { 1239 {
1240 {% if gc_type == 'WillBeGarbageCollectedObject' %} 1240 {% if gc_type == 'WillBeGarbageCollectedObject' %}
1241 #if !ENABLE(OILPAN) 1241 #if !ENABLE(OILPAN)
1242 internalPointer->toImpl<{{cpp_class}}>()->deref(); 1242 internalPointer->toImpl<{{cpp_class}}>()->deref();
1243 #endif 1243 #endif
1244 {% elif gc_type == 'RefCountedObject' %} 1244 {% elif gc_type == 'RefCountedObject' %}
1245 internalPointer->toImpl<{{cpp_class}}>()->deref(); 1245 internalPointer->toImpl<{{cpp_class}}>()->deref();
1246 {% endif %} 1246 {% endif %}
1247 } 1247 }
1248 1248
1249 PersistentNode* {{v8_class}}::createPersistentHandle(ScriptWrappableBase* intern alPointer) 1249 WrapperPersistentNode* {{v8_class}}::createPersistentHandle(ScriptWrappableBase* internalPointer)
1250 { 1250 {
1251 {% if gc_type == 'GarbageCollectedObject' %} 1251 {% if gc_type == 'GarbageCollectedObject' %}
1252 return new Persistent<{{cpp_class}}>(internalPointer->toImpl<{{cpp_class}}>( )); 1252 return WrapperPersistent<{{cpp_class}}>::create(internalPointer->toImpl<{{cp p_class}}>());
1253 {% elif gc_type == 'WillBeGarbageCollectedObject' %} 1253 {% elif gc_type == 'WillBeGarbageCollectedObject' %}
1254 #if ENABLE(OILPAN) 1254 #if ENABLE(OILPAN)
1255 return new Persistent<{{cpp_class}}>(internalPointer->toImpl<{{cpp_class}}>( )); 1255 return WrapperPersistent<{{cpp_class}}>::create(internalPointer->toImpl<{{cp p_class}}>());
1256 #else 1256 #else
1257 ASSERT_NOT_REACHED(); 1257 ASSERT_NOT_REACHED();
1258 return 0; 1258 return 0;
1259 #endif 1259 #endif
1260 {% elif gc_type == 'RefCountedObject' %} 1260 {% elif gc_type == 'RefCountedObject' %}
1261 ASSERT_NOT_REACHED(); 1261 ASSERT_NOT_REACHED();
1262 return 0; 1262 return 0;
1263 {% endif %} 1263 {% endif %}
1264 } 1264 }
1265 1265
1266 template<> 1266 template<>
1267 v8::Handle<v8::Value> toV8NoInline({{cpp_class}}* impl, v8::Handle<v8::Object> c reationContext, v8::Isolate* isolate) 1267 v8::Handle<v8::Value> toV8NoInline({{cpp_class}}* impl, v8::Handle<v8::Object> c reationContext, v8::Isolate* isolate)
1268 { 1268 {
1269 return toV8(impl, creationContext, isolate); 1269 return toV8(impl, creationContext, isolate);
1270 } 1270 }
1271 1271
1272 {% endblock %} 1272 {% endblock %}
OLDNEW
« no previous file with comments | « Source/bindings/templates/interface.h ('k') | Source/bindings/tests/results/V8SVGTestInterface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698