зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1610653 - Part 9: Do not use global this property assignment to define global variable in testing/modules. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D144116
This commit is contained in:
Родитель
b2f0fcf3c4
Коммит
acaf6f75b5
|
@ -31,14 +31,14 @@ const { ObjectUtils } = ChromeUtils.import(
|
|||
* test-only modules. This is false when the reporter is set by content scripts,
|
||||
* because they may still run in the parent process.
|
||||
*/
|
||||
var Assert = (this.Assert = function(reporterFunc, isDefault) {
|
||||
function Assert(reporterFunc, isDefault) {
|
||||
if (reporterFunc) {
|
||||
this.setReporter(reporterFunc);
|
||||
}
|
||||
if (isDefault) {
|
||||
Assert.setReporter(reporterFunc);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// This allows using the Assert object as an additional global instance.
|
||||
Object.setPrototypeOf(Assert, Assert.prototype);
|
||||
|
|
Загрузка…
Ссылка в новой задаче