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..c6cba8c1d3d919b577753b3fa0aebb2c4c371b27 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.isRunRequired(isRunRequiredCallback.bind(this)); |
+ } |
+ |
+ /** |
+ * @this {WebInspector.Main} |
+ */ |
+ function isRunRequiredCallback(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); |
} |
/** |