Bug 895220 - Do not OOM in AtomizeAndCopyChars if using NoGC; r=bhackett

This commit is contained in:
Terrence Cole
2013-07-18 13:55:39 -07:00
parent 5e23d511db
commit 7320689f47

View File

@@ -312,7 +312,8 @@ AtomizeAndCopyChars(ExclusiveContext *cx, const jschar *tbchars, size_t length,
if (!atoms.relookupOrAdd(p, AtomHasher::Lookup(tbchars, length),
AtomStateEntry(atom, bool(ib)))) {
js_ReportOutOfMemory(cx); /* SystemAllocPolicy does not report OOM. */
if (allowGC)
js_ReportOutOfMemory(cx); /* SystemAllocPolicy does not report OOM. */
return NULL;
}