Open Bug 2054066 Opened 1 day ago Updated 1 day ago

[IPC Urlbar] Make the message-path controller proxy a content module and let the child own controller construction

Categories

(Firefox :: Address Bar, task)

task

Tracking

()

ASSIGNED

People

(Reporter: dao, Assigned: dao)

References

(Blocks 1 open bug)

Details

(Whiteboard: [sng][mcab-hnt])

Attachments

(2 files)

No description provided.

UrlbarParentControllerProxy is the content-side stand-in a
UrlbarChildController holds in place of the real parent controller, so for a
content-process <moz-urlbar> it has to run in the content global. Move it from
a .sys.mjs system module to a content/ .mjs (registered in jar.mn,
dropped from moz.build) and import it statically, as content modules must be.

With the proxy built content-side, controller construction becomes symmetric:
UrlbarChildController builds #parent for both transports -- a real
UrlbarParentController in place on the direct path, a
UrlbarParentControllerProxy on the message path -- keyed on a new
UrlbarChild.usesMessagePath predicate. The actor no longer builds or caches the
direct-path controller: getOrCreateController and its #controllers WeakMap are
gone. That caching only deduped by input element, which <moz-urlbar> already
does (it runs #init() only when it has no controller and never clears it on
disconnect), so the WeakMap never served a hit.

Behavior-neutral on both paths in chrome. Worth verifying: reconnect reuse in
customize mode, which the dropped WeakMap nominally covered.

Assignee: nobody → dao+bmo
Status: NEW → ASSIGNED
Summary: [IPC Urlbar] Phase 6: Make the message-path controller proxy a content module and let the child own controller construction → [IPC Urlbar] Make the message-path controller proxy a content module and let the child own controller construction

The comments named the two transports inconsistently ("direct" vs "in-process",
"message path" vs "message-passing path" vs "wire path"). Settle on "direct
path" (synchronous, real controller reference) and "message path" (actor
messages), since the distinction is the transport, not the process boundary --
the chrome pref-on variant runs the message path in-process. "in-process" /
"cross-process" now appear only where the process boundary itself is the point.

Attachment #9606632 - Attachment description: Bug 2054066 - [IPC Urlbar] Phase 6: Make the message-path controller proxy a content module and let the child own controller construction. r?mbeier! → Bug 2054066 - [IPC Urlbar] Make the message-path controller proxy a content module and let the child own controller construction. r?mbeier!
Attachment #9606633 - Attachment description: Bug 2054066 - [IPC Urlbar] Phase 6: Use consistent direct-path / message-path terminology in comments. r?mbeier! → Bug 2054066 - [IPC Urlbar] Use consistent direct-path / message-path terminology in comments. r?mbeier!
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: