mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 622691 followup: invert statement order in AutoUnlockDefaultCompartment to get update inside lock, r=gal
This commit is contained in:
parent
acbe1325b9
commit
f018264c7f
@ -2678,16 +2678,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);
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user