Bug 1242505 - Part 1 - Handle more rejections in code exercised by browser-chrome tests. r=Mossop

MozReview-Commit-ID: JTMgC2XwzX2

--HG--
extra : rebase_source : 83a77cbfe5629abe99ae575b57592361ea9627b8
This commit is contained in:
Paolo Amadini 2017-05-25 15:00:22 +01:00
Родитель 07056b1bad
Коммит 6886a4fb81
5 изменённых файлов: 9 добавлений и 6 удалений

Просмотреть файл

@ -108,6 +108,8 @@ class BasePopup {
this.destroyed = true;
this.browserLoadedDeferred.reject(new Error("Popup destroyed"));
// Ignore unhandled rejections if the "attach" method is not called.
this.browserLoaded.catch(() => {});
BasePopup.instances.get(this.window).delete(this.extension);

Просмотреть файл

@ -1310,7 +1310,7 @@ var SessionStoreInternal = {
// Let everyone know we're done.
this._deferredInitialized.resolve();
}
}, console.error);
}).catch(console.error);
},
/**

Просмотреть файл

@ -255,7 +255,8 @@ this.PreferenceExperiments = {
preferenceName,
observer(newValue) {
if (newValue !== preferenceValue) {
PreferenceExperiments.stop(experimentName, false);
PreferenceExperiments.stop(experimentName, false)
.catch(Cu.reportError);
}
},
};

Просмотреть файл

@ -383,7 +383,7 @@ this.TabCrashHandler = {
CrashSubmit.submit(dumpID, {
recordSubmission: true,
extraExtraKeyVals,
}).then(null, Cu.reportError);
}).catch(Cu.reportError);
this.prefs.setBoolPref("sendReport", true);
this.prefs.setBoolPref("includeURL", includeURL);
@ -881,7 +881,7 @@ this.UnsubmittedCrashHandler = {
extraExtraKeyVals: {
"SubmittedFromInfobar": true,
},
});
}).catch(Cu.reportError);
}
},
};
@ -995,7 +995,7 @@ this.PluginCrashReporter = {
});
if (browserDumpID)
CrashSubmit.submit(browserDumpID);
CrashSubmit.submit(browserDumpID).catch(Cu.reportError);
this.broadcastState(runID, "submitting");

Просмотреть файл

@ -290,7 +290,7 @@ var WebExtensionInspectedWindowActor = protocol.ActorClassWithSpec(
})
.catch(err => {
delete this.customizedReload;
throw err;
console.error(err);
});
} catch (err) {
// Cancel the customized reload (if any) on exception during the