Bug 887334 - Use the new AutoCompartment overload for the atoms compartment and remove AutoEnterAtomsCompartment. r=bhackett

We have to do some temporary hackiness to deal with some of the new PJS work.
This patch stays as true to the old world as possible, so that we can more
easily backport it.
This commit is contained in:
Bobby Holley
2013-07-17 11:53:52 -07:00
parent c48c0f3fe1
commit 2589b3bc0d
5 changed files with 9 additions and 39 deletions

View File

@@ -258,7 +258,7 @@ AtomizeAndTakeOwnership(ExclusiveContext *cx, jschar *tbchars, size_t length, In
return atom;
}
AutoEnterAtomsCompartment ac(cx);
AutoCompartment ac(cx, cx->asJSContext()->runtime()->atomsCompartment);
JSFlatString *flat = js_NewString<CanGC>(cx, tbchars, length);
if (!flat) {
@@ -302,7 +302,7 @@ AtomizeAndCopyChars(ExclusiveContext *cx, const jschar *tbchars, size_t length,
return atom;
}
AutoEnterAtomsCompartment ac(cx);
AutoCompartment ac(cx, cx->asJSContext()->runtime()->atomsCompartment);
JSFlatString *flat = js_NewStringCopyN<allowGC>(cx, tbchars, length);
if (!flat)