Bug 695422. js: Return NULL instead of false. r=luke

Caught with clang

--HG--
extra : rebase_source : dbb9c4ffc8e38f30b467ee38d1923f0645ea8b2e
This commit is contained in:
Jeff Muizelaar 2011-10-18 15:20:02 -04:00
parent 773b1a59b1
commit 30e3f5a366
2 changed files with 2 additions and 2 deletions

View File

@ -1766,7 +1766,7 @@ ParseXMLSource(JSContext *cx, JSString *src)
JSObject *scopeChain = GetCurrentScopeChain(cx);
if (!scopeChain) {
cx->free_(chars);
return false;
return NULL;
}
ParseNode *pn = parser.parseXMLText(scopeChain, false);

View File

@ -1829,7 +1829,7 @@ Debugger::newDebuggerScript(JSContext *cx, JSScript *script, JSObject *holder)
JS_ASSERT(proto);
JSObject *scriptobj = NewNonFunction<WithProto::Given>(cx, &DebuggerScript_class, proto, NULL);
if (!scriptobj || !scriptobj->ensureClassReservedSlots(cx))
return false;
return NULL;
scriptobj->setPrivate(script);
scriptobj->setReservedSlot(JSSLOT_DEBUGSCRIPT_OWNER, ObjectValue(*object));
scriptobj->setReservedSlot(JSSLOT_DEBUGSCRIPT_HOLDER, PrivateValue(holder));