Use a content-safe deepEqual in urlbar content modules instead of ObjectUtils
Categories
(Firefox :: Address Bar, task)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox154 | --- | fixed |
People
(Reporter: dao, Assigned: dao)
References
Details
(Whiteboard: [sng][mcab-hnt])
Attachments
(1 external file)
The urlbar content modules (UrlbarInput, SmartbarInput, UrlbarView, UrlbarResult) call ObjectUtils.deepEqual from resource://gre/modules/ObjectUtils.sys.mjs, a system module a content-web realm can't import -- which blocks these modules from running in a content process.
Add a small content-safe UrlbarShared.deepEqual (for plain JSON-like data) and route all the call sites through it, dropping the ObjectUtils imports. The compared data is all plain objects/arrays/primitives (search modes, engine-title lists, view buttons/templates, row labels, highlight tokens), so ObjectUtils's general-purpose handling (Map/Set/Date/etc.) isn't needed. deepEqual is a pure function, so it needs no routing through the UrlbarChild actor. Behavior-neutral.
Updated•3 months ago
|
| Assignee | ||
Comment 1•3 months ago
|
||
UrlbarInput, SmartbarInput, UrlbarView, and UrlbarResult compared plain data with
ObjectUtils.deepEqual, a system module a content-web realm can't import. Add a
content-safe UrlbarShared.deepEqual (plain JSON-like data only -- arrays, objects,
primitives) and route the eight call sites through it, dropping the ObjectUtils
imports.
The compared data is all plain (search modes, engine-title lists, view
buttons/templates, row labels, highlight tokens), so ObjectUtils's Map/Set/Date
handling isn't needed. deepEqual is pure, so unlike whereToOpenLink/getFixupInfo it
needs no UrlbarChild round-trip -- and routing it through the controller would break
the search-mode and engine-list comparisons, which run before the controller
exists. Behavior-neutral.
Updated•3 months ago
|
Updated•3 months ago
|
Description
•