| Index: third_party/WebKit/Source/devtools/scripts/build/build_release_applications.py
|
| diff --git a/third_party/WebKit/Source/devtools/scripts/build/build_release_applications.py b/third_party/WebKit/Source/devtools/scripts/build/build_release_applications.py
|
| index e095c3853400c8239369bca53fe860e165eb46f6..a2ff8671bb68a45dbd37c8cfbd171e5e5ec16d3f 100755
|
| --- a/third_party/WebKit/Source/devtools/scripts/build/build_release_applications.py
|
| +++ b/third_party/WebKit/Source/devtools/scripts/build/build_release_applications.py
|
| @@ -189,17 +189,25 @@ class ReleaseBuilder(object):
|
| non_autostart_deps = deps & non_autostart
|
| if len(non_autostart_deps):
|
| bail_error('Non-autostart dependencies specified for the autostarted module "%s": %s' % (name, non_autostart_deps))
|
| -
|
| - namespace = name.replace('_lazy', '')
|
| - if namespace == 'sdk' or namespace == 'ui':
|
| - namespace = namespace.upper();
|
| - namespace = "".join(map(lambda x: x[0].upper() + x[1:], namespace.split('_')))
|
| + namespace = name
|
| + if self._map_special_case_namespace(namespace):
|
| + namespace = self._map_special_case_namespace(namespace)
|
| + else:
|
| + namespace = "".join(map(lambda x: x[0].upper() + x[1:], namespace.split('_')))
|
| output.write('\n/* Module %s */\n' % name)
|
| output.write('\nself[\'%s\'] = self[\'%s\'] || {};\n' % (namespace, namespace))
|
| modular_build.concatenate_scripts(desc.get('scripts'), join(self.application_dir, name), self.output_dir, output)
|
| else:
|
| non_autostart.add(name)
|
|
|
| + def _map_special_case_namespace(self, namespace):
|
| + if hasattr(self, '_special_cases'):
|
| + return self._special_cases.get(namespace, None)
|
| + scripts_path = path.join(path.dirname(path.dirname(path.abspath(__file__))), 'module_to_namespaces.json')
|
| + with open(scripts_path) as json_file:
|
| + self._special_cases = json.load(json_file)
|
| + return self._special_cases.get(namespace, None)
|
| +
|
| def _concatenate_application_script(self, output):
|
| runtime_contents = read_file(join(self.application_dir, 'Runtime.js'))
|
| runtime_contents = re.sub('var allDescriptors = \[\];', 'var allDescriptors = %s;' % self._release_module_descriptors().replace('\\', '\\\\'), runtime_contents, 1)
|
|
|