Closed Bug 1306222 Opened 8 years ago Closed 8 years ago

Use NeedsSubjectPrincipal in DataTransfer

Categories

(Core :: DOM: Core & HTML, defect)

50 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla52
Tracking Status
firefox52 --- fixed

People

(Reporter: baku, Assigned: baku)

References

Details

Attachments

(2 files, 2 obsolete files)

Attached patch explicit_principal5.patch (obsolete) — Splinter Review
No description provided.
Attachment #8796042 - Flags: review?(ehsan)
Attached patch explicit_principal5.patch (obsolete) — Splinter Review
Attachment #8796042 - Attachment is obsolete: true
Attachment #8796042 - Flags: review?(ehsan)
Attachment #8796043 - Flags: review?(ehsan)
Comment on attachment 8796043 [details] [diff] [review] explicit_principal5.patch Review of attachment 8796043 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/events/ClipboardEvent.cpp @@ +75,5 @@ > // support other types of events, make sure that read/write privileges are > // checked properly within DataTransfer. > clipboardData = new DataTransfer(ToSupports(e), eCopy, false, -1); > + clipboardData->SetData(aParam.mDataType, aParam.mData, > + Some(nsContentUtils::SubjectPrincipal()), aRv); Instead of doing this, you should make the constructor [NeedsSubjectPrincipal] and just pass the result down. I suppose we need to add a [ConstructorNeedsSubjectPrincipal] attribute? Or, we can make [NeedsSubjectPrincipal] appearing on an interface with [Constructor] mean the constructor needs a subject principal? The latter feels a bit gross. ::: dom/events/DataTransfer.cpp @@ +437,5 @@ > NS_IMETHODIMP > DataTransfer::GetData(const nsAString& aFormat, nsAString& aData) > { > ErrorResult rv; > + GetData(aFormat, aData, Some(nsContentUtils::SubjectPrincipal()), rv); Can we remove this?
Attachment #8796043 - Flags: review?(ehsan) → review-
Attachment #8796043 - Attachment is obsolete: true
Attachment #8796194 - Flags: review?(ehsan)
Attachment #8796195 - Flags: review?(ehsan)
Still working about removing nsIDOMDataTransfer::GetData
And that can be done in a follow up.
Attachment #8796194 - Flags: review?(ehsan) → review+
Attachment #8796195 - Flags: review?(ehsan) → review+
Pushed by amarchesini@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/069d41a294b8 Introducing GlobalObject::GetSubjectPrincipal, r=ehsan https://hg.mozilla.org/integration/mozilla-inbound/rev/d1ea28929a0c Use NeedsSubjectPrincipal in DataTransfer, r=ehsan
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: