Closed Bug 1585515 Opened 5 years ago Closed 5 years ago

Inline Previews are re-fetched when the user clicks on a call stack frame

Categories

(DevTools :: Debugger, task)

task
Not set
normal

Tracking

(firefox71 fixed)

RESOLVED FIXED
Firefox 71
Tracking Status
firefox71 --- fixed

People

(Reporter: jlast, Assigned: davidwalsh)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

we'll likely want to give memoizedAction a go for fetchScopes so that we stop re-doing work...

e.g. loadSourceText

The weird thing is that fetchScopes has getGeneratedFrameScope(getState(), frame.id)

A simpler alternative would be to add this check in generateInlinePreview

diff --git a/devtools/client/debugger/src/actions/pause/inlinePreview.js b/devtools/client/debugger/src/actions/pause/inlinePreview.js
index c3b575ba7118..7128d5a81194 100644
--- a/devtools/client/debugger/src/actions/pause/inlinePreview.js
+++ b/devtools/client/debugger/src/actions/pause/inlinePreview.js
@@ -32,6 +32,11 @@ export function generateInlinePreview(cx: ThreadContext, frame: ?Frame) {
     }

     const { thread } = cx;
+
+    if (getInlinePreviews(cx, thread, frame)) {
+      return;
+    }
+
     const originalFrameScopes = getOriginalFrameScope(
       getState(),
       thread,

How did you discover this / see it?

When I pause on a breakpoint, and as I step through, I only ever see loadSourceTextPromise and loadSource being called once.

Nevermind! I see what you mean now. Working on it!

Pushed by dwalsh@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b1e07a798b0c
Prevent inline preview from being refetched r=jlast
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 71
Assignee: nobody → dwalsh
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: