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

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

Issue 1961883002: Generate separate files for union type containers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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: third_party/WebKit/Source/bindings/scripts/utilities.py
diff --git a/third_party/WebKit/Source/bindings/scripts/utilities.py b/third_party/WebKit/Source/bindings/scripts/utilities.py
index 23708876cfcbfe13ffc376823fc778c054f598b0..945138c09b1fde9c075eef531fa7adb8ed26b814 100644
--- a/third_party/WebKit/Source/bindings/scripts/utilities.py
+++ b/third_party/WebKit/Source/bindings/scripts/utilities.py
@@ -88,7 +88,7 @@ class ComponentInfoProvider(object):
return set()
@property
- def include_path_for_union_types(self):
+ def include_path_for_union_types(self, name):
return None
@@ -118,9 +118,8 @@ class ComponentInfoProviderCore(ComponentInfoProvider):
def union_types(self):
return self._component_info['union_types']
- @property
- def include_path_for_union_types(self):
- return 'bindings/core/v8/UnionTypesCore.h'
+ def include_path_for_union_types(self, name):
+ return 'bindings/core/v8/%s.h' % name
@property
def specifier_for_export(self):
@@ -165,9 +164,12 @@ class ComponentInfoProviderModules(ComponentInfoProvider):
# generating multiple container generation.
return self._component_info_modules['union_types'] - self._component_info_core['union_types']
- @property
- def include_path_for_union_types(self):
- return 'bindings/modules/v8/UnionTypesModules.h'
+ def include_path_for_union_types(self, name):
+ core_union_type_names = [union_type.name for union_type
+ in self._component_info_core['union_types']]
+ if name in core_union_type_names:
+ return 'bindings/core/v8/%s.h' % name
+ return 'bindings/modules/v8/%s.h' % name
@property
def specifier_for_export(self):

Powered by Google App Engine
This is Rietveld 408576698