Closed Bug 1968779 Opened 2 months ago Closed 2 months ago

Wait for builtin-newtab.js to signal that it has finished onStartup before allowing ActivityStream to be instantiated

Categories

(Firefox :: New Tab Page, task)

task

Tracking

()

RESOLVED FIXED
141 Branch
Tracking Status
firefox139 --- unaffected
firefox140 + fixed
firefox141 --- fixed

People

(Reporter: mconley, Assigned: mconley)

References

(Blocks 1 open bug)

Details

(Whiteboard: [hnt-trainhop])

Attachments

(2 files)

We have a routine here that attempts to wait for the built-in newtab addon to be ready (and to have run its onStartup routine in builtin-newtab.js) before proceeding with instantiating and initializing ActivityStream.

According to willdurand, despite waiting for the readyPromise on the addon, there are still potentially cases where the builtin-newtab.js's onStartup routine will still not have run. Looking at some Telemetry, it looks like despite no clients firing false for the addonReadySuccess metric here, we are seeing clients sending false for activityStreamCtorSuccess here.

I think if we can have the AboutNewTabRedirector hold on to a Promise instance, and have that Promise resolve when the builtin-newtab.js finishes running onStartup, we can have AboutNewTab.sys.mjs's onBrowserReady wait for that.

I'll move the addonReadySuccess metric into builtin-newtab.js to also help us determine if something in there happens to throw for some reason.

Assignee: nobody → mconley

[Tracking Requested - why for this release]:

I'll also want to get this uplifted to 140 Beta for our newtab train-hop test later in June.

Attachment #9491039 - Attachment description: Bug 1968779 - Wait for builtin-newtab.js to signal that it has finished onStartup before allowing ActivityStream to be instantiated. r?pdahiya!,#home-newtab-reviewers! → Bug 1968779 - Wait for builtin-newtab.js to signal that it has finished onStartup before allowing ActivityStream to be instantiated. r?pdahiya!
Pushed by mconley@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/0fea06ee4ab3 Wait for builtin-newtab.js to signal that it has finished onStartup before allowing ActivityStream to be instantiated. r=pdahiya
Status: NEW → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 141 Branch
Attachment #9491512 - Flags: approval-mozilla-beta?

firefox-beta Uplift Approval Request

  • User impact if declined: Some users may experience a race condition where their newtab / home pages are blank for the remainder of their browsing session.
  • Code covered by automated testing: yes
  • Fix verified in Nightly: yes
  • Needs manual QE test: no
  • Steps to reproduce for manual QE testing: N/A
  • Risk associated with taking this patch: Low.
  • Explanation of risk level: Instead of waiting for the AddonManager to say that the addon has finished running through startup, we're having the addon tell AboutNewTab instead. It's just a minor shuffling of responsibility.
  • String changes made/needed: None.
  • Is Android affected?: no
Attachment #9491512 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
See Also: → 1963537
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: