зеркало из https://github.com/mozilla/pjs.git
Bug 622691 followup: invert statement order in AutoUnlockDefaultCompartment to get update inside lock, r=gal, a=blocking
This commit is contained in:
Родитель
a0994d93bf
Коммит
d4d0d04635
|
@ -2677,16 +2677,16 @@ class AutoUnlockDefaultCompartment {
|
|||
JSContext *cx;
|
||||
public:
|
||||
AutoUnlockDefaultCompartment(JSContext *cx) : cx(cx) {
|
||||
JS_UNLOCK(cx, &cx->runtime->atomState.lock);
|
||||
#ifdef JS_THREADSAFE
|
||||
cx->runtime->defaultCompartmentIsLocked = false;
|
||||
#endif
|
||||
JS_UNLOCK(cx, &cx->runtime->atomState.lock);
|
||||
}
|
||||
~AutoUnlockDefaultCompartment() {
|
||||
JS_LOCK(cx, &cx->runtime->atomState.lock);
|
||||
#ifdef JS_THREADSAFE
|
||||
cx->runtime->defaultCompartmentIsLocked = true;
|
||||
#endif
|
||||
JS_LOCK(cx, &cx->runtime->atomState.lock);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче