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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sdk/DebuggerModel.js

Issue 2122353002: [DevTools] Make resource tree model optional (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 5 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 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 this.dispatchEventToListeners(WebInspector.DebuggerModel.Events.GlobalOb jectCleared); 321 this.dispatchEventToListeners(WebInspector.DebuggerModel.Events.GlobalOb jectCleared);
322 }, 322 },
323 323
324 _reset: function() 324 _reset: function()
325 { 325 {
326 this._scripts = {}; 326 this._scripts = {};
327 this._scriptsBySourceURL.clear(); 327 this._scriptsBySourceURL.clear();
328 }, 328 },
329 329
330 /** 330 /**
331 * @param {!WebInspector.Script} script
332 * @return {?string}
333 */
334 completeSourceURL: function(script)
335 {
336 var sourceURL = script.sourceURL;
337 if (!sourceURL)
338 return null;
339 var resourceTreeModel = WebInspector.ResourceTreeModel.fromTarget(this.t arget());
dgozman 2016/07/14 16:29:29 This is a wrong dependency. Debugger should not de
eostroukhov-old 2016/07/20 23:46:15 Moved the code back to CompilerScriptMapping... Jo
340 return resourceTreeModel ? WebInspector.ParsedURL.completeURL(resourceTr eeModel.inspectedPageURL(), sourceURL) : sourceURL;
341 },
342
343 /**
331 * @return {!Object.<string, !WebInspector.Script>} 344 * @return {!Object.<string, !WebInspector.Script>}
332 */ 345 */
333 get scripts() 346 get scripts()
334 { 347 {
335 return this._scripts; 348 return this._scripts;
336 }, 349 },
337 350
338 /** 351 /**
339 * @param {!RuntimeAgent.ScriptId} scriptId 352 * @param {!RuntimeAgent.ScriptId} scriptId
340 * @return {!WebInspector.Script} 353 * @return {!WebInspector.Script}
(...skipping 945 matching lines...) Expand 10 before | Expand all | Expand 10 after
1286 /** 1299 /**
1287 * @param {?WebInspector.Target} target 1300 * @param {?WebInspector.Target} target
1288 * @return {?WebInspector.DebuggerModel} 1301 * @return {?WebInspector.DebuggerModel}
1289 */ 1302 */
1290 WebInspector.DebuggerModel.fromTarget = function(target) 1303 WebInspector.DebuggerModel.fromTarget = function(target)
1291 { 1304 {
1292 if (!target || !target.hasJSCapability()) 1305 if (!target || !target.hasJSCapability())
1293 return null; 1306 return null;
1294 return /** @type {?WebInspector.DebuggerModel} */ (target.model(WebInspector .DebuggerModel)); 1307 return /** @type {?WebInspector.DebuggerModel} */ (target.model(WebInspector .DebuggerModel));
1295 } 1308 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698