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

Unified Diff: Source/bindings/templates/attributes.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 | « no previous file | Source/bindings/templates/methods.cpp » ('j') | Source/bindings/templates/methods.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/templates/attributes.cpp
diff --git a/Source/bindings/templates/attributes.cpp b/Source/bindings/templates/attributes.cpp
index 6b0335abbe8629bf4ae923e71abd154bfdc13ed6..ac1c3457d83ffe56a887676c97e165895aef33d3 100644
--- a/Source/bindings/templates/attributes.cpp
+++ b/Source/bindings/templates/attributes.cpp
@@ -50,7 +50,7 @@ const v8::PropertyCallbackInfo<v8::Value>& info
bool isNull = false;
{% endif %}
{% if attribute.is_implemented_in_private_script %}
- {{attribute.cpp_type}} result;
+ {{attribute.cpp_type}} result{% if attribute.cpp_type == 'int' %} = 0{% endif %};
if (!{{attribute.cpp_value_original}})
return;
{% elif attribute.cpp_value_original %}
« no previous file with comments | « no previous file | Source/bindings/templates/methods.cpp » ('j') | Source/bindings/templates/methods.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698