Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 462 * @param {?WebInspector.DebuggerModel.CallFrame} debuggerCallFrame | 462 * @param {?WebInspector.DebuggerModel.CallFrame} debuggerCallFrame |
| 463 * @param {!WebInspector.LiveLocationPool} locationPool | 463 * @param {!WebInspector.LiveLocationPool} locationPool |
| 464 * @param {!WebInspector.UIList.Item=} asyncCallFrame | 464 * @param {!WebInspector.UIList.Item=} asyncCallFrame |
| 465 */ | 465 */ |
| 466 WebInspector.CallStackSidebarPane.CallFrame = function(functionName, location, l inkifier, debuggerCallFrame, locationPool, asyncCallFrame) | 466 WebInspector.CallStackSidebarPane.CallFrame = function(functionName, location, l inkifier, debuggerCallFrame, locationPool, asyncCallFrame) |
| 467 { | 467 { |
| 468 WebInspector.UIList.Item.call(this, WebInspector.beautifyFunctionName(functi onName), ""); | 468 WebInspector.UIList.Item.call(this, WebInspector.beautifyFunctionName(functi onName), ""); |
| 469 this._location = location; | 469 this._location = location; |
| 470 this._debuggerCallFrame = debuggerCallFrame; | 470 this._debuggerCallFrame = debuggerCallFrame; |
| 471 this._asyncCallFrame = asyncCallFrame; | 471 this._asyncCallFrame = asyncCallFrame; |
| 472 | 472 this._liveLocationPool = new WebInspector.LiveLocationPool(); |
| 473 if (asyncCallFrame) { | 473 WebInspector.debuggerWorkspaceBinding.createCallFrameLiveLocation(location, this._update.bind(this), locationPool); |
| 474 var script = location.script(); | |
| 475 var locationElement = linkifier.linkifyRawLocation(location, script ? sc ript.sourceURL : ""); | |
| 476 this.subtitleElement.appendChild(locationElement); | |
| 477 } else { | |
| 478 this._liveLocationPool = new WebInspector.LiveLocationPool(); | |
|
lushnikov
2016/10/07 22:28:29
this should go to the outside
luoe
2016/10/07 23:18:58
Removed, after checking that it wasn't used.
| |
| 479 WebInspector.debuggerWorkspaceBinding.createCallFrameLiveLocation(locati on, this._update.bind(this), locationPool); | |
| 480 } | |
| 481 } | 474 } |
| 482 | 475 |
| 483 WebInspector.CallStackSidebarPane.CallFrame.prototype = { | 476 WebInspector.CallStackSidebarPane.CallFrame.prototype = { |
| 484 /** | 477 /** |
| 485 * @param {!WebInspector.LiveLocation} liveLocation | 478 * @param {!WebInspector.LiveLocation} liveLocation |
| 486 */ | 479 */ |
| 487 _update: function(liveLocation) | 480 _update: function(liveLocation) |
| 488 { | 481 { |
| 489 var uiLocation = liveLocation.uiLocation(); | 482 var uiLocation = liveLocation.uiLocation(); |
| 490 if (!uiLocation) | 483 if (!uiLocation) |
| 491 return; | 484 return; |
| 492 var text = uiLocation.linkText(); | 485 var text = uiLocation.linkText(); |
| 493 this.setSubtitle(text.trimMiddle(30)); | 486 this.setSubtitle(text.trimMiddle(30)); |
| 494 this.subtitleElement.title = text; | 487 this.subtitleElement.title = text; |
| 495 }, | 488 }, |
| 496 | 489 |
| 497 __proto__: WebInspector.UIList.Item.prototype | 490 __proto__: WebInspector.UIList.Item.prototype |
| 498 } | 491 } |
| OLD | NEW |