commit | 5772b82a6e90b06807b2e3c5b139024bd85352b7 | [log] [tgz] |
---|---|---|
author | Tim van der Lippe <[email protected]> | Mon Feb 03 12:26:20 2020 |
committer | Commit Bot <[email protected]> | Mon Feb 03 12:46:28 2020 |
tree | fb59b6e53aabb2c554a6885b54c210de9360fb63 | |
parent | 16a037708c026d087638900031541d79deec463f [diff] [blame] |
Make audits_worker a worker with module scope This allows us to properly import the Runtime with an ES import, as well as resolve the service dispatcher in the appropriate scope. It relies on the previous patch to be pushed to the appspot server, before it can be resolved properly. Bug: 1006759 Change-Id: I2d65c82e00ffaaa6ca2dd39fd4309e44d7a87002 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2030781 Commit-Queue: Tim van der Lippe <[email protected]> Reviewed-by: Paul Lewis <[email protected]>
diff --git a/front_end/audits_worker.js b/front_end/audits_worker.js index f6813c6..c97fda6 100644 --- a/front_end/audits_worker.js +++ b/front_end/audits_worker.js
@@ -1,9 +1,9 @@ // Copyright 2016 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -self.importScripts('platform/utilities.js'); -// Release build has Runtime.js bundled. -if (!self.Root || !self.Root.Runtime) { - self.importScripts('Runtime.js'); -} +import './platform/utilities.js'; +import './Runtime.js'; + +import './worker_service/ServiceDispatcher.js'; + Root.Runtime.startWorker('audits_worker');