Bug 875661, bug 875125, and other future work want ways to interact with the VM from off the main thread. These will work by adding superclasses of JSContext that have fewer capabilities. One problem though is that JSContext's first fields, as enshrined in jsfriendapi ContextFriendFields, are direct pointers to the context's compartment, zone and runtime. It would be better if these were protected members, so that subclasses of ContextFriendFields could decide what functionality to expose from these in a threadsafe way. The attached patch changes cx->compartment and cx->runtime into cx->compartment() and cx->runtime(). The only interesting bits are in jspubtd.h and jscntxt.h.
Attachment #760460 - Flags: review?(luke)
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
You need to log in before you can comment on or make changes to this bug.