| 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 this._update(); | 61 this._update(); |
| 62 } | 62 } |
| 63 | 63 |
| 64 _update() { | 64 _update() { |
| 65 this._locationPool.disposeAll(); | 65 this._locationPool.disposeAll(); |
| 66 | 66 |
| 67 var details = UI.context.flavor(SDK.DebuggerPausedDetails); | 67 var details = UI.context.flavor(SDK.DebuggerPausedDetails); |
| 68 if (!details) { | 68 if (!details) { |
| 69 this._notPausedMessageElement.classList.remove('hidden'); | 69 this._notPausedMessageElement.classList.remove('hidden'); |
| 70 this._blackboxedMessageElement.classList.add('hidden'); | 70 this._blackboxedMessageElement.classList.add('hidden'); |
| 71 this._list.replaceAllItems([]); | 71 this._list.source().replaceAllItems([]); |
| 72 this._debuggerModel = null; | 72 this._debuggerModel = null; |
| 73 UI.context.setFlavor(SDK.DebuggerModel.CallFrame, null); | 73 UI.context.setFlavor(SDK.DebuggerModel.CallFrame, null); |
| 74 return; | 74 return; |
| 75 } | 75 } |
| 76 | 76 |
| 77 this._debuggerModel = details.debuggerModel; | 77 this._debuggerModel = details.debuggerModel; |
| 78 this._notPausedMessageElement.classList.add('hidden'); | 78 this._notPausedMessageElement.classList.add('hidden'); |
| 79 | 79 |
| 80 var showBlackboxed = this._showBlackboxed || | 80 var showBlackboxed = this._showBlackboxed || |
| 81 details.callFrames.every(frame => Bindings.blackboxManager.isBlackboxedR
awLocation(frame.location())); | 81 details.callFrames.every(frame => Bindings.blackboxManager.isBlackboxedR
awLocation(frame.location())); |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 if (hiddenCallFramesCount === 1) { | 132 if (hiddenCallFramesCount === 1) { |
| 133 this._blackboxedMessageElement.firstChild.textContent = | 133 this._blackboxedMessageElement.firstChild.textContent = |
| 134 Common.UIString('1 stack frame is hidden (black-boxed).'); | 134 Common.UIString('1 stack frame is hidden (black-boxed).'); |
| 135 } else { | 135 } else { |
| 136 this._blackboxedMessageElement.firstChild.textContent = | 136 this._blackboxedMessageElement.firstChild.textContent = |
| 137 Common.UIString('%d stack frames are hidden (black-boxed).', hiddenC
allFramesCount); | 137 Common.UIString('%d stack frames are hidden (black-boxed).', hiddenC
allFramesCount); |
| 138 } | 138 } |
| 139 this._blackboxedMessageElement.classList.remove('hidden'); | 139 this._blackboxedMessageElement.classList.remove('hidden'); |
| 140 } | 140 } |
| 141 | 141 |
| 142 this._list.replaceAllItems(items); | 142 this._list.source().replaceAllItems(items); |
| 143 this._list.selectNextItem(true /* canWrap */, false /* center */); | 143 this._list.selectNextItem(true /* canWrap */, false /* center */); |
| 144 } | 144 } |
| 145 | 145 |
| 146 /** | 146 /** |
| 147 * @override | 147 * @override |
| 148 * @param {!Sources.CallStackSidebarPane.Item} item | 148 * @param {!Sources.CallStackSidebarPane.Item} item |
| 149 * @return {!Element} | 149 * @return {!Element} |
| 150 */ | 150 */ |
| 151 createElementForItem(item) { | 151 createElementForItem(item) { |
| 152 var element = createElementWithClass('div', 'call-frame-item'); | 152 var element = createElementWithClass('div', 'call-frame-item'); |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 | 350 |
| 351 /** | 351 /** |
| 352 * @return {boolean} | 352 * @return {boolean} |
| 353 */ | 353 */ |
| 354 _selectPreviousCallFrameOnStack() { | 354 _selectPreviousCallFrameOnStack() { |
| 355 return this._list.selectPreviousItem(false /* canWrap */, false /* center */
); | 355 return this._list.selectPreviousItem(false /* canWrap */, false /* center */
); |
| 356 } | 356 } |
| 357 | 357 |
| 358 _copyStackTrace() { | 358 _copyStackTrace() { |
| 359 var text = []; | 359 var text = []; |
| 360 for (var i = 0; i < this._list.length(); i++) { | 360 for (var i = 0; i < this._list.source().length(); i++) { |
| 361 var item = this._list.itemAtIndex(i); | 361 var item = this._list.source().itemAtIndex(i); |
| 362 if (item.promiseCreationFrame) | 362 if (item.promiseCreationFrame) |
| 363 continue; | 363 continue; |
| 364 var itemText = this._itemTitle(item); | 364 var itemText = this._itemTitle(item); |
| 365 var location = this._itemLocation(item); | 365 var location = this._itemLocation(item); |
| 366 if (location) { | 366 if (location) { |
| 367 var uiLocation = Bindings.debuggerWorkspaceBinding.rawLocationToUILocati
on(location); | 367 var uiLocation = Bindings.debuggerWorkspaceBinding.rawLocationToUILocati
on(location); |
| 368 itemText += ' (' + uiLocation.linkText(true /* skipTrim */) + ')'; | 368 itemText += ' (' + uiLocation.linkText(true /* skipTrim */) + ')'; |
| 369 } | 369 } |
| 370 text.push(itemText); | 370 text.push(itemText); |
| 371 } | 371 } |
| (...skipping 13 matching lines...) Expand all Loading... |
| 385 | 385 |
| 386 /** | 386 /** |
| 387 * @typedef {{ | 387 * @typedef {{ |
| 388 * debuggerCallFrame: (SDK.DebuggerModel.CallFrame|undefined), | 388 * debuggerCallFrame: (SDK.DebuggerModel.CallFrame|undefined), |
| 389 * asyncStackHeader: (string|undefined), | 389 * asyncStackHeader: (string|undefined), |
| 390 * runtimeCallFrame: (Protocol.Runtime.CallFrame|undefined), | 390 * runtimeCallFrame: (Protocol.Runtime.CallFrame|undefined), |
| 391 * promiseCreationFrame: (Protocol.Runtime.CallFrame|undefined) | 391 * promiseCreationFrame: (Protocol.Runtime.CallFrame|undefined) |
| 392 * }} | 392 * }} |
| 393 */ | 393 */ |
| 394 Sources.CallStackSidebarPane.Item; | 394 Sources.CallStackSidebarPane.Item; |
| OLD | NEW |