Closed Bug 1708734 Opened 4 years ago Closed 3 years ago

Simplify specifying JSWindowActor listeners which don't force actor creation

Categories

(Core :: DOM: Content Processes, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
90 Branch
Fission Milestone M7a
Tracking Status
firefox90 --- fixed

People

(Reporter: nika, Assigned: nika)

References

(Blocks 1 open bug)

Details

(Whiteboard: [fission-perf])

Attachments

(4 files)

Currently all event listeners specified for JSWindowActors always force creation of the actor when they are fired, however it appears to be a common pattern to use listeners like pagehide or unload to perform cleanup of a child-side actor. We should provide an option to request that one of these listeners should only be observed if the actor already exists to avoid these listeners creating actors as the page they're connected to is destroyed.

This may improve some navigation performance with fission by avoiding the unload and pagehide events causing the creation of the MarionetteEventsChild, LinkHandlerChild and AboutReaderChild actors for the temporary initial about:blank document during process switches.

Assignee: nobody → nika
Blocks: fission-perf
Severity: -- → N/A
Fission Milestone: --- → M7a
Priority: -- → P2
Status: NEW → ASSIGNED

(In reply to Nika Layzell [:nika] (ni? for response) from comment #0)

This may improve some navigation performance with fission by avoiding the unload and pagehide events causing the creation of the MarionetteEventsChild, LinkHandlerChild and AboutReaderChild actors for the temporary initial about:blank document during process switches.

Please note that the navigation logic in Marionette actually requires the pagehide event to be sent by the MarionetteEventsChild actor. It is basically our initial signal that a new page navigation has been started. When this gets removed Marionette will hang on each and every page navigation.

Pushed by nlayzell@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e3a2ec3b19b4 Part 1: Add getExistingActor to actor managers, r=kmag https://hg.mozilla.org/integration/autoland/rev/93b3e76c8702 Part 2: Allow specifying that an actor should not be created when event is fired, r=kmag https://hg.mozilla.org/integration/autoland/rev/0849b7003a19 Part 3: Add tests for createActor: false, r=kmag https://hg.mozilla.org/integration/autoland/rev/19653a51145c Part 4: Don't create the actor for some JSActor events, r=mconley,marionette-reviewers,whimboo
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: