Last Comment Bug 704841 - Use implicit_jscontext for Components.utils getters
: Use implicit_jscontext for Components.utils getters
Status: RESOLVED FIXED
[mentor=jdm] [lang=c++]
:
Product: Core
Classification: Components
Component: XPConnect (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla11
Assigned To: Reuben Morais [:reuben]
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-11-23 08:08 PST by :Ms2ger (⌚ UTC+1/+2)
Modified: 2012-02-01 13:57 PST (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch (3.89 KB, patch)
2011-12-01 07:14 PST, Reuben Morais [:reuben]
bobbyholley: review+
josh: feedback+
Details | Diff | Splinter Review

Description :Ms2ger (⌚ UTC+1/+2) 2011-11-23 08:08:50 PST
There's a
  // FIXME/bug 671453: work around broken [implicit_jscontext]
comment, but bug 671453 has been fixed. Let's use it.
Comment 1 Josh Matthews [:jdm] 2011-11-23 10:39:08 PST
Relevant code:
http://mxr.mozilla.org/mozilla-central/source/js/xpconnect/idl/xpccomponents.idl#321
http://mxr.mozilla.org/mozilla-central/source/js/xpconnect/src/XPCComponents.cpp#4053

All of the attributes in nsIXPCComponents_Utils should have the implicit_jscontext attribute added. The getters and setters generated by the macros in the C++ file will then get a JSContext* parameter added to them, which should be used instead of the GetJSContext function they currently call.
Comment 2 Reuben Morais [:reuben] 2011-12-01 07:14:23 PST
Created attachment 578254 [details] [diff] [review]
Patch
Comment 3 Josh Matthews [:jdm] 2011-12-01 08:19:28 PST
Comment on attachment 578254 [details] [diff] [review]
Patch

Nice!
Comment 4 Bobby Holley (:bholley) (busy with Stylo) 2011-12-01 17:52:46 PST
Comment on attachment 578254 [details] [diff] [review]
Patch

Looks good! r=bholley
Comment 6 Ed Morley [:emorley] 2011-12-04 07:20:30 PST
https://hg.mozilla.org/mozilla-central/rev/8d316e7fd4b0

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