| 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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 continue; | 152 continue; |
| 153 this._sourceMapForURL.put(sourceURL, sourceMap); | 153 this._sourceMapForURL.put(sourceURL, sourceMap); |
| 154 if (!this._workspace.hasMappingForURL(sourceURL) && !this._works
pace.uiSourceCodeForURL(sourceURL)) { | 154 if (!this._workspace.hasMappingForURL(sourceURL) && !this._works
pace.uiSourceCodeForURL(sourceURL)) { |
| 155 var contentProvider = sourceMap.sourceContentProvider(source
URL, WebInspector.resourceTypes.Script); | 155 var contentProvider = sourceMap.sourceContentProvider(source
URL, WebInspector.resourceTypes.Script); |
| 156 this._networkWorkspaceBinding.addFileForURL(sourceURL, conte
ntProvider, script.isContentScript()); | 156 this._networkWorkspaceBinding.addFileForURL(sourceURL, conte
ntProvider, script.isContentScript()); |
| 157 } | 157 } |
| 158 var uiSourceCode = this._workspace.uiSourceCodeForURL(sourceURL)
; | 158 var uiSourceCode = this._workspace.uiSourceCodeForURL(sourceURL)
; |
| 159 if (uiSourceCode) | 159 if (uiSourceCode) |
| 160 this._bindUISourceCode(uiSourceCode); | 160 this._bindUISourceCode(uiSourceCode); |
| 161 else | 161 else |
| 162 this._target.consoleModel.showErrorMessage(WebInspector.UISt
ring("Failed to locate workspace file mapped to URL %s from source map %s", sour
ceURL, sourceMap.url())); | 162 WebInspector.console.error(WebInspector.UIString("Failed to
locate workspace file mapped to URL %s from source map %s", sourceURL, sourceMap
.url())); |
| 163 } | 163 } |
| 164 script.updateLocations(); | 164 script.updateLocations(); |
| 165 } | 165 } |
| 166 }, | 166 }, |
| 167 | 167 |
| 168 /** | 168 /** |
| 169 * @return {boolean} | 169 * @return {boolean} |
| 170 */ | 170 */ |
| 171 isIdentity: function() | 171 isIdentity: function() |
| 172 { | 172 { |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 this._sourceMapForScriptId = {}; | 294 this._sourceMapForScriptId = {}; |
| 295 this._scriptForSourceMap.clear(); | 295 this._scriptForSourceMap.clear(); |
| 296 this._sourceMapForURL.clear(); | 296 this._sourceMapForURL.clear(); |
| 297 }, | 297 }, |
| 298 | 298 |
| 299 dispose: function() | 299 dispose: function() |
| 300 { | 300 { |
| 301 this._workspace.removeEventListener(WebInspector.Workspace.Events.UISour
ceCodeAdded, this._uiSourceCodeAddedToWorkspace, this); | 301 this._workspace.removeEventListener(WebInspector.Workspace.Events.UISour
ceCodeAdded, this._uiSourceCodeAddedToWorkspace, this); |
| 302 } | 302 } |
| 303 } | 303 } |
| OLD | NEW |