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

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

Issue 390223004: initialize result variables in v8 bindings (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 5 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/templates/attributes.cpp ('k') | Source/bindings/tests/results/V8TestObject.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/templates/methods.cpp
diff --git a/Source/bindings/templates/methods.cpp b/Source/bindings/templates/methods.cpp
index 0918767796fc51e16f7dd3a0045a19c6ccfea0c7..01d6d34d61b78071db018573cfcef93af9d5aafe 100644
--- a/Source/bindings/templates/methods.cpp
+++ b/Source/bindings/templates/methods.cpp
@@ -247,7 +247,7 @@ Document& document = *toDocument(currentExecutionContext(info.GetIsolate()));
{% if method.idl_type == 'void' %}
{{cpp_value}};
{% elif method.is_implemented_in_private_script %}
-{{method.cpp_type}} result;
+{{method.cpp_type}} result{% if method.cpp_type == 'int' %} = 0{% endif %};
haraken 2014/07/15 15:13:25 method.cpp_type == 'int' is a bit too hacky. Can
if (!{{method.cpp_value}})
return;
{% elif method.is_constructor %}
« no previous file with comments | « Source/bindings/templates/attributes.cpp ('k') | Source/bindings/tests/results/V8TestObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698