Commit 03b6c020 authored by Hitoshi Yoshida's avatar Hitoshi Yoshida Committed by Commit Bot

CodeGen: Do not break included header files in code generators

We, in team, agreed not to break include header file paths written in
code generator.  Breaking them makes it difficult to find or sort lines.

Bug: 839389
Change-Id: I882d9bd37fa85bd1359933757e491c4db65a7971
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2026560Reviewed-by: default avatarYuki Shiino <yukishiino@chromium.org>
Commit-Queue: Hitoshi Yoshida <peria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#736266}
parent 0dda86a2
......@@ -102,16 +102,17 @@ def collect_include_headers_of_idl_types(idl_types):
if idl_type.is_numeric or idl_type.is_boolean or idl_type.is_typedef:
pass
elif idl_type.is_string:
header_paths.add("third_party/blink/renderer/"
"platform/wtf/text/wtf_string.h")
header_paths.add(
"third_party/blink/renderer/platform/wtf/text/wtf_string.h")
elif idl_type.is_buffer_source_type:
header_paths.add("third_party/blink/renderer/core/typed_arrays/"
"dom_typed_array.h")
header_paths.add(
"third_party/blink/renderer/core/typed_arrays/dom_typed_array.h"
)
header_paths.add(
"third_party/blink/renderer/platform/heap/handle.h")
elif idl_type.is_object or idl_type.is_any:
header_paths.add("third_party/blink/renderer/"
"bindings/core/v8/script_value.h")
header_paths.add(
"third_party/blink/renderer/bindings/core/v8/script_value.h")
elif idl_type.type_definition_object:
header_paths.add(
"third_party/blink/renderer/platform/heap/handle.h")
......@@ -119,13 +120,13 @@ def collect_include_headers_of_idl_types(idl_types):
header_paths.add(PathManager(type_def_obj).api_path(ext="h"))
elif (idl_type.is_sequence or idl_type.is_frozen_array
or idl_type.is_variadic or idl_type.is_record):
header_paths.add("third_party/blink/renderer/"
"platform/wtf/vector.h")
header_paths.add("third_party/blink/renderer/"
"platform/heap/heap_allocator.h")
header_paths.add(
"third_party/blink/renderer/platform/wtf/vector.h")
header_paths.add(
"third_party/blink/renderer/platform/heap/heap_allocator.h")
elif idl_type.is_promise:
header_paths.add("third_party/blink/renderer/"
"bindings/core/v8/script_promise.h")
header_paths.add(
"third_party/blink/renderer/bindings/core/v8/script_promise.h")
elif idl_type.is_union:
union_def_obj = idl_type.union_definition_object
header_paths.add(PathManager(union_def_obj).api_path(ext="h"))
......
......@@ -671,8 +671,7 @@ def generate_dictionary(dictionary):
"Visitor",
])
source_node.accumulator.add_include_headers([
"third_party/blink/renderer/bindings/core/v8/"
"native_value_traits_impl.h",
"third_party/blink/renderer/bindings/core/v8/native_value_traits_impl.h",
"third_party/blink/renderer/platform/bindings/exception_messages.h",
"third_party/blink/renderer/platform/bindings/exception_state.h",
"third_party/blink/renderer/platform/bindings/v8_per_isolate_data.h",
......
......@@ -678,8 +678,7 @@ def make_cooperative_scheduling_safepoint(cg_context):
"->Safepoint();")
node.accumulate(
CodeGenAccumulator.require_include_headers([
"third_party/blink/renderer/platform/scheduler/public/"
"cooperative_scheduling_manager.h"
"third_party/blink/renderer/platform/scheduler/public/cooperative_scheduling_manager.h"
]))
return node
......@@ -726,10 +725,8 @@ def make_log_activity(cg_context):
node = TextNode(_format(pattern, _1=cond, _2=body))
node.accumulate(
CodeGenAccumulator.require_include_headers([
"third_party/blink/renderer/"
"platform/bindings/v8_dom_activity_logger.h",
"third_party/blink/renderer/"
"platform/bindings/v8_per_context_data.h",
"third_party/blink/renderer/platform/bindings/v8_dom_activity_logger.h",
"third_party/blink/renderer/platform/bindings/v8_per_context_data.h",
]))
return node
......@@ -1168,8 +1165,7 @@ def make_steps_of_ce_reactions(cg_context):
nodes.accumulate(
CodeGenAccumulator.require_include_headers([
"third_party/blink/renderer/core/html/custom/ce_reactions_scope.h",
"third_party/blink/renderer/core/html/custom/"
"v0_custom_element_processing_stack.h"
"third_party/blink/renderer/core/html/custom/v0_custom_element_processing_stack.h"
]))
return nodes
......@@ -3069,11 +3065,9 @@ def generate_interface(interface):
component_export_header(impl_component),
])
impl_source_node.accumulator.add_include_headers([
"third_party/blink/renderer/bindings/core/v8/"
"native_value_traits_impl.h",
"third_party/blink/renderer/bindings/core/v8/native_value_traits_impl.h",
"third_party/blink/renderer/bindings/core/v8/v8_dom_configuration.h",
"third_party/blink/renderer/bindings/core/v8/"
"v8_set_return_value_for_core.h",
"third_party/blink/renderer/bindings/core/v8/v8_set_return_value_for_core.h",
"third_party/blink/renderer/platform/bindings/exception_messages.h",
"third_party/blink/renderer/platform/bindings/runtime_call_stats.h",
"third_party/blink/renderer/platform/bindings/v8_binding.h",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment