Bug 897655 - Use off thread parsing when loading scripts from XUL documents, r=billm,bz,luke.

This commit is contained in:
Brian Hackett
2013-08-15 14:14:43 -07:00
parent b9f5ee8e5b
commit 6abfee1eec
34 changed files with 658 additions and 245 deletions

View File

@@ -350,16 +350,9 @@ js::AtomizeString(ExclusiveContext *cx, JSString *str,
return &atom;
}
const jschar *chars;
if (str->isLinear()) {
chars = str->asLinear().chars();
} else {
if (!cx->shouldBeJSContext())
return NULL;
chars = str->getChars(cx->asJSContext());
if (!chars)
return NULL;
}
const jschar *chars = str->getChars(cx);
if (!chars)
return NULL;
if (JSAtom *atom = AtomizeAndCopyChars<NoGC>(cx, chars, str->length(), ib))
return atom;