6
edits
(→Plans) |
Wesgarland (talk | contribs) (Added Emerging Invariants section) |
||
Line 171: | Line 171: | ||
'''Wrapper API.''' Since the cross-compartment reference from a wrapper to the wrappee is so special, we will need API for it. TBD. | '''Wrapper API.''' Since the cross-compartment reference from a wrapper to the wrappee is so special, we will need API for it. TBD. | ||
== Emerging Invariants == | |||
This section describes invariants and rules which have emerged during initial development of the conservative GC and the compartments code. They are not likely to change, but still may. | |||
* The C stack is not scanned for GC roots when there are no contexts (suspended or otherwise) in requests on a given thread | |||
* When doing a single-compartment GC, only the current thread's stack is scanned (unless there are no contexts in requests on that thread) | |||
* A context's compartment is equal to JS_GetScopeChain(cx)->getCompartment. A NULL scope chain indicates the default compartment. | |||
* Corollary: All non-default compartments have at least a global object. | |||
* Only one thread per compartment may be in a request at any given time |
edits