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

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

Issue 1557363002: Remove the WEB_AUDIO compile time flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 | third_party/WebKit/Source/build/features.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/bindings/scripts/code_generator_v8.py
diff --git a/third_party/WebKit/Source/bindings/scripts/code_generator_v8.py b/third_party/WebKit/Source/bindings/scripts/code_generator_v8.py
index a08c3acfde1e98b45a7f669ae60c62ebe552442f..07f723352f3463504e20cf4ae9a8937407c32070 100644
--- a/third_party/WebKit/Source/bindings/scripts/code_generator_v8.py
+++ b/third_party/WebKit/Source/bindings/scripts/code_generator_v8.py
@@ -83,12 +83,22 @@ from v8_utilities import capitalize, cpp_name, conditional_string, v8_class_name
from utilities import KNOWN_COMPONENTS, idl_filename_to_component, is_valid_component_dependency, is_testing_target
+def normalize_and_sort_includes(include_paths):
+ normalized_include_paths = []
+ for include_path in include_paths:
+ match = re.search(r'/gen/blink/(.*)$', posixpath.abspath(include_path))
+ if match:
+ include_path = match.group(1)
+ normalized_include_paths.append(include_path)
+ return sorted(normalized_include_paths)
+
+
def render_template(include_paths, header_template, cpp_template,
template_context, component=None):
template_context['code_generator'] = module_pyname
# Add includes for any dependencies
- template_context['header_includes'] = sorted(
+ template_context['header_includes'] = normalize_and_sort_includes(
template_context['header_includes'])
for include_path in include_paths:
@@ -97,7 +107,7 @@ def render_template(include_paths, header_template, cpp_template,
assert is_valid_component_dependency(component, dependency)
includes.add(include_path)
- template_context['cpp_includes'] = sorted(includes)
+ template_context['cpp_includes'] = normalize_and_sort_includes(includes)
header_text = header_template.render(template_context)
cpp_text = cpp_template.render(template_context)
@@ -372,7 +382,7 @@ class CodeGeneratorUnionType(object):
additional_header_includes.append(
'bindings/core/v8/UnionTypesCore.h')
- template_context['header_includes'] = sorted(
+ template_context['header_includes'] = normalize_and_sort_includes(
template_context['header_includes'] + additional_header_includes)
header_text = header_template.render(template_context)
« no previous file with comments | « no previous file | third_party/WebKit/Source/build/features.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698