feat(21068): remove action queue for new MV3#21410
Merged
DDDDDanica merged 1 commit intodevelopfrom Oct 19, 2023
Merged
Conversation
Contributor
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
6e171fc to
7e276cb
Compare
7e276cb to
4afc879
Compare
Collaborator
Builds ready [4afc879]
Page Load Metrics (995 ± 386 ms)
Bundle size diffs
|
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## develop #21410 +/- ##
===========================================
- Coverage 68.54% 68.50% -0.04%
===========================================
Files 1029 1029
Lines 41013 40953 -60
Branches 10962 10941 -21
===========================================
- Hits 28110 28052 -58
+ Misses 12903 12901 -2
☔ View full report in Codecov by Sentry. |
pedronfigueiredo
approved these changes
Oct 19, 2023
NidhiKJha
approved these changes
Oct 19, 2023
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
For our purposes at MetaMask, one of the most significant differences between manifest v3 and v2 extension implementations was that the background process runs on a service worker that restarts every 5 minutes. However, we recently learned that Chrome dropped that requirement, which means the mv3-specific code still needs to persist in the service worker state, but the implementation can be simplified from what we have previously implemented.
To remove the action queue functionality, we can essentially un-deprecate callBackgroundMethod and simplify it as well as submitRequestToBackground.
We can also simply call background., but since these methods use callbacks, it's still useful to keep a wrapper function around the background methods that promisifies them.
Reference MR which added action queue previously:
#15337
Manual testing steps
Screenshots/Recordings
If applicable, add screenshots and/or recordings to visualize the before and after of your change.
Before
[screenshot]
After
[screenshot]
Related issues
Implements: #21068
Pre-merge author checklist
Pre-merge reviewer checklist