Last Comment Bug 708330 - Use IDL for Components.utils.getWeakReference
: Use IDL for Components.utils.getWeakReference
Product: Core
Classification: Components
Component: XPConnect (show other bugs)
: Trunk
: All All
-- normal (vote)
: mozilla11
Assigned To: :Ms2ger (⌚ UTC+1/+2)
: Andrew Overholt [:overholt]
Depends on: 712649
  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:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

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

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

Yet another...
Comment 1 User image 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 User image 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 User image :Ms2ger (⌚ UTC+1/+2) 2011-12-18 07:21:17 PST

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