mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-21 01:05:45 +00:00
8cf8a6212d
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 |
||
---|---|---|
.. | ||
actors | ||
app | ||
base | ||
branding | ||
components | ||
config | ||
docs | ||
extensions | ||
fonts | ||
fxr | ||
installer | ||
locales | ||
modules | ||
themes | ||
tools/mozscreenshots | ||
.eslintrc.js | ||
app.mozbuild | ||
build.mk | ||
confvars.sh | ||
defs.mk | ||
l10n-registry.manifest | ||
LICENSE | ||
Makefile.in | ||
moz.build | ||
moz.configure |