-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1943130 - [devtools] Avoid fetching breakable lines more than onc…
…e per source. r=devtools-reviewers,bomsy We can't use either `memoizableAction`, nor the `promise` middleware. * `memoizableAction` helps memoize on the long run, but doesn't handle mutliple calls made for the same ressource *before* the async computation of the value. * `promise` middleware explicitely prevents exposing the actual Promise to the reducer, which prevents exposing it to the selector. Ultimately, we have to expose that async promise done to compute the reducer data, that's the one the frontend should wait for on any subsequent run for the same ressource. These two existing APIs are weak and should probably be removed in favor of something similar to the current patch. Last, but not least, this approach doesn't leak all data indefinitely until DevTools closes (`memoizableAction` does) Also tweak the new-source action in order to force fetching breakable lines of HTML sources, only if that source is currently selected. We were computing breakable lines for all HTML sources, for example when having iframes. Differential Revision: https://phabricator.services.mozilla.com/D235208
- Loading branch information
Showing
6 changed files
with
116 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters