ts_paint depends on the first MozAfterPaint in the content window, not in the
browser as I had thought. After MozAfterPaint, it pings the parent process and
waits for a response (see `TalosPowers.loadPromise`), and then it ends. It will
wait up to 500ms for the response before timing out. Source:
https://dxr.mozilla.org/mozilla-central/source/testing/talos/talos/startup_test/tspaint_test.html
At first I modified UrlbarProviderSearchTips to wait on
`browser-delayed-startup-finished`, but the jsm kept appearing in ts_paint
profiles, and that's how I found out the above. So that's not sufficient.
There's already a promise in browser.js for waiting on the first paint in the
first content window, but it's "private." I added a public getter for it and
changed the name so it's clearer that it's related to the first content window,
not the browser window.
I also added a 500ms timeout just like the worst case in ts_paint.
Both checks (paint and the timeout) are done for a particular browser window
only the first time UrlbarProviderSearchTips sees it.
Finally, UrlbarProviderSearchTips can avoid importing BrowserWindowTracker
during startup by having browser.js pass the window to its `onLocationChange`. I
saw the BrowserWindowTracker.jsm import in some profiles while working on this.
With these changes, UrlbarProviderSearchTips no longer appears in ts_paint
profiles when I run it locally -- except when it is imported by
UrlbarProvidersManager, which ultimately happens due to setting the placeholder
text in the urlbar input. But even that doesn't appear in every profile.
I've also included the reordering of checks from a previous version of this
patch. That's still worth doing in general even if it's no longer relevant to
ts_paint.
Differential Revision: https://phabricator.services.mozilla.com/D80799
Rather than sending the strings down to the content process and back up instead
have the content process just send the media type which when prefixed with
`media-` gives us the fluent ID for the string. Ideally this would allow us to
just set that as the `data-l10n-id` for the items but since this tree is
generated by a custom `nsITreeView` implementation that isn't an option so this
still caches the strings on load.
A single formatValues call will be more performant.
Differential Revision: https://phabricator.services.mozilla.com/D77897
Most of TelemetryController is only used in the parent process, but is
currently loaded in all processes, where it needlessly consumes tens of KB of
memory. This patch splits the parent- and content-specific parts, and only
loads each in the processes where they're needed.
Differential Revision: https://phabricator.services.mozilla.com/D79870
Most of TelemetryController is only used in the parent process, but is
currently loaded in all processes, where it needlessly consumes tens of KB of
memory. This patch splits the parent- and content-specific parts, and only
loads each in the processes where they're needed.
Differential Revision: https://phabricator.services.mozilla.com/D79870
Most of TelemetryController is only used in the parent process, but is
currently loaded in all processes, where it needlessly consumes tens of KB of
memory. This patch splits the parent- and content-specific parts, and only
loads each in the processes where they're needed.
Differential Revision: https://phabricator.services.mozilla.com/D79870
The timeout happens when we get an old element of the 'errorCode'
element in the test code. In this patch, we fix this issue by getting
the element every time we check the condition of the 'errorCode'
condition.
Differential Revision: https://phabricator.services.mozilla.com/D80214
Bug 1636207 updated webrtcUI.getActiveStreams to support getting window streams. This updates
the call sites in the legacy webrtc indicator, so we get all streams. In the affected call sites
the streams are used to find and focus the parent window and show the permissions doorhanger.
Differential Revision: https://phabricator.services.mozilla.com/D80030
Caching filenames in 32-entry LRU array covers >95% of calls, and makes the average `Filename()` call 5 to 10 times cheaper.
browser_start_content_mainthreadio.js needed to be updated to handle operations that now have a filename thanks to the cache.
Differential Revision: https://phabricator.services.mozilla.com/D79767