Export ActorChild so it can be imported as symbol
Categories
(Toolkit :: Async Tooling, enhancement, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox66 | --- | fixed |
People
(Reporter: ato, Assigned: ato)
Details
Attachments
(1 file)
Classes are not automatically assigned to the globally exported
symbol, despite being listed in EXPORTED_SYMBOLS.
For example it is currently not possible to extract ActorChild this
way:
const {ActorChild} = ChromeUtils.import("resource://gre/modules/ActorChild.jsm", {});
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 1•5 years ago
|
||
Example of error message:
JavaScript error: chrome://remote/content/Actor.jsm, line 10: TypeError: class heritage ActorChild is not an object or null
Assignee | ||
Comment 2•5 years ago
|
||
JS classes, unlike var or const, are not automatically made part
of the global scope in JSMs. This makes it impossible to import
ActorChild this way:
const {ActorChild} = ChromeUtils.import("resource://gre/modules/ActorChild.jsm", {});
By assigning the ActorChild class to this we work around this problem.
Pushed by atolfsen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4b6549b8a601 toolkit: export ActorChild in global scope; r=Felipe
Comment 4•5 years ago
|
||
Backed out changeset 4b6549b8a601 (bug 1521385) for Android build bustage
Log:
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=222989253&repo=autoland&lineNumber=43
Push with failures:
https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=4b6549b8a6012efa6a3b250b26fff7cf0d1ca564
Backout:
https://hg.mozilla.org/integration/autoland/rev/32440769ba00494e8e96bea0af17e792688ea7a1
Assignee | ||
Comment 5•5 years ago
|
||
I don’t expect this is a failure of the patch, but of the hg checkout
on the Android builder. Pushing again.
Pushed by dvarga@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2b62559fb02b toolkit: export ActorChild in global scope; r=Felipe
Comment 7•5 years ago
|
||
It seems there was a issue with the instance on witch Android build were running from and the backout wasn't really necessary.
After figuring that out, we grafted and push your patch onto autoland.
Sorry for that.
Comment 8•5 years ago
|
||
bugherder |
Description
•