Closed Bug 1535446 Opened 9 months ago Closed 9 months ago

Introduce js/public/RealmOptions.h

Categories

(Core :: JavaScript Engine, enhancement)

enhancement
Not set

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: Waldo, Assigned: Waldo)

Details

Attachments

(1 file)

RealmOptions, RealmCreationOptions, RealmBehaviors could all go in their own header pretty easily, out of jsapi.h. Also the accessor functions to access them on an existing realm.

By then the only thing in jsapi.h that needs any of these things is JS_NewGlobalObject which needs JS::RealmOptions (well, technically it only needs a forward declaration, but the class is JS_PUBLIC_API so using a forward declaration is fraught and not worth the trouble). Perhaps we could move all realm stuff to js/public/Realm.h which does actually exist now, but then JS_NewGlobalObject would be a somewhat weird name to appear there, maybe, and I'm unwilling to say we should rename that now (or to what).

So for now, just slim jsapi.h some, split out a coherent set of concepts to another header for improved readability, but don't actually improve the header dependency story right now.

Pushed by jwalden@mit.edu:
https://hg.mozilla.org/integration/autoland/rev/605ed8fc4c42
Move realm options into a new js/public/RealmOptions.h header.  r=sfink
Status: ASSIGNED → RESOLVED
Closed: 9 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
You need to log in before you can comment on or make changes to this bug.