Use providers in the VM factories to respect the dep di semantics #1145
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.
Task/Issue URL: https://app.asana.com/0/414730916066338/1200093914838515/f
Tech Design URL:
CC:
Description:
#1123 introduced a bug that was detected by our pixels.
singleton-- as they should besingletonthat effectively makes all VM dependenciessingleton. Regardless of whether they are actually declare as such or notThis PR makes all the factories to provide
providersof the dependencies, rather than the actual instance. So that they respect how the instances declare themselves when injected, ie.singletonor multiple instances.In particular, the effects can be seen with the
fw_pixels. They are fired multiple times (one per fragment) when they should fire only once.Steps to test this PR:
App compiles
install/upgrade the app from this branch
use the SERP to perform searches
form the SERP, open several tabs
add/remove bookmarks
add/remove fireproof sites
navigate to settings screen
use fire button
clear app data and go through onboarding UX
for all above, verify app works as expected
install/upgrade from this branch
open several tabs and ensure they are active
ensure
Ask When Signing Inis enabled insidesettings -> fireproof sitesopen a new tab and log into facebook.com (or any other login you may want)
verify the dialog to fireproof the site appears
navigate to any other of the active tabs
verify no dialog appears
verify
m_fw_xxare only shown onceInternal references:
Software Engineering Expectations
Technical Design Template