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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sdk/DebuggerModel.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) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 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 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 /** 330 /**
331 * @return {!Object.<string, !WebInspector.Script>} 331 * @return {!Object.<string, !WebInspector.Script>}
332 */ 332 */
333 get scripts() 333 get scripts()
334 { 334 {
335 return this._scripts; 335 return this._scripts;
336 }, 336 },
337 337
338 /** 338 /**
339 * @param {!RuntimeAgent.ScriptId} scriptId 339 * @param {!RuntimeAgent.ScriptId} scriptId
340 * @return {!WebInspector.Script} 340 * @return {?WebInspector.Script}
341 */ 341 */
342 scriptForId: function(scriptId) 342 scriptForId: function(scriptId)
343 { 343 {
344 return this._scripts[scriptId] || null; 344 return this._scripts[scriptId] || null;
345 }, 345 },
346 346
347 /** 347 /**
348 * @return {!Array.<!WebInspector.Script>} 348 * @return {!Array.<!WebInspector.Script>}
349 */ 349 */
350 scriptsForSourceURL: function(sourceURL) 350 scriptsForSourceURL: function(sourceURL)
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after
926 WebInspector.DebuggerModel.Location.prototype = { 926 WebInspector.DebuggerModel.Location.prototype = {
927 /** 927 /**
928 * @return {!DebuggerAgent.Location} 928 * @return {!DebuggerAgent.Location}
929 */ 929 */
930 payload: function() 930 payload: function()
931 { 931 {
932 return { scriptId: this.scriptId, lineNumber: this.lineNumber, columnNum ber: this.columnNumber }; 932 return { scriptId: this.scriptId, lineNumber: this.lineNumber, columnNum ber: this.columnNumber };
933 }, 933 },
934 934
935 /** 935 /**
936 * @return {!WebInspector.Script} 936 * @return {?WebInspector.Script}
937 */ 937 */
938 script: function() 938 script: function()
939 { 939 {
940 return this._debuggerModel.scriptForId(this.scriptId); 940 return this._debuggerModel.scriptForId(this.scriptId);
941 }, 941 },
942 942
943 continueToLocation: function() 943 continueToLocation: function()
944 { 944 {
945 this._debuggerModel._agent.continueToLocation(this.payload()); 945 this._debuggerModel._agent.continueToLocation(this.payload());
946 }, 946 },
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
1288 /** 1288 /**
1289 * @param {?WebInspector.Target} target 1289 * @param {?WebInspector.Target} target
1290 * @return {?WebInspector.DebuggerModel} 1290 * @return {?WebInspector.DebuggerModel}
1291 */ 1291 */
1292 WebInspector.DebuggerModel.fromTarget = function(target) 1292 WebInspector.DebuggerModel.fromTarget = function(target)
1293 { 1293 {
1294 if (!target || !target.hasJSCapability()) 1294 if (!target || !target.hasJSCapability())
1295 return null; 1295 return null;
1296 return /** @type {?WebInspector.DebuggerModel} */ (target.model(WebInspector .DebuggerModel)); 1296 return /** @type {?WebInspector.DebuggerModel} */ (target.model(WebInspector .DebuggerModel));
1297 } 1297 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698