Revert "[DevTools]: Moves common to ES modules"
This reverts commit e064553334d4b0c925f0b1f0e2e0234be66b71be.
Reason for revert: Memory tool fails to take heap snapshots with this
error: https://imgur.com/hzR9Eqw
Original change's description:
> [DevTools]: Moves common to ES modules
>
> This CL converts the contents of the common/ folder over to ES modules
> from the current custom module system. It includes statements in each
> file that will pollute the global namespace, allowing the non-ESM code
> to continue working as before.
>
> Bug: 1006759
> Change-Id: Ib591e49155000381f85999a5da6c467ad0160996
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1816563
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Commit-Queue: Paul Lewis <aerotwist@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#699728}
TBR=yangguo@chromium.org,aerotwist@chromium.org,tvanderlippe@chromium.org
Change-Id: Ic0d526780451e8bb4de538f11c85859a3badfb0f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1006759
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1825463
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#699835}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 25a9b3bd7404d49e55772ffba046ed8df65ad14e
diff --git a/scripts/compile_frontend.py b/scripts/compile_frontend.py
index 0f251eb..9a3eb88 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()
@@ -318,6 +318,7 @@
namespace_externs_file = tempfile.NamedTemporaryFile(mode='wt', delete=False)
try:
for namespace in namespaces:
+ namespace_externs_file.write('/** @const */\n')
namespace_externs_file.write('var %s = {};\n' % namespace)
finally:
namespace_externs_file.close()