| 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 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 var missingSources = []; | 241 var missingSources = []; |
| 242 for (var sourceURL of sourceMap.sourceURLs()) { | 242 for (var sourceURL of sourceMap.sourceURLs()) { |
| 243 if (this._sourceMapForURL.get(sourceURL)) | 243 if (this._sourceMapForURL.get(sourceURL)) |
| 244 continue; | 244 continue; |
| 245 this._sourceMapForURL.set(sourceURL, sourceMap); | 245 this._sourceMapForURL.set(sourceURL, sourceMap); |
| 246 var uiSourceCode = Bindings.NetworkProject.uiSourceCodeForScriptURL(this._
workspace, sourceURL, script); | 246 var uiSourceCode = Bindings.NetworkProject.uiSourceCodeForScriptURL(this._
workspace, sourceURL, script); |
| 247 if (!uiSourceCode) { | 247 if (!uiSourceCode) { |
| 248 var contentProvider = sourceMap.sourceContentProvider(sourceURL, Common.
resourceTypes.SourceMapScript); | 248 var contentProvider = sourceMap.sourceContentProvider(sourceURL, Common.
resourceTypes.SourceMapScript); |
| 249 var embeddedContent = sourceMap.embeddedContentByURL(sourceURL); | 249 var embeddedContent = sourceMap.embeddedContentByURL(sourceURL); |
| 250 var embeddedContentLength = typeof embeddedContent === 'string' ? embedd
edContent.length : null; | 250 var embeddedContentLength = typeof embeddedContent === 'string' ? embedd
edContent.length : null; |
| 251 uiSourceCode = this._networkProject.addFile( | 251 uiSourceCode = this._networkProject.addSourceMapFile( |
| 252 contentProvider, SDK.ResourceTreeFrame.fromScript(script), script.is
ContentScript(), embeddedContentLength); | 252 contentProvider, SDK.ResourceTreeFrame.fromScript(script), script.is
ContentScript(), embeddedContentLength); |
| 253 uiSourceCode[Bindings.CompilerScriptMapping._originSymbol] = script.sour
ceURL; | 253 uiSourceCode[Bindings.CompilerScriptMapping._originSymbol] = script.sour
ceURL; |
| 254 } | 254 } |
| 255 if (uiSourceCode) { | 255 if (uiSourceCode) { |
| 256 this._bindUISourceCode(uiSourceCode); | 256 this._bindUISourceCode(uiSourceCode); |
| 257 } else { | 257 } else { |
| 258 if (missingSources.length < 3) | 258 if (missingSources.length < 3) |
| 259 missingSources.push(sourceURL); | 259 missingSources.push(sourceURL); |
| 260 else if (missingSources.peekLast() !== '\u2026') | 260 else if (missingSources.peekLast() !== '\u2026') |
| 261 missingSources.push('\u2026'); | 261 missingSources.push('\u2026'); |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 } | 380 } |
| 381 | 381 |
| 382 dispose() { | 382 dispose() { |
| 383 Common.EventTarget.removeEventListeners(this._eventListeners); | 383 Common.EventTarget.removeEventListeners(this._eventListeners); |
| 384 this._debuggerReset(); | 384 this._debuggerReset(); |
| 385 this._stubProject.dispose(); | 385 this._stubProject.dispose(); |
| 386 } | 386 } |
| 387 }; | 387 }; |
| 388 | 388 |
| 389 Bindings.CompilerScriptMapping._originSymbol = Symbol('origin'); | 389 Bindings.CompilerScriptMapping._originSymbol = Symbol('origin'); |
| OLD | NEW |