Bug 897655 - Use off thread parsing when loading scripts from XUL documents, r=billm,bz,luke.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user