From 9a5ec90faeaab4ac21e586e6993fabbd0121ba9e Mon Sep 17 00:00:00 2001 From: Jeff Muizelaar Date: Tue, 18 Oct 2011 15:20:02 -0400 Subject: [PATCH] Bug 695422. js: Return NULL instead of false. r=luke Caught with clang --HG-- extra : rebase_source : dbb9c4ffc8e38f30b467ee38d1923f0645ea8b2e --- js/src/jsxml.cpp | 2 +- js/src/vm/Debugger.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/js/src/jsxml.cpp b/js/src/jsxml.cpp index 77cdbf6af9d..2272d5c24a0 100644 --- a/js/src/jsxml.cpp +++ b/js/src/jsxml.cpp @@ -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); diff --git a/js/src/vm/Debugger.cpp b/js/src/vm/Debugger.cpp index 06bf0c7de29..718f844c86f 100644 --- a/js/src/vm/Debugger.cpp +++ b/js/src/vm/Debugger.cpp @@ -1829,7 +1829,7 @@ Debugger::newDebuggerScript(JSContext *cx, JSScript *script, JSObject *holder) JS_ASSERT(proto); JSObject *scriptobj = NewNonFunction(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));