Open Bug 1481337 Opened 4 years ago Updated 4 years 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.
Priority: -- → P3
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.
You need to log in before you can comment on or make changes to this bug.