Before this patch, the about:home/about:newtab Redux store code had some
middleware that queued any messages sent from the page before the parent
had sent any messages. Presumably this was so that those messages wouldn't
be dropped if they were sent while the parent process was still setting
up its Feeds.
Unfortunately, there's a race here - if the parent process _is_ ready and
just chooses not to send any messages right away, the loaded about:home/about:newtab
document will just hold on to any actions until the parent process has
sent something down to it.
The Talos test that was failing here was waiting for the initial about:home
page to send a message which would record a Telemetry probe. That message
wasn't arriving in time. Presumably, _eventually_ the parent process would
have sent a message down to the about:home page which would flush the actions,
but the Talos test would time out before that would occur.
This patch changes things by having the _parent_ process queue any messages
sent from the content in the event that the ActivityStreamMessageChannel
is not yet set up. Once it is set up, those messages are dispatched after
the simulated NEW_TAB_INIT and NEW_TAB_LOAD for those early tabs are
sent to the parent process Redux store.
Differential Revision: https://phabricator.services.mozilla.com/D195179
Make the main Spotlight image always lazy load, and make other
Spotlight/about:welcome images lazy load if the configured src is an
http or https URL. This is to fix a bug where slow image loading due to
network issues could cause Spotlight modals to hang while blocking
interaction with the rest of the browser.
Differential Revision: https://phabricator.services.mozilla.com/D180483
Significant portions of this were written by Shane Hughes <shughes@mozilla.com> -
specifically the parts that move the Firefox Account sign-in flow for tabs into
a SpecialMessageAction, and making AboutWelcomeUtils.handleUserAction return
a Promise.
Differential Revision: https://phabricator.services.mozilla.com/D176453
Significant portions of this were written by Shane Hughes <shughes@mozilla.com> -
specifically the parts that move the Firefox Account sign-in flow for tabs into
a SpecialMessageAction, and making AboutWelcomeUtils.handleUserAction return
a Promise.
Differential Revision: https://phabricator.services.mozilla.com/D176453
Unify the values of "source" and "page" as used in FeatureCallout.sys.mjs:
- Explicitly pass in a value for "page" when instantiating a Feature Callout and use this for the value of "page" when sending Feature Callout telemetry and as the "source" when making calls to `sendTriggerMessage`. This avoids the risk of including non-about: page URLs or PDF file extensions in our telemetry.
- Set the value of "page" in an HTML data attribute that can be accessed for use in about:welcome telemetry for Spotlight and Feature Callouts.
- Update references to the page value previously used as the page/source for telemetry from `about:firefoxview` Feature Callouts from "firefoxview" to "about:firefoxview"
- Pass the token "chrome" when creating a callout from the browser chrome and update references to the source in PDF.js messages' targeting
- Update the page value expected in automated tests as needed
Differential Revision: https://phabricator.services.mozilla.com/D165910
Update About Welcome's invocations of window functions to use optional
chaining to avoid errors when they are undefined. Then, the surfaces
that load the About Welcome bundle will no longer need to define those
references as empty functions.
Differential Revision: https://phabricator.services.mozilla.com/D155011
Update About Welcome's invocations of window functions to use optional
chaining to avoid errors when they are undefined. Then, the surfaces
that load the About Welcome bundle will no longer need to define those
references as empty functions.
Differential Revision: https://phabricator.services.mozilla.com/D155011