mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 13:21:05 +00:00
Bug 1578381 - Rename HomePage.init to delayedStartup to better describe when it gets called normally. r=mixedpuppy
Depends on D48169 Differential Revision: https://phabricator.services.mozilla.com/D48195 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
3bd76b3e1b
commit
526c10a89d
@ -2072,7 +2072,7 @@ var gBrowserInit = {
|
||||
BrowserSearch.delayedStartupInit();
|
||||
AutoShowBookmarksToolbar.init();
|
||||
gProtectionsHandler.init();
|
||||
HomePage.init().catch(Cu.reportError);
|
||||
HomePage.delayedStartup().catch(Cu.reportError);
|
||||
|
||||
let safeMode = document.getElementById("helpSafeMode");
|
||||
if (Services.appinfo.inSafeMode) {
|
||||
|
@ -71,7 +71,7 @@ let HomePage = {
|
||||
* homepage, but this is deemed acceptable, as we'll correct it once
|
||||
* initialised.
|
||||
*/
|
||||
async init() {
|
||||
async delayedStartup() {
|
||||
if (this._initializationPromise) {
|
||||
await this._initializationPromise;
|
||||
return;
|
||||
@ -178,7 +178,7 @@ let HomePage = {
|
||||
* `|` separated list of URLs.
|
||||
*/
|
||||
async set(value) {
|
||||
await this.init();
|
||||
await this.delayedStartup();
|
||||
|
||||
if (await this.shouldIgnore(value)) {
|
||||
Cu.reportError(
|
||||
@ -234,7 +234,7 @@ let HomePage = {
|
||||
* True if the url should be ignored.
|
||||
*/
|
||||
async shouldIgnore(url) {
|
||||
await this.init();
|
||||
await this.delayedStartup();
|
||||
|
||||
const lowerURL = url.toLowerCase();
|
||||
return this._ignoreList.some(code => lowerURL.includes(code.toLowerCase()));
|
||||
|
@ -44,7 +44,7 @@ add_task(async function test_initWithIgnoredPageCausesReset() {
|
||||
);
|
||||
Assert.ok(HomePage.overridden, "Should have overriden the homepage");
|
||||
|
||||
await HomePage.init();
|
||||
await HomePage.delayedStartup();
|
||||
|
||||
Assert.ok(
|
||||
!HomePage.overridden,
|
||||
|
Loading…
Reference in New Issue
Block a user