Closed Bug 708330 Opened 8 years ago Closed 8 years ago

Use IDL for Components.utils.getWeakReference

Categories

(Core :: XPConnect, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla11

People

(Reporter: Ms2ger, Assigned: Ms2ger)

References

Details

Attachments

(1 file)

Attached patch Patch v1Splinter Review
Yet another...
Attachment #579758 - Flags: review?(bobbyholley+bmo)
Comment on attachment 579758 [details] [diff] [review]
Patch v1

Looks good. r=bholley
Attachment #579758 - Flags: review?(bobbyholley+bmo) → review+
Comment on attachment 579758 [details] [diff] [review]
Patch v1


>-nsXPCComponents_Utils::GetWeakReference(xpcIJSWeakReference **_retval)
>+nsXPCComponents_Utils::GetWeakReference(const JS::Value& object, JSContext* cx,
>+                                        xpcIJSWeakReference **_retval)

So, it looks like this should probably be const JS:Value &object, and JSContext *cx. XPConnect seems really inconsistent about this, but it seems like the dominant style is "Use JS star/ampersand placement for JSAPI types, and use gecko for gecko types". This is crappy, and I'm not sure whether we should change the latter part. But we might as well stick with the former.

So please change them in the patches where it's easy to do so, and for the rest of it don't sweat it too much.
https://hg.mozilla.org/mozilla-central/rev/515da54158b2
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla11
Depends on: 712649
You need to log in before you can comment on or make changes to this bug.