Last Comment Bug 708330 - Use IDL for Components.utils.getWeakReference
: Use IDL for Components.utils.getWeakReference
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: XPConnect (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla11
Assigned To: :Ms2ger (⌚ UTC+1/+2)
:
Mentors:
Depends on: 712649
Blocks:
  Show dependency treegraph
 
Reported: 2011-12-07 11:07 PST by :Ms2ger (⌚ UTC+1/+2)
Modified: 2011-12-21 07:52 PST (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch v1 (4.79 KB, patch)
2011-12-07 11:07 PST, :Ms2ger (⌚ UTC+1/+2)
bobbyholley: review+
Details | Diff | Splinter Review

Description :Ms2ger (⌚ UTC+1/+2) 2011-12-07 11:07:11 PST
Created attachment 579758 [details] [diff] [review]
Patch v1

Yet another...
Comment 1 Bobby Holley (:bholley) (busy with Stylo) 2011-12-07 11:54:41 PST
Comment on attachment 579758 [details] [diff] [review]
Patch v1

Looks good. r=bholley
Comment 2 Bobby Holley (:bholley) (busy with Stylo) 2011-12-07 12:15:00 PST
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.
Comment 3 :Ms2ger (⌚ UTC+1/+2) 2011-12-18 07:21:17 PST
https://hg.mozilla.org/mozilla-central/rev/515da54158b2

Note You need to log in before you can comment on or make changes to this bug.