Allow use of JSRootedObject using only external headers

RESOLVED FIXED in mozilla17

Status

()

Core
JavaScript Engine
RESOLVED FIXED
5 years ago
4 years ago

People

(Reporter: sfink, Assigned: sfink)

Tracking

unspecified
mozilla17
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

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.
Created attachment 645015 [details] [diff] [review]
Allow use of JSRootedObject using only external headers
Attachment #645015 - Flags: review?(wmccloskey)
Attachment #645015 - Flags: review?(wmccloskey) → review+
http://hg.mozilla.org/integration/mozilla-inbound/rev/33321a15636f

Comment 3

5 years ago
https://hg.mozilla.org/mozilla-central/rev/33321a15636f
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
Depends on: 869517
You need to log in before you can comment on or make changes to this bug.