Bug 1155618 - Fix some places where OOM errors are not reported to the context r=terrence

This commit is contained in:
Jon Coppeard
2015-05-01 16:26:10 +01:00
parent 14cc27d4be
commit 5d7b834fef
13 changed files with 62 additions and 23 deletions

View File

@@ -543,11 +543,14 @@ NativeIterator::allocateIterator(JSContext* cx, uint32_t slength, const AutoIdVe
}
NativeIterator*
NativeIterator::allocateSentinel(JSContext* cx)
NativeIterator::allocateSentinel(JSContext* maybecx)
{
NativeIterator* ni = js_pod_malloc<NativeIterator>();
if (!ni)
if (!ni) {
if (maybecx)
ReportOutOfMemory(maybecx);
return nullptr;
}
PodZero(ni);