From d0cb41a02413eb599b3e80fb11dc3c20c326044e Mon Sep 17 00:00:00 2001 From: Marc Dumais Date: Wed, 4 Mar 2020 09:50:26 -0500 Subject: [PATCH] Revert "[debug] Lazily update frames of all threads in all-stop mode" This reverts commit d1678ad8068d9a9bf9ed8b90d2a67f01c116e850. Fixes #7272 Signed-off-by: Marc Dumais --- packages/debug/src/browser/debug-session.tsx | 8 +------- packages/debug/src/browser/model/debug-thread.tsx | 7 ------- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/packages/debug/src/browser/debug-session.tsx b/packages/debug/src/browser/debug-session.tsx index d04990c67bbce..30cb93d9f00d0 100644 --- a/packages/debug/src/browser/debug-session.tsx +++ b/packages/debug/src/browser/debug-session.tsx @@ -93,10 +93,7 @@ export class DebugSession implements CompositeTreeElement { } }), this.on('stopped', async ({ body }) => { - // Update thread list await this.updateThreads(body); - - // Update current thread's frames immediately await this.updateFrames(); }), this.on('thread', ({ body: { reason, threadId } }) => { @@ -224,9 +221,6 @@ export class DebugSession implements CompositeTreeElement { this.fireDidChange(); if (thread) { this.toDisposeOnCurrentThread.push(thread.onDidChanged(() => this.fireDidChange())); - - // If this thread is missing stack frame information, then load that. - this.updateFrames(); } } @@ -471,7 +465,7 @@ export class DebugSession implements CompositeTreeElement { protected async updateFrames(): Promise { const thread = this._currentThread; - if (!thread || thread.pendingFrameCount || thread.frameCount) { + if (!thread || thread.frameCount) { return; } if (this.capabilities.supportsDelayedStackTraceLoading) { diff --git a/packages/debug/src/browser/model/debug-thread.tsx b/packages/debug/src/browser/model/debug-thread.tsx index b9442b93128dd..c5225bc202230 100644 --- a/packages/debug/src/browser/model/debug-thread.tsx +++ b/packages/debug/src/browser/model/debug-thread.tsx @@ -140,9 +140,7 @@ export class DebugThread extends DebugThreadData implements TreeElement { } protected pendingFetch = Promise.resolve([]); - protected _pendingFetchCount: number = 0; async fetchFrames(levels: number = 20): Promise { - this._pendingFetchCount += 1; return this.pendingFetch = this.pendingFetch.then(async () => { try { const start = this.frameCount; @@ -151,14 +149,9 @@ export class DebugThread extends DebugThreadData implements TreeElement { } catch (e) { console.error(e); return []; - } finally { - this._pendingFetchCount -= 1; } }); } - get pendingFrameCount(): number { - return this._pendingFetchCount; - } protected async doFetchFrames(startFrame: number, levels: number): Promise { try { const response = await this.session.sendRequest('stackTrace',