Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(62)

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/bindings/CompilerScriptMapping.js

Issue 2186753002: [DevTools] Track URL through the target (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments addressed Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 }, 316 },
317 317
318 /** 318 /**
319 * @param {!WebInspector.Script} script 319 * @param {!WebInspector.Script} script
320 * @return {!Promise<?WebInspector.TextSourceMap>} 320 * @return {!Promise<?WebInspector.TextSourceMap>}
321 */ 321 */
322 _loadSourceMapForScript: function(script) 322 _loadSourceMapForScript: function(script)
323 { 323 {
324 // script.sourceURL can be a random string, but is generally an absolute path -> complete it to inspected page url for 324 // script.sourceURL can be a random string, but is generally an absolute path -> complete it to inspected page url for
325 // relative links. 325 // relative links.
326 var scriptURL = WebInspector.ParsedURL.completeURL(this._target.resource TreeModel.inspectedPageURL(), script.sourceURL); 326 var scriptURL = WebInspector.ParsedURL.completeURL(this._target.inspecte dURL(), script.sourceURL);
327 if (!scriptURL) 327 if (!scriptURL)
328 return Promise.resolve(/** @type {?WebInspector.TextSourceMap} */(nu ll)); 328 return Promise.resolve(/** @type {?WebInspector.TextSourceMap} */(nu ll));
329 329
330 console.assert(script.sourceMapURL); 330 console.assert(script.sourceMapURL);
331 var scriptSourceMapURL = /** @type {string} */ (script.sourceMapURL); 331 var scriptSourceMapURL = /** @type {string} */ (script.sourceMapURL);
332 332
333 var sourceMapURL = WebInspector.ParsedURL.completeURL(scriptURL, scriptS ourceMapURL); 333 var sourceMapURL = WebInspector.ParsedURL.completeURL(scriptURL, scriptS ourceMapURL);
334 if (!sourceMapURL) 334 if (!sourceMapURL)
335 return Promise.resolve(/** @type {?WebInspector.TextSourceMap} */(nu ll)); 335 return Promise.resolve(/** @type {?WebInspector.TextSourceMap} */(nu ll));
336 336
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698