| 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 | 233 |
| 234 // Report sources. | 234 // Report sources. |
| 235 var sourceURLs = sourceMap.sourceURLs(); | 235 var sourceURLs = sourceMap.sourceURLs(); |
| 236 var missingSources = []; | 236 var missingSources = []; |
| 237 for (var i = 0; i < sourceURLs.length; ++i) { | 237 for (var i = 0; i < sourceURLs.length; ++i) { |
| 238 var sourceURL = sourceURLs[i]; | 238 var sourceURL = sourceURLs[i]; |
| 239 if (this._sourceMapForURL.get(sourceURL)) | 239 if (this._sourceMapForURL.get(sourceURL)) |
| 240 continue; | 240 continue; |
| 241 this._sourceMapForURL.set(sourceURL, sourceMap); | 241 this._sourceMapForURL.set(sourceURL, sourceMap); |
| 242 var uiSourceCode = this._networkMapping.uiSourceCodeForScriptURL(sou
rceURL, script); | 242 var uiSourceCode = this._networkMapping.uiSourceCodeForScriptURL(sou
rceURL, script); |
| 243 if (!uiSourceCode && !this._networkMapping.hasMappingForNetworkURL(s
ourceURL)) { | 243 if (!uiSourceCode) { |
| 244 var contentProvider = sourceMap.sourceContentProvider(sourceURL,
WebInspector.resourceTypes.SourceMapScript); | 244 var contentProvider = sourceMap.sourceContentProvider(sourceURL,
WebInspector.resourceTypes.SourceMapScript); |
| 245 uiSourceCode = this._networkProject.addFile(contentProvider, Web
Inspector.ResourceTreeFrame.fromScript(script), script.isContentScript()); | 245 uiSourceCode = this._networkProject.addFile(contentProvider, Web
Inspector.ResourceTreeFrame.fromScript(script), script.isContentScript()); |
| 246 uiSourceCode[WebInspector.CompilerScriptMapping._originSymbol] =
script.sourceURL; | 246 uiSourceCode[WebInspector.CompilerScriptMapping._originSymbol] =
script.sourceURL; |
| 247 } | 247 } |
| 248 if (uiSourceCode) { | 248 if (uiSourceCode) { |
| 249 this._bindUISourceCode(uiSourceCode); | 249 this._bindUISourceCode(uiSourceCode); |
| 250 } else { | 250 } else { |
| 251 if (missingSources.length < 3) | 251 if (missingSources.length < 3) |
| 252 missingSources.push(sourceURL); | 252 missingSources.push(sourceURL); |
| 253 else if (missingSources.peekLast() !== "\u2026") | 253 else if (missingSources.peekLast() !== "\u2026") |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 395 } | 395 } |
| 396 | 396 |
| 397 /** | 397 /** |
| 398 * @param {!WebInspector.Target} target | 398 * @param {!WebInspector.Target} target |
| 399 * @return {string} | 399 * @return {string} |
| 400 */ | 400 */ |
| 401 WebInspector.CompilerScriptMapping.projectIdForTarget = function(target) | 401 WebInspector.CompilerScriptMapping.projectIdForTarget = function(target) |
| 402 { | 402 { |
| 403 return "compiler-script-project:" + target.id(); | 403 return "compiler-script-project:" + target.id(); |
| 404 } | 404 } |
| OLD | NEW |