Open
Bug 1494428
Opened 6 years ago
Updated 2 years ago
[remote-dbg-next] watchRuntime action is firing SUCCESS before finishing all async processing
Categories
(DevTools :: about:debugging, enhancement, P3)
DevTools
about:debugging
Tracking
(Not tracked)
NEW
People
(Reporter: jdescottes, Unassigned)
References
(Blocks 1 open bug)
Details
(Whiteboard: remote-debugging-technical-debt)
Follow up to Bug 1493968. We have the following action: function watchRuntime(id) { return async (dispatch, getState) => { dispatch({ type: WATCH_RUNTIME_START }); try { if (id === RUNTIMES.THIS_FIREFOX) { // THIS_FIREFOX connects and disconnects on the fly when opening the page. await dispatch(connectRuntime(RUNTIMES.THIS_FIREFOX)); } // The selected runtime should already have a connected client assigned. const runtime = findRuntimeById(id, getState().runtimes); await dispatch({ type: WATCH_RUNTIME_SUCCESS, runtime }); dispatch(Actions.requestExtensions()); dispatch(Actions.requestTabs()); dispatch(Actions.requestWorkers()); } catch (e) { dispatch({ type: WATCH_RUNTIME_FAILURE, error: e.message }); } }; } (https://searchfox.org/mozilla-central/rev/ce57be88b8aa2ad03ace1b9684cd6c361be5109f/devtools/client/aboutdebugging-new/src/actions/runtimes.js#114) The final dispatch is made with await dispatch({ type: WATCH_RUNTIME_SUCCESS, runtime }); but after that we dispatch other asynchronous actions that will retrieve the various targets. I think the overall idea is fine as we want to start displaying the runtime page as soon as we can monitor the client, and maybe don't wan't to wait for targets to arrive. However maybe we should have another dispatch at the end when all targets have been retrieved. Or we should have a loading indicator in the target panels to show that we are currently trying to fetch data.
Updated•6 years ago
|
Priority: -- → P2
Reporter | ||
Updated•6 years ago
|
Reporter | ||
Comment 2•6 years ago
|
||
Note that this cleanup would allow for a safer way to wait for about:debugging to be ready. See https://phabricator.services.mozilla.com/D10575#256508
Reporter | ||
Comment 3•6 years ago
|
||
filter on remote-debugging-next-move-m3-to-m2
Blocks: remote-debugging-ng-m2
Reporter | ||
Comment 4•6 years ago
|
||
filter on remote-debugging-next-move-m3-to-m2
Reporter | ||
Comment 5•6 years ago
|
||
filter on remote-debugging-next-move-m3-to-m2
No longer blocks: remote-debugging-ng-m3
Whiteboard: old-remote-debugging-ng-m3
Reporter | ||
Comment 6•5 years ago
|
||
filter on: remote-debugging-m2-reserve-cleanup
Whiteboard: old-remote-debugging-ng-m3 → remote-debugging-technical-debt
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•