commit e2b9f13f8c3148badf58b9036eeee290c3079e5c
parent 263e474fd79da4adb5d051c0682b9808570e891c
Author: Jens Stutte <jstutte@mozilla.com>
Date: Wed, 1 Oct 2025 07:27:29 +0000
Bug 1991086 - Check for reentrancy in AboutNewTab.init(). r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D266353
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/browser/modules/AboutNewTab.sys.mjs b/browser/modules/AboutNewTab.sys.mjs
@@ -46,6 +46,10 @@ export const AboutNewTab = {
* init - Initializes an instance of Activity Stream if one doesn't exist already.
*/
init() {
+ if (this.initialized) {
+ return;
+ }
+
Services.obs.addObserver(this, TOPIC_APP_QUIT);
if (!AppConstants.RELEASE_OR_BETA) {
XPCOMUtils.defineLazyPreferenceGetter(