Closed Bug 1534847 Opened 8 months ago Closed 8 months ago

Editor may get stuck showing "Loading..."

Categories

(DevTools :: Debugger, enhancement, P1)

enhancement

Tracking

(firefox67 fixed)

RESOLVED FIXED
Firefox 67
Tracking Status
firefox67 --- fixed

People

(Reporter: loganfsmyth, Assigned: loganfsmyth)

Details

Attachments

(3 files)

Reported originally in https://github.com/firefox-devtools/debugger/issues/8106

It looks like loadSourceText can get into an unexpected state if the page refreshes while loading.

Splitting up this logic makes us less likely to introduce code that would break
the caching behavior. If you look closely at these changes, you'll notice that
there actually one one early return in this code that would cause us to
exit without clearing the 'requests' cache meaning we could get stuck in
an infinite loading state.

If users navigate while source text is loading, we need to ignore existing
cached promises because they may resolve and then not actually set the
resulting source, because the source was deleted from the source list.
We want to explicitly use a new cache entry if we have navigated.

Depends on D23451

Returning null here leaves us in an infinite loading state because null is treated as neither
success nor failure.

Depends on D23452

Pushed by jlaster@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7cf6462189e8
Part 1: Refactor loadSourceText to separate caching from logic. r=jlast
https://hg.mozilla.org/integration/autoland/rev/27a3400989c9
Part 2: Invalidate the loadSourceText cache on navigation. r=jlast
https://hg.mozilla.org/integration/autoland/rev/ee3da1413835
Part 3: Pass originalText load failure through to UI instead of failing silently.
Pushed by jlaster@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/3befa22661a8
Part 1: Refactor loadSourceText to separate caching from logic. r=jlast
https://hg.mozilla.org/integration/mozilla-inbound/rev/35af4e6b5633
Part 2: Invalidate the loadSourceText cache on navigation. r=jlast
https://hg.mozilla.org/integration/mozilla-inbound/rev/f3500b0a2f3b
Part 3: Pass originalText load failure through to UI instead of failing silently. r=jlast
Status: ASSIGNED → RESOLVED
Closed: 8 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 67
Flags: needinfo?(lsmyth)
You need to log in before you can comment on or make changes to this bug.