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

Unified Diff: Source/bindings/templates/attributes.cpp

Issue 176763009: Have DOMWindow deal with references instead of pointers when possible (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 10 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/templates/attributes.cpp
diff --git a/Source/bindings/templates/attributes.cpp b/Source/bindings/templates/attributes.cpp
index 0cd34be6b84c5db36644981eb38a9f3fdd019a39..61b84d78d3567b74907623946f91cb21869426cc 100644
--- a/Source/bindings/templates/attributes.cpp
+++ b/Source/bindings/templates/attributes.cpp
@@ -98,7 +98,7 @@ const v8::PropertyCallbackInfo<v8::Value>& info
{# v8SetReturnValue #}
{% if attribute.is_keep_alive_for_gc %}
{# FIXME: merge local variable assignment with above #}
- {{attribute.cpp_type}} result = {{attribute.cpp_value}};
+ {{attribute.cpp_type}} result({{attribute.cpp_value}});
if (result && DOMDataStore::setReturnValueFromWrapper{{world_suffix}}<{{attribute.v8_type}}>(info.GetReturnValue(), result.get()))
return;
v8::Handle<v8::Value> wrapper = toV8(result.get(), info.Holder(), info.GetIsolate());
@@ -213,7 +213,7 @@ v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info
{% endif %}
{% if attribute.put_forwards %}
{{cpp_class}}* proxyImp = {{v8_class}}::toNative(info.Holder());
- {{attribute.idl_type}}* imp = proxyImp->{{attribute.name}}();
+ {{attribute.idl_type}}* imp = WTF::getPtr(proxyImp->{{attribute.name}}());
if (!imp)
return;
{% elif not attribute.is_static %}
« no previous file with comments | « Source/bindings/scripts/v8_interface.py ('k') | Source/bindings/tests/results/V8TestInterfaceEventConstructor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698