Closed
Bug 1306222
Opened 8 years ago
Closed 8 years ago
Use NeedsSubjectPrincipal in DataTransfer
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla52
Tracking | Status | |
---|---|---|
firefox52 | --- | fixed |
People
(Reporter: baku, Assigned: baku)
References
Details
Attachments
(2 files, 2 obsolete files)
2.26 KB,
patch
|
ehsan.akhgari
:
review+
|
Details | Diff | Splinter Review |
13.09 KB,
patch
|
ehsan.akhgari
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Attachment #8796042 -
Flags: review?(ehsan)
Assignee | ||
Comment 1•8 years ago
|
||
Attachment #8796042 -
Attachment is obsolete: true
Attachment #8796042 -
Flags: review?(ehsan)
Attachment #8796043 -
Flags: review?(ehsan)
Comment 2•8 years ago
|
||
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-
Assignee | ||
Comment 3•8 years ago
|
||
Attachment #8796043 -
Attachment is obsolete: true
Attachment #8796194 -
Flags: review?(ehsan)
Assignee | ||
Comment 4•8 years ago
|
||
Attachment #8796195 -
Flags: review?(ehsan)
Assignee | ||
Comment 5•8 years ago
|
||
Still working about removing nsIDOMDataTransfer::GetData
Assignee | ||
Comment 6•8 years ago
|
||
And that can be done in a follow up.
Updated•8 years ago
|
Attachment #8796194 -
Flags: review?(ehsan) → review+
Updated•8 years ago
|
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
Comment 8•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/069d41a294b8
https://hg.mozilla.org/mozilla-central/rev/d1ea28929a0c
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox52:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•