Bug 1686301 - Report errors in skeleton UI via telemetry r=mconley,emalysz

This is, for the most part, just a large refactor of the skeleton UI stuff to
support coarse-grained error reporting via telemetry. There are a few slight
changes in how we handle some errors. For example, if CreateWindow fails, we
will now bail out and report the failure. The flow for the happy path, however,
should remain unchanged.

Differential Revision: https://phabricator.services.mozilla.com/D102098
This commit is contained in:
Doug Thayer
2021-01-26 16:10:20 +00:00
parent 67835c4698
commit 4aa8dc8b67
7 changed files with 585 additions and 425 deletions

View File

@@ -1910,7 +1910,7 @@ nsresult AppWindow::MaybeSaveEarlyWindowPersistentValues(
settings.rtlEnabled = intl::LocaleService::GetInstance()->IsAppLocaleRTL();
PersistPreXULSkeletonUIValues(settings);
Unused << PersistPreXULSkeletonUIValues(settings);
#endif
return NS_OK;
@@ -3141,7 +3141,7 @@ AppWindow::OnStateChange(nsIWebProgress* aProgress, nsIRequest* aRequest,
RefPtr<Promise> promise = l10n->Ready();
MOZ_ASSERT(promise);
RefPtr<L10nReadyPromiseHandler> handler =
new L10nReadyPromiseHandler(menubarDoc, mWindow);
new L10nReadyPromiseHandler(menubarDoc, mWindow);
promise->AppendNativeHandler(handler);
} else {
// Something went wrong loading the doc and l10n wasn't created. This