Bug 1765167 Comment 0 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

Similar to bug 1765156

We have 2 ways to import JSM. `Cu.import` and `ChromeUtils.import`.

`ChromeUtils.import` returns exports object, but `Cu.import` returns global object.
The former supports lexical variables, but the latter doesn't have them, so
the former requires variables defined on the JSM's global this property.

To achieve bug 1610653, we should replace `Cu.import` with `ChromeUtils.import`,
and then deprecate `Cu.import`, to avoid future confusion.
Similar to bug 1765156

We have 2 ways to import JSM. `ChromeUtils.import` and `Cu.import`.

`ChromeUtils.import` returns exports object, but `Cu.import` returns global object.
The former supports lexical variables, but the latter doesn't have them, so
the latter requires variables defined on the JSM's global this property.

To achieve bug 1610653, we should replace `Cu.import` with `ChromeUtils.import`,
and then deprecate `Cu.import`, to avoid future confusion.

Back to Bug 1765167 Comment 0