This repository was archived by the owner on Feb 29, 2020. It is now read-only.
fix (systemaddon): #3377 dont skip refresh if already refreshing#3386
Merged
Mardak merged 1 commit intomozilla:masterfrom Sep 8, 2017
Merged
fix (systemaddon): #3377 dont skip refresh if already refreshing#3386Mardak merged 1 commit intomozilla:masterfrom
Mardak merged 1 commit intomozilla:masterfrom
Conversation
Contributor
|
This seems reasonable as long as there isn't a problem with initialising twice. I mean the actual fix in my patch was ensuring initialisation happens before refresh, which this doesn't affect. |
Member
|
Well, the fix here in addition to having TippyTop initialize twice, it also causes refresh to happen twice (or each additional refresh+init). We can relatively easily fix the multi-init by having init know it's initializing and return a promise for when the initial init finishes, but this still has all I'll think about this a bit more… |
Mardak
approved these changes
Sep 8, 2017
Member
Mardak
left a comment
There was a problem hiding this comment.
eh. let's take it for the export. should be a corner case………
Collaborator
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.
This is one (simple) way to fix #3377 the problem.
The downside is that TippyTop provider can be initialized twice in some cases, but that does no harm other than wasting a few cycles.
Another option is to not call
refresh()onINITand wait untilNEW_TAB_LOAD. Downside of that is the first tab load might take more time.There are more complex solutions. Like we could have some sort of list of targets that need to be refreshed when the current refresh is complete.
@AdamHillier @Mardak thoughts?