Open Bug 1481337 Opened 6 years ago Updated 1 year ago

Get rid of XPCNativeWrapper JS global

Categories

(Core :: XPConnect, enhancement, P3)

enhancement

Tracking

()

People

(Reporter: kmag, Assigned: kmag)

References

(Blocks 1 open bug)

Details

All of the original uses of `new XPCNativeWrapper` and `XPCNativeWrapper.unwrap` have been superseded by ChromeUtils.waiveXrays and ChromeUtils.unwaiveXrays, respectively. There isn't much point in keeping the older APIs around, now that legacy extensions are gone from the wild.

Looks like Thunderbird has a few uses that will need to be fixed, too. A few of them even use the old "shallow wrapper" form which hasn't had any useful effect in years.
Depends on: 1481412
Note that XPCNativeWrapper is visible from WebExtensions. A DevMo document [1] even mentions XPCNativeWrapper and content scripts have no access to ChromeUtils. Please make a document about the deprecation before removing it.

[1] https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Sharing_objects_with_page_scripts#comment_text_38
Removing dependency because XPCNativeWrapper is visible from WebExtensions.
No longer blocks: post-57-api-changes
(In reply to Masatoshi Kimura [:emk] from comment #1)
> Note that XPCNativeWrapper is visible from WebExtensions. A DevMo document
> [1] even mentions XPCNativeWrapper and content scripts have no access to
> ChromeUtils. Please make a document about the deprecation before removing it.

Well that is both annoying and unexpected. We may need to keep exposing it to content script sandboxes for a while if there are actual users, but it should still be removed from chrome scopes.
Severity: normal → S3
Depends on: 1813377
You need to log in before you can comment on or make changes to this bug.