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 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
440 * @param {!WebInspector.UIList.Item=} asyncCallFrame | 440 * @param {!WebInspector.UIList.Item=} asyncCallFrame |
441 */ | 441 */ |
442 WebInspector.CallStackSidebarPane.CallFrame = function(functionName, location, l
inkifier, debuggerCallFrame, locationPool, asyncCallFrame) | 442 WebInspector.CallStackSidebarPane.CallFrame = function(functionName, location, l
inkifier, debuggerCallFrame, locationPool, asyncCallFrame) |
443 { | 443 { |
444 WebInspector.UIList.Item.call(this, WebInspector.beautifyFunctionName(functi
onName), ""); | 444 WebInspector.UIList.Item.call(this, WebInspector.beautifyFunctionName(functi
onName), ""); |
445 this._location = location; | 445 this._location = location; |
446 this._debuggerCallFrame = debuggerCallFrame; | 446 this._debuggerCallFrame = debuggerCallFrame; |
447 this._asyncCallFrame = asyncCallFrame; | 447 this._asyncCallFrame = asyncCallFrame; |
448 | 448 |
449 if (asyncCallFrame) { | 449 if (asyncCallFrame) { |
450 var locationElement = linkifier.linkifyRawLocation(location, location.sc
ript().sourceURL); | 450 var script = location.script(); |
| 451 var locationElement = linkifier.linkifyRawLocation(location, script ? sc
ript.sourceURL : ""); |
451 this.subtitleElement.appendChild(locationElement); | 452 this.subtitleElement.appendChild(locationElement); |
452 } else { | 453 } else { |
453 this._liveLocationPool = new WebInspector.LiveLocationPool(); | 454 this._liveLocationPool = new WebInspector.LiveLocationPool(); |
454 WebInspector.debuggerWorkspaceBinding.createCallFrameLiveLocation(locati
on, this._update.bind(this), locationPool); | 455 WebInspector.debuggerWorkspaceBinding.createCallFrameLiveLocation(locati
on, this._update.bind(this), locationPool); |
455 } | 456 } |
456 } | 457 } |
457 | 458 |
458 WebInspector.CallStackSidebarPane.CallFrame.prototype = { | 459 WebInspector.CallStackSidebarPane.CallFrame.prototype = { |
459 /** | 460 /** |
460 * @param {!WebInspector.LiveLocation} liveLocation | 461 * @param {!WebInspector.LiveLocation} liveLocation |
461 */ | 462 */ |
462 _update: function(liveLocation) | 463 _update: function(liveLocation) |
463 { | 464 { |
464 var uiLocation = liveLocation.uiLocation(); | 465 var uiLocation = liveLocation.uiLocation(); |
465 if (!uiLocation) | 466 if (!uiLocation) |
466 return; | 467 return; |
467 var text = uiLocation.linkText(); | 468 var text = uiLocation.linkText(); |
468 this.setSubtitle(text.trimMiddle(30)); | 469 this.setSubtitle(text.trimMiddle(30)); |
469 this.subtitleElement.title = text; | 470 this.subtitleElement.title = text; |
470 }, | 471 }, |
471 | 472 |
472 __proto__: WebInspector.UIList.Item.prototype | 473 __proto__: WebInspector.UIList.Item.prototype |
473 } | 474 } |
OLD | NEW |