Closed Bug 1317599 Opened 3 years ago Closed 3 years ago

Get rid of LegacyIsCallerChromeOrNativeCode use in datatransfer

Categories

(Core :: DOM: Events, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla53
Tracking Status
firefox53 --- fixed

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

We can use explicit caller type here.
Comment on attachment 8810734 [details] [diff] [review]
Get rid of LegacyIsCallerChromeOrNativeCode use in datatransfer code

Review of attachment 8810734 [details] [diff] [review]:
-----------------------------------------------------------------

This is much nicer than the old LegacyIsCallerChromeOrNativeCode version.

I wonder whether any of the other methods in DataTransfer{Item{List,},} which are currently [NeedsSubjectPrincipal] don't actually need the subject principal and could instead use this, as it seems nicer to call from C++.

I imagine that the only one which could handle that would likely be DataTransfer.types, as we need to do some principal comparisons for permissions checks in the DataTransferItemList::Data. Anyways, I think that is better for a follow up.
Attachment #8810734 - Flags: review?(michael) → review+
I filed bug 1317720 on more places that can use NeedsCallerType.
Blocks: 1317720
Pushed by bzbarsky@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/e7eecb6dbcc5
Get rid of LegacyIsCallerChromeOrNativeCode use in datatransfer code.  r=mystor
https://hg.mozilla.org/mozilla-central/rev/e7eecb6dbcc5
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
You need to log in before you can comment on or make changes to this bug.