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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/snippets/ScriptSnippetModel.js

Issue 2198443004: [DevTools] Fix location.script().sourceURL (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: a 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 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 * @param {!RuntimeAgent.ScriptId=} scriptId 241 * @param {!RuntimeAgent.ScriptId=} scriptId
242 * @param {?RuntimeAgent.ExceptionDetails=} exceptionDetails 242 * @param {?RuntimeAgent.ExceptionDetails=} exceptionDetails
243 * @this {WebInspector.ScriptSnippetModel} 243 * @this {WebInspector.ScriptSnippetModel}
244 */ 244 */
245 function compileCallback(scriptId, exceptionDetails) 245 function compileCallback(scriptId, exceptionDetails)
246 { 246 {
247 var mapping = this._mappingForTarget.get(target); 247 var mapping = this._mappingForTarget.get(target);
248 if (mapping.evaluationIndex(uiSourceCode) !== evaluationIndex) 248 if (mapping.evaluationIndex(uiSourceCode) !== evaluationIndex)
249 return; 249 return;
250 250
251 mapping._addScript(executionContext.debuggerModel.scriptForId(script Id || exceptionDetails.scriptId), uiSourceCode); 251 var script = /** @type {!WebInspector.Script} */(executionContext.de buggerModel.scriptForId(scriptId || exceptionDetails.scriptId));
252 mapping._addScript(script, uiSourceCode);
252 if (!scriptId) { 253 if (!scriptId) {
253 this._printRunOrCompileScriptResultFailure(target, exceptionDeta ils, evaluationUrl); 254 this._printRunOrCompileScriptResultFailure(target, exceptionDeta ils, evaluationUrl);
254 return; 255 return;
255 } 256 }
256 257
257 var breakpointLocations = this._removeBreakpoints(uiSourceCode); 258 var breakpointLocations = this._removeBreakpoints(uiSourceCode);
258 this._restoreBreakpoints(uiSourceCode, breakpointLocations); 259 this._restoreBreakpoints(uiSourceCode, breakpointLocations);
259 260
260 this._runScript(scriptId, executionContext, evaluationUrl); 261 this._runScript(scriptId, executionContext, evaluationUrl);
261 } 262 }
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
683 this._model.deleteScriptSnippet(url); 684 this._model.deleteScriptSnippet(url);
684 }, 685 },
685 686
686 __proto__: WebInspector.ContentProviderBasedProject.prototype 687 __proto__: WebInspector.ContentProviderBasedProject.prototype
687 } 688 }
688 689
689 /** 690 /**
690 * @type {!WebInspector.ScriptSnippetModel} 691 * @type {!WebInspector.ScriptSnippetModel}
691 */ 692 */
692 WebInspector.scriptSnippetModel = new WebInspector.ScriptSnippetModel(WebInspect or.workspace); 693 WebInspector.scriptSnippetModel = new WebInspector.ScriptSnippetModel(WebInspect or.workspace);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698