Closed Bug 1764773 Opened 3 years ago Closed 3 years ago

Do not use global this to define global variable in jsm

Categories

(Firefox :: General, task, P3)

task

Tracking

()

RESOLVED DUPLICATE of bug 1610653

People

(Reporter: arai, Assigned: arai)

Details

As a preparation for esmification, global this usage needs to be reduced.

There are several case that global variable is defined by this.foo = ..., but it can be rewritten as var foo = ....

This bug does not cover the case that copies lexical variable to global variable, because that cannot be rewritten until we switch to ES module:
Some other code does the following to copy lexical variable to global variable, but this is not necessary to export.

const foo = 10;
this.foo = foo;
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → DUPLICATE
No longer blocks: 1607331
You need to log in before you can comment on or make changes to this bug.