Closed
Bug 1507540
Opened 6 years ago
Closed 6 years ago
Use notxpcom attributes more in xpidl, now that we can
Categories
(Core :: XPCOM, enhancement)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
mozilla65
Tracking | Status | |
---|---|---|
firefox65 | --- | fixed |
People
(Reporter: bzbarsky, Assigned: bzbarsky)
References
Details
Attachments
(7 files)
5.93 KB,
patch
|
mrbkap
:
review+
|
Details | Diff | Splinter Review |
38.00 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
16.44 KB,
patch
|
valentin
:
review+
|
Details | Diff | Splinter Review |
2.02 KB,
patch
|
mconley
:
review+
|
Details | Diff | Splinter Review |
14.50 KB,
patch
|
ehsan.akhgari
:
review+
|
Details | Diff | Splinter Review |
14.91 KB,
patch
|
froydnj
:
review+
|
Details | Diff | Splinter Review |
20.37 KB,
patch
|
mccr8
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Updated•6 years ago
|
Component: General → XPCOM
Assignee | ||
Comment 1•6 years ago
|
||
Fwiw, the component was correct. This is going to have changes all over the tree, once I finish ironing out the Android build issues.
Assignee | ||
Comment 2•6 years ago
|
||
Attachment #9025735 -
Flags: review?(mrbkap)
Assignee | ||
Comment 3•6 years ago
|
||
Attachment #9025736 -
Flags: review?(bugs)
Assignee | ||
Comment 4•6 years ago
|
||
Attachment #9025737 -
Flags: review?(valentin.gosu)
Assignee | ||
Comment 5•6 years ago
|
||
Attachment #9025738 -
Flags: review?(mconley)
Assignee | ||
Comment 6•6 years ago
|
||
Attachment #9025739 -
Flags: review?(ehsan)
Assignee | ||
Comment 7•6 years ago
|
||
Attachment #9025740 -
Flags: review?(nfroyd)
Assignee | ||
Comment 8•6 years ago
|
||
Attachment #9025741 -
Flags: review?(continuation)
Comment 9•6 years ago
|
||
Comment on attachment 9025740 [details] [diff] [review] part 6. Make nsIVariant's "type" a notxpcom attribute Review of attachment 9025740 [details] [diff] [review]: ----------------------------------------------------------------- ::: xpcom/ds/nsIVariant.idl @@ +64,4 @@ > [scriptable, uuid(81e4c2de-acac-4ad6-901a-b5fb1b851a0d)] > interface nsIVariant : nsISupports > { > + [notxpcom,nostdcall] readonly attribute uint16_t dataType; Two questions: 1) Did we really want to delete `noscript` here? 2) Why are we changing this to `nostdcall` at the same time?
Attachment #9025740 -
Flags: review?(nfroyd) → review+
Updated•6 years ago
|
Attachment #9025735 -
Flags: review?(mrbkap) → review+
Assignee | ||
Comment 10•6 years ago
|
||
> 1) Did we really want to delete `noscript` here? notxpcom implies noscript. I could put the noscript back, but it would just be redundant. Style around this is inconsistent in the tree, and I went with the shorter thing, but I can see the argument for doing the more explicit thing. Up to you what you want to see in your module. > 2) Why are we changing this to `nostdcall` at the same time? To cut down on the ugly in the C++, basically. I could leave off the nostdcall, and then the impls would have to have NS_IMETHODIMP_(uint16_t) as the return type instead of just uint16_t. Frankly, I think we should have noscript imply nostdcall, but doing that as a single change is a bit hard. ;) We can get there incrementally if we just add nostdcall whenever we can, then at some point it's added to all noscript things and we can just make noscript imply it. :) Is there a reason to _not_ add nostdcall?
Comment 11•6 years ago
|
||
Thanks for the explanation! (In reply to Boris Zbarsky [:bzbarsky, bz on IRC] from comment #10) > > 1) Did we really want to delete `noscript` here? > > notxpcom implies noscript. I could put the noscript back, but it would just > be redundant. > > Style around this is inconsistent in the tree, and I went with the shorter > thing, but I can see the argument for doing the more explicit thing. Ah yes. We should probably get to the point where we're just specifying notxpcom instead of notxpcom,noscript. > > 2) Why are we changing this to `nostdcall` at the same time? > > To cut down on the ugly in the C++, basically. I could leave off the > nostdcall, and then the impls would have to have NS_IMETHODIMP_(uint16_t) as > the return type instead of just uint16_t. This seems very reasonable. Having noscript imply nostdcall also seems like a reasonable goal to aspire to.
Updated•6 years ago
|
Attachment #9025737 -
Flags: review?(valentin.gosu) → review+
Comment 13•6 years ago
|
||
Comment on attachment 9025738 [details] [diff] [review] part 4. Remove unused nsIProfiler::GetStartParams Review of attachment 9025738 [details] [diff] [review]: ----------------------------------------------------------------- Yeah, I think usage of this attribute went by the wayside during the work in bug 1328363 - looks like we just forgot to remove it. Thanks!
Attachment #9025738 -
Flags: review?(mconley) → review+
Comment 14•6 years ago
|
||
(I need to look at carefully whether returning Foo* leads to code where strong pointer isn't used when needed.)
Assignee | ||
Comment 15•6 years ago
|
||
> (I need to look at carefully whether returning Foo* leads to code where strong pointer isn't used when needed.)
Makes sense. I generally kept using strong pointers for that reason, fwiw, so it should not be too hard to check.
Comment 16•6 years ago
|
||
I mainly meant that in the sense of future-proof-ness.
Assignee | ||
Comment 17•6 years ago
|
||
Fair. I wonder whether it's worth adding an annotation to xpidl for changing the return type to already_AddRefed<>.
Comment 18•6 years ago
|
||
That would be quite nice I think.
Updated•6 years ago
|
Attachment #9025736 -
Flags: review?(bugs) → review+
Updated•6 years ago
|
Attachment #9025739 -
Flags: review?(ehsan) → review+
Comment 19•6 years ago
|
||
Comment on attachment 9025741 [details] [diff] [review] part 7. Use notxpcom more in dom/ Review of attachment 9025741 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/base/nsObjectLoadingContent.cpp @@ +3721,4 @@ > { > // We don't resolve anything; we just try to make sure we're instantiated. > // This purposefully does not fire for chrome/xray resolves, see bug 967694 > + ScriptRequestPluginInstance(aCx); Unused << please @@ +3742,4 @@ > // Just like DoResolve, just make sure we're instantiated. That will do > // the work our Enumerate hook needs to do. This purposefully does not fire > // for xray resolves, see bug 967694 > + ScriptRequestPluginInstance(aCx); Unused << please
Attachment #9025741 -
Flags: review?(continuation) → review+
Comment 20•6 years ago
|
||
Pushed by bzbarsky@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/edff28b27f20 part 1. Use more notxpcom attributes in caps/. r=mrbkap https://hg.mozilla.org/integration/mozilla-inbound/rev/a1e826769668 part 2. Use more notxpcom attributes in docshell/. r=smaug https://hg.mozilla.org/integration/mozilla-inbound/rev/52d07c32fa7c part 3. Use more notxpcom attributes in netwerk/. r=valentin https://hg.mozilla.org/integration/mozilla-inbound/rev/5cdbce9b4a51 part 4. Remove unused nsIProfiler::GetStartParams. r=mconley https://hg.mozilla.org/integration/mozilla-inbound/rev/f50e3a884aa8 part 5. Use more notxpcom attributes in widget/. r=ehsan https://hg.mozilla.org/integration/mozilla-inbound/rev/6b60870ec6f8 part 6. Make nsIVariant's "type" a notxpcom attribute. r=froydnj https://hg.mozilla.org/integration/mozilla-inbound/rev/d583bf98a4b2 part 7. Use notxpcom more in dom/. r=mccr8
Comment 21•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/edff28b27f20 https://hg.mozilla.org/mozilla-central/rev/a1e826769668 https://hg.mozilla.org/mozilla-central/rev/52d07c32fa7c https://hg.mozilla.org/mozilla-central/rev/5cdbce9b4a51 https://hg.mozilla.org/mozilla-central/rev/f50e3a884aa8 https://hg.mozilla.org/mozilla-central/rev/6b60870ec6f8 https://hg.mozilla.org/mozilla-central/rev/d583bf98a4b2
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
You need to log in
before you can comment on or make changes to this bug.
Description
•