Bug 735036 - Check for OOM in debug only method. r=luke

This commit is contained in:
Tom Schuster 2012-04-24 20:03:48 +02:00
parent 8df6ada1ae
commit 9d15dfd22d
2 changed files with 3 additions and 2 deletions

View File

@ -384,7 +384,7 @@ class HashTable : private AllocPolicy
mutationCount(0)
{}
bool init(uint32_t length)
MOZ_WARN_UNUSED_RESULT bool init(uint32_t length)
{
/* Make sure that init isn't called twice. */
JS_ASSERT(table == NULL);

View File

@ -4193,7 +4193,8 @@ StartVerifyBarriers(JSRuntime *rt)
trc->edgeptr = (char *)trc->root;
trc->term = trc->edgeptr + size;
trc->nodemap.init();
if (!trc->nodemap.init())
return;
/* Create the root node. */
trc->curnode = MakeNode(trc, NULL, JSGCTraceKind(0));