Closed Bug 881333 Opened 8 years ago Closed 8 years ago
Use accessor methods for cx->compartment and cx->runtime
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: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
You need to log in before you can comment on or make changes to this bug.