Migrate Runtime.js to ESM
Introduce a new namespace "Root" to be able to disambiguate between
Runtime the namespace and Runtime the object.
roll CodeMirror
The above line is necessary to fix the presubmit, which complains
about CodeMirror changes. This is only updating a type reference.
Bug: 1006759
Change-Id: I04941d9f18649701060e3035f7eeb2ef3abb51e4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1829708
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Tim Van der Lippe <tvanderlippe@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#701257}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 17cc008cf6ad28c6e8c07c638a1b380ca30e7f79
diff --git a/scripts/compile_frontend.py b/scripts/compile_frontend.py
index a15c1bc..befedb9 100755
--- a/scripts/compile_frontend.py
+++ b/scripts/compile_frontend.py
@@ -279,9 +279,9 @@
'--externs',
namespace_externs_path,
'--js',
- ROOT_MODULE_FILE,
- '--js',
RUNTIME_FILE,
+ '--js',
+ ROOT_MODULE_FILE,
]
all_files = descriptors.all_compiled_files()
@@ -317,6 +317,7 @@
namespaces.sort()
namespace_externs_file = tempfile.NamedTemporaryFile(mode='wt', delete=False)
try:
+ namespace_externs_file.write('var Root = {};\n')
for namespace in namespaces:
namespace_externs_file.write('var %s = {};\n' % namespace)
finally: