OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 this._debuggerWorkspaceBinding.updateLocations(scripts[i]); | 184 this._debuggerWorkspaceBinding.updateLocations(scripts[i]); |
185 } | 185 } |
186 | 186 |
187 /** | 187 /** |
188 * @param {!SDK.Script} script | 188 * @param {!SDK.Script} script |
189 * @return {?Workspace.UISourceCode} | 189 * @return {?Workspace.UISourceCode} |
190 */ | 190 */ |
191 _workspaceUISourceCodeForScript(script) { | 191 _workspaceUISourceCodeForScript(script) { |
192 if (script.isAnonymousScript()) | 192 if (script.isAnonymousScript()) |
193 return null; | 193 return null; |
194 return Bindings.NetworkProject.uiSourceCodeForScriptURL(this._workspace, scr
ipt.sourceURL, script); | 194 var uiSourceCode = Bindings.NetworkProject.uiSourceCodeForScriptURL(this._wo
rkspace, script.sourceURL, script); |
| 195 if (!uiSourceCode) { |
| 196 var resourceBinding = Bindings.ResourceBinding.forTarget(this._debuggerMod
el.target()); |
| 197 uiSourceCode = resourceBinding ? resourceBinding.uiSourceCodeForURL(script
.sourceURL) : null; |
| 198 } |
| 199 return uiSourceCode; |
195 } | 200 } |
196 | 201 |
197 /** | 202 /** |
198 * @param {!Workspace.UISourceCode} uiSourceCode | 203 * @param {!Workspace.UISourceCode} uiSourceCode |
199 * @return {!Array.<!SDK.Script>} | 204 * @return {!Array.<!SDK.Script>} |
200 */ | 205 */ |
201 _scriptsForUISourceCode(uiSourceCode) { | 206 _scriptsForUISourceCode(uiSourceCode) { |
202 var target = Bindings.NetworkProject.targetForUISourceCode(uiSourceCode); | 207 var target = Bindings.NetworkProject.targetForUISourceCode(uiSourceCode); |
203 if (target !== this._debuggerModel.target()) | 208 if (target !== this._debuggerModel.target()) |
204 return []; | 209 return []; |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
434 hasSourceMapURL() { | 439 hasSourceMapURL() { |
435 return this._script && !!this._script.sourceMapURL; | 440 return this._script && !!this._script.sourceMapURL; |
436 } | 441 } |
437 }; | 442 }; |
438 | 443 |
439 /** @enum {symbol} */ | 444 /** @enum {symbol} */ |
440 Bindings.ResourceScriptFile.Events = { | 445 Bindings.ResourceScriptFile.Events = { |
441 DidMergeToVM: Symbol('DidMergeToVM'), | 446 DidMergeToVM: Symbol('DidMergeToVM'), |
442 DidDivergeFromVM: Symbol('DidDivergeFromVM'), | 447 DidDivergeFromVM: Symbol('DidDivergeFromVM'), |
443 }; | 448 }; |
OLD | NEW |