Bug 906371 - Use off thread JS parsing when loading async scripts, r=bz,billm.
This commit is contained in:
@@ -38,11 +38,10 @@ using mozilla::RangedPtr;
|
||||
const char *
|
||||
js::AtomToPrintableString(ExclusiveContext *cx, JSAtom *atom, JSAutoByteString *bytes)
|
||||
{
|
||||
// The only uses for this method when running off the main thread are for
|
||||
// parse errors/warnings, which will not actually be reported in such cases.
|
||||
if (!cx->isJSContext())
|
||||
return "";
|
||||
return js_ValueToPrintable(cx->asJSContext(), StringValue(atom), bytes);
|
||||
JSString *str = js_QuoteString(cx, atom, 0);
|
||||
if (!str)
|
||||
return NULL;
|
||||
return bytes->encodeLatin1(cx, str);
|
||||
}
|
||||
|
||||
const char * const js::TypeStrings[] = {
|
||||
|
||||
Reference in New Issue
Block a user