Better method signatures for [noscript, notxpcom] attributes (actually use return values)

RESOLVED FIXED in Firefox 65

Status

()

defect
RESOLVED FIXED
8 years ago
7 months ago

People

(Reporter: bzbarsky, Assigned: bzbarsky)

Tracking

Trunk
mozilla65
x86
macOS
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox65 fixed)

Details

Attachments

(1 attachment)

Recently I reviewed a patch which added some:

  [noscript, notxpcom] readonly attribute TimeStamp foo;

where TimeStamp is a mozilla::TimeStamp but the C++ generated header had a function with an out param instead of just returning a TimeStamp...  It would be really nice if we could use a return value here somehow.

Comment 1

8 years ago
The "normal" way to do this is:

[noscript, notxpcom] TimeStamp getFood();
Right; I'm just asking for this to Just Work the other way instead of having to have weird-looking IDL...
At this point using [notxpcom] on an attribute gives an error at IDL-processing time.

I'm just going to fix this, so people don't have to figure out the hard way that they need a method (or two, if not readonly) instead of an attribute.
Assignee: nobody → bzbarsky

Comment 5

7 months ago
Pushed by bzbarsky@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5beaad8a185b
Add support for [notxpcom] annotations on xpidl attributes.  r=nika
Flags: needinfo?(bzbarsky)

Comment 8

7 months ago
Pushed by bzbarsky@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/95393acee0ea
Add support for [notxpcom] annotations on xpidl attributes.  r=nika

Comment 9

7 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/95393acee0ea
Status: NEW → RESOLVED
Closed: 7 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
Blocks: 1507540
You need to log in before you can comment on or make changes to this bug.