Closed
Bug 1900611
Opened 2 years ago
Closed 2 years ago
TopSites getSites should wait until initialization is complete
Categories
(Firefox :: Top Sites, task, P2)
Firefox
Top Sites
Tracking
()
RESOLVED
FIXED
129 Branch
| Tracking | Status | |
|---|---|---|
| firefox129 | --- | fixed |
People
(Reporter: jteow, Assigned: jteow)
References
(Blocks 1 open bug)
Details
(Whiteboard: [sng])
Attachments
(1 file)
|
Bug 1900611 - Have multiple calls to TopSites.getSites actually wait until init is complete - r?dao!
48 bytes,
text/x-phabricator-request
|
Details | Review |
While trying to implement the integration with New Tab I realized that it's possible for multiple executions to getSites to return the wrong value.
Basically if one call to TopSites.getSites triggers an initialization, we flip the #inited flag. The subsequent call will then pass the check, at which point it will likely receive an empty array because TopSites hasn't finished initializing yet.
I also moved updateCustomSearchShortcuts into init because the TopSitesFeed implementation calls them both in the INIT action. This change avoids callers from knowing this relationship.
Updated•2 years ago
|
| Assignee | ||
Comment 1•2 years ago
|
||
Pushed by jteow@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d8cb11d64dbb
Have multiple calls to TopSites.getSites actually wait until init is complete - r=dao
Comment 3•2 years ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 2 years ago
status-firefox129:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 129 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•