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

Unified Diff: Source/bindings/scripts/code_generator_v8.py

Issue 299203002: Support per-overload [RuntimeEnabled] extended attribute (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: move comment Created 6 years, 6 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/scripts/code_generator_v8.py
diff --git a/Source/bindings/scripts/code_generator_v8.py b/Source/bindings/scripts/code_generator_v8.py
index d6b89f599ee9c823f1d9e34324f5b8565dbb909e..778a87ec79b9d11b1959bd6d4f80820616e90b29 100644
--- a/Source/bindings/scripts/code_generator_v8.py
+++ b/Source/bindings/scripts/code_generator_v8.py
@@ -187,8 +187,9 @@ def runtime_enabled_if(code, runtime_enabled_function_name):
return code
# Indent if statement to level of original code
indent = re.match(' *', code).group(0)
- return ('%sif (%s())\n' % (indent, runtime_enabled_function_name) +
- ' %s' % code)
+ return ('%sif (%s()) {\n' % (indent, runtime_enabled_function_name) +
+ ' %s\n' % '\n '.join(code.splitlines()) +
+ '%s}\n' % indent)
################################################################################
« no previous file with comments | « no previous file | Source/bindings/scripts/v8_interface.py » ('j') | Source/bindings/tests/results/V8TestObject.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698