| 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 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 } |
| OLD | NEW |