зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1855545: Avoid an infinite loop in ShoppingUtils.init r=Mardak
Differential Revision: https://phabricator.services.mozilla.com/D189420
This commit is contained in:
Родитель
f5dcdf7b2d
Коммит
7e70db6c73
|
@ -61,9 +61,12 @@ export const ShoppingUtils = {
|
|||
this.onNimbusUpdate = this.onNimbusUpdate.bind(this);
|
||||
|
||||
if (!this.registered) {
|
||||
// Note (bug 1855545): we must set `this.registered` before calling
|
||||
// `onUpdate`, as it will immediately invoke `this.onNimbusUpdate`,
|
||||
// which in turn calls `ShoppingUtils.init`, creating an infinite loop.
|
||||
this.registered = true;
|
||||
lazy.NimbusFeatures.shopping2023.onUpdate(this.onNimbusUpdate);
|
||||
this._updateNimbusVariables();
|
||||
this.registered = true;
|
||||
}
|
||||
|
||||
if (!this.nimbusEnabled) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче