Always create a dummy stack frame when crossing compartment boundaries (bug 600015, r=mrbkap).

This commit is contained in:
Andreas Gal
2010-09-27 15:55:15 -07:00
parent 6294db9fb3
commit c1d4bb1b7e
24 changed files with 132 additions and 104 deletions

View File

@@ -521,7 +521,8 @@ js_AtomizeString(JSContext *cx, JSString *str, uintN flags)
atoms.add(p, StringToInitialAtomEntry(key));
} else {
if (flags & ATOM_TMPSTR) {
JSAutoEnterCompartment ac(cx, cx->runtime->defaultCompartment);
SwitchToCompartment sc(cx, cx->runtime->defaultCompartment);
if (flags & ATOM_NOCOPY) {
key = js_NewString(cx, str->flatChars(), str->flatLength());
if (!key)