| 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 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 var sourceURLs = sourceMap.sourceURLs(); | 233 var sourceURLs = sourceMap.sourceURLs(); |
| 234 var missingSources = []; | 234 var missingSources = []; |
| 235 for (var i = 0; i < sourceURLs.length; ++i) { | 235 for (var i = 0; i < sourceURLs.length; ++i) { |
| 236 var sourceURL = sourceURLs[i]; | 236 var sourceURL = sourceURLs[i]; |
| 237 if (this._sourceMapForURL.get(sourceURL)) | 237 if (this._sourceMapForURL.get(sourceURL)) |
| 238 continue; | 238 continue; |
| 239 this._sourceMapForURL.set(sourceURL, sourceMap); | 239 this._sourceMapForURL.set(sourceURL, sourceMap); |
| 240 var uiSourceCode = this._networkMapping.uiSourceCodeForScriptURL(sou
rceURL, script); | 240 var uiSourceCode = this._networkMapping.uiSourceCodeForScriptURL(sou
rceURL, script); |
| 241 if (!uiSourceCode && !this._networkMapping.hasMappingForNetworkURL(s
ourceURL)) { | 241 if (!uiSourceCode && !this._networkMapping.hasMappingForNetworkURL(s
ourceURL)) { |
| 242 var contentProvider = sourceMap.sourceContentProvider(sourceURL,
WebInspector.resourceTypes.SourceMapScript); | 242 var contentProvider = sourceMap.sourceContentProvider(sourceURL,
WebInspector.resourceTypes.SourceMapScript); |
| 243 uiSourceCode = this._networkProject.addFileForURL(sourceURL, con
tentProvider, WebInspector.ResourceTreeFrame.fromScript(script), script.isConten
tScript()); | 243 uiSourceCode = this._networkProject.addFile(contentProvider, Web
Inspector.ResourceTreeFrame.fromScript(script), script.isContentScript()); |
| 244 uiSourceCode[WebInspector.CompilerScriptMapping._originSymbol] =
script.sourceURL; | 244 uiSourceCode[WebInspector.CompilerScriptMapping._originSymbol] =
script.sourceURL; |
| 245 } | 245 } |
| 246 if (uiSourceCode) { | 246 if (uiSourceCode) { |
| 247 this._bindUISourceCode(uiSourceCode); | 247 this._bindUISourceCode(uiSourceCode); |
| 248 } else { | 248 } else { |
| 249 if (missingSources.length < 3) | 249 if (missingSources.length < 3) |
| 250 missingSources.push(sourceURL); | 250 missingSources.push(sourceURL); |
| 251 else if (missingSources.peekLast() !== "\u2026") | 251 else if (missingSources.peekLast() !== "\u2026") |
| 252 missingSources.push("\u2026"); | 252 missingSources.push("\u2026"); |
| 253 } | 253 } |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 this._sourceMapForScriptId.clear() | 382 this._sourceMapForScriptId.clear() |
| 383 this._scriptForSourceMap.clear(); | 383 this._scriptForSourceMap.clear(); |
| 384 this._sourceMapForURL.clear(); | 384 this._sourceMapForURL.clear(); |
| 385 }, | 385 }, |
| 386 | 386 |
| 387 dispose: function() | 387 dispose: function() |
| 388 { | 388 { |
| 389 this._workspace.removeEventListener(WebInspector.Workspace.Events.UISour
ceCodeAdded, this._uiSourceCodeAddedToWorkspace, this); | 389 this._workspace.removeEventListener(WebInspector.Workspace.Events.UISour
ceCodeAdded, this._uiSourceCodeAddedToWorkspace, this); |
| 390 } | 390 } |
| 391 } | 391 } |
| OLD | NEW |