mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-14 05:45:37 +00:00
Bug 622691: fix unlock order in AutoLockDefaultCompartment, r=gal
This commit is contained in:
parent
98169843b9
commit
6f64880260
@ -2650,10 +2650,10 @@ class AutoLockDefaultCompartment {
|
||||
#endif
|
||||
}
|
||||
~AutoLockDefaultCompartment() {
|
||||
JS_UNLOCK(cx, &cx->runtime->atomState.lock);
|
||||
#ifdef JS_THREADSAFE
|
||||
cx->runtime->defaultCompartmentIsLocked = false;
|
||||
#endif
|
||||
JS_UNLOCK(cx, &cx->runtime->atomState.lock);
|
||||
}
|
||||
};
|
||||
|
||||
@ -2668,10 +2668,10 @@ class AutoUnlockDefaultCompartment {
|
||||
#endif
|
||||
}
|
||||
~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