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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user