| Index: Source/devtools/front_end/main/Main.js
|
| diff --git a/Source/devtools/front_end/main/Main.js b/Source/devtools/front_end/main/Main.js
|
| index 168e335337c9c275980add65566b11f23a8f7837..0a7c64bca1182ccdd35f78224541420c0a133d40 100644
|
| --- a/Source/devtools/front_end/main/Main.js
|
| +++ b/Source/devtools/front_end/main/Main.js
|
| @@ -135,13 +135,34 @@ WebInspector.Main.prototype = {
|
|
|
| _loadCompletedForWorkers: function()
|
| {
|
| - // Make sure script execution of dedicated worker is resumed and then paused
|
| - // on the first script statement in case we autoattached to it.
|
| + // Make sure script execution of dedicated worker or service worker is
|
| + // resumed and then paused on the first script statement in case we
|
| + // autoattached to it.
|
| if (WebInspector.queryParam("workerPaused")) {
|
| + pauseAndResume.call(this);
|
| + } else{
|
| + RuntimeAgent.isPausedWorker(isPausedWorkerCallback.bind(this));
|
| + }
|
| +
|
| + /**
|
| + * @this {WebInspector.Main}
|
| + */
|
| + function isPausedWorkerCallback(error, result)
|
| + {
|
| + if (result) {
|
| + pauseAndResume.call(this);
|
| + } else if (!Capabilities.isMainFrontend) {
|
| + calculateTitle.call(this);
|
| + }
|
| + }
|
| +
|
| + /**
|
| + * @this {WebInspector.Main}
|
| + */
|
| + function pauseAndResume()
|
| + {
|
| DebuggerAgent.pause();
|
| RuntimeAgent.run(calculateTitle.bind(this));
|
| - } else if (!Capabilities.isMainFrontend) {
|
| - calculateTitle.call(this);
|
| }
|
|
|
| /**
|
|
|