mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-15 06:15:43 +00:00
Thread-safety comment for bug 479198. r=brendan.
This commit is contained in:
parent
bae75acbdc
commit
66aa050b79
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user