| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com). | 3 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com). |
| 4 * Copyright (C) 2009 Joseph Pecoraro | 4 * Copyright (C) 2009 Joseph Pecoraro |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * | 9 * |
| 10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 if (error || wasThrown) { | 128 if (error || wasThrown) { |
| 129 console.error(error); | 129 console.error(error); |
| 130 return; | 130 return; |
| 131 } | 131 } |
| 132 InspectorFrontendHost.inspectedURLChanged(result.value); | 132 InspectorFrontendHost.inspectedURLChanged(result.value); |
| 133 } | 133 } |
| 134 }, | 134 }, |
| 135 | 135 |
| 136 _loadCompletedForWorkers: function() | 136 _loadCompletedForWorkers: function() |
| 137 { | 137 { |
| 138 // Make sure script execution of dedicated worker is resumed and then pa
used | 138 // Make sure script execution of dedicated worker or service worker is |
| 139 // on the first script statement in case we autoattached to it. | 139 // resumed and then paused on the first script statement in case we |
| 140 // autoattached to it. |
| 140 if (WebInspector.queryParam("workerPaused")) { | 141 if (WebInspector.queryParam("workerPaused")) { |
| 141 DebuggerAgent.pause(); | 142 pauseAndResume.call(this); |
| 142 RuntimeAgent.run(calculateTitle.bind(this)); | 143 } else{ |
| 143 } else if (!Capabilities.isMainFrontend) { | 144 RuntimeAgent.isRunRequired(isRunRequiredCallback.bind(this)); |
| 144 calculateTitle.call(this); | |
| 145 } | 145 } |
| 146 | 146 |
| 147 /** | 147 /** |
| 148 * @this {WebInspector.Main} |
| 149 */ |
| 150 function isRunRequiredCallback(error, result) |
| 151 { |
| 152 if (result) { |
| 153 pauseAndResume.call(this); |
| 154 } else if (!Capabilities.isMainFrontend) { |
| 155 calculateTitle.call(this); |
| 156 } |
| 157 } |
| 158 |
| 159 /** |
| 160 * @this {WebInspector.Main} |
| 161 */ |
| 162 function pauseAndResume() |
| 163 { |
| 164 DebuggerAgent.pause(); |
| 165 RuntimeAgent.run(calculateTitle.bind(this)); |
| 166 } |
| 167 |
| 168 /** |
| 148 * @this {WebInspector.Main} | 169 * @this {WebInspector.Main} |
| 149 */ | 170 */ |
| 150 function calculateTitle() | 171 function calculateTitle() |
| 151 { | 172 { |
| 152 this._calculateWorkerInspectorTitle(); | 173 this._calculateWorkerInspectorTitle(); |
| 153 } | 174 } |
| 154 }, | 175 }, |
| 155 | 176 |
| 156 _resetErrorAndWarningCounts: function() | 177 _resetErrorAndWarningCounts: function() |
| 157 { | 178 { |
| (...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 804 | 825 |
| 805 WebInspector.__defineGetter__("inspectedPageURL", function() | 826 WebInspector.__defineGetter__("inspectedPageURL", function() |
| 806 { | 827 { |
| 807 return WebInspector.resourceTreeModel.inspectedPageURL(); | 828 return WebInspector.resourceTreeModel.inspectedPageURL(); |
| 808 }); | 829 }); |
| 809 | 830 |
| 810 WebInspector.panel = function(name) | 831 WebInspector.panel = function(name) |
| 811 { | 832 { |
| 812 return WebInspector.inspectorView.panel(name); | 833 return WebInspector.inspectorView.panel(name); |
| 813 } | 834 } |
| OLD | NEW |