Cleanup _loadModules in Runtime

Both of these checks are obsolete with the removal of scripts from
the module.json files. To cleanup build_release_applications in the
future to allow us to remove modules from module.json files, we need
to remove these checks.

R=aerotwist@chromium.org

Bug: 1131500
Change-Id: If2fb0ad2751eeee569f5340d42d307cd39d4c268
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2426523
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
This commit is contained in:
Tim van der Lippe
2020-09-23 16:26:14 +00:00
committed by Commit Bot
parent 065c674dde
commit 8134d1f706
-10
View File
@@ -628,10 +628,6 @@ export class Module {
}
async _loadModules() {
if (!this._descriptor.modules || !this._descriptor.modules.length) {
return;
}
const legacyFileName = `${this._name}-legacy.js`;
const moduleFileName = `${this._name}_module.js`;
const entrypointFileName = `${this._name}.js`;
@@ -644,12 +640,6 @@ export class Module {
await eval(`import('../${this._name}/${moduleFileName}')`);
}
// All `*_test_runner` directories don't necessarily have an entrypoint
// These runners are typically included in the `_module.js` file already.
if (!this._descriptor.modules.includes(entrypointFileName)) {
return;
}
const fileName = this._descriptor.modules.includes(legacyFileName) ? legacyFileName : entrypointFileName;
// TODO(crbug.com/1011811): Remove eval when we use TypeScript which does support dynamic imports