Chromium Code Reviews| 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..8ff49dfc524d2ba0898857986cbbe61bdb6e04ae 100644 |
| --- a/third_party/WebKit/Source/bindings/scripts/utilities.py |
| +++ b/third_party/WebKit/Source/bindings/scripts/utilities.py |
| @@ -9,6 +9,7 @@ Design doc: http://www.chromium.org/developers/design-documents/idl-build |
| import os |
| import cPickle as pickle |
| +import platform |
| import re |
| import shlex |
| import string |
| @@ -88,7 +89,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 +119,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 +165,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): |
| @@ -294,6 +297,13 @@ def write_file(new_text, destination_filename, only_if_changed): |
| destination_dirname = os.path.dirname(destination_filename) |
| if not os.path.exists(destination_dirname): |
| os.makedirs(destination_dirname) |
| + # Workaround for http://crbug.com/611437 |
| + # TODO(bashi): Remove this hack once we resolve too-long generated file |
| + # names. |
| + if platform.system() == 'Windows': |
| + # http://stackoverflow.com/questions/14075465 |
| + destination_filename = '\\\\?\\' + ( |
| + os.path.abspath(os.path.join(os.getcwd(), destination_filename))) |
|
Dirk Pranke
2016/05/13 15:20:43
Do we know for sure that GN, ninja, and any other
Nico
2016/05/13 15:21:31
+1
|
| with open(destination_filename, 'w') as destination_file: |
| destination_file.write(new_text) |