Closed Bug 776635 Opened 12 years ago Closed 12 years ago

Allow use of JSRootedObject using only external headers

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla17

People

(Reporter: sfink, Assigned: sfink)

References

Details

Attachments

(1 file)

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.
Attachment #645015 - Flags: review?(wmccloskey) → review+
https://hg.mozilla.org/mozilla-central/rev/33321a15636f
Status: NEW → RESOLVED
Closed: 12 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.

Attachment

General

Created:
Updated:
Size: