Audit eslint-env mozilla/frame-script consumer
Categories
(Developer Infrastructure :: Lint and Formatting, task)
Tracking
(firefox105 fixed)
Tracking | Status | |
---|---|---|
firefox105 | --- | fixed |
People
(Reporter: arai, Assigned: arai)
References
(Blocks 1 open bug)
Details
Attachments
(11 files)
Bug 1780543 - Part 1: Use eslint-env mozilla/frame-script consistently in frame script. r?Standard8!
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review |
Frame scripts are supposed to have /* eslint-env mozilla/frame-script */
line, but there are 2 problematic cases:
- the file is a frame script, but it doesn't have
/* eslint-env mozilla/frame-script */
line - the file is not a frame script, but it has
/* eslint-env mozilla/frame-script */
line
One case of the latter is remote page scripts, that has subset of frame-script environment this is unrelated environment.
We should add dedicate environment for it and use it instead.
Cu.exportFunction(this.sendAsyncMessage.bind(this), window, {
defineAs: "RPMSendAsyncMessage",
});
Cu.exportFunction(this.addMessageListener.bind(this), window, {
defineAs: "RPMAddMessageListener",
allowCallbacks: true,
});
Cu.exportFunction(this.removeMessageListener.bind(this), window, {
defineAs: "RPMRemoveMessageListener",
allowCallbacks: true,
});
Assignee | ||
Comment 1•2 years ago
|
||
looks like I misunderstood about RPM*
propreties defined in frame-script.js
.
mozilla/frame-script
definition seems to have mix of frame script and remote pages,
and RPM*
properties must be moved to remote page environment.
Assignee | ||
Comment 2•2 years ago
|
||
Assignee | ||
Comment 3•2 years ago
|
||
Depends on D152426
Assignee | ||
Comment 4•2 years ago
|
||
Depends on D152427
Assignee | ||
Comment 5•2 years ago
|
||
Depends on D152428
Assignee | ||
Comment 6•2 years ago
|
||
Depends on D152429
Assignee | ||
Comment 7•2 years ago
|
||
Depends on D152430
Assignee | ||
Comment 8•2 years ago
|
||
Depends on D152431
Comment 9•2 years ago
|
||
Thank you for working on this, it is really nice to have these split up into more meaningful names and scopes.
In addition to my document comments, please could you update this section of the docs? Probably pointing it to the environment page would be helpful.
Assignee | ||
Comment 10•2 years ago
|
||
Depends on D152432
Assignee | ||
Comment 11•2 years ago
|
||
Also define Components and Services, that's enabled by default on sandbox.
Depends on D152646
Assignee | ||
Comment 12•2 years ago
|
||
Also update the list of variables.
Depends on D152647
Assignee | ||
Comment 13•2 years ago
|
||
Depends on D152648
Comment 14•2 years ago
|
||
Comment 15•2 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/b3feda5b27e1
https://hg.mozilla.org/mozilla-central/rev/ae908c7f89f2
https://hg.mozilla.org/mozilla-central/rev/e0ba4db5a86b
https://hg.mozilla.org/mozilla-central/rev/3b36e3518d0f
https://hg.mozilla.org/mozilla-central/rev/fe18343ba5e6
https://hg.mozilla.org/mozilla-central/rev/d17b9468e8e1
https://hg.mozilla.org/mozilla-central/rev/6c9f57ac30c3
https://hg.mozilla.org/mozilla-central/rev/2751a3bb2d57
https://hg.mozilla.org/mozilla-central/rev/54b6884df84e
https://hg.mozilla.org/mozilla-central/rev/dda806f50320
https://hg.mozilla.org/mozilla-central/rev/b1c809ded882
Updated•2 years ago
|
Description
•