Closed Bug 1481412 Opened 6 years ago Closed 4 years ago

Port bug 1481337 - Replace use of XPCNativeWrapper

Categories

(Thunderbird :: General, task)

task
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: jorgk-bmo, Unassigned)

References

(Blocks 1 open bug)

Details

Quoting bug 1481337:

All of the original uses of `new XPCNativeWrapper` and `XPCNativeWrapper.unwrap` have been superseded by ChromeUtils.waiveXrays and ChromeUtils.unwaiveXrays, respectively.

https://dxr.mozilla.org/comm-central/search?q=XPCNativeWrapper&redirect=false

editor/ui/composer/content/editorUtilities.js
mail/test/resources/mozmill/mozmill/extension/content/modules/utils.js

Kris, thanks for the heads-up. I can only see two call sites. Am I missing something? What's the old "shallow wrapper" you mentioned?
Flags: needinfo?(kmaglione+bmo)
Version: 60 → Trunk
I see at least 4:

https://dxr.mozilla.org/comm-central/search?q=XPCNativeWrapper+-path%3Amozilla%2F+-path%3Aobj-&redirect=false

Though I guess the last 2 are in Seamonkey.

(In reply to Jorg K (GMT+2) from comment #0)
> What's the old "shallow wrapper" you mentioned?

Passing a second argument to XPCNativeWrapper used to return an X-ray wrapper that was one level deep. When you accessed the property named in the second argument, it would return a non-X-ray wrapper for it.
Flags: needinfo?(kmaglione+bmo)
Thanks Kris. SM is somewhat of an unclear story. They have a lot of catching up to do.
Type: defect → task

Note that all of the uses in comm-central of XPCNativeWrapper have been removed by various other bugs in the intervening years.

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.