Thread-safety comment for bug 479198. r=brendan.

This commit is contained in:
Jason Orendorff 2009-04-06 16:43:45 -05:00
parent bae75acbdc
commit 66aa050b79

View File

@ -297,6 +297,12 @@ js_FillPropertyCache(JSContext *cx, JSObject *obj, jsuword kshape,
/*
* Make sure that a later shadowing assignment will enter
* PurgeProtoChain and invalidate this entry, bug 479198.
*
* This is thread-safe even though obj is not locked. Only the
* DELEGATE bit of obj->classword can change at runtime, given that
* obj is native; and the bit is only set, never cleared. And on
* platforms where another CPU can fail to see this write, it's OK
* because the property cache and JIT cache are thread-local.
*/
OBJ_SET_DELEGATE(cx, obj);
}