JavaScript:SpiderMonkey:GC Futures: Difference between revisions

Line 150: Line 150:
A tricky consequence of this is that the API function <code>JS_SetProperty(cx, obj, name, vp)</code> must put cx into obj's compartment before calling <code>js_Atomize</code>. Otherwise obj might end up with property ids in other compartments, a bad scene.
A tricky consequence of this is that the API function <code>JS_SetProperty(cx, obj, name, vp)</code> must put cx into obj's compartment before calling <code>js_Atomize</code>. Otherwise obj might end up with property ids in other compartments, a bad scene.


When does a context's current compartment change? At API entry points and when a function is called across compartment boundaries (which always happens via a wrapper). So it will be rare and will not ordinarily happen on trace.
When does a context's current compartment change? At API entry points and when a function is called across compartment boundaries (which always happens via a wrapper). So it will be rare and we can fall off trace when it happens.
638

edits