Last Comment Bug 776635 - Allow use of JSRootedObject using only external headers
: Allow use of JSRootedObject using only external headers
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: unspecified
: All All
: -- normal (vote)
: mozilla17
Assigned To: Steve Fink [:sfink] [:s:] (PTO Sep23-28)
:
:
Mentors:
Depends on: 869517
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-23 12:00 PDT by Steve Fink [:sfink] [:s:] (PTO Sep23-28)
Modified: 2013-05-07 09:43 PDT (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Allow use of JSRootedObject using only external headers (3.84 KB, patch)
2012-07-23 12:00 PDT, Steve Fink [:sfink] [:s:] (PTO Sep23-28)
wmccloskey: review+
Details | Diff | Splinter Review

Description Steve Fink [:sfink] [:s:] (PTO Sep23-28) 2012-07-23 12:00:44 PDT
Currently, JS::Rooted<JSObject*> requires the full definition of JSObject to be available (due to RootMethods<JSObject*>::kind() calling JSObject::rootKind()). This patch switches to using a RootKind<T> template that is explicitly specialized in jspubtd.h for externally-visible pointer types, but still falls back on T::rootKind() for other pointer types so that we don't need to explicitly specialize on eg all subclasses of JSString or JSObject.
Comment 1 Steve Fink [:sfink] [:s:] (PTO Sep23-28) 2012-07-23 12:00:51 PDT
Created attachment 645015 [details] [diff] [review]
Allow use of JSRootedObject using only external headers
Comment 2 Steve Fink [:sfink] [:s:] (PTO Sep23-28) 2012-07-23 13:49:40 PDT
http://hg.mozilla.org/integration/mozilla-inbound/rev/33321a15636f
Comment 3 Ed Morley [:emorley] 2012-07-24 02:59:30 PDT
https://hg.mozilla.org/mozilla-central/rev/33321a15636f

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