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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sources/CallStackSidebarPane.js

Issue 2151653005: DevTools: Do not linkify to pseudo (program) node when there's no URL (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update a test expectation. 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) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 */ 444 */
445 WebInspector.CallStackSidebarPane.CallFrame = function(functionName, location, l inkifier, debuggerCallFrame, locationPool, asyncCallFrame) 445 WebInspector.CallStackSidebarPane.CallFrame = function(functionName, location, l inkifier, debuggerCallFrame, locationPool, asyncCallFrame)
446 { 446 {
447 WebInspector.UIList.Item.call(this, WebInspector.beautifyFunctionName(functi onName), ""); 447 WebInspector.UIList.Item.call(this, WebInspector.beautifyFunctionName(functi onName), "");
448 this._location = location; 448 this._location = location;
449 this._debuggerCallFrame = debuggerCallFrame; 449 this._debuggerCallFrame = debuggerCallFrame;
450 this._asyncCallFrame = asyncCallFrame; 450 this._asyncCallFrame = asyncCallFrame;
451 451
452 if (asyncCallFrame) { 452 if (asyncCallFrame) {
453 var locationElement = linkifier.linkifyRawLocation(location, location.sc ript().sourceURL); 453 var locationElement = linkifier.linkifyRawLocation(location, location.sc ript().sourceURL);
454 this.subtitleElement.appendChild(locationElement); 454 if (locationElement)
455 this.subtitleElement.appendChild(locationElement);
455 } else { 456 } else {
456 this._liveLocationPool = new WebInspector.LiveLocationPool(); 457 this._liveLocationPool = new WebInspector.LiveLocationPool();
457 WebInspector.debuggerWorkspaceBinding.createCallFrameLiveLocation(locati on, this._update.bind(this), locationPool); 458 WebInspector.debuggerWorkspaceBinding.createCallFrameLiveLocation(locati on, this._update.bind(this), locationPool);
458 } 459 }
459 } 460 }
460 461
461 WebInspector.CallStackSidebarPane.CallFrame.prototype = { 462 WebInspector.CallStackSidebarPane.CallFrame.prototype = {
462 /** 463 /**
463 * @param {!WebInspector.LiveLocation} liveLocation 464 * @param {!WebInspector.LiveLocation} liveLocation
464 */ 465 */
465 _update: function(liveLocation) 466 _update: function(liveLocation)
466 { 467 {
467 var uiLocation = liveLocation.uiLocation(); 468 var uiLocation = liveLocation.uiLocation();
468 if (!uiLocation) 469 if (!uiLocation)
469 return; 470 return;
470 var text = uiLocation.linkText(); 471 var text = uiLocation.linkText();
471 this.setSubtitle(text.trimMiddle(30)); 472 this.setSubtitle(text.trimMiddle(30));
472 this.subtitleElement.title = text; 473 this.subtitleElement.title = text;
473 }, 474 },
474 475
475 __proto__: WebInspector.UIList.Item.prototype 476 __proto__: WebInspector.UIList.Item.prototype
476 } 477 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698