Bug 695422. js: Return NULL instead of false. r=luke
authorJeff Muizelaar <jmuizelaar@mozilla.com>
Tue, 18 Oct 2011 15:20:02 -0400
changeset 79053 ca6cd3b13ea3e24955ed7c119f34d60f04123029
parent 79052 81fdcdc7368d618d238fd9f107ada176a050e0ba
child 79054 17ef2ebb8ef98c90d3df71025cd896c000fd17bf
push id21356
push usermak77@bonardo.net
push dateFri, 21 Oct 2011 15:28:13 +0000
treeherdermozilla-central@75eaad17724f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersluke
bugs695422
milestone10.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 695422. js: Return NULL instead of false. r=luke Caught with clang
js/src/jsxml.cpp
js/src/vm/Debugger.cpp
--- a/js/src/jsxml.cpp
+++ b/js/src/jsxml.cpp
@@ -1761,17 +1761,17 @@ ParseXMLSource(JSContext *cx, JSString *
     }
 
     {
         Parser parser(cx);
         if (parser.init(chars, length, filename, lineno, cx->findVersion())) {
             JSObject *scopeChain = GetCurrentScopeChain(cx);
             if (!scopeChain) {
                 cx->free_(chars);
-                return false;
+                return NULL;
             }
 
             ParseNode *pn = parser.parseXMLText(scopeChain, false);
             uintN flags;
             if (pn && GetXMLSettingFlags(cx, &flags)) {
                 AutoNamespaceArray namespaces(cx);
                 if (namespaces.array.setCapacity(cx, 1))
                     xml = ParseNodeToXML(&parser, pn, &namespaces.array, flags);
--- a/js/src/vm/Debugger.cpp
+++ b/js/src/vm/Debugger.cpp
@@ -1824,17 +1824,17 @@ JSObject *
 Debugger::newDebuggerScript(JSContext *cx, JSScript *script, JSObject *holder)
 {
     assertSameCompartment(cx, object);
 
     JSObject *proto = &object->getReservedSlot(JSSLOT_DEBUG_SCRIPT_PROTO).toObject();
     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));
 
     return scriptobj;
 }
 
 JSObject *