Closed Bug 1593487 Opened 8 months ago Closed 8 months ago

moduleURI vs module for the location of the jsm for JSWindowActors (vs. legacy actors) is a footgun

Categories

(Toolkit :: General, task, P3)

task

Tracking

()

RESOLVED FIXED
mozilla72
Fission Milestone M4
Tracking Status
firefox72 --- fixed

People

(Reporter: Gijs, Assigned: Gijs)

References

Details

Attachments

(1 file)

Legacy actors use a module property. "New", fission-compatible actors use a moduleURI property. If a moduleURI property is missing, no clear error messages appear in the browser console. This has repeatedly bitten people trying to convert legacy actors to fission, including me.

We should make ChromeUtils.registerWindowActor throw an exception with a clear error message (perhaps even including "did you specify 'module' instead of 'moduleURI' ?") for a module where it gets a WindowActorSidedOptions without a moduleURI property, and ensure it appears in the browser console. AFAICT it makes no sense to specify either the child or parent side without a module to load.

Gijs, looks like this needs to be in the backlog for toolkit:general, can you give it a priority? Is there anyone in particular to need-info to make this actionable?

Flags: needinfo?(gijskruitbosch+bugs)

I think this isn't super hard. I think we'd want to do something at https://searchfox.org/mozilla-central/rev/8b7aa8af652f87d39349067a5bc9c0256bf6dedc/dom/ipc/JSWindowActorService.cpp#114-120 if mParent or mChild was passed but without the module URI. We can use the aRv ErrorResult to return an error.

Leaving self-needinfo to look at this, hopefully tomorrow.

Priority: -- → P3
Assignee: nobody → gijskruitbosch+bugs
Status: NEW → ASSIGNED
Flags: needinfo?(gijskruitbosch+bugs)
Blocks: 1595048
Pushed by gijskruitbosch@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/dacb2051e47e
tighten up registerWindowActor's handling of nonsensical actor specifications and remove cruft, r=nika,mconley
Status: ASSIGNED → RESOLVED
Closed: 8 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla72

Retroactively moving fixed bugs whose summaries mention "Fission" (or other Fission-related keywords) but are not assigned to a Fission Milestone to an appropriate Fission Milestone.

This will generate a lot of bugmail, so you can filter your bugmail for the following UUID and delete them en masse:

0ee3c76a-bc79-4eb2-8d12-05dc0b68e732

Fission Milestone: --- → M4
You need to log in before you can comment on or make changes to this bug.