Bug 786339 - Remove two implicit conversions from NULL to false in the JS code; r=luke
authorEhsan Akhgari <ehsan@mozilla.com>
Tue, 28 Aug 2012 13:22:42 -0400
changeset 103688 1ec9c51ac5a1210ce547165d0814a9120f53421a
parent 103687 a151960d655c50d516f9edf1fdef8f158a496126
child 103689 152d19d479b20dd06bd68866ecdf6a6508f6ea58
child 103727 0b4bc3760d51cbb235f01b737c67efd9728a9dd7
push id14115
push usereakhgari@mozilla.com
push dateTue, 28 Aug 2012 18:26:01 +0000
treeherdermozilla-inbound@1ec9c51ac5a1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersluke
bugs786339
milestone18.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 786339 - Remove two implicit conversions from NULL to false in the JS code; r=luke
js/src/frontend/BytecodeCompiler.cpp
js/src/vm/Stack.cpp
--- a/js/src/frontend/BytecodeCompiler.cpp
+++ b/js/src/frontend/BytecodeCompiler.cpp
@@ -330,17 +330,17 @@ frontend::CompileFunctionBody(JSContext 
         return false;
 
     BytecodeEmitter funbce(/* parent = */ NULL, &parser, &funsc, script, /* callerFrame = */ NULL,
                            /* hasGlobalScope = */ false, options.lineno);
     if (!funbce.init())
         return false;
 
     if (!NameFunctions(cx, pn))
-        return NULL;
+        return false;
 
     if (fn->pn_body) {
         JS_ASSERT(fn->pn_body->isKind(PNK_ARGSBODY));
         fn->pn_body->append(pn);
         fn->pn_body->pn_pos = pn->pn_pos;
         pn = fn->pn_body;
     }
 
--- a/js/src/vm/Stack.cpp
+++ b/js/src/vm/Stack.cpp
@@ -1134,17 +1134,17 @@ ContextStack::popGeneratorFrame(const Ge
     JS_ASSERT(ImplicitCast<const FrameGuard>(gfg).pushed());
 }
 
 bool
 ContextStack::saveFrameChain()
 {
     bool pushedSeg;
     if (!ensureOnTop(cx_, REPORT_ERROR, 0, CANT_EXTEND, &pushedSeg))
-        return NULL;
+        return false;
 
     JS_ASSERT(pushedSeg);
     JS_ASSERT(!hasfp());
     JS_ASSERT(onTop());
     JS_ASSERT(seg_->isEmpty());
     return true;
 }