Bug 701467 - Remove JS_TRUE/JS_FALSE from xpconnect; r=bholley
authorMs2ger <ms2ger@gmail.com>
Sat, 26 Nov 2011 11:05:59 +0100
changeset 81606 3258ba3a269d5e865b720c853120e088d4537e10
parent 81605 c58bad0b4640797f19541cc367d8ee0871457b71
child 81607 573c4744a0dda6458b685fe3ab4b1a77b7037abc
push id628
push userclegnitto@mozilla.com
push dateWed, 21 Dec 2011 14:41:57 +0000
treeherdermozilla-aurora@24a61ad789e8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbholley
bugs701467
milestone11.0a1
Bug 701467 - Remove JS_TRUE/JS_FALSE from xpconnect; r=bholley
js/xpconnect/loader/mozJSComponentLoader.cpp
js/xpconnect/shell/xpcshell.cpp
js/xpconnect/src/XPCCallContext.cpp
js/xpconnect/src/XPCComponents.cpp
js/xpconnect/src/XPCConvert.cpp
js/xpconnect/src/XPCDebug.cpp
js/xpconnect/src/XPCException.cpp
js/xpconnect/src/XPCInlines.h
js/xpconnect/src/XPCJSID.cpp
js/xpconnect/src/XPCJSRuntime.cpp
js/xpconnect/src/XPCLocale.cpp
js/xpconnect/src/XPCLog.cpp
js/xpconnect/src/XPCMaps.cpp
js/xpconnect/src/XPCQuickStubs.cpp
js/xpconnect/src/XPCQuickStubs.h
js/xpconnect/src/XPCStack.cpp
js/xpconnect/src/XPCThreadContext.cpp
js/xpconnect/src/XPCThrower.cpp
js/xpconnect/src/XPCVariant.cpp
js/xpconnect/src/XPCWrappedJS.cpp
js/xpconnect/src/XPCWrappedJSClass.cpp
js/xpconnect/src/XPCWrappedNative.cpp
js/xpconnect/src/XPCWrappedNativeInfo.cpp
js/xpconnect/src/XPCWrappedNativeJSOps.cpp
js/xpconnect/src/XPCWrappedNativeProto.cpp
js/xpconnect/src/XPCWrappedNativeScope.cpp
js/xpconnect/src/XPCWrapper.cpp
js/xpconnect/src/dombindings.cpp
js/xpconnect/src/nsDOMQS.h
js/xpconnect/src/nsXPConnect.cpp
js/xpconnect/src/xpcprivate.h
js/xpconnect/src/xpcpublic.h
js/xpconnect/wrappers/AccessCheck.cpp
--- a/js/xpconnect/loader/mozJSComponentLoader.cpp
+++ b/js/xpconnect/loader/mozJSComponentLoader.cpp
@@ -191,110 +191,110 @@ mozJSLoaderErrorReporter(JSContext *cx, 
 #endif
 }
 
 static JSBool
 Dump(JSContext *cx, uintN argc, jsval *vp)
 {
     JSString *str;
     if (!argc)
-        return JS_TRUE;
+        return true;
 
     str = JS_ValueToString(cx, JS_ARGV(cx, vp)[0]);
     if (!str)
-        return JS_FALSE;
+        return false;
 
     size_t length;
     const jschar *chars = JS_GetStringCharsAndLength(cx, str, &length);
     if (!chars)
-        return JS_FALSE;
+        return false;
 
     NS_ConvertUTF16toUTF8 utf8str(reinterpret_cast<const PRUnichar*>(chars));
 #ifdef ANDROID
     __android_log_print(ANDROID_LOG_INFO, "Gecko", utf8str.get());
 #endif
     fputs(utf8str.get(), stdout);
     fflush(stdout);
-    return JS_TRUE;
+    return true;
 }
 
 static JSBool
 Debug(JSContext *cx, uintN argc, jsval *vp)
 {
 #ifdef DEBUG
     return Dump(cx, argc, vp);
 #else
-    return JS_TRUE;
+    return true;
 #endif
 }
 
 static JSBool
 Atob(JSContext *cx, uintN argc, jsval *vp)
 {
     if (!argc)
-        return JS_TRUE;
+        return true;
 
     return nsXPConnect::Base64Decode(cx, JS_ARGV(cx, vp)[0], &JS_RVAL(cx, vp));
 }
 
 static JSBool
 Btoa(JSContext *cx, uintN argc, jsval *vp)
 {
     if (!argc)
-        return JS_TRUE;
+        return true;
 
     return nsXPConnect::Base64Encode(cx, JS_ARGV(cx, vp)[0], &JS_RVAL(cx, vp));
 }
 
 static JSBool
 File(JSContext *cx, uintN argc, jsval *vp)
 {
     nsresult rv;
 
     if (!argc) {
         XPCThrower::Throw(NS_ERROR_UNEXPECTED, cx);
-        return JS_FALSE;
+        return false;
     }
 
     nsCOMPtr<nsISupports> native;
     rv = nsDOMFileFile::NewFile(getter_AddRefs(native));
     if (NS_FAILED(rv)) {
         XPCThrower::Throw(rv, cx);
-        return JS_FALSE;
+        return false;
     }
 
     nsCOMPtr<nsIJSNativeInitializer> initializer = do_QueryInterface(native);
     NS_ASSERTION(initializer, "what?");
 
     rv = initializer->Initialize(nsnull, cx, nsnull, argc, JS_ARGV(cx, vp));
     if (NS_FAILED(rv)) {
         XPCThrower::Throw(rv, cx);
-        return JS_FALSE;
+        return false;
     }
 
     nsXPConnect* xpc = nsXPConnect::GetXPConnect();
     if (!xpc) {
         XPCThrower::Throw(NS_ERROR_UNEXPECTED, cx);
-        return JS_FALSE;
+        return false;
     }
 
     JSObject* glob = JS_GetGlobalForScopeChain(cx);
 
     nsCOMPtr<nsIXPConnectJSObjectHolder> holder;
     jsval retval;
     rv = xpc->WrapNativeToJSVal(cx, glob, native, nsnull,
                                 &NS_GET_IID(nsISupports),
                                 true, &retval, nsnull);
     if (NS_FAILED(rv)) {
         XPCThrower::Throw(rv, cx);
-        return JS_FALSE;
+        return false;
     }
 
     JS_SET_RVAL(cx, vp, retval);
-    return JS_TRUE;
+    return true;
 }
 
 static JSFunctionSpec gGlobalFun[] = {
     {"dump",    Dump,   1,0},
     {"debug",   Debug,  1,0},
     {"atob",    Atob,   1,0},
     {"btoa",    Btoa,   1,0},
     {"File",    File,   1,JSFUN_CONSTRUCTOR},
--- a/js/xpconnect/shell/xpcshell.cpp
+++ b/js/xpconnect/shell/xpcshell.cpp
@@ -149,29 +149,29 @@ static const char kXPConnectServiceContr
 #define EXITCODE_RUNTIME_ERROR 3
 #define EXITCODE_FILE_NOT_FOUND 4
 
 FILE *gOutFile = NULL;
 FILE *gErrFile = NULL;
 FILE *gInFile = NULL;
 
 int gExitCode = 0;
-JSBool gQuitting = JS_FALSE;
-static JSBool reportWarnings = JS_TRUE;
-static JSBool compileOnly = JS_FALSE;
+JSBool gQuitting = false;
+static JSBool reportWarnings = true;
+static JSBool compileOnly = false;
 
 JSPrincipals *gJSPrincipals = nsnull;
 nsAutoString *gWorkingDirectory = nsnull;
 
 static JSBool
 GetLocationProperty(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
 {
 #if !defined(XP_WIN) && !defined(XP_UNIX)
     //XXX: your platform should really implement this
-    return JS_FALSE;
+    return false;
 #else
     JSStackFrame *fp = JS_GetScriptedCaller(cx, NULL);
     JSScript *script = JS_GetFrameScript(cx, fp);
     const char *filename = JS_GetScriptFilename(cx, script);
 
     if (filename) {
         nsresult rv;
         nsCOMPtr<nsIXPConnect> xpc =
@@ -235,17 +235,17 @@ GetLocationProperty(JSContext *cx, JSObj
 
             if (NS_SUCCEEDED(rv) &&
                 NS_SUCCEEDED(locationHolder->GetJSObject(&locationObj))) {
                 *vp = OBJECT_TO_JSVAL(locationObj);
             }
         }
     }
 
-    return JS_TRUE;
+    return true;
 #endif
 }
 
 #ifdef EDITLINE
 extern "C" {
 extern JS_EXPORT_API(char)     *readline(const char *prompt);
 extern JS_EXPORT_API(void)     add_history(char *line);
 }
@@ -256,35 +256,35 @@ GetLine(JSContext *cx, char *bufp, FILE 
 #ifdef EDITLINE
     /*
      * Use readline only if file is stdin, because there's no way to specify
      * another handle.  Are other filehandles interactive?
      */
     if (file == stdin) {
         char *linep = readline(prompt);
         if (!linep)
-            return JS_FALSE;
+            return false;
         if (*linep)
             add_history(linep);
         strcpy(bufp, linep);
         JS_free(cx, linep);
         bufp += strlen(bufp);
         *bufp++ = '\n';
         *bufp = '\0';
     } else
 #endif
     {
         char line[256] = { '\0' };
         fputs(prompt, gOutFile);
         fflush(gOutFile);
         if ((!fgets(line, sizeof line, file) && errno != EINTR) || feof(file))
-            return JS_FALSE;
+            return false;
         strcpy(bufp, line);
     }
-    return JS_TRUE;
+    return true;
 }
 
 static void
 my_ErrorReporter(JSContext *cx, const char *message, JSErrorReport *report)
 {
     int i, j, k, n;
     char *prefix = NULL, *tmp;
     const char *ctmp;
@@ -383,93 +383,93 @@ ReadLine(JSContext *cx, uintN argc, jsva
     // bug 105707. It is also the same limit as in ProcessFile.
     char buf[4096];
     JSString *str;
 
     /* If a prompt was specified, construct the string */
     if (argc > 0) {
         str = JS_ValueToString(cx, JS_ARGV(cx, vp)[0]);
         if (!str)
-            return JS_FALSE;
+            return false;
     } else {
         str = JSVAL_TO_STRING(JS_GetEmptyStringValue(cx));
     }
 
     /* Get a line from the infile */
     JSAutoByteString strBytes(cx, str);
     if (!strBytes || !GetLine(cx, buf, gInFile, strBytes.ptr()))
-        return JS_FALSE;
+        return false;
 
     /* Strip newline character added by GetLine() */
     unsigned int buflen = strlen(buf);
     if (buflen == 0) {
         if (feof(gInFile)) {
             JS_SET_RVAL(cx, vp, JSVAL_NULL);
-            return JS_TRUE;
+            return true;
         }
     } else if (buf[buflen - 1] == '\n') {
         --buflen;
     }
 
     /* Turn buf into a JSString */
     str = JS_NewStringCopyN(cx, buf, buflen);
     if (!str)
-        return JS_FALSE;
+        return false;
 
     JS_SET_RVAL(cx, vp, STRING_TO_JSVAL(str));
-    return JS_TRUE;
+    return true;
 }
 
 static JSBool
 Print(JSContext *cx, uintN argc, jsval *vp)
 {
     uintN i, n;
     JSString *str;
 
     jsval *argv = JS_ARGV(cx, vp);
     for (i = n = 0; i < argc; i++) {
         str = JS_ValueToString(cx, argv[i]);
         if (!str)
-            return JS_FALSE;
+            return false;
         JSAutoByteString strBytes(cx, str);
         if (!strBytes)
-            return JS_FALSE;
+            return false;
         fprintf(gOutFile, "%s%s", i ? " " : "", strBytes.ptr());
         fflush(gOutFile);
     }
     n++;
     if (n)
         fputc('\n', gOutFile);
     JS_SET_RVAL(cx, vp, JSVAL_VOID);
-    return JS_TRUE;
+    return true;
 }
 
 static JSBool
 Dump(JSContext *cx, uintN argc, jsval *vp)
 {
     JS_SET_RVAL(cx, vp, JSVAL_VOID);
 
     JSString *str;
     if (!argc)
-        return JS_TRUE;
+        return true;
 
     str = JS_ValueToString(cx, JS_ARGV(cx, vp)[0]);
     if (!str)
-        return JS_FALSE;
+        return false;
 
     JSAutoByteString bytes(cx, str);
     if (!bytes)
-        return JS_FALSE;
+        return false;
 
 #ifdef ANDROID
     __android_log_print(ANDROID_LOG_INFO, "Gecko", bytes.ptr());
 #endif
     fputs(bytes.ptr(), gOutFile);
     fflush(gOutFile);
-    return JS_TRUE;
+    return true;
 }
 
 static JSBool
 Load(JSContext *cx, uintN argc, jsval *vp)
 {
     JSObject *obj = JS_THIS_OBJECT(cx, vp);
     if (!obj)
         return false;
@@ -505,77 +505,77 @@ Load(JSContext *cx, uintN argc, jsval *v
 
 static JSBool
 Version(JSContext *cx, uintN argc, jsval *vp)
 {
     if (argc > 0 && JSVAL_IS_INT(JS_ARGV(cx, vp)[0]))
         JS_SET_RVAL(cx, vp, INT_TO_JSVAL(JS_SetVersion(cx, JSVersion(JSVAL_TO_INT(JS_ARGV(cx, vp)[0])))));
     else
         JS_SET_RVAL(cx, vp, INT_TO_JSVAL(JS_GetVersion(cx)));
-    return JS_TRUE;
+    return true;
 }
 
 static JSBool
 BuildDate(JSContext *cx, uintN argc, jsval *vp)
 {
     fprintf(gOutFile, "built on %s at %s\n", __DATE__, __TIME__);
     JS_SET_RVAL(cx, vp, JSVAL_VOID);
-    return JS_TRUE;
+    return true;
 }
 
 static JSBool
 Quit(JSContext *cx, uintN argc, jsval *vp)
 {
     gExitCode = 0;
     JS_ConvertArguments(cx, argc, JS_ARGV(cx, vp),"/ i", &gExitCode);
 
-    gQuitting = JS_TRUE;
+    gQuitting = true;
 //    exit(0);
-    return JS_FALSE;
+    return false;
 }
 
 static JSBool
 DumpXPC(JSContext *cx, uintN argc, jsval *vp)
 {
     int32 depth = 2;
 
     if (argc > 0) {
         if (!JS_ValueToInt32(cx, JS_ARGV(cx, vp)[0], &depth))
-            return JS_FALSE;
+            return false;
     }
 
     nsCOMPtr<nsIXPConnect> xpc = do_GetService(nsIXPConnect::GetCID());
     if (xpc)
         xpc->DebugDump((int16)depth);
     JS_SET_RVAL(cx, vp, JSVAL_VOID);
-    return JS_TRUE;
+    return true;
 }
 
 static JSBool
 GC(JSContext *cx, uintN argc, jsval *vp)
 {
     JS_GC(cx);
 #ifdef JS_GCMETER
     js_DumpGCStats(cx->runtime, stdout);
 #endif
     JS_SET_RVAL(cx, vp, JSVAL_VOID);
-    return JS_TRUE;
+    return true;
 }
 
 #ifdef JS_GC_ZEAL
 static JSBool
 GCZeal(JSContext *cx, uintN argc, jsval *vp)
 {
     uint32 zeal;
     if (!JS_ValueToECMAUint32(cx, argc ? JS_ARGV(cx, vp)[0] : JSVAL_VOID, &zeal))
-        return JS_FALSE;
+        return false;
 
-    JS_SetGCZeal(cx, (PRUint8)zeal, JS_DEFAULT_ZEAL_FREQ, JS_FALSE);
+    JS_SetGCZeal(cx, (PRUint8)zeal, JS_DEFAULT_ZEAL_FREQ, false);
     JS_SET_RVAL(cx, vp, JSVAL_VOID);
-    return JS_TRUE;
+    return true;
 }
 #endif
 
 #ifdef DEBUG
 
 static JSBool
 DumpHeap(JSContext *cx, uintN argc, jsval *vp)
 {
@@ -592,20 +592,20 @@ DumpHeap(JSContext *cx, uintN argc, jsva
 
     vp = argv + 0;
     JSAutoByteString fileName;
     if (argc > 0 && *vp != JSVAL_NULL && *vp != JSVAL_VOID) {
         JSString *str;
 
         str = JS_ValueToString(cx, *vp);
         if (!str)
-            return JS_FALSE;
+            return false;
         *vp = STRING_TO_JSVAL(str);
         if (!fileName.encode(cx, str))
-            return JS_FALSE;
+            return false;
     }
 
     vp = argv + 1;
     if (argc > 1 && *vp != JSVAL_NULL && *vp != JSVAL_VOID) {
         if (!JSVAL_IS_TRACEABLE(*vp))
             goto not_traceable_arg;
         startThing = JSVAL_TO_TRACEABLE(*vp);
         startTraceKind = JSVAL_TRACE_KIND(*vp);
@@ -618,17 +618,17 @@ DumpHeap(JSContext *cx, uintN argc, jsva
         thingToFind = JSVAL_TO_TRACEABLE(*vp);
     }
 
     vp = argv + 3;
     if (argc > 3 && *vp != JSVAL_NULL && *vp != JSVAL_VOID) {
         uint32 depth;
 
         if (!JS_ValueToECMAUint32(cx, *vp, &depth))
-            return JS_FALSE;
+            return false;
         maxDepth = depth;
     }
 
     vp = argv + 4;
     if (argc > 4 && *vp != JSVAL_NULL && *vp != JSVAL_VOID) {
         if (!JSVAL_IS_TRACEABLE(*vp))
             goto not_traceable_arg;
         thingToIgnore = JSVAL_TO_TRACEABLE(*vp);
@@ -636,90 +636,90 @@ DumpHeap(JSContext *cx, uintN argc, jsva
 
     if (!fileName) {
         dumpFile = gOutFile;
     } else {
         dumpFile = fopen(fileName.ptr(), "w");
         if (!dumpFile) {
             fprintf(gErrFile, "dumpHeap: can't open %s: %s\n",
                     fileName.ptr(), strerror(errno));
-            return JS_FALSE;
+            return false;
         }
     }
 
     ok = JS_DumpHeap(cx, dumpFile, startThing, startTraceKind, thingToFind,
                      maxDepth, thingToIgnore);
     if (dumpFile != gOutFile)
         fclose(dumpFile);
     return ok;
 
   not_traceable_arg:
     fprintf(gErrFile,
             "dumpHeap: argument %u is not null or a heap-allocated thing\n",
             (unsigned)(vp - argv));
-    return JS_FALSE;
+    return false;
 }
 
 #endif /* DEBUG */
 
 static JSBool
 Clear(JSContext *cx, uintN argc, jsval *vp)
 {
     if (argc > 0 && !JSVAL_IS_PRIMITIVE(JS_ARGV(cx, vp)[0])) {
         JS_ClearScope(cx, JSVAL_TO_OBJECT(JS_ARGV(cx, vp)[0]));
     } else {
         JS_ReportError(cx, "'clear' requires an object");
-        return JS_FALSE;
+        return false;
     }
     JS_SET_RVAL(cx, vp, JSVAL_VOID);
-    return JS_TRUE;
+    return true;
 }
 
 static JSBool
 SendCommand(JSContext* cx,
             uintN argc,
             jsval* vp)
 {
     if (argc == 0) {
         JS_ReportError(cx, "Function takes at least one argument!");
-        return JS_FALSE;
+        return false;
     }
 
     jsval *argv = JS_ARGV(cx, vp);
     JSString* str = JS_ValueToString(cx, argv[0]);
     if (!str) {
         JS_ReportError(cx, "Could not convert argument 1 to string!");
-        return JS_FALSE;
+        return false;
     }
 
     if (argc > 1 && JS_TypeOfValue(cx, argv[1]) != JSTYPE_FUNCTION) {
         JS_ReportError(cx, "Could not convert argument 2 to function!");
-        return JS_FALSE;
+        return false;
     }
 
     if (!XRE_SendTestShellCommand(cx, str, argc > 1 ? &argv[1] : nsnull)) {
         JS_ReportError(cx, "Couldn't send command!");
-        return JS_FALSE;
+        return false;
     }
 
     JS_SET_RVAL(cx, vp, JSVAL_VOID);
-    return JS_TRUE;
+    return true;
 }
 
 static JSBool
 GetChildGlobalObject(JSContext* cx,
                      uintN,
                      jsval* vp)
 {
     JSObject* global;
     if (XRE_GetChildGlobalObject(cx, &global)) {
         JS_SET_RVAL(cx, vp, OBJECT_TO_JSVAL(global));
-        return JS_TRUE;
+        return true;
     }
-    return JS_FALSE;
+    return false;
 }
 
 /*
  * JSContext option name to flag map. The option names are in alphabetical
  * order for better reporting.
  */
 static const struct JSOption {
     const char  *name;
@@ -771,69 +771,69 @@ Options(JSContext *cx, uintN argc, jsval
     char *names;
     JSBool found;
 
     optset = 0;
     jsval *argv = JS_ARGV(cx, vp);
     for (uintN i = 0; i < argc; i++) {
         str = JS_ValueToString(cx, argv[i]);
         if (!str)
-            return JS_FALSE;
+            return false;
         argv[i] = STRING_TO_JSVAL(str);
         JSAutoByteString opt(cx, str);
         if (!opt)
-            return JS_FALSE;
+            return false;
         flag = MapContextOptionNameToFlag(cx,  opt.ptr());
         if (!flag)
-            return JS_FALSE;
+            return false;
         optset |= flag;
     }
     optset = JS_ToggleOptions(cx, optset);
 
     names = NULL;
-    found = JS_FALSE;
+    found = false;
     for (size_t i = 0; i < ArrayLength(js_options); i++) {
         if (js_options[i].flag & optset) {
-            found = JS_TRUE;
+            found = true;
             names = JS_sprintf_append(names, "%s%s",
                                       names ? "," : "", js_options[i].name);
             if (!names)
                 break;
         }
     }
     if (!found)
         names = strdup("");
     if (!names) {
         JS_ReportOutOfMemory(cx);
-        return JS_FALSE;
+        return false;
     }
     str = JS_NewStringCopyZ(cx, names);
     free(names);
     if (!str)
-        return JS_FALSE;
+        return false;
     JS_SET_RVAL(cx, vp, STRING_TO_JSVAL(str));
-    return JS_TRUE;
+    return true;
 }
 
 static JSBool
 Parent(JSContext *cx, uintN argc, jsval *vp)
 {
     if (argc != 1) {
         JS_ReportError(cx, "Wrong number of arguments");
-        return JS_FALSE;
+        return false;
     }
 
     jsval v = JS_ARGV(cx, vp)[0];
     if (JSVAL_IS_PRIMITIVE(v)) {
         JS_ReportError(cx, "Only objects have parents!");
-        return JS_FALSE;
+        return false;
     }
 
     *vp = OBJECT_TO_JSVAL(JS_GetParent(cx, JSVAL_TO_OBJECT(v)));
-    return JS_TRUE;
+    return true;
 }
 
 static JSFunctionSpec glob_functions[] = {
     {"print",           Print,          0,0},
     {"readline",        ReadLine,       1,0},
     {"load",            Load,           1,0},
     {"quit",            Quit,           0,0},
     {"version",         Version,        1,0},
@@ -866,34 +866,34 @@ env_setProperty(JSContext *cx, JSObject 
 {
 /* XXX porting may be easy, but these don't seem to supply setenv by default */
 #if !defined XP_OS2 && !defined SOLARIS
     JSString *idstr, *valstr;
     int rv;
 
     jsval idval;
     if (!JS_IdToValue(cx, id, &idval))
-        return JS_FALSE;
+        return false;
 
     idstr = JS_ValueToString(cx, idval);
     valstr = JS_ValueToString(cx, *vp);
     if (!idstr || !valstr)
-        return JS_FALSE;
+        return false;
     JSAutoByteString name(cx, idstr);
     if (!name)
-        return JS_FALSE;
+        return false;
     JSAutoByteString value(cx, valstr);
     if (!value)
-        return JS_FALSE;
+        return false;
 #if defined XP_WIN || defined HPUX || defined OSF1 || defined SCO
     {
         char *waste = JS_smprintf("%s=%s", name.ptr(), value.ptr());
         if (!waste) {
             JS_ReportOutOfMemory(cx);
-            return JS_FALSE;
+            return false;
         }
         rv = putenv(waste);
 #ifdef XP_WIN
         /*
          * HPUX9 at least still has the bad old non-copying putenv.
          *
          * Per mail from <s.shanmuganathan@digital.com>, OSF1 also has a putenv
          * that will crash if you pass it an auto char array (so it must place
@@ -902,86 +902,86 @@ env_setProperty(JSContext *cx, JSObject 
         free(waste);
 #endif
     }
 #else
     rv = setenv(name.ptr(), value.ptr(), 1);
 #endif
     if (rv < 0) {
         JS_ReportError(cx, "can't set envariable %s to %s", name.ptr(), value.ptr());
-        return JS_FALSE;
+        return false;
     }
     *vp = STRING_TO_JSVAL(valstr);
 #endif /* !defined XP_OS2 && !defined SOLARIS */
-    return JS_TRUE;
+    return true;
 }
 
 static JSBool
 env_enumerate(JSContext *cx, JSObject *obj)
 {
     static JSBool reflected;
     char **evp, *name, *value;
     JSString *valstr;
     JSBool ok;
 
     if (reflected)
-        return JS_TRUE;
+        return true;
 
     for (evp = (char **)JS_GetPrivate(cx, obj); (name = *evp) != NULL; evp++) {
         value = strchr(name, '=');
         if (!value)
             continue;
         *value++ = '\0';
         valstr = JS_NewStringCopyZ(cx, value);
         if (!valstr) {
-            ok = JS_FALSE;
+            ok = false;
         } else {
             ok = JS_DefineProperty(cx, obj, name, STRING_TO_JSVAL(valstr),
                                    NULL, NULL, JSPROP_ENUMERATE);
         }
         value[-1] = '=';
         if (!ok)
-            return JS_FALSE;
+            return false;
     }
 
-    reflected = JS_TRUE;
-    return JS_TRUE;
+    reflected = true;
+    return true;
 }
 
 static JSBool
 env_resolve(JSContext *cx, JSObject *obj, jsid id, uintN flags,
             JSObject **objp)
 {
     JSString *idstr, *valstr;
 
     if (flags & JSRESOLVE_ASSIGNING)
-        return JS_TRUE;
+        return true;
 
     jsval idval;
     if (!JS_IdToValue(cx, id, &idval))
-        return JS_FALSE;
+        return false;
 
     idstr = JS_ValueToString(cx, idval);
     if (!idstr)
-        return JS_FALSE;
+        return false;
     JSAutoByteString name(cx, idstr);
     if (!name)
-        return JS_FALSE;
+        return false;
     const char *value = getenv(name.ptr());
     if (value) {
         valstr = JS_NewStringCopyZ(cx, value);
         if (!valstr)
-            return JS_FALSE;
+            return false;
         if (!JS_DefinePropertyById(cx, obj, id, STRING_TO_JSVAL(valstr),
                                    NULL, NULL, JSPROP_ENUMERATE)) {
-            return JS_FALSE;
+            return false;
         }
         *objp = obj;
     }
-    return JS_TRUE;
+    return true;
 }
 
 static JSClass env_class = {
     "environment", JSCLASS_HAS_PRIVATE | JSCLASS_NEW_RESOLVE,
     JS_PropertyStub,  JS_PropertyStub,
     JS_PropertyStub,  env_setProperty,
     env_enumerate, (JSResolveOp) env_resolve,
     JS_ConvertStub,   nsnull
@@ -1057,36 +1057,36 @@ ProcessFile(JSContext *cx, JSObject *obj
             (void)JS_ExecuteScript(cx, obj, script, &result);
         DoEndRequest(cx);
 
         return;
     }
 
     /* It's an interactive filehandle; drop into read-eval-print loop. */
     lineno = 1;
-    hitEOF = JS_FALSE;
+    hitEOF = false;
     do {
         bufp = buffer;
         *bufp = '\0';
 
         /*
          * Accumulate lines until we get a 'compilable unit' - one that either
          * generates an error (before running out of source) or that compiles
          * cleanly.  This should be whenever we get a complete statement that
          * coincides with the end of a line.
          */
         startline = lineno;
         do {
             if (!GetLine(cx, bufp, file, startline == lineno ? "js> " : "")) {
-                hitEOF = JS_TRUE;
+                hitEOF = true;
                 break;
             }
             bufp += strlen(bufp);
             lineno++;
-        } while (!JS_BufferIsCompilableUnit(cx, JS_FALSE, obj, buffer, strlen(buffer)));
+        } while (!JS_BufferIsCompilableUnit(cx, false, obj, buffer, strlen(buffer)));
 
         DoBeginRequest(cx);
         /* Clear any pending exception from previous failed compiles.  */
         JS_ClearPendingException(cx);
         script = JS_CompileScriptForPrincipals(cx, obj, gJSPrincipals, buffer,
                                                strlen(buffer), "typein", startline);
         if (script) {
             JSErrorReporter older;
@@ -1097,17 +1097,17 @@ ProcessFile(JSContext *cx, JSObject *obj
                     /* Suppress error reports from JS_ValueToString(). */
                     older = JS_SetErrorReporter(cx, NULL);
                     str = JS_ValueToString(cx, result);
                     JS_SetErrorReporter(cx, older);
                     JSAutoByteString bytes;
                     if (str && bytes.encode(cx, str))
                         fprintf(gOutFile, "%s\n", bytes.ptr());
                     else
-                        ok = JS_FALSE;
+                        ok = false;
                 }
             }
         }
         DoEndRequest(cx);
     } while (!hitEOF && !gQuitting);
 
     fprintf(gOutFile, "\n");
 }
@@ -1148,23 +1148,23 @@ extern JSClass global_class;
 static int
 ProcessArgs(JSContext *cx, JSObject *obj, char **argv, int argc)
 {
     const char rcfilename[] = "xpcshell.js";
     FILE *rcfile;
     int i;
     JSObject *argsObj;
     char *filename = NULL;
-    JSBool isInteractive = JS_TRUE;
-    JSBool forceTTY = JS_FALSE;
+    JSBool isInteractive = true;
+    JSBool forceTTY = false;
 
     rcfile = fopen(rcfilename, "r");
     if (rcfile) {
         printf("[loading '%s'...]\n", rcfilename);
-        ProcessFile(cx, obj, rcfilename, rcfile, JS_FALSE);
+        ProcessFile(cx, obj, rcfilename, rcfile, false);
         fclose(rcfile);
     }
 
     /*
      * Scan past all optional arguments so we can create the arguments object
      * before processing any -f options, which must interleave properly with
      * -v and -w options.  This requires two passes, and without getopt, we'll
      * have to keep the option logic here and in the second for loop in sync.
@@ -1204,31 +1204,31 @@ ProcessArgs(JSContext *cx, JSObject *obj
                               NULL, NULL, JSPROP_ENUMERATE)) {
             return 1;
         }
     }
 
     for (i = 0; i < argc; i++) {
         if (argv[i][0] != '-' || argv[i][1] == '\0') {
             filename = argv[i++];
-            isInteractive = JS_FALSE;
+            isInteractive = false;
             break;
         }
         switch (argv[i][1]) {
         case 'v':
             if (++i == argc) {
                 return usage();
             }
             JS_SetVersion(cx, JSVersion(atoi(argv[i])));
             break;
         case 'W':
-            reportWarnings = JS_FALSE;
+            reportWarnings = false;
             break;
         case 'w':
-            reportWarnings = JS_TRUE;
+            reportWarnings = true;
             break;
         case 'S':
             JS_ToggleOptions(cx, JSOPTION_WERROR);
         case 's':
             JS_ToggleOptions(cx, JSOPTION_STRICT);
             break;
         case 'x':
             JS_ToggleOptions(cx, JSOPTION_XML);
@@ -1236,57 +1236,57 @@ ProcessArgs(JSContext *cx, JSObject *obj
         case 'd':
             xpc_ActivateDebugMode();
             break;
         case 'P':
             if (JS_GET_CLASS(cx, JS_GetPrototype(cx, obj)) != &global_class) {
                 JSObject *gobj;
 
                 if (!JS_DeepFreezeObject(cx, obj))
-                    return JS_FALSE;
+                    return false;
                 gobj = JS_NewGlobalObject(cx, &global_class);
                 if (!gobj || !JS_SplicePrototype(cx, gobj, obj))
-                    return JS_FALSE;
+                    return false;
                 JS_SetParent(cx, gobj, NULL);
                 JS_SetGlobalObject(cx, gobj);
                 obj = gobj;
             }
             break;
         case 'f':
             if (++i == argc) {
                 return usage();
             }
-            Process(cx, obj, argv[i], JS_FALSE);
+            Process(cx, obj, argv[i], false);
             /*
              * XXX: js -f foo.js should interpret foo.js and then
              * drop into interactive mode, but that breaks test
              * harness. Just execute foo.js for now.
              */
-            isInteractive = JS_FALSE;
+            isInteractive = false;
             break;
         case 'i':
-            isInteractive = forceTTY = JS_TRUE;
+            isInteractive = forceTTY = true;
             break;
         case 'e':
         {
             jsval rval;
 
             if (++i == argc) {
                 return usage();
             }
 
             JS_EvaluateScriptForPrincipals(cx, obj, gJSPrincipals, argv[i],
                                            strlen(argv[i]), "-e", 1, &rval);
 
-            isInteractive = JS_FALSE;
+            isInteractive = false;
             break;
         }
         case 'C':
-            compileOnly = JS_TRUE;
-            isInteractive = JS_FALSE;
+            compileOnly = true;
+            isInteractive = false;
             break;
         case 'j':
             JS_ToggleOptions(cx, JSOPTION_JIT);
             break;
         case 'm':
             JS_ToggleOptions(cx, JSOPTION_METHODJIT);
             break;
         case 'p':
@@ -1679,37 +1679,37 @@ nsXPCFunctionThisTranslator::TranslateTh
                                            nsIInterfaceInfo *aInterfaceInfo,
                                            PRUint16 aMethodIndex,
                                            bool *aHideFirstParamFromJS,
                                            nsIID * *aIIDOfResult,
                                            nsISupports **_retval)
 {
     NS_IF_ADDREF(aInitialThis);
     *_retval = aInitialThis;
-    *aHideFirstParamFromJS = JS_FALSE;
+    *aHideFirstParamFromJS = false;
     *aIIDOfResult = nsnull;
     return NS_OK;
 }
 
 #endif
 
 // ContextCallback calls are chained
 static JSContextCallback gOldJSContextCallback;
 
 static JSBool
 ContextCallback(JSContext *cx, uintN contextOp)
 {
     if (gOldJSContextCallback && !gOldJSContextCallback(cx, contextOp))
-        return JS_FALSE;
+        return false;
 
     if (contextOp == JSCONTEXT_NEW) {
         JS_SetErrorReporter(cx, my_ErrorReporter);
         JS_SetVersion(cx, JSVERSION_LATEST);
     }
-    return JS_TRUE;
+    return true;
 }
 
 static bool
 GetCurrentWorkingDirectory(nsAString& workingDirectory)
 {
 #if !defined(XP_WIN) && !defined(XP_UNIX)
     //XXX: your platform should really implement this
     return false;
--- a/js/xpconnect/src/XPCCallContext.cpp
+++ b/js/xpconnect/src/XPCCallContext.cpp
@@ -50,18 +50,18 @@ XPCCallContext::XPCCallContext(XPCContex
                                uintN argc       /* = NO_ARGS   */,
                                jsval *argv      /* = nsnull    */,
                                jsval *rval      /* = nsnull    */)
     :   mState(INIT_FAILED),
         mXPC(nsXPConnect::GetXPConnect()),
         mThreadData(nsnull),
         mXPCContext(nsnull),
         mJSContext(cx),
-        mContextPopRequired(JS_FALSE),
-        mDestroyJSContextInDestructor(JS_FALSE),
+        mContextPopRequired(false),
+        mDestroyJSContextInDestructor(false),
         mCallerLanguage(callerLanguage)
 {
     Init(callerLanguage, callerLanguage == NATIVE_CALLER, obj, funobj,
          INIT_SHOULD_LOOKUP_WRAPPER, name, argc, argv, rval);
 }
 
 XPCCallContext::XPCCallContext(XPCContext::LangType callerLanguage,
                                JSContext* cx,
@@ -70,18 +70,18 @@ XPCCallContext::XPCCallContext(XPCContex
                                JSObject* flattenedJSObject,
                                XPCWrappedNative* wrapper,
                                XPCWrappedNativeTearOff* tearOff)
     :   mState(INIT_FAILED),
         mXPC(nsXPConnect::GetXPConnect()),
         mThreadData(nsnull),
         mXPCContext(nsnull),
         mJSContext(cx),
-        mContextPopRequired(JS_FALSE),
-        mDestroyJSContextInDestructor(JS_FALSE),
+        mContextPopRequired(false),
+        mDestroyJSContextInDestructor(false),
         mCallerLanguage(callerLanguage),
         mFlattenedJSObject(flattenedJSObject),
         mWrapper(wrapper),
         mTearOff(tearOff)
 {
     Init(callerLanguage, callBeginRequest, obj, nsnull,
          WRAPPER_PASSED_TO_CONSTRUCTOR, JSID_VOID, NO_ARGS,
          nsnull, nsnull);
@@ -131,17 +131,17 @@ XPCCallContext::Init(XPCContext::LangTyp
             return;
     }
 
     if (topJSContext != mJSContext) {
         if (NS_FAILED(stack->Push(mJSContext))) {
             NS_ERROR("bad!");
             return;
         }
-        mContextPopRequired = JS_TRUE;
+        mContextPopRequired = true;
     }
 
     // Get into the request as early as we can to avoid problems with scanning
     // callcontexts on other threads from within the gc callbacks.
 
     NS_ASSERTION(!callBeginRequest || mCallerLanguage == NATIVE_CALLER,
                  "Don't call JS_BeginRequest unless the caller is native.");
     if (callBeginRequest)
@@ -207,34 +207,34 @@ XPCCallContext::SetName(jsid name)
     CHECK_STATE(HAVE_OBJECT);
 
     mName = name;
 
     if (mTearOff) {
         mSet = nsnull;
         mInterface = mTearOff->GetInterface();
         mMember = mInterface->FindMember(name);
-        mStaticMemberIsLocal = JS_TRUE;
+        mStaticMemberIsLocal = true;
         if (mMember && !mMember->IsConstant())
             mMethodIndex = mMember->GetIndex();
     } else {
         mSet = mWrapper ? mWrapper->GetSet() : nsnull;
 
         if (mSet &&
             mSet->FindMember(name, &mMember, &mInterface,
                              mWrapper->HasProto() ?
                              mWrapper->GetProto()->GetSet() :
                              nsnull,
                              &mStaticMemberIsLocal)) {
             if (mMember && !mMember->IsConstant())
                 mMethodIndex = mMember->GetIndex();
         } else {
             mMember = nsnull;
             mInterface = nsnull;
-            mStaticMemberIsLocal = JS_FALSE;
+            mStaticMemberIsLocal = false;
         }
     }
 
     mState = HAVE_NAME;
 }
 
 void
 XPCCallContext::SetCallInfo(XPCNativeInterface* iface, XPCNativeMember* member,
@@ -265,39 +265,39 @@ XPCCallContext::SetArgsAndResultPtr(uint
                                     jsval *rval)
 {
     CHECK_STATE(HAVE_OBJECT);
 
     if (mState < HAVE_NAME) {
         mSet = nsnull;
         mInterface = nsnull;
         mMember = nsnull;
-        mStaticMemberIsLocal = JS_FALSE;
+        mStaticMemberIsLocal = false;
     }
 
     mArgc   = argc;
     mArgv   = argv;
     mRetVal = rval;
 
-    mReturnValueWasSet = JS_FALSE;
+    mReturnValueWasSet = false;
     mState = HAVE_ARGS;
 }
 
 nsresult
 XPCCallContext::CanCallNow()
 {
     nsresult rv;
 
     if (!HasInterfaceAndMember())
         return NS_ERROR_UNEXPECTED;
     if (mState < HAVE_ARGS)
         return NS_ERROR_UNEXPECTED;
 
     if (!mTearOff) {
-        mTearOff = mWrapper->FindTearOff(*this, mInterface, JS_FALSE, &rv);
+        mTearOff = mWrapper->FindTearOff(*this, mInterface, false, &rv);
         if (!mTearOff || mTearOff->GetInterface() != mInterface) {
             mTearOff = nsnull;
             return NS_FAILED(rv) ? rv : NS_ERROR_UNEXPECTED;
         }
     }
 
     // Refresh in case FindTearOff extended the set
     mSet = mWrapper->GetSet();
--- a/js/xpconnect/src/XPCComponents.cpp
+++ b/js/xpconnect/src/XPCComponents.cpp
@@ -60,36 +60,36 @@
 
 using namespace js;
 /***************************************************************************/
 // stuff used by all
 
 static nsresult ThrowAndFail(uintN errNum, JSContext* cx, bool* retval)
 {
     XPCThrower::Throw(errNum, cx);
-    *retval = JS_FALSE;
+    *retval = false;
     return NS_OK;
 }
 
 static JSBool
 JSValIsInterfaceOfType(JSContext *cx, jsval v, REFNSIID iid)
 {
     nsCOMPtr<nsIXPConnect> xpc;
     nsCOMPtr<nsIXPConnectWrappedNative> wn;
     nsCOMPtr<nsISupports> sup;
     nsISupports* iface;
     if (!JSVAL_IS_PRIMITIVE(v) &&
         nsnull != (xpc = nsXPConnect::GetXPConnect()) &&
         NS_SUCCEEDED(xpc->GetWrappedNativeOfJSObject(cx, JSVAL_TO_OBJECT(v),
                                                      getter_AddRefs(wn))) && wn &&
         NS_SUCCEEDED(wn->Native()->QueryInterface(iid, (void**)&iface)) && iface) {
         NS_RELEASE(iface);
-        return JS_TRUE;
+        return true;
     }
-    return JS_FALSE;
+    return false;
 }
 
 char* xpc_CloneAllAccess()
 {
     static const char allAccess[] = "AllAccess";
     return (char*)nsMemory::Clone(allAccess, sizeof(allAccess));
 }
 
@@ -1620,17 +1620,17 @@ nsXPCComponents_ID::CallOrConstruct(nsIX
     XPCContext* xpcc = ccx.GetXPCContext();
 
     // Do the security check if necessary
 
     nsIXPCSecurityManager* sm =
             xpcc->GetAppropriateSecurityManager(nsIXPCSecurityManager::HOOK_CREATE_INSTANCE);
     if (sm && NS_FAILED(sm->CanCreateInstance(cx, nsJSID::GetCID()))) {
         // the security manager vetoed. It should have set an exception.
-        *_retval = JS_FALSE;
+        *_retval = false;
         return NS_OK;
     }
 
     // convert the first argument into a string and see if it looks like an id
 
     JSString* jsstr;
     JSAutoByteString bytes;
     nsID id;
@@ -1840,17 +1840,17 @@ nsXPCComponents_Exception::CallOrConstru
     XPCContext* xpcc = ccx.GetXPCContext();
 
     // Do the security check if necessary
 
     nsIXPCSecurityManager* sm =
             xpcc->GetAppropriateSecurityManager(nsIXPCSecurityManager::HOOK_CREATE_INSTANCE);
     if (sm && NS_FAILED(sm->CanCreateInstance(cx, nsXPCException::GetCID()))) {
         // the security manager vetoed. It should have set an exception.
-        *_retval = JS_FALSE;
+        *_retval = false;
         return NS_OK;
     }
 
     // initialization params for the exception object we will create
     const char*             eMsg = "exception";
     JSAutoByteString        eMsgBytes;
     nsresult                eResult = NS_ERROR_FAILURE;
     nsCOMPtr<nsIStackFrame> eStack;
@@ -2172,17 +2172,17 @@ nsXPCConstructor::CallOrConstruct(nsIXPC
     }
 
     jsval ctorArgs[1] = {OBJECT_TO_JSVAL(iidObj)};
     jsval val;
 
     if (!JS_CallFunctionName(cx, cidObj, "createInstance", 1, ctorArgs, &val) ||
         JSVAL_IS_PRIMITIVE(val)) {
         // createInstance will have thrown an exception
-        *_retval = JS_FALSE;
+        *_retval = false;
         return NS_OK;
     }
 
     // root the result
     if (vp)
         *vp = val;
 
     // call initializer method if supplied
@@ -2194,17 +2194,17 @@ nsXPCConstructor::CallOrConstruct(nsIXPC
         // first check existence of function property for better error reporting
         if (!JS_GetProperty(cx, newObj, mInitializer, &fun) ||
             JSVAL_IS_PRIMITIVE(fun)) {
             return ThrowAndFail(NS_ERROR_XPC_BAD_INITIALIZER_NAME, cx, _retval);
         }
 
         if (!JS_CallFunctionValue(cx, newObj, fun, argc, argv, &ignored)) {
             // function should have thrown an exception
-            *_retval = JS_FALSE;
+            *_retval = false;
             return NS_OK;
         }
     }
 
     return NS_OK;
 }
 
 /*******************************************************/
@@ -2396,17 +2396,17 @@ nsXPCComponents_Constructor::CallOrConst
         return ThrowAndFail(NS_ERROR_XPC_UNEXPECTED, cx, _retval);
 
     // Do the security check if necessary
 
     nsIXPCSecurityManager* sm =
             xpcc->GetAppropriateSecurityManager(nsIXPCSecurityManager::HOOK_CREATE_INSTANCE);
     if (sm && NS_FAILED(sm->CanCreateInstance(cx, nsXPCConstructor::GetCID()))) {
         // the security manager vetoed. It should have set an exception.
-        *_retval = JS_FALSE;
+        *_retval = false;
         return NS_OK;
     }
 
     // initialization params for the Constructor object we will create
     nsCOMPtr<nsIJSCID> cClassID;
     nsCOMPtr<nsIJSIID> cInterfaceID;
     const char*        cInitializer = nsnull;
     JSAutoByteString  cInitializerBytes;
@@ -2871,108 +2871,108 @@ PrincipalHolder::GetPrincipal()
     return mHoldee;
 }
 
 static JSBool
 SandboxDump(JSContext *cx, uintN argc, jsval *vp)
 {
     JSString *str;
     if (!argc)
-        return JS_TRUE;
+        return true;
 
     str = JS_ValueToString(cx, JS_ARGV(cx, vp)[0]);
     if (!str)
-        return JS_FALSE;
+        return false;
 
     size_t length;
     const jschar *chars = JS_GetStringCharsZAndLength(cx, str, &length);
     if (!chars)
-        return JS_FALSE;
+        return false;
 
     nsDependentString wstr(chars, length);
     char *cstr = ToNewUTF8String(wstr);
     if (!cstr)
-        return JS_FALSE;
+        return false;
 
 #if defined(XP_MACOSX)
     // Be nice and convert all \r to \n.
     char *c = cstr, *cEnd = cstr + strlen(cstr);
     while (c < cEnd) {
         if (*c == '\r')
             *c = '\n';
         c++;
     }
 #endif
 
     fputs(cstr, stderr);
     fflush(stderr);
     NS_Free(cstr);
     JS_SET_RVAL(cx, vp, JSVAL_TRUE);
-    return JS_TRUE;
+    return true;
 }
 
 static JSBool
 SandboxDebug(JSContext *cx, uintN argc, jsval *vp)
 {
 #ifdef DEBUG
     return SandboxDump(cx, argc, vp);
 #else
-    return JS_TRUE;
+    return true;
 #endif
 }
 
 static JSBool
 SandboxImport(JSContext *cx, uintN argc, jsval *vp)
 {
     JSObject *thisobj = JS_THIS_OBJECT(cx, vp);
     if (!thisobj)
-        return JS_FALSE;
+        return false;
 
     jsval *argv = JS_ARGV(cx, vp);
     if (argc < 1 || JSVAL_IS_PRIMITIVE(argv[0])) {
         XPCThrower::Throw(NS_ERROR_INVALID_ARG, cx);
-        return JS_FALSE;
+        return false;
     }
 
     JSString *funname;
     if (argc > 1) {
         // Use the second parameter as the function name.
         funname = JS_ValueToString(cx, argv[1]);
         if (!funname)
-            return JS_FALSE;
+            return false;
         argv[1] = STRING_TO_JSVAL(funname);
     } else {
         // NB: funobj must only be used to get the JSFunction out.
         JSObject *funobj = JSVAL_TO_OBJECT(argv[0]);
         if (js::IsProxy(funobj)) {
             funobj = XPCWrapper::UnsafeUnwrapSecurityWrapper(funobj);
         }
 
         JSAutoEnterCompartment ac;
         if (!ac.enter(cx, funobj)) {
-            return JS_FALSE;
+            return false;
         }
 
         JSFunction *fun = JS_ValueToFunction(cx, OBJECT_TO_JSVAL(funobj));
         if (!fun) {
             XPCThrower::Throw(NS_ERROR_INVALID_ARG, cx);
-            return JS_FALSE;
+            return false;
         }
 
         // Use the actual function name as the name.
         funname = JS_GetFunctionId(fun);
         if (!funname) {
             XPCThrower::Throw(NS_ERROR_INVALID_ARG, cx);
-            return JS_FALSE;
+            return false;
         }
     }
 
     jsid id;
     if (!JS_ValueToId(cx, STRING_TO_JSVAL(funname), &id))
-        return JS_FALSE;
+        return false;
 
     JS_SET_RVAL(cx, vp, JSVAL_VOID);
     return JS_SetPropertyById(cx, thisobj, id, &argv[0]);
 }
 
 static JSBool
 sandbox_enumerate(JSContext *cx, JSObject *obj)
 {
@@ -2994,17 +2994,17 @@ sandbox_finalize(JSContext *cx, JSObject
     NS_IF_RELEASE(sop);
 }
 
 static JSBool
 sandbox_convert(JSContext *cx, JSObject *obj, JSType type, jsval *vp)
 {
     if (type == JSTYPE_OBJECT) {
         *vp = OBJECT_TO_JSVAL(obj);
-        return JS_TRUE;
+        return true;
     }
 
     return JS_ConvertStub(cx, obj, type, vp);
 }
 
 static JSClass SandboxClass = {
     "Sandbox",
     XPCONNECT_GLOBAL_FLAGS,
@@ -3405,17 +3405,17 @@ JSBool
 ContextHolder::ContextHolderOperationCallback(JSContext *cx)
 {
     ContextHolder* thisObject =
         static_cast<ContextHolder*>(JS_GetContextPrivate(cx));
     NS_ASSERTION(thisObject, "How did that happen?");
 
     JSContext *origCx = thisObject->mOrigCx;
     JSOperationCallback callback = JS_GetOperationCallback(origCx);
-    JSBool ok = JS_TRUE;
+    JSBool ok = true;
     if (callback)
         ok = callback(origCx);
     return ok;
 }
 
 /***************************************************************************/
 
 /* void evalInSandbox(in AString source, in nativeobj sandbox); */
@@ -3896,36 +3896,36 @@ nsXPCComponents_Utils::CreateObjectIn(co
     return NS_OK;
 }
 
 JSBool
 FunctionWrapper(JSContext *cx, uintN argc, jsval *vp)
 {
     jsval v;
     if (!JS_GetReservedSlot(cx, JSVAL_TO_OBJECT(JS_CALLEE(cx, vp)), 0, &v))
-        return JS_FALSE;
+        return false;
     NS_ASSERTION(JSVAL_IS_OBJECT(v), "weird function");
 
     return JS_CallFunctionValue(cx, JS_THIS_OBJECT(cx, vp), v,
                                 argc, JS_ARGV(cx, vp), vp);
 }
 
 JSBool
 WrapCallable(JSContext *cx, JSObject *obj, jsid id, JSObject *propobj, jsval *vp)
 {
     JSFunction *fun = JS_NewFunctionById(cx, FunctionWrapper, 0, 0,
                                          JS_GetGlobalForObject(cx, obj), id);
     if (!fun)
-        return JS_FALSE;
+        return false;
 
     JSObject *funobj = JS_GetFunctionObject(fun);
     if (!JS_SetReservedSlot(cx, funobj, 0, OBJECT_TO_JSVAL(propobj)))
-        return JS_FALSE;
+        return false;
     *vp = OBJECT_TO_JSVAL(funobj);
-    return JS_TRUE;
+    return true;
 }
 
 /* void makeObjectPropsNormal(jsval vobj); */
 NS_IMETHODIMP
 nsXPCComponents_Utils::MakeObjectPropsNormal(const jsval &vobj, JSContext *cx)
 {
     if (!cx)
         return NS_ERROR_FAILURE;
@@ -4074,17 +4074,17 @@ GENERATE_JSOPTION_GETTER_SETTER(Jitprofi
 GENERATE_JSOPTION_GETTER_SETTER(Methodjit_always, JSOPTION_METHODJIT_ALWAYS)
 
 #undef GENERATE_JSOPTION_GETTER_SETTER
 
 NS_IMETHODIMP
 nsXPCComponents_Utils::SetGCZeal(PRInt32 aValue, JSContext* cx)
 {
 #ifdef JS_GC_ZEAL
-    JS_SetGCZeal(cx, PRUint8(aValue), JS_DEFAULT_ZEAL_FREQ, JS_FALSE);
+    JS_SetGCZeal(cx, PRUint8(aValue), JS_DEFAULT_ZEAL_FREQ, false);
 #endif
     return NS_OK;
 }
 
 /***************************************************************************/
 /***************************************************************************/
 /***************************************************************************/
 
@@ -4321,25 +4321,25 @@ NS_IMETHODIMP
 nsXPCComponents::GetProperty(nsIXPConnectWrappedNative *wrapper,
                              JSContext * cx, JSObject * obj,
                              jsid id, jsval * vp, bool *_retval)
 {
     XPCContext* xpcc = XPCContext::GetXPCContext(cx);
     if (!xpcc)
         return NS_ERROR_FAILURE;
 
-    bool doResult = JS_FALSE;
+    bool doResult = false;
     nsresult res;
     XPCJSRuntime* rt = xpcc->GetRuntime();
     if (id == rt->GetStringID(XPCJSRuntime::IDX_LAST_RESULT)) {
         res = xpcc->GetLastResult();
-        doResult = JS_TRUE;
+        doResult = true;
     } else if (id == rt->GetStringID(XPCJSRuntime::IDX_RETURN_CODE)) {
         res = xpcc->GetPendingResult();
-        doResult = JS_TRUE;
+        doResult = true;
     }
 
     nsresult rv = NS_OK;
     if (doResult) {
         if (!JS_NewNumberValue(cx, (jsdouble) res, vp))
             return NS_ERROR_OUT_OF_MEMORY;
         rv = NS_SUCCESS_I_DID_SOMETHING;
     }
@@ -4376,36 +4376,36 @@ nsXPCComponents::SetProperty(nsIXPConnec
 
 // static
 JSBool
 nsXPCComponents::AttachNewComponentsObject(XPCCallContext& ccx,
                                            XPCWrappedNativeScope* aScope,
                                            JSObject* aGlobal)
 {
     if (!aGlobal)
-        return JS_FALSE;
+        return false;
 
     nsXPCComponents* components = new nsXPCComponents();
     if (!components)
-        return JS_FALSE;
+        return false;
 
     nsCOMPtr<nsIXPCComponents> cholder(components);
 
     AutoMarkingNativeInterfacePtr iface(ccx);
     iface = XPCNativeInterface::GetNewOrUsed(ccx, &NS_GET_IID(nsIXPCComponents));
 
     if (!iface)
-        return JS_FALSE;
+        return false;
 
     nsCOMPtr<XPCWrappedNative> wrapper;
     xpcObjectHelper helper(cholder);
     XPCWrappedNative::GetNewOrUsed(ccx, helper, aScope, iface,
                                    OBJ_IS_NOT_GLOBAL, getter_AddRefs(wrapper));
     if (!wrapper)
-        return JS_FALSE;
+        return false;
 
     aScope->SetComponents(components);
 
     jsid id = ccx.GetRuntime()->GetStringID(XPCJSRuntime::IDX_COMPONENTS);
     JSObject* obj;
 
     return NS_SUCCEEDED(wrapper->GetJSObject(&obj)) &&
            obj && JS_DefinePropertyById(ccx, aGlobal, id, OBJECT_TO_JSVAL(obj),
--- a/js/xpconnect/src/XPCConvert.cpp
+++ b/js/xpconnect/src/XPCConvert.cpp
@@ -73,45 +73,45 @@ static intN sXPCOMUCStringFinalizerIndex
 
 /***********************************************************/
 
 // static
 JSBool
 XPCConvert::IsMethodReflectable(const XPTMethodDescriptor& info)
 {
     if (XPT_MD_IS_NOTXPCOM(info.flags) || XPT_MD_IS_HIDDEN(info.flags))
-        return JS_FALSE;
+        return false;
 
     for (int i = info.num_args-1; i >= 0; i--) {
         const nsXPTParamInfo& param = info.params[i];
         const nsXPTType& type = param.GetType();
 
         // Reflected methods can't use native types. All native types end up
         // getting tagged as void*, so this check is easy.
         if (type.TagPart() == nsXPTType::T_VOID)
-            return JS_FALSE;
+            return false;
     }
-    return JS_TRUE;
+    return true;
 }
 
 /***************************************************************************/
 
 // static
 JSBool
 XPCConvert::GetISupportsFromJSObject(JSObject* obj, nsISupports** iface)
 {
     JSClass* jsclass = js::GetObjectJSClass(obj);
     NS_ASSERTION(jsclass, "obj has no class");
     if (jsclass &&
         (jsclass->flags & JSCLASS_HAS_PRIVATE) &&
         (jsclass->flags & JSCLASS_PRIVATE_IS_NSISUPPORTS)) {
         *iface = (nsISupports*) xpc_GetJSPrivate(obj);
-        return JS_TRUE;
+        return true;
     }
-    return JS_FALSE;
+    return false;
 }
 
 /***************************************************************************/
 
 static void
 FinalizeXPCOMUCString(JSContext *cx, JSString *str)
 {
     NS_ASSERTION(sXPCOMUCStringFinalizerIndex != -1,
@@ -126,20 +126,20 @@ FinalizeXPCOMUCString(JSContext *cx, JSS
 static JSBool
 AddXPCOMUCStringFinalizer()
 {
 
     sXPCOMUCStringFinalizerIndex =
         JS_AddExternalStringFinalizer(FinalizeXPCOMUCString);
 
     if (sXPCOMUCStringFinalizerIndex == -1) {
-        return JS_FALSE;
+        return false;
     }
 
-    return JS_TRUE;
+    return true;
 }
 
 //static
 void
 XPCConvert::RemoveXPCOMUCStringFinalizer()
 {
     JS_RemoveExternalStringFinalizer(FinalizeXPCOMUCString);
     sXPCOMUCStringFinalizerIndex = -1;
@@ -214,66 +214,66 @@ XPCConvert::NativeData2JS(XPCLazyCallCon
                              "Passing a malformed bool through XPConnect");
             *d = BOOLEAN_TO_JSVAL(!!b);
             break;
         }
     case nsXPTType::T_CHAR  :
         {
             char* p = (char*)s;
             if (!p)
-                return JS_FALSE;
+                return false;
 
 #ifdef STRICT_CHECK_OF_UNICODE
             NS_ASSERTION(! ILLEGAL_CHAR_RANGE(p) , "passing non ASCII data");
 #endif // STRICT_CHECK_OF_UNICODE
 
             JSString* str;
             if (!(str = JS_NewStringCopyN(cx, p, 1)))
-                return JS_FALSE;
+                return false;
             *d = STRING_TO_JSVAL(str);
             break;
         }
     case nsXPTType::T_WCHAR :
         {
             jschar* p = (jschar*)s;
             if (!p)
-                return JS_FALSE;
+                return false;
             JSString* str;
             if (!(str = JS_NewUCStringCopyN(cx, p, 1)))
-                return JS_FALSE;
+                return false;
             *d = STRING_TO_JSVAL(str);
             break;
         }
 
     case nsXPTType::T_JSVAL :
         {
             *d = *((jsval*)s);
             if (!JS_WrapValue(cx, d))
-                return JS_FALSE;
+                return false;
             break;
         }
 
     default:
 
         // set the default result
         *d = JSVAL_NULL;
 
         switch (type.TagPart()) {
         case nsXPTType::T_VOID:
             XPC_LOG_ERROR(("XPCConvert::NativeData2JS : void* params not supported"));
-            return JS_FALSE;
+            return false;
 
         case nsXPTType::T_IID:
             {
                 nsID* iid2 = *((nsID**)s);
                 if (!iid2)
                     break;
                 JSObject* obj;
                 if (!(obj = xpc_NewIDObject(cx, lccx.GetScopeForNewJSObjects(), *iid2)))
-                    return JS_FALSE;
+                    return false;
                 *d = OBJECT_TO_JSVAL(obj);
                 break;
             }
 
         case nsXPTType::T_ASTRING:
             // Fall through to T_DOMSTRING case
 
         case nsXPTType::T_DOMSTRING:
@@ -281,17 +281,17 @@ XPCConvert::NativeData2JS(XPCLazyCallCon
                 const nsAString* p = *((const nsAString**)s);
                 if (!p)
                     break;
 
                 if (!p->IsVoid()) {
                     nsStringBuffer* buf;
                     jsval str = XPCStringConvert::ReadableToJSVal(cx, *p, &buf);
                     if (JSVAL_IS_NULL(str))
-                        return JS_FALSE;
+                        return false;
                     if (buf)
                         buf->AddRef();
 
                     *d = str;
                 }
 
                 // *d is defaulted to JSVAL_NULL so no need to set it
                 // again if p is a "void" string
@@ -311,57 +311,57 @@ XPCConvert::NativeData2JS(XPCLazyCallCon
                 for (t=p; *t && isAscii ; t++) {
                   if (ILLEGAL_CHAR_RANGE(*t))
                       isAscii = false;
                 }
                 NS_ASSERTION(isAscii, "passing non ASCII data");
 #endif // STRICT_CHECK_OF_UNICODE
                 JSString* str;
                 if (!(str = JS_NewStringCopyZ(cx, p)))
-                    return JS_FALSE;
+                    return false;
                 *d = STRING_TO_JSVAL(str);
                 break;
             }
 
         case nsXPTType::T_WCHAR_STR:
             {
                 jschar* p = *((jschar**)s);
                 if (!p)
                     break;
                 JSString* str;
                 if (!(str = JS_NewUCStringCopyZ(cx, p)))
-                    return JS_FALSE;
+                    return false;
                 *d = STRING_TO_JSVAL(str);
                 break;
             }
         case nsXPTType::T_UTF8STRING:
             {
                 const nsACString* cString = *((const nsACString**)s);
 
                 if (!cString)
                     break;
 
                 if (!cString->IsVoid()) {
                     PRUint32 len;
                     jschar *p = (jschar *)UTF8ToNewUnicode(*cString, &len);
 
                     if (!p)
-                        return JS_FALSE;
+                        return false;
 
                     if (sXPCOMUCStringFinalizerIndex == -1 &&
                         !AddXPCOMUCStringFinalizer())
-                        return JS_FALSE;
+                        return false;
 
                     JSString* jsString =
                         JS_NewExternalString(cx, p, len,
                                              sXPCOMUCStringFinalizerIndex);
 
                     if (!jsString) {
                         nsMemory::Free(p);
-                        return JS_FALSE;
+                        return false;
                     }
 
                     *d = STRING_TO_JSVAL(jsString);
                 }
 
                 break;
 
             }
@@ -370,80 +370,80 @@ XPCConvert::NativeData2JS(XPCLazyCallCon
                 const nsACString* cString = *((const nsACString**)s);
 
                 if (!cString)
                     break;
 
                 if (!cString->IsVoid()) {
                     PRUnichar* unicodeString = ToNewUnicode(*cString);
                     if (!unicodeString)
-                        return JS_FALSE;
+                        return false;
 
                     if (sXPCOMUCStringFinalizerIndex == -1 &&
                         !AddXPCOMUCStringFinalizer())
-                        return JS_FALSE;
+                        return false;
 
                     JSString* jsString = JS_NewExternalString(cx,
                                                               (jschar*)unicodeString,
                                                               cString->Length(),
                                                               sXPCOMUCStringFinalizerIndex);
 
                     if (!jsString) {
                         nsMemory::Free(unicodeString);
-                        return JS_FALSE;
+                        return false;
                     }
 
                     *d = STRING_TO_JSVAL(jsString);
                 }
 
                 break;
             }
 
         case nsXPTType::T_INTERFACE:
         case nsXPTType::T_INTERFACE_IS:
             {
                 nsISupports* iface = *((nsISupports**)s);
                 if (iface) {
                     if (iid->Equals(NS_GET_IID(nsIVariant))) {
                         nsCOMPtr<nsIVariant> variant = do_QueryInterface(iface);
                         if (!variant)
-                            return JS_FALSE;
+                            return false;
 
                         return XPCVariant::VariantDataToJS(lccx, variant,
                                                            pErr, d);
                     }
                     // else...
 
                     // XXX The OBJ_IS_NOT_GLOBAL here is not really right. In
                     // fact, this code is depending on the fact that the
                     // global object will not have been collected, and
                     // therefore this NativeInterface2JSObject will not end up
                     // creating a new XPCNativeScriptableShared.
                     xpcObjectHelper helper(iface);
                     if (!NativeInterface2JSObject(lccx, d, nsnull, helper, iid,
                                                   nsnull, true,
                                                   OBJ_IS_NOT_GLOBAL, pErr))
-                        return JS_FALSE;
+                        return false;
 
 #ifdef DEBUG
                     JSObject* jsobj = JSVAL_TO_OBJECT(*d);
                     if (jsobj && !js::GetObjectParent(jsobj))
                         NS_ASSERTION(js::GetObjectClass(jsobj)->flags & JSCLASS_IS_GLOBAL,
                                      "Why did we recreate this wrapper?");
 #endif
                 }
                 break;
             }
 
         default:
             NS_ERROR("bad type");
-            return JS_FALSE;
+            return false;
         }
     }
-    return JS_TRUE;
+    return true;
 }
 
 /***************************************************************************/
 
 #ifdef DEBUG
 static bool
 CheckJSCharInCharRange(jschar c)
 {
@@ -470,119 +470,119 @@ XPCConvert::JSData2Native(XPCCallContext
     NS_PRECONDITION(d, "bad param");
 
     JSContext* cx = ccx.GetJSContext();
 
     int32    ti;
     uint32   tu;
     jsdouble td;
     JSBool   tb;
-    JSBool isDOMString = JS_TRUE;
+    JSBool isDOMString = true;
 
     if (pErr)
         *pErr = NS_ERROR_XPC_BAD_CONVERT_JS;
 
     switch (type.TagPart()) {
     case nsXPTType::T_I8     :
         if (!JS_ValueToECMAInt32(cx, s, &ti))
-            return JS_FALSE;
+            return false;
         *((int8*)d)  = (int8) ti;
         break;
     case nsXPTType::T_I16    :
         if (!JS_ValueToECMAInt32(cx, s, &ti))
-            return JS_FALSE;
+            return false;
         *((int16*)d)  = (int16) ti;
         break;
     case nsXPTType::T_I32    :
         if (!JS_ValueToECMAInt32(cx, s, (int32*)d))
-            return JS_FALSE;
+            return false;
         break;
     case nsXPTType::T_I64    :
         if (JSVAL_IS_INT(s)) {
             if (!JS_ValueToECMAInt32(cx, s, &ti))
-                return JS_FALSE;
+                return false;
             LL_I2L(*((int64*)d),ti);
 
         } else {
             if (!JS_ValueToNumber(cx, s, &td))
-                return JS_FALSE;
+                return false;
             LL_D2L(*((int64*)d),td);
         }
         break;
     case nsXPTType::T_U8     :
         if (!JS_ValueToECMAUint32(cx, s, &tu))
-            return JS_FALSE;
+            return false;
         *((uint8*)d)  = (uint8) tu;
         break;
     case nsXPTType::T_U16    :
         if (!JS_ValueToECMAUint32(cx, s, &tu))
-            return JS_FALSE;
+            return false;
         *((uint16*)d)  = (uint16) tu;
         break;
     case nsXPTType::T_U32    :
         if (!JS_ValueToECMAUint32(cx, s, (uint32*)d))
-            return JS_FALSE;
+            return false;
         break;
     case nsXPTType::T_U64    :
         if (JSVAL_IS_INT(s)) {
             if (!JS_ValueToECMAUint32(cx, s, &tu))
-                return JS_FALSE;
+                return false;
             LL_UI2L(*((int64*)d),tu);
         } else {
             if (!JS_ValueToNumber(cx, s, &td))
-                return JS_FALSE;
+                return false;
 #ifdef XP_WIN
             // Note: Win32 can't handle double to uint64 directly
             *((uint64*)d) = (uint64)((int64) td);
 #else
             LL_D2L(*((uint64*)d),td);
 #endif
         }
         break;
     case nsXPTType::T_FLOAT  :
         if (!JS_ValueToNumber(cx, s, &td))
-            return JS_FALSE;
+            return false;
         *((float*)d) = (float) td;
         break;
     case nsXPTType::T_DOUBLE :
         if (!JS_ValueToNumber(cx, s, (double*)d))
-            return JS_FALSE;
+            return false;
         break;
     case nsXPTType::T_BOOL   :
         JS_ValueToBoolean(cx, s, &tb);
         *((bool*)d) = tb;
         break;
     case nsXPTType::T_CHAR   :
         {
             JSString* str = JS_ValueToString(cx, s);
             if (!str) {
-                return JS_FALSE;
+                return false;
             }
             size_t length;
             const jschar* chars = JS_GetStringCharsAndLength(cx, str, &length);
             if (!chars) {
-                return JS_FALSE;
+                return false;
             }
             jschar ch = length ? chars[0] : 0;
 #ifdef DEBUG
             CheckJSCharInCharRange(ch);
 #endif
             *((char*)d) = char(ch);
             break;
         }
     case nsXPTType::T_WCHAR  :
         {
             JSString* str;
             if (!(str = JS_ValueToString(cx, s))) {
-                return JS_FALSE;
+                return false;
             }
             size_t length;
             const jschar* chars = JS_GetStringCharsAndLength(cx, str, &length);
             if (!chars) {
-                return JS_FALSE;
+                return false;
             }
             if (length == 0) {
                 *((uint16*)d) = 0;
                 break;
             }
             *((uint16*)d) = (uint16) chars[0];
             break;
         }
@@ -590,351 +590,351 @@ XPCConvert::JSData2Native(XPCCallContext
         *((jsval*)d) = s;
         break;
     default:
 
         switch (type.TagPart()) {
         case nsXPTType::T_VOID:
             XPC_LOG_ERROR(("XPCConvert::JSData2Native : void* params not supported"));
             NS_ERROR("void* params not supported");
-            return JS_FALSE;
+            return false;
         case nsXPTType::T_IID:
         {
             JSObject* obj;
             const nsID* pid=nsnull;
 
             if (JSVAL_IS_VOID(s) || JSVAL_IS_NULL(s)) {
                 *((const nsID**)d) = nsnull;
-                return JS_TRUE;
+                return true;
             }
 
             if (!JSVAL_IS_OBJECT(s) ||
                 (!(obj = JSVAL_TO_OBJECT(s))) ||
                 (!(pid = xpc_JSObjectToID(cx, obj))) ||
                 (!(pid = (const nsID*) nsMemory::Clone(pid, sizeof(nsID))))) {
-                return JS_FALSE;
+                return false;
             }
             *((const nsID**)d) = pid;
-            return JS_TRUE;
+            return true;
         }
 
         case nsXPTType::T_ASTRING:
         {
-            isDOMString = JS_FALSE;
+            isDOMString = false;
             // Fall through to T_DOMSTRING case.
         }
         case nsXPTType::T_DOMSTRING:
         {
             static const PRUnichar EMPTY_STRING[] = { '\0' };
             static const PRUnichar VOID_STRING[] = { 'u', 'n', 'd', 'e', 'f', 'i', 'n', 'e', 'd', '\0' };
 
             const PRUnichar* chars = nsnull;
             JSString* str = nsnull;
-            JSBool isNewString = JS_FALSE;
+            JSBool isNewString = false;
             PRUint32 length = 0;
 
             if (JSVAL_IS_VOID(s)) {
                 if (isDOMString) {
                     chars  = VOID_STRING;
                     length = ArrayLength(VOID_STRING) - 1;
                 } else {
                     chars = EMPTY_STRING;
                     length = 0;
                 }
             } else if (!JSVAL_IS_NULL(s)) {
                 str = JS_ValueToString(cx, s);
                 if (!str)
-                    return JS_FALSE;
+                    return false;
 
                 length = (PRUint32) JS_GetStringLength(str);
                 if (length) {
                     chars = JS_GetStringCharsZ(cx, str);
                     if (!chars)
-                        return JS_FALSE;
+                        return false;
                     if (STRING_TO_JSVAL(str) != s)
-                        isNewString = JS_TRUE;
+                        isNewString = true;
                 } else {
                     str = nsnull;
                     chars = EMPTY_STRING;
                 }
             }
 
             if (useAllocator) {
                 // XXX extra string copy when isNewString
                 if (str && !isNewString) {
                     size_t strLength;
                     const jschar *strChars = JS_GetStringCharsZAndLength(cx, str, &strLength);
                     if (!strChars)
-                        return JS_FALSE;
+                        return false;
 
                     XPCReadableJSStringWrapper *wrapper =
                         ccx.NewStringWrapper(strChars, strLength);
                     if (!wrapper)
-                        return JS_FALSE;
+                        return false;
 
                     *((const nsAString**)d) = wrapper;
                 } else if (JSVAL_IS_NULL(s)) {
                     XPCReadableJSStringWrapper *wrapper =
                         new XPCReadableJSStringWrapper();
                     if (!wrapper)
-                        return JS_FALSE;
+                        return false;
 
                     *((const nsAString**)d) = wrapper;
                 } else {
                     // use nsString to encourage sharing
                     const nsAString *rs = new nsString(chars, length);
                     if (!rs)
-                        return JS_FALSE;
+                        return false;
                     *((const nsAString**)d) = rs;
                 }
             } else {
                 nsAString* ws = *((nsAString**)d);
 
                 if (JSVAL_IS_NULL(s) || (!isDOMString && JSVAL_IS_VOID(s))) {
                     ws->Truncate();
                     ws->SetIsVoid(true);
                 } else
                     ws->Assign(chars, length);
             }
-            return JS_TRUE;
+            return true;
         }
 
         case nsXPTType::T_CHAR_STR:
         {
             if (JSVAL_IS_VOID(s) || JSVAL_IS_NULL(s)) {
                 *((char**)d) = nsnull;
-                return JS_TRUE;
+                return true;
             }
 
             JSString* str = JS_ValueToString(cx, s);
             if (!str) {
-                return JS_FALSE;
+                return false;
             }
 #ifdef DEBUG
             const jschar* chars=nsnull;
             if (nsnull != (chars = JS_GetStringCharsZ(cx, str))) {
                 bool legalRange = true;
                 int len = JS_GetStringLength(str);
                 const jschar* t;
                 PRInt32 i=0;
                 for (t=chars; (i< len) && legalRange ; i++,t++) {
                     if (!CheckJSCharInCharRange(*t))
                         break;
                 }
             }
 #endif // DEBUG
             size_t length = JS_GetStringEncodingLength(cx, str);
             if (length == size_t(-1)) {
-                return JS_FALSE;
+                return false;
             }
             char *buffer = static_cast<char *>(nsMemory::Alloc(length + 1));
             if (!buffer) {
-                return JS_FALSE;
+                return false;
             }
             JS_EncodeStringToBuffer(str, buffer, length);
             buffer[length] = '\0';
             *((void**)d) = buffer;
-            return JS_TRUE;
+            return true;
         }
 
         case nsXPTType::T_WCHAR_STR:
         {
             const jschar* chars=nsnull;
             JSString* str;
 
             if (JSVAL_IS_VOID(s) || JSVAL_IS_NULL(s)) {
                 *((jschar**)d) = nsnull;
-                return JS_TRUE;
+                return true;
             }
 
             if (!(str = JS_ValueToString(cx, s))) {
-                return JS_FALSE;
+                return false;
             }
             if (!(chars = JS_GetStringCharsZ(cx, str))) {
-                return JS_FALSE;
+                return false;
             }
             int len = JS_GetStringLength(str);
             int byte_len = (len+1)*sizeof(jschar);
             if (!(*((void**)d) = nsMemory::Alloc(byte_len))) {
                 // XXX should report error
-                return JS_FALSE;
+                return false;
             }
             jschar* destchars = *((jschar**)d);
             memcpy(destchars, chars, byte_len);
             destchars[len] = 0;
 
-            return JS_TRUE;
+            return true;
         }
 
         case nsXPTType::T_UTF8STRING:
         {
             const jschar* chars;
             PRUint32 length;
             JSString* str;
 
             if (JSVAL_IS_NULL(s) || JSVAL_IS_VOID(s)) {
                 if (useAllocator) {
                     nsACString *rs = new nsCString();
                     if (!rs)
-                        return JS_FALSE;
+                        return false;
 
                     rs->SetIsVoid(true);
                     *((nsACString**)d) = rs;
                 } else {
                     nsCString* rs = *((nsCString**)d);
                     rs->Truncate();
                     rs->SetIsVoid(true);
                 }
-                return JS_TRUE;
+                return true;
             }
 
             // The JS val is neither null nor void...
 
             if (!(str = JS_ValueToString(cx, s))||
                 !(chars = JS_GetStringCharsZ(cx, str))) {
-                return JS_FALSE;
+                return false;
             }
 
             length = JS_GetStringLength(str);
 
             nsCString *rs;
             if (useAllocator) {
                 // Use nsCString to enable sharing
                 rs = new nsCString();
                 if (!rs)
-                    return JS_FALSE;
+                    return false;
 
                 *((const nsCString**)d) = rs;
             } else {
                 rs = *((nsCString**)d);
             }
             const PRUnichar* start = (const PRUnichar*)chars;
             const PRUnichar* end = start + length;
             CopyUTF16toUTF8(nsDependentSubstring(start, end), *rs);
-            return JS_TRUE;
+            return true;
         }
 
         case nsXPTType::T_CSTRING:
         {
             if (JSVAL_IS_NULL(s) || JSVAL_IS_VOID(s)) {
                 if (useAllocator) {
                     nsACString *rs = new nsCString();
                     if (!rs)
-                        return JS_FALSE;
+                        return false;
 
                     rs->SetIsVoid(true);
                     *((nsACString**)d) = rs;
                 } else {
                     nsACString* rs = *((nsACString**)d);
                     rs->Truncate();
                     rs->SetIsVoid(true);
                 }
-                return JS_TRUE;
+                return true;
             }
 
             // The JS val is neither null nor void...
             JSString* str = JS_ValueToString(cx, s);
             if (!str) {
-                return JS_FALSE;
+                return false;
             }
 
             size_t length = JS_GetStringEncodingLength(cx, str);
             if (length == size_t(-1)) {
-                return JS_FALSE;
+                return false;
             }
 
             nsACString *rs;
             if (useAllocator) {
                 rs = new nsCString();
                 if (!rs)
-                    return JS_FALSE;
+                    return false;
                 *((const nsACString**)d) = rs;
             } else {
                 rs = *((nsACString**)d);
             }
 
             rs->SetLength(PRUint32(length));
             if (rs->Length() != PRUint32(length)) {
-                return JS_FALSE;
+                return false;
             }
             JS_EncodeStringToBuffer(str, rs->BeginWriting(), length);
 
-            return JS_TRUE;
+            return true;
         }
 
         case nsXPTType::T_INTERFACE:
         case nsXPTType::T_INTERFACE_IS:
         {
             JSObject* obj;
             NS_ASSERTION(iid,"can't do interface conversions without iid");
 
             if (iid->Equals(NS_GET_IID(nsIVariant))) {
                 XPCVariant* variant = XPCVariant::newVariant(ccx, s);
                 if (!variant)
-                    return JS_FALSE;
+                    return false;
                 *((nsISupports**)d) = static_cast<nsIVariant*>(variant);
-                return JS_TRUE;
+                return true;
             } else if (iid->Equals(NS_GET_IID(nsIAtom)) &&
                        JSVAL_IS_STRING(s)) {
                 // We're trying to pass a string as an nsIAtom.  Let's atomize!
                 JSString* str = JSVAL_TO_STRING(s);
                 const PRUnichar* chars = JS_GetStringCharsZ(cx, str);
                 if (!chars) {
                     if (pErr)
                         *pErr = NS_ERROR_XPC_BAD_CONVERT_JS_NULL_REF;
-                    return JS_FALSE;
+                    return false;
                 }
                 PRUint32 length = JS_GetStringLength(str);
                 nsIAtom* atom = NS_NewAtom(nsDependentSubstring(chars,
                                                                 chars + length));
                 if (!atom && pErr)
                     *pErr = NS_ERROR_OUT_OF_MEMORY;
                 *((nsISupports**)d) = atom;
                 return atom != nsnull;
             }
             //else ...
 
             if (JSVAL_IS_VOID(s) || JSVAL_IS_NULL(s)) {
                 *((nsISupports**)d) = nsnull;
-                return JS_TRUE;
+                return true;
             }
 
             // only wrap JSObjects
             if (!JSVAL_IS_OBJECT(s) || !(obj = JSVAL_TO_OBJECT(s))) {
                 if (pErr && JSVAL_IS_INT(s) && 0 == JSVAL_TO_INT(s))
                     *pErr = NS_ERROR_XPC_BAD_CONVERT_JS_ZERO_ISNOT_NULL;
-                return JS_FALSE;
+                return false;
             }
 
             return JSObject2NativeInterface(ccx, (void**)d, obj, iid,
                                             nsnull, pErr);
         }
         default:
             NS_ERROR("bad type");
-            return JS_FALSE;
+            return false;
         }
     }
-    return JS_TRUE;
+    return true;
 }
 
 inline JSBool
 CreateHolderIfNeeded(XPCCallContext& ccx, JSObject* obj, jsval* d,
                      nsIXPConnectJSObjectHolder** dest)
 {
     if (dest) {
         XPCJSObjectHolder* objHolder = XPCJSObjectHolder::newHolder(ccx, obj);
         if (!objHolder)
-            return JS_FALSE;
+            return false;
 
         NS_ADDREF(*dest = objHolder);
     }
 
     *d = OBJECT_TO_JSVAL(obj);
 
-    return JS_TRUE;
+    return true;
 }
 
 /***************************************************************************/
 // static
 JSBool
 XPCConvert::NativeInterface2JSObject(XPCLazyCallContext& lccx,
                                      jsval* d,
                                      nsIXPConnectJSObjectHolder** dest,
@@ -948,17 +948,17 @@ XPCConvert::NativeInterface2JSObject(XPC
     NS_ASSERTION(!Interface || iid,
                  "Need the iid if you pass in an XPCNativeInterface cache.");
 
     *d = JSVAL_NULL;
     if (dest)
         *dest = nsnull;
     nsISupports *src = aHelper.Object();
     if (!src)
-        return JS_TRUE;
+        return true;
     if (pErr)
         *pErr = NS_ERROR_XPC_BAD_CONVERT_NATIVE;
 
     // We used to have code here that unwrapped and simply exposed the
     // underlying JSObject. That caused anomolies when JSComponents were
     // accessed from other JS code - they didn't act like other xpconnect
     // wrapped components. So, instead, we create "double wrapped" objects
     // (that means an XPCWrappedNative around an nsXPCWrappedJS). This isn't
@@ -967,121 +967,121 @@ XPCConvert::NativeInterface2JSObject(XPC
     JSContext* cx = lccx.GetJSContext();
     NS_ABORT_IF_FALSE(js::GetObjectCompartment(lccx.GetScopeForNewJSObjects()) == cx->compartment,
                       "bad scope for new JSObjects");
 
     JSObject *jsscope = lccx.GetScopeForNewJSObjects();
     XPCWrappedNativeScope* xpcscope =
         XPCWrappedNativeScope::FindInJSObjectScope(cx, jsscope);
     if (!xpcscope)
-        return JS_FALSE;
+        return false;
 
     // First, see if this object supports the wrapper cache.
     // Note: If |cache->IsProxy()| is true, then it means that the object
     // implementing it doesn't want a wrapped native as its JS Object, but
     // instead it provides its own proxy object. In that case, the object
     // to use is found as cache->GetWrapper(). If that is null, then the
     // object will create (and fill the cache) from its WrapObject call.
     nsWrapperCache *cache = aHelper.GetWrapperCache();
 
     bool tryConstructSlimWrapper = false;
     JSObject *flat;
     if (cache) {
         flat = cache->GetWrapper();
         if (cache->IsProxy()) {
             XPCCallContext &ccx = lccx.GetXPCCallContext();
             if (!ccx.IsValid())
-                return JS_FALSE;
+                return false;
 
             if (!flat) {
                 bool triedToWrap;
                 flat = cache->WrapObject(lccx.GetJSContext(), xpcscope,
                                          &triedToWrap);
                 if (!flat && triedToWrap)
-                    return JS_FALSE;
+                    return false;
             }
 
             if (flat) {
                 if (!JS_WrapObject(ccx, &flat))
-                    return JS_FALSE;
+                    return false;
 
                 return CreateHolderIfNeeded(ccx, flat, d, dest);
             }
         }
 
         if (!dest) {
             if (!flat) {
                 tryConstructSlimWrapper = true;
             } else if (IS_SLIM_WRAPPER_OBJECT(flat)) {
                 if (js::GetObjectCompartment(flat) == cx->compartment) {
                     *d = OBJECT_TO_JSVAL(flat);
-                    return JS_TRUE;
+                    return true;
                 }
             }
         }
     } else {
         flat = nsnull;
     }
 
     // If we're not handing this wrapper to an nsIXPConnectJSObjectHolder, and
     // the object supports slim wrappers, try to create one here.
     if (tryConstructSlimWrapper) {
         XPCCallContext &ccx = lccx.GetXPCCallContext();
         if (!ccx.IsValid())
-            return JS_FALSE;
+            return false;
 
         jsval slim;
         if (ConstructSlimWrapper(ccx, aHelper, xpcscope, &slim)) {
             *d = slim;
-            return JS_TRUE;
+            return true;
         }
 
-        // Even if ConstructSlimWrapper returns JS_FALSE it might have created a
+        // Even if ConstructSlimWrapper returns false it might have created a
         // wrapper (while calling the PreCreate hook). In that case we need to
         // fall through because we either have a slim wrapper that needs to be
         // morphed or an XPCWrappedNative.
         flat = cache->GetWrapper();
     }
 
     // We can't simply construct a slim wrapper. Go ahead and create an
     // XPCWrappedNative for this object. At this point, |flat| could be
     // non-null, meaning that either we already have a wrapped native from
     // the cache (which might need to be QI'd to the new interface) or that
     // we found a slim wrapper that we'll have to morph.
     AutoMarkingNativeInterfacePtr iface;
     if (iid) {
         XPCCallContext &ccx = lccx.GetXPCCallContext();
         if (!ccx.IsValid())
-            return JS_FALSE;
+            return false;
 
         iface.Init(ccx);
 
         if (Interface)
             iface = *Interface;
 
         if (!iface) {
             iface = XPCNativeInterface::GetNewOrUsed(ccx, iid);
             if (!iface)
-                return JS_FALSE;
+                return false;
 
             if (Interface)
                 *Interface = iface;
         }
     }
 
     NS_ASSERTION(!flat || IS_WRAPPER_CLASS(js::GetObjectClass(flat)),
                  "What kind of wrapper is this?");
 
     nsresult rv;
     XPCWrappedNative* wrapper;
     nsRefPtr<XPCWrappedNative> strongWrapper;
     if (!flat) {
         XPCCallContext &ccx = lccx.GetXPCCallContext();
         if (!ccx.IsValid())
-            return JS_FALSE;
+            return false;
 
         rv = XPCWrappedNative::GetNewOrUsed(ccx, aHelper, xpcscope, iface,
                                             isGlobal,
                                             getter_AddRefs(strongWrapper));
 
         wrapper = strongWrapper;
     } else if (IS_WN_WRAPPER_OBJECT(flat)) {
         wrapper = static_cast<XPCWrappedNative*>(xpc_GetJSPrivate(flat));
@@ -1090,90 +1090,90 @@ XPCConvert::NativeInterface2JSObject(XPC
         // otherwise we'll just return its JSObject in d (which should be
         // rooted in that case).
         if (dest)
             strongWrapper = wrapper;
         // If iface is not null we know lccx.GetXPCCallContext() returns
         // a valid XPCCallContext because we checked when calling Init on
         // iface.
         if (iface)
-            wrapper->FindTearOff(lccx.GetXPCCallContext(), iface, JS_FALSE,
+            wrapper->FindTearOff(lccx.GetXPCCallContext(), iface, false,
                                  &rv);
         else
             rv = NS_OK;
     } else {
         NS_ASSERTION(IS_SLIM_WRAPPER(flat),
                      "What kind of wrapper is this?");
 
         XPCCallContext &ccx = lccx.GetXPCCallContext();
         if (!ccx.IsValid())
-            return JS_FALSE;
+            return false;
 
         SLIM_LOG(("***** morphing from XPCConvert::NativeInterface2JSObject"
                   "(%p)\n",
                   static_cast<nsISupports*>(xpc_GetJSPrivate(flat))));
 
         rv = XPCWrappedNative::Morph(ccx, flat, iface, cache,
                                      getter_AddRefs(strongWrapper));
         wrapper = strongWrapper;
     }
 
     if (NS_FAILED(rv) && pErr)
         *pErr = rv;
 
     // If creating the wrapped native failed, then return early.
     if (NS_FAILED(rv) || !wrapper)
-        return JS_FALSE;
+        return false;
 
     // If we're not creating security wrappers, we can return the
     // XPCWrappedNative as-is here.
     flat = wrapper->GetFlatJSObject();
     jsval v = OBJECT_TO_JSVAL(flat);
     if (!XPCPerThreadData::IsMainThread(lccx.GetJSContext()) ||
         !allowNativeWrapper) {
         *d = v;
         if (dest)
             *dest = strongWrapper.forget().get();
         if (pErr)
             *pErr = NS_OK;
-        return JS_TRUE;
+        return true;
     }
 
     XPCCallContext &ccx = lccx.GetXPCCallContext();
     if (!ccx.IsValid())
-        return JS_FALSE;
+        return false;
 
     JSObject *original = flat;
     if (!JS_WrapObject(ccx, &flat))
-        return JS_FALSE;
+        return false;
 
     // If the object was not wrapped, we are same compartment and don't need
     // to enforce any cross origin policies, except in case of the location
     // object, which always needs a wrapper in between.
     if (original == flat) {
         if (xpc::WrapperFactory::IsLocationObject(flat)) {
             JSObject *locationWrapper = wrapper->GetWrapper();
             if (!locationWrapper) {
                 locationWrapper = xpc::WrapperFactory::WrapLocationObject(cx, flat);
                 if (!locationWrapper)
-                    return JS_FALSE;
+                    return false;
 
                 // Cache the location wrapper to ensure that we maintain
                 // the identity of window/document.location.
                 wrapper->SetWrapper(locationWrapper);
             }
 
             flat = locationWrapper;
         } else if (wrapper->NeedsSOW() &&
                    !xpc::AccessCheck::isChrome(cx->compartment)) {
             JSObject *sowWrapper = wrapper->GetWrapper();
             if (!sowWrapper) {
                 sowWrapper = xpc::WrapperFactory::WrapSOWObject(cx, flat);
                 if (!sowWrapper)
-                    return JS_FALSE;
+                    return false;
 
                 // Cache the sow wrapper to ensure that we maintain
                 // the identity of this node.
                 wrapper->SetWrapper(sowWrapper);
             }
 
             flat = sowWrapper;
         } else {
@@ -1189,26 +1189,26 @@ XPCConvert::NativeInterface2JSObject(XPC
     if (dest) {
         // The strongWrapper still holds the original flat object.
         if (flat == original) {
             *dest = strongWrapper.forget().get();
         } else {
             nsRefPtr<XPCJSObjectHolder> objHolder =
                 XPCJSObjectHolder::newHolder(ccx, flat);
             if (!objHolder)
-                return JS_FALSE;
+                return false;
 
             *dest = objHolder.forget().get();
         }
     }
 
     if (pErr)
         *pErr = NS_OK;
 
-    return JS_TRUE;
+    return true;
 }
 
 /***************************************************************************/
 
 // static
 JSBool
 XPCConvert::JSObject2NativeInterface(XPCCallContext& ccx,
                                      void** dest, JSObject* src,
@@ -1246,17 +1246,17 @@ XPCConvert::JSObject2NativeInterface(XPC
         // pass it to C++. If we are, then fall through to the code below. If
         // we aren't, throw an exception eagerly.
         JSObject* inner = nsnull;
         if (XPCWrapper::IsSecurityWrapper(src)) {
             inner = XPCWrapper::Unwrap(cx, src);
             if (!inner) {
                 if (pErr)
                     *pErr = NS_ERROR_XPC_SECURITY_MANAGER_VETO;
-                return JS_FALSE;
+                return false;
             }
         }
 
         // Is this really a native xpcom object with a wrapper?
         XPCWrappedNative* wrappedNative =
                     XPCWrappedNative::GetWrappedNativeOfJSObject(cx,
                                                                  inner
                                                                  ? inner
@@ -1266,24 +1266,24 @@ XPCConvert::JSObject2NativeInterface(XPC
             return NS_SUCCEEDED(iface->QueryInterface(*iid, dest));
         }
         // else...
 
         // XXX E4X breaks the world. Don't try wrapping E4X objects!
         // This hack can be removed (or changed accordingly) when the
         // DOM <-> E4X bindings are complete, see bug 270553
         if (JS_TypeOfValue(cx, OBJECT_TO_JSVAL(src)) == JSTYPE_XML)
-            return JS_FALSE;
+            return false;
 
         // Deal with slim wrappers here.
         if (GetISupportsFromJSObject(src, &iface)) {
             if (iface)
                 return NS_SUCCEEDED(iface->QueryInterface(*iid, dest));
 
-            return JS_FALSE;
+            return false;
         }
     }
 
     // else...
 
     nsXPCWrappedJS* wrapper;
     nsresult rv = nsXPCWrappedJS::GetNewOrUsed(ccx, src, *iid, aOuter, &wrapper);
     if (pErr)
@@ -1297,17 +1297,17 @@ XPCConvert::JSObject2NativeInterface(XPC
                       wrapper->QueryInterface(*iid, dest);
         if (pErr)
             *pErr = rv;
         NS_RELEASE(wrapper);
         return NS_SUCCEEDED(rv);
     }
 
     // else...
-    return JS_FALSE;
+    return false;
 }
 
 /***************************************************************************/
 /***************************************************************************/
 
 // static
 nsresult
 XPCConvert::ConstructException(nsresult rv, const char* message,
@@ -1477,32 +1477,32 @@ XPCConvert::JSValToXPCException(XPCCallC
                                   nsnull, ifaceName, methodName, nsnull,
                                   exceptn, cx, &s);
     }
 
     if (JSVAL_IS_NUMBER(s)) {
         // lets see if it looks like an nsresult
         nsresult rv;
         double number;
-        JSBool isResult = JS_FALSE;
+        JSBool isResult = false;
 
         if (JSVAL_IS_INT(s)) {
             rv = (nsresult) JSVAL_TO_INT(s);
             if (NS_FAILED(rv))
-                isResult = JS_TRUE;
+                isResult = true;
             else
                 number = (double) JSVAL_TO_INT(s);
         } else {
             number = JSVAL_TO_DOUBLE(s);
             if (number > 0.0 &&
                 number < (double)0xffffffff &&
                 0.0 == fmod(number,1)) {
                 rv = (nsresult) number;
                 if (NS_FAILED(rv))
-                    isResult = JS_TRUE;
+                    isResult = true;
             }
         }
 
         if (isResult)
             return ConstructException(rv, nsnull, ifaceName, methodName,
                                       nsnull, exceptn, cx, &s);
         else {
             // XXX all this nsISupportsDouble code seems a little redundant
@@ -1605,30 +1605,30 @@ XPCConvert::NativeArray2JS(XPCLazyCallCo
                            const nsXPTType& type, const nsID* iid,
                            JSUint32 count, nsresult* pErr)
 {
     NS_PRECONDITION(s, "bad param");
     NS_PRECONDITION(d, "bad param");
 
     XPCCallContext& ccx = lccx.GetXPCCallContext();
     if (!ccx.IsValid())
-        return JS_FALSE;
+        return false;
 
     JSContext* cx = ccx.GetJSContext();
     NS_ABORT_IF_FALSE(js::GetObjectCompartment(lccx.GetScopeForNewJSObjects()) == cx->compartment,
                       "bad scope for new JSObjects");
 
     // XXX add support for putting chars in a string rather than an array
 
     // XXX add support to indicate *which* array element was not convertable
 
     JSObject *array = JS_NewArrayObject(cx, count, nsnull);
 
     if (!array)
-        return JS_FALSE;
+        return false;
 
     // root this early
     *d = OBJECT_TO_JSVAL(array);
     AUTO_MARK_JSVAL(ccx, d);
 
     if (pErr)
         *pErr = NS_ERROR_XPC_BAD_CONVERT_NATIVE;
 
@@ -1671,20 +1671,20 @@ XPCConvert::NativeArray2JS(XPCLazyCallCo
     case nsXPTType::T_UTF8STRING    : NS_ERROR("bad type"); goto failure;
     case nsXPTType::T_CSTRING       : NS_ERROR("bad type"); goto failure;
     case nsXPTType::T_ASTRING       : NS_ERROR("bad type"); goto failure;
     default                         : NS_ERROR("bad type"); goto failure;
     }
 
     if (pErr)
         *pErr = NS_OK;
-    return JS_TRUE;
+    return true;
 
 failure:
-    return JS_FALSE;
+    return false;
 
 #undef POPULATE
 }
 
 // static
 JSBool
 XPCConvert::JSArray2Native(XPCCallContext& ccx, void** d, jsval s,
                            JSUint32 count, const nsXPTType& type,
@@ -1707,41 +1707,41 @@ XPCConvert::JSArray2Native(XPCCallContex
     // XXX add support for getting chars from strings
 
     // XXX add support to indicate *which* array element was not convertable
 
     if (JSVAL_IS_VOID(s) || JSVAL_IS_NULL(s)) {
         if (0 != count) {
             if (pErr)
                 *pErr = NS_ERROR_XPC_NOT_ENOUGH_ELEMENTS_IN_ARRAY;
-            return JS_FALSE;
+            return false;
         }
 
         *d = nsnull;
-        return JS_TRUE;
+        return true;
     }
 
     if (!JSVAL_IS_OBJECT(s)) {
         if (pErr)
             *pErr = NS_ERROR_XPC_CANT_CONVERT_PRIMITIVE_TO_ARRAY;
-        return JS_FALSE;
+        return false;
     }
 
     jsarray = JSVAL_TO_OBJECT(s);
     if (!JS_IsArrayObject(cx, jsarray)) {
         if (pErr)
             *pErr = NS_ERROR_XPC_CANT_CONVERT_OBJECT_TO_ARRAY;
-        return JS_FALSE;
+        return false;
     }
 
     jsuint len;
     if (!JS_GetArrayLength(cx, jsarray, &len) || len < count) {
         if (pErr)
             *pErr = NS_ERROR_XPC_NOT_ENOUGH_ELEMENTS_IN_ARRAY;
-        return JS_FALSE;
+        return false;
     }
 
     if (pErr)
         *pErr = NS_ERROR_XPC_BAD_CONVERT_JS;
 
 #define POPULATE(_mode, _t)                                                   \
     PR_BEGIN_MACRO                                                            \
         cleanupMode = _mode;                                                  \
@@ -1750,17 +1750,17 @@ XPCConvert::JSArray2Native(XPCCallContex
             nsnull == (array = nsMemory::Alloc(count * sizeof(_t)))) {        \
             if (pErr)                                                         \
                 *pErr = NS_ERROR_OUT_OF_MEMORY;                               \
             goto failure;                                                     \
         }                                                                     \
         for (initedCount = 0; initedCount < count; initedCount++) {           \
             if (!JS_GetElement(cx, jsarray, initedCount, &current) ||         \
                 !JSData2Native(ccx, ((_t*)array)+initedCount, current, type,  \
-                               JS_TRUE, iid, pErr))                           \
+                               true, iid, pErr))                              \
                 goto failure;                                                 \
         }                                                                     \
     PR_END_MACRO
 
 
     // XXX check IsPtr - esp. to handle array of nsID (as opposed to nsID*)
 
     // XXX make extra space at end of char* and wchar* and null termintate
@@ -1790,17 +1790,17 @@ XPCConvert::JSArray2Native(XPCCallContex
     case nsXPTType::T_CSTRING       : NS_ERROR("bad type"); goto failure;
     case nsXPTType::T_ASTRING       : NS_ERROR("bad type"); goto failure;
     default                         : NS_ERROR("bad type"); goto failure;
     }
 
     *d = array;
     if (pErr)
         *pErr = NS_OK;
-    return JS_TRUE;
+    return true;
 
 failure:
     // we may need to cleanup the partially filled array of converted stuff
     if (array) {
         if (cleanupMode == re) {
             nsISupports** a = (nsISupports**) array;
             for (PRUint32 i = 0; i < initedCount; i++) {
                 nsISupports* p = a[i];
@@ -1811,17 +1811,17 @@ failure:
             for (PRUint32 i = 0; i < initedCount; i++) {
                 void* p = a[i];
                 if (p) nsMemory::Free(p);
             }
         }
         nsMemory::Free(array);
     }
 
-    return JS_FALSE;
+    return false;
 
 #undef POPULATE
 }
 
 // static
 JSBool
 XPCConvert::NativeStringWithSize2JS(JSContext* cx,
                                     jsval* d, const void* s,
@@ -1838,36 +1838,36 @@ XPCConvert::NativeStringWithSize2JS(JSCo
     switch (type.TagPart()) {
         case nsXPTType::T_PSTRING_SIZE_IS:
         {
             char* p = *((char**)s);
             if (!p)
                 break;
             JSString* str;
             if (!(str = JS_NewStringCopyN(cx, p, count)))
-                return JS_FALSE;
+                return false;
             *d = STRING_TO_JSVAL(str);
             break;
         }
         case nsXPTType::T_PWSTRING_SIZE_IS:
         {
             jschar* p = *((jschar**)s);
             if (!p)
                 break;
             JSString* str;
             if (!(str = JS_NewUCStringCopyN(cx, p, count)))
-                return JS_FALSE;
+                return false;
             *d = STRING_TO_JSVAL(str);
             break;
         }
         default:
             XPC_LOG_ERROR(("XPCConvert::NativeStringWithSize2JS : unsupported type"));
-            return JS_FALSE;
+            return false;
     }
-    return JS_TRUE;
+    return true;
 }
 
 // static
 JSBool
 XPCConvert::JSStringWithSize2Native(XPCCallContext& ccx, void* d, jsval s,
                                     JSUint32 count, const nsXPTType& type,
                                     uintN* pErr)
 {
@@ -1883,109 +1883,109 @@ XPCConvert::JSStringWithSize2Native(XPCC
 
     switch (type.TagPart()) {
         case nsXPTType::T_PSTRING_SIZE_IS:
         {
             if (JSVAL_IS_VOID(s) || JSVAL_IS_NULL(s)) {
                 if (0 != count) {
                     if (pErr)
                         *pErr = NS_ERROR_XPC_NOT_ENOUGH_CHARS_IN_STRING;
-                    return JS_FALSE;
+                    return false;
                 }
                 if (0 != count) {
                     len = (count + 1) * sizeof(char);
                     if (!(*((void**)d) = nsMemory::Alloc(len)))
-                        return JS_FALSE;
-                    return JS_TRUE;
+                        return false;
+                    return true;
                 }
                 // else ...
 
                 *((char**)d) = nsnull;
-                return JS_TRUE;
+                return true;
             }
 
             JSString* str = JS_ValueToString(cx, s);
             if (!str) {
-                return JS_FALSE;
+                return false;
             }
 
             size_t length = JS_GetStringEncodingLength(cx, str);
             if (length == size_t(-1)) {
-                return JS_FALSE;
+                return false;
             }
             if (length > count) {
                 if (pErr)
                     *pErr = NS_ERROR_XPC_NOT_ENOUGH_CHARS_IN_STRING;
-                return JS_FALSE;
+                return false;
             }
             len = PRUint32(length);
 
             if (len < count)
                 len = count;
 
             JSUint32 alloc_len = (len + 1) * sizeof(char);
             char *buffer = static_cast<char *>(nsMemory::Alloc(alloc_len));
             if (!buffer) {
-                return JS_FALSE;
+                return false;
             }
             JS_EncodeStringToBuffer(str, buffer, len);
             buffer[len] = '\0';
             *((char**)d) = buffer;
 
-            return JS_TRUE;
+            return true;
         }
 
         case nsXPTType::T_PWSTRING_SIZE_IS:
         {
             const jschar* chars=nsnull;
             JSString* str;
 
             if (JSVAL_IS_VOID(s) || JSVAL_IS_NULL(s)) {
                 if (0 != count) {
                     if (pErr)
                         *pErr = NS_ERROR_XPC_NOT_ENOUGH_CHARS_IN_STRING;
-                    return JS_FALSE;
+                    return false;
                 }
 
                 if (0 != count) {
                     len = (count + 1) * sizeof(jschar);
                     if (!(*((void**)d) = nsMemory::Alloc(len)))
-                        return JS_FALSE;
-                    return JS_TRUE;
+                        return false;
+                    return true;
                 }
 
                 // else ...
                 *((const jschar**)d) = nsnull;
-                return JS_TRUE;
+                return true;
             }
 
             if (!(str = JS_ValueToString(cx, s))) {
-                return JS_FALSE;
+                return false;
             }
 
             len = JS_GetStringLength(str);
             if (len > count) {
                 if (pErr)
                     *pErr = NS_ERROR_XPC_NOT_ENOUGH_CHARS_IN_STRING;
-                return JS_FALSE;
+                return false;
             }
             if (len < count)
                 len = count;
 
             if (!(chars = JS_GetStringCharsZ(cx, str))) {
-                return JS_FALSE;
+                return false;
             }
             JSUint32 alloc_len = (len + 1) * sizeof(jschar);
             if (!(*((void**)d) = nsMemory::Alloc(alloc_len))) {
                 // XXX should report error
-                return JS_FALSE;
+                return false;
             }
             memcpy(*((jschar**)d), chars, alloc_len);
             (*((jschar**)d))[count] = 0;
 
-            return JS_TRUE;
+            return true;
         }
         default:
             XPC_LOG_ERROR(("XPCConvert::JSStringWithSize2Native : unsupported type"));
-            return JS_FALSE;
+            return false;
     }
 }
 
--- a/js/xpconnect/src/XPCDebug.cpp
+++ b/js/xpconnect/src/XPCDebug.cpp
@@ -65,17 +65,17 @@ static const char* JSVAL2String(JSContex
 }
 
 static char* FormatJSFrame(JSContext* cx, JSStackFrame* fp,
                            char* buf, int num,
                            JSBool showArgs, JSBool showLocals, JSBool showThisProps)
 {
     JSPropertyDescArray callProps = {0, nsnull};
     JSPropertyDescArray thisProps = {0, nsnull};
-    JSBool gotThisVal = JS_FALSE;
+    JSBool gotThisVal = false;
     jsval thisVal;
     JSObject* callObj = nsnull;
     JSString* funname = nsnull;
     JSAutoByteString funbytes;
     const char* filename = nsnull;
     PRInt32 lineno = 0;
     JSFunction* fun = nsnull;
     uint32 namedArgCount = 0;
@@ -278,17 +278,17 @@ static char* FormatJSStackDump(JSContext
 
 JSBool
 xpc_DumpJSStack(JSContext* cx, JSBool showArgs, JSBool showLocals, JSBool showThisProps)
 {
     if (char* buf = xpc_PrintJSStack(cx, showArgs, showLocals, showThisProps)) {
         fputs(buf, stdout);
         JS_smprintf_free(buf);
     }
-    return JS_TRUE;
+    return true;
 }
 
 char*
 xpc_PrintJSStack(JSContext* cx, JSBool showArgs, JSBool showLocals,
                  JSBool showThisProps)
 {
     char* buf;
     JSExceptionState *state = JS_SaveExceptionState(cx);
@@ -318,30 +318,30 @@ JSBool
 xpc_DumpEvalInJSStackFrame(JSContext* cx, JSUint32 frameno, const char* text)
 {
     JSStackFrame* fp;
     JSStackFrame* iter = nsnull;
     JSUint32 num = 0;
 
     if (!cx || !text) {
         puts("invalid params passed to xpc_DumpEvalInJSStackFrame!");
-        return JS_FALSE;
+        return false;
     }
 
     printf("js[%d]> %s\n", frameno, text);
 
     while (nsnull != (fp = JS_FrameIterator(cx, &iter))) {
         if (num == frameno)
             break;
         num++;
     }
 
     if (!fp) {
         puts("invalid frame number!");
-        return JS_FALSE;
+        return false;
     }
 
     JSAutoRequest ar(cx);
 
     JSExceptionState* exceptionState = JS_SaveExceptionState(cx);
     JSErrorReporter older = JS_SetErrorReporter(cx, xpcDumpEvalErrorReporter);
 
     jsval rval;
@@ -350,30 +350,30 @@ xpc_DumpEvalInJSStackFrame(JSContext* cx
     if (JS_EvaluateInStackFrame(cx, fp, text, strlen(text), "eval", 1, &rval) &&
         nsnull != (str = JS_ValueToString(cx, rval)) &&
         bytes.encode(cx, str)) {
         printf("%s\n", bytes.ptr());
     } else
         puts("eval failed!");
     JS_SetErrorReporter(cx, older);
     JS_RestoreExceptionState(cx, exceptionState);
-    return JS_TRUE;
+    return true;
 }
 
 /***************************************************************************/
 
 JSTrapStatus
 xpc_DebuggerKeywordHandler(JSContext *cx, JSScript *script, jsbytecode *pc,
                            jsval *rval, void *closure)
 {
     static const char line[] =
     "------------------------------------------------------------------------";
     puts(line);
     puts("Hit JavaScript \"debugger\" keyword. JS call stack...");
-    xpc_DumpJSStack(cx, JS_TRUE, JS_TRUE, JS_FALSE);
+    xpc_DumpJSStack(cx, true, true, false);
     puts(line);
     return JSTRAP_CONTINUE;
 }
 
 JSBool xpc_InstallJSDebuggerKeywordHandler(JSRuntime* rt)
 {
     return JS_SetDebuggerHandler(rt, xpc_DebuggerKeywordHandler, nsnull);
 }
@@ -468,10 +468,10 @@ xpc_DumpJSObject(JSObject* obj)
     puts("  proto:  (JSObject*)(obj->fslots[0])");
     puts("");
 
     if (obj)
         PrintObject(obj, 0, &pile);
     else
         puts("xpc_DumpJSObject passed null!");
 
-    return JS_TRUE;
+    return true;
 }
--- a/js/xpconnect/src/XPCException.cpp
+++ b/js/xpconnect/src/XPCException.cpp
@@ -73,20 +73,20 @@ nsXPCException::NameAndFormatForNSResult
                                          const char** name,
                                          const char** format)
 {
 
     for (ResultMap* p = map; p->name; p++) {
         if (rv == p->rv) {
             if (name) *name = p->name;
             if (format) *format = p->format;
-            return JS_TRUE;
+            return true;
         }
     }
-    return JS_FALSE;
+    return false;
 }
 
 // static
 void*
 nsXPCException::IterateNSResults(nsresult* rv,
                                  const char** name,
                                  const char** format,
                                  void** iterp)
@@ -399,17 +399,17 @@ nsXPCException::ToString(char **_retval)
         final = (char*) nsMemory::Clone(temp, sizeof(char)*(strlen(temp)+1));
         JS_smprintf_free(temp);
     }
 
     *_retval = final;
     return final ? NS_OK : NS_ERROR_OUT_OF_MEMORY;
 }
 
-JSBool nsXPCException::sEverMadeOneFromFactory = JS_FALSE;
+JSBool nsXPCException::sEverMadeOneFromFactory = false;
 
 // static
 nsresult
 nsXPCException::NewException(const char *aMessage,
                              nsresult aResult,
                              nsIStackFrame *aLocation,
                              nsISupports *aData,
                              nsIException** exceptn)
@@ -419,17 +419,17 @@ nsXPCException::NewException(const char 
     // shared factory/classinsance object never gets created and our QI getter
     // for our instance's pointer to our nsIClassInfo will always return null.
     // This is bad because it means that wrapped exceptions will never have a
     // shared prototype. So... We force one to be created via the factory
     // *once* and then go about our business.
     if (!sEverMadeOneFromFactory) {
         nsCOMPtr<nsIXPCException> e =
             do_CreateInstance(XPC_EXCEPTION_CONTRACTID);
-        sEverMadeOneFromFactory = JS_TRUE;
+        sEverMadeOneFromFactory = true;
     }
 
     nsresult rv;
     nsXPCException* e = new nsXPCException();
     if (e) {
         NS_ADDREF(e);
 
         nsIStackFrame* location;
--- a/js/xpconnect/src/XPCInlines.h
+++ b/js/xpconnect/src/XPCInlines.h
@@ -418,71 +418,71 @@ XPCNativeSet::FindMember(jsid name, XPCN
     // look for interface names first
 
     for (i = 0, iface = mInterfaces; i < count; i++, iface++) {
         if (name == (*iface)->GetName()) {
             if (pMember)
                 *pMember = nsnull;
             if (pInterfaceIndex)
                 *pInterfaceIndex = (PRUint16) i;
-            return JS_TRUE;
+            return true;
         }
     }
 
     // look for method names
     for (i = 0, iface = mInterfaces; i < count; i++, iface++) {
         XPCNativeMember* member = (*iface)->FindMember(name);
         if (member) {
             if (pMember)
                 *pMember = member;
             if (pInterfaceIndex)
                 *pInterfaceIndex = (PRUint16) i;
-            return JS_TRUE;
+            return true;
         }
     }
-    return JS_FALSE;
+    return false;
 }
 
 inline JSBool
 XPCNativeSet::FindMember(jsid name, XPCNativeMember** pMember,
                          XPCNativeInterface** pInterface) const
 {
     PRUint16 index;
     if (!FindMember(name, pMember, &index))
-        return JS_FALSE;
+        return false;
     *pInterface = mInterfaces[index];
-    return JS_TRUE;
+    return true;
 }
 
 inline JSBool
 XPCNativeSet::FindMember(jsid name,
                          XPCNativeMember** pMember,
                          XPCNativeInterface** pInterface,
                          XPCNativeSet* protoSet,
                          JSBool* pIsLocal) const
 {
     XPCNativeMember* Member;
     XPCNativeInterface* Interface;
     XPCNativeMember* protoMember;
 
     if (!FindMember(name, &Member, &Interface))
-        return JS_FALSE;
+        return false;
 
     *pMember = Member;
     *pInterface = Interface;
 
     *pIsLocal =
         !Member ||
         !protoSet ||
         (protoSet != this &&
          !protoSet->MatchesSetUpToInterface(this, Interface) &&
          (!protoSet->FindMember(name, &protoMember, (PRUint16*)nsnull) ||
           protoMember != Member));
 
-    return JS_TRUE;
+    return true;
 }
 
 inline XPCNativeInterface*
 XPCNativeSet::FindNamedInterface(jsid name) const
 {
     XPCNativeInterface* const * pp = mInterfaces;
 
     for (int i = (int) mInterfaceCount; i > 0; i--, pp++) {
@@ -510,60 +510,60 @@ XPCNativeSet::FindInterfaceWithIID(const
 
 inline JSBool
 XPCNativeSet::HasInterface(XPCNativeInterface* aInterface) const
 {
     XPCNativeInterface* const * pp = mInterfaces;
 
     for (int i = (int) mInterfaceCount; i > 0; i--, pp++) {
         if (aInterface == *pp)
-            return JS_TRUE;
+            return true;
     }
-    return JS_FALSE;
+    return false;
 }
 
 inline JSBool
 XPCNativeSet::HasInterfaceWithAncestor(XPCNativeInterface* aInterface) const
 {
     return HasInterfaceWithAncestor(aInterface->GetIID());
 }
 
 inline JSBool
 XPCNativeSet::HasInterfaceWithAncestor(const nsIID* iid) const
 {
     // We can safely skip the first interface which is *always* nsISupports.
     XPCNativeInterface* const * pp = mInterfaces+1;
     for (int i = (int) mInterfaceCount; i > 1; i--, pp++)
         if ((*pp)->HasAncestor(iid))
-            return JS_TRUE;
+            return true;
 
     // This is rare, so check last.
     if (iid == &NS_GET_IID(nsISupports))
         return true;
 
-    return JS_FALSE;
+    return false;
 }
 
 inline JSBool
 XPCNativeSet::MatchesSetUpToInterface(const XPCNativeSet* other,
                                       XPCNativeInterface* iface) const
 {
     int count = JS_MIN((int)mInterfaceCount, (int)other->mInterfaceCount);
 
     XPCNativeInterface* const * pp1 = mInterfaces;
     XPCNativeInterface* const * pp2 = other->mInterfaces;
 
     for (int i = (int) count; i > 0; i--, pp1++, pp2++) {
         XPCNativeInterface* cur = (*pp1);
         if (cur != (*pp2))
-            return JS_FALSE;
+            return false;
         if (cur == iface)
-            return JS_TRUE;
+            return true;
     }
-    return JS_FALSE;
+    return false;
 }
 
 inline void XPCNativeSet::Mark()
 {
     if (IsMarked())
         return;
 
     XPCNativeInterface* const * pp = mInterfaces;
@@ -643,18 +643,18 @@ XPCWrappedNative::SweepTearOffs()
 /***************************************************************************/
 
 inline JSBool
 xpc_ForcePropertyResolve(JSContext* cx, JSObject* obj, jsid id)
 {
     jsval prop;
 
     if (!JS_LookupPropertyById(cx, obj, id, &prop))
-        return JS_FALSE;
-    return JS_TRUE;
+        return false;
+    return true;
 }
 
 inline JSObject*
 xpc_NewSystemInheritingJSObject(JSContext *cx, JSClass *clasp, JSObject *proto,
                                 bool uniqueType, JSObject *parent)
 {
     JSObject *obj;
     if (clasp->flags & JSCLASS_IS_GLOBAL) {
@@ -685,17 +685,17 @@ GetRTStringByIndex(JSContext *cx, uintN 
 {
   return STRING_TO_JSVAL(JSID_TO_STRING(GetRTIdByIndex(cx, index)));
 }
 
 inline
 JSBool ThrowBadParam(nsresult rv, uintN paramNum, XPCCallContext& ccx)
 {
     XPCThrower::ThrowBadParam(rv, paramNum, ccx);
-    return JS_FALSE;
+    return false;
 }
 
 inline
 void ThrowBadResult(nsresult result, XPCCallContext& ccx)
 {
     XPCThrower::ThrowBadResult(NS_ERROR_XPC_NATIVE_RETURNED_FAILURE,
                                result, ccx);
 }
--- a/js/xpconnect/src/XPCJSID.cpp
+++ b/js/xpconnect/src/XPCJSID.cpp
@@ -269,17 +269,17 @@ NS_METHOD GetSharedScriptableHelperForJS
         *helper = gSharedScriptableHelperForJSIID;
     } else
         *helper = nsnull;
     return NS_OK;
 }
 
 /******************************************************/
 
-static JSBool gClassObjectsWereInited = JS_FALSE;
+static JSBool gClassObjectsWereInited = false;
 
 #define NULL_CID                                                              \
 { 0x00000000, 0x0000, 0x0000,                                                 \
   { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } }
 
 NS_DECL_CI_INTERFACE_GETTER(nsJSIID)
 NS_IMPL_CLASSINFO(nsJSIID, GetSharedScriptableHelperForJSIID,
                   nsIClassInfo::THREADSAFE, NULL_CID)
@@ -288,26 +288,26 @@ NS_DECL_CI_INTERFACE_GETTER(nsJSCID)
 NS_IMPL_CLASSINFO(nsJSCID, NULL, nsIClassInfo::THREADSAFE, NULL_CID)
 
 void xpc_InitJSxIDClassObjects()
 {
     if (!gClassObjectsWereInited) {
         gSharedScriptableHelperForJSIID = new SharedScriptableHelperForJSIID();
         NS_ADDREF(gSharedScriptableHelperForJSIID);
     }
-    gClassObjectsWereInited = JS_TRUE;
+    gClassObjectsWereInited = true;
 }
 
 void xpc_DestroyJSxIDClassObjects()
 {
     NS_IF_RELEASE(NS_CLASSINFO_NAME(nsJSIID));
     NS_IF_RELEASE(NS_CLASSINFO_NAME(nsJSCID));
     NS_IF_RELEASE(gSharedScriptableHelperForJSIID);
 
-    gClassObjectsWereInited = JS_FALSE;
+    gClassObjectsWereInited = false;
 }
 
 /***************************************************************************/
 
 NS_INTERFACE_MAP_BEGIN(nsJSIID)
   NS_INTERFACE_MAP_ENTRY(nsIJSID)
   NS_INTERFACE_MAP_ENTRY(nsIJSIID)
   NS_INTERFACE_MAP_ENTRY(nsIXPCScriptable)
@@ -476,33 +476,33 @@ nsJSIID::Enumerate(nsIXPConnectWrappedNa
 }
 
 /* bool hasInstance (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in jsval val, out bool bp); */
 NS_IMETHODIMP
 nsJSIID::HasInstance(nsIXPConnectWrappedNative *wrapper,
                      JSContext * cx, JSObject * obj,
                      const jsval &val, bool *bp, bool *_retval)
 {
-    *bp = JS_FALSE;
+    *bp = false;
     nsresult rv = NS_OK;
 
     if (!JSVAL_IS_PRIMITIVE(val)) {
         // we have a JSObject
         JSObject* obj = JSVAL_TO_OBJECT(val);
 
         NS_ASSERTION(obj, "when is an object not an object?");
 
         // is this really a native xpcom object with a wrapper?
         const nsIID* iid;
         mInfo->GetIIDShared(&iid);
 
         if (IS_SLIM_WRAPPER(obj)) {
             XPCWrappedNativeProto* proto = GetSlimWrapperProto(obj);
             if (proto->GetSet()->HasInterfaceWithAncestor(iid)) {
-                *bp = JS_TRUE;
+                *bp = true;
                 return NS_OK;
             }
 
 #ifdef DEBUG_slimwrappers
             char foo[NSID_LENGTH];
             iid->ToProvidedString(foo);
             SLIM_LOG_WILL_MORPH_FOR_PROP(cx, obj, foo);
 #endif
@@ -530,29 +530,29 @@ nsJSIID::HasInstance(nsIXPConnectWrapped
 
         if (!other_wrapper)
             return NS_OK;
 
         // We'll trust the interface set of the wrapper if this is known
         // to be an interface that the objects *expects* to be able to
         // handle.
         if (other_wrapper->HasInterfaceNoQI(*iid)) {
-            *bp = JS_TRUE;
+            *bp = true;
             return NS_OK;
         }
 
         // Otherwise, we'll end up Querying the native object to be sure.
         XPCCallContext ccx(JS_CALLER, cx);
 
         AutoMarkingNativeInterfacePtr iface(ccx);
         iface = XPCNativeInterface::GetNewOrUsed(ccx, iid);
 
         nsresult findResult = NS_OK;
-        if (iface && other_wrapper->FindTearOff(ccx, iface, JS_FALSE, &findResult))
-            *bp = JS_TRUE;
+        if (iface && other_wrapper->FindTearOff(ccx, iface, false, &findResult))
+            *bp = true;
         if (NS_FAILED(findResult) && findResult != NS_ERROR_NO_INTERFACE)
             rv = findResult;
     }
     return rv;
 }
 
 /* string canCreateWrapper (in nsIIDPtr iid); */
 NS_IMETHODIMP
@@ -755,17 +755,17 @@ nsJSCID::CreateInstance(nsISupports **_r
     NS_ASSERTION(NS_FAILED(rv) || inst, "component manager returned success, but instance is null!");
 
     if (NS_FAILED(rv) || !inst)
         return NS_ERROR_XPC_CI_RETURNED_FAILURE;
 
     rv = xpc->WrapNativeToJSVal(cx, obj, inst, nsnull, iid, true, vp, nsnull);
     if (NS_FAILED(rv) || JSVAL_IS_PRIMITIVE(*vp))
         return NS_ERROR_XPC_CANT_CREATE_WN;
-    ccxp->SetReturnValueWasSet(JS_TRUE);
+    ccxp->SetReturnValueWasSet(true);
     return NS_OK;
 }
 
 /* nsISupports getService (); */
 NS_IMETHODIMP
 nsJSCID::GetService(nsISupports **_retval)
 {
     if (!mDetails.IsValid())
@@ -825,17 +825,17 @@ nsJSCID::GetService(nsISupports **_retva
 
     JSObject* instJSObj;
     nsCOMPtr<nsIXPConnectJSObjectHolder> holder;
     rv = xpc->WrapNative(cx, obj, srvc, *iid, getter_AddRefs(holder));
     if (NS_FAILED(rv) || !holder || NS_FAILED(holder->GetJSObject(&instJSObj)))
         return NS_ERROR_XPC_CANT_CREATE_WN;
 
     *vp = OBJECT_TO_JSVAL(instJSObj);
-    ccxp->SetReturnValueWasSet(JS_TRUE);
+    ccxp->SetReturnValueWasSet(true);
     return NS_OK;
 }
 
 /* bool construct (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in PRUint32 argc, in JSValPtr argv, in JSValPtr vp); */
 NS_IMETHODIMP
 nsJSCID::Construct(nsIXPConnectWrappedNative *wrapper,
                    JSContext * cx, JSObject * obj,
                    PRUint32 argc, jsval * argv, jsval * vp,
@@ -855,17 +855,17 @@ nsJSCID::Construct(nsIXPConnectWrappedNa
 }
 
 /* bool hasInstance (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in jsval val, out bool bp); */
 NS_IMETHODIMP
 nsJSCID::HasInstance(nsIXPConnectWrappedNative *wrapper,
                      JSContext * cx, JSObject * obj,
                      const jsval &val, bool *bp, bool *_retval)
 {
-    *bp = JS_FALSE;
+    *bp = false;
     nsresult rv = NS_OK;
 
     if (!JSVAL_IS_PRIMITIVE(val)) {
         // we have a JSObject
         JSObject* obj = JSVAL_TO_OBJECT(val);
 
         NS_ASSERTION(obj, "when is an object not an object?");
 
--- a/js/xpconnect/src/XPCJSRuntime.cpp
+++ b/js/xpconnect/src/XPCJSRuntime.cpp
@@ -237,41 +237,41 @@ DetachedWrappedNativeProtoMarker(JSDHash
 // GCCallback calls are chained
 static JSBool
 ContextCallback(JSContext *cx, uintN operation)
 {
     XPCJSRuntime* self = nsXPConnect::GetRuntimeInstance();
     if (self) {
         if (operation == JSCONTEXT_NEW) {
             if (!self->OnJSContextNew(cx))
-                return JS_FALSE;
+                return false;
         } else if (operation == JSCONTEXT_DESTROY) {
             delete XPCContext::GetXPCContext(cx);
         }
     }
-    return JS_TRUE;
+    return true;
 }
 
 xpc::CompartmentPrivate::~CompartmentPrivate()
 {
     MOZ_COUNT_DTOR(xpc::CompartmentPrivate);
 }
 
 static JSBool
 CompartmentCallback(JSContext *cx, JSCompartment *compartment, uintN op)
 {
     JS_ASSERT(op == JSCOMPARTMENT_DESTROY);
 
     XPCJSRuntime* self = nsXPConnect::GetRuntimeInstance();
     if (!self)
-        return JS_TRUE;
+        return true;
 
     nsAutoPtr<xpc::CompartmentPrivate> priv(static_cast<xpc::CompartmentPrivate*>(JS_SetCompartmentPrivate(cx, compartment, nsnull)));
     if (!priv)
-        return JS_TRUE;
+        return true;
 
     if (xpc::PtrAndPrincipalHashKey *key = priv->key) {
         XPCCompartmentMap &map = self->GetCompartmentMap();
 #ifdef DEBUG
         {
             JSCompartment *current = NULL;
             NS_ASSERTION(map.Get(key, &current), "no compartment?");
             NS_ASSERTION(current == compartment, "compartment mismatch");
@@ -286,17 +286,17 @@ CompartmentCallback(JSContext *cx, JSCom
             JSCompartment *current;
             NS_ASSERTION(map.Get(ptr, &current), "no compartment?");
             NS_ASSERTION(current == compartment, "compartment mismatch");
         }
 #endif
         map.Remove(ptr);
     }
 
-    return JS_TRUE;
+    return true;
 }
 
 struct ObjectHolder : public JSDHashEntryHdr
 {
     void *holder;
     nsScriptObjectTracer* tracer;
 };
 
@@ -649,23 +649,23 @@ SweepCompartment(nsCStringHashKey& aKey,
     return PL_DHASH_NEXT;
 }
 
 // static
 JSBool XPCJSRuntime::GCCallback(JSContext *cx, JSGCStatus status)
 {
     XPCJSRuntime* self = nsXPConnect::GetRuntimeInstance();
     if (!self)
-        return JS_TRUE;
+        return true;
 
     switch (status) {
         case JSGC_BEGIN:
         {
             if (!NS_IsMainThread()) {
-                return JS_FALSE;
+                return false;
             }
 
             // We seem to sometime lose the unrooted global flag. Restore it
             // here. FIXME: bug 584495.
             JSContext *iter = nsnull, *acx;
 
             while ((acx = JS_ContextIterator(cx->runtime, &iter))) {
                 if (!acx->hasRunOption(JSOPTION_UNROOTED_GLOBAL))
@@ -702,23 +702,23 @@ JSBool XPCJSRuntime::GCCallback(JSContex
 
             // Find dying scopes.
             XPCWrappedNativeScope::FinishedMarkPhaseOfGC(cx, self);
 
             // Sweep compartments.
             self->GetCompartmentMap().EnumerateRead((XPCCompartmentMap::EnumReadFunction)
                                                     SweepCompartment, cx);
 
-            self->mDoingFinalization = JS_TRUE;
+            self->mDoingFinalization = true;
             break;
         }
         case JSGC_FINALIZE_END:
         {
             NS_ASSERTION(self->mDoingFinalization, "bad state");
-            self->mDoingFinalization = JS_FALSE;
+            self->mDoingFinalization = false;
 
             // Release all the members whose JSObjects are now known
             // to be dead.
             DoDeferredRelease(self->mWrappedJSToReleaseArray);
 
 #ifdef XPC_REPORT_NATIVE_INTERFACE_AND_SET_FLUSHING
             printf("--------------------------------------------------------------\n");
             int setsBefore = (int) self->mNativeSetMap->Count();
@@ -916,20 +916,20 @@ JSBool XPCJSRuntime::GCCallback(JSContex
         }
         default:
             break;
     }
 
     nsTArray<JSGCCallback> callbacks(self->extraGCCallbacks);
     for (PRUint32 i = 0; i < callbacks.Length(); ++i) {
         if (!callbacks[i](cx, status))
-            return JS_FALSE;
+            return false;
     }
 
-    return JS_TRUE;
+    return true;
 }
 
 // Auto JS GC lock helper.
 class AutoLockJSGC
 {
 public:
     AutoLockJSGC(JSRuntime* rt) : mJSRuntime(rt) { JS_LOCK_GC(mJSRuntime); }
     ~AutoLockJSGC() { JS_UNLOCK_GC(mJSRuntime); }
@@ -2053,17 +2053,17 @@ XPCJSRuntime::XPCJSRuntime(nsXPConnect* 
    mNativeScriptableSharedMap(XPCNativeScriptableSharedMap::newMap(XPC_NATIVE_JSCLASS_MAP_SIZE)),
    mDyingWrappedNativeProtoMap(XPCWrappedNativeProtoMap::newMap(XPC_DYING_NATIVE_PROTO_MAP_SIZE)),
    mDetachedWrappedNativeProtoMap(XPCWrappedNativeProtoMap::newMap(XPC_DETACHED_NATIVE_PROTO_MAP_SIZE)),
    mExplicitNativeWrapperMap(XPCNativeWrapperMap::newMap(XPC_NATIVE_WRAPPER_MAP_SIZE)),
    mMapLock(XPCAutoLock::NewLock("XPCJSRuntime::mMapLock")),
    mThreadRunningGC(nsnull),
    mWrappedJSToReleaseArray(),
    mNativesToReleaseArray(),
-   mDoingFinalization(JS_FALSE),
+   mDoingFinalization(false),
    mVariantRoots(nsnull),
    mWrappedJSRoots(nsnull),
    mObjectHolderRoots(nsnull),
    mWatchdogWakeup(nsnull),
    mWatchdogThread(nsnull),
    mWatchdogHibernating(false),
    mLastActiveTime(-1)
 {
@@ -2071,17 +2071,17 @@ XPCJSRuntime::XPCJSRuntime(nsXPConnect* 
     DEBUG_WrappedNativeHashtable =
         JS_NewDHashTable(JS_DHashGetStubOps(), nsnull,
                          sizeof(JSDHashEntryStub), 128);
 #endif
     NS_TIME_FUNCTION;
 
     DOM_InitInterfaces();
     Preferences::AddBoolVarCache(&gNewDOMBindingsEnabled, "dom.new_bindings",
-                                 JS_FALSE);
+                                 false);
 
 
     // these jsids filled in later when we have a JSContext to work with.
     mStrIDs[0] = JSID_VOID;
 
     mJSRuntime = JS_NewRuntime(32L * 1024L * 1024L); // pref ?
     if (!mJSRuntime)
         NS_RUNTIMEABORT("JS_NewRuntime failed.");
@@ -2173,53 +2173,53 @@ XPCJSRuntime::newXPCJSRuntime(nsXPConnec
 }
 
 JSBool
 XPCJSRuntime::OnJSContextNew(JSContext *cx)
 {
     NS_TIME_FUNCTION;
 
     // if it is our first context then we need to generate our string ids
-    JSBool ok = JS_TRUE;
+    JSBool ok = true;
     if (JSID_IS_VOID(mStrIDs[0])) {
         JS_SetGCParameterForThread(cx, JSGC_MAX_CODE_CACHE_BYTES, 16 * 1024 * 1024);
         {
             // Scope the JSAutoRequest so it goes out of scope before calling
             // mozilla::dom::binding::DefineStaticJSVals.
             JSAutoRequest ar(cx);
             for (uintN i = 0; i < IDX_TOTAL_COUNT; i++) {
                 JSString* str = JS_InternString(cx, mStrings[i]);
                 if (!str || !JS_ValueToId(cx, STRING_TO_JSVAL(str), &mStrIDs[i])) {
                     mStrIDs[0] = JSID_VOID;
-                    ok = JS_FALSE;
+                    ok = false;
                     break;
                 }
                 mStrJSVals[i] = STRING_TO_JSVAL(str);
             }
         }
 
         ok = mozilla::dom::binding::DefineStaticJSVals(cx);
     }
     if (!ok)
-        return JS_FALSE;
+        return false;
 
     XPCPerThreadData* tls = XPCPerThreadData::GetData(cx);
     if (!tls)
-        return JS_FALSE;
+        return false;
 
     XPCContext* xpc = new XPCContext(this, cx);
     if (!xpc)
-        return JS_FALSE;
+        return false;
 
     JS_SetNativeStackQuota(cx, 128 * sizeof(size_t) * 1024);
 
     // we want to mark the global object ourselves since we use a different color
     JS_ToggleOptions(cx, JSOPTION_UNROOTED_GLOBAL);
 
-    return JS_TRUE;
+    return true;
 }
 
 JSBool
 XPCJSRuntime::DeferredRelease(nsISupports* obj)
 {
     NS_ASSERTION(obj, "bad param");
 
     if (mNativesToReleaseArray.IsEmpty()) {
--- a/js/xpconnect/src/XPCLocale.cpp
+++ b/js/xpconnect/src/XPCLocale.cpp
@@ -90,31 +90,31 @@ struct XPCLocaleCallbacks : public JSLoc
   }
 
   static JSBool
   ChangeCase(JSContext* cx, JSString* src, jsval* rval,
              void(*changeCaseFnc)(const nsAString&, nsAString&))
   {
     nsDependentJSString depStr;
     if (!depStr.init(cx, src)) {
-      return JS_FALSE;
+      return false;
     }
 
     nsAutoString result;
     changeCaseFnc(depStr, result);
 
     JSString *ucstr =
       JS_NewUCStringCopyN(cx, (jschar*)result.get(), result.Length());
     if (!ucstr) {
-      return JS_FALSE;
+      return false;
     }
 
     *rval = STRING_TO_JSVAL(ucstr);
 
-    return JS_TRUE;
+    return true;
   }
 
   static JSBool
   LocaleToUpperCase(JSContext *cx, JSString *src, jsval *rval)
   {
     return ChangeCase(cx, src, rval, ToUpperCase);
   }
 
@@ -237,21 +237,21 @@ struct XPCLocaleCallbacks : public JSLoc
         }
         if (!str)
           JS_free(cx, unichars);
       }
     }
 
     if (!str) {
       nsDOMClassInfo::ThrowJSException(cx, NS_ERROR_OUT_OF_MEMORY);
-      return JS_FALSE;
+      return false;
     }
 
     *rval = STRING_TO_JSVAL(str);
-    return JS_TRUE;
+    return true;
   }
 
   JSBool
   Compare(JSContext *cx, JSString *src1, JSString *src2, jsval *rval)
   {
     nsresult rv;
 
     if (!mCollation) {
@@ -270,38 +270,38 @@ struct XPCLocaleCallbacks : public JSLoc
             rv = colFactory->CreateCollation(locale, getter_AddRefs(mCollation));
           }
         }
       }
 
       if (NS_FAILED(rv)) {
         nsDOMClassInfo::ThrowJSException(cx, rv);
 
-        return JS_FALSE;
+        return false;
       }
     }
 
     nsDependentJSString depStr1, depStr2;
     if (!depStr1.init(cx, src1) || !depStr2.init(cx, src2)) {
-      return JS_FALSE;
+      return false;
     }
 
     PRInt32 result;
     rv = mCollation->CompareString(nsICollation::kCollationStrengthDefault,
                                    depStr1, depStr2, &result);
 
     if (NS_FAILED(rv)) {
       nsDOMClassInfo::ThrowJSException(cx, rv);
 
-      return JS_FALSE;
+      return false;
     }
 
     *rval = INT_TO_JSVAL(result);
 
-    return JS_TRUE;
+    return true;
   }
 
   nsCOMPtr<nsICollation> mCollation;
   nsCOMPtr<nsIUnicodeDecoder> mDecoder;
 
 #ifdef DEBUG
   PRThread* mThread;
 
@@ -338,19 +338,19 @@ static JSContextCallback sOldContextCall
 static JSRuntime* sHookedRuntime;
 #endif  // DEBUG
 
 static JSBool
 DelocalizeContextCallback(JSContext *cx, uintN contextOp)
 {
   NS_ABORT_IF_FALSE(JS_GetRuntime(cx) == sHookedRuntime, "unknown runtime!");
 
-  JSBool ok = JS_TRUE;
+  JSBool ok = true;
   if (sOldContextCallback && !sOldContextCallback(cx, contextOp)) {
-    ok = JS_FALSE;
+    ok = false;
     // Even if the old callback fails, we still have to march on or
     // else we might leak the intl stuff hooked onto |cx|
   }
 
   if (contextOp == JSCONTEXT_DESTROY) {
     if (XPCLocaleCallbacks* lc = XPCLocaleCallbacks::MaybeThis(cx)) {
       // This is a JSContext for which xpc_LocalizeContext() was called.
       JS_SetLocaleCallbacks(cx, nsnull);
--- a/js/xpconnect/src/XPCLog.cpp
+++ b/js/xpconnect/src/XPCLog.cpp
@@ -134,27 +134,27 @@ LogSlimWrapperWillMorph(JSContext *cx, J
         XPCNativeScriptableInfo *si =
             GetSlimWrapperProto(obj)->GetScriptableInfo();
         printf("***** morphing %s from %s", si->GetJSClass()->name,
                functionName);
         if (propname)
             printf(" for %s", propname);
         printf(" (%p, %p)\n", obj,
                static_cast<nsISupports*>(xpc_GetJSPrivate(obj)));
-        xpc_DumpJSStack(cx, JS_FALSE, JS_FALSE, JS_FALSE);
+        xpc_DumpJSStack(cx, false, false, false);
     }
 }
 
 void
 LogSlimWrapperNotCreated(JSContext *cx, nsISupports *obj, const char *reason)
 {
     char* className = nsnull;
     nsCOMPtr<nsIClassInfo> ci = do_QueryInterface(obj);
     if (ci)
         ci->GetClassDescription(&className);
     printf("***** refusing to create slim wrapper%s%s, reason: %s (%p)\n",
            className ? " for " : "", className ? className : "", reason, obj);
     if (className)
         PR_Free(className);
     JSAutoRequest autoRequest(cx);
-    xpc_DumpJSStack(cx, JS_FALSE, JS_FALSE, JS_FALSE);
+    xpc_DumpJSStack(cx, false, false, false);
 }
 #endif
--- a/js/xpconnect/src/XPCMaps.cpp
+++ b/js/xpconnect/src/XPCMaps.cpp
@@ -297,30 +297,30 @@ NativeSetMap::Entry::Match(JSDHashTable 
     XPCNativeSetKey* Key = (XPCNativeSetKey*) key;
 
     // See the comment in the XPCNativeSetKey declaration in xpcprivate.h.
     if (!Key->IsAKey()) {
         XPCNativeSet* Set1 = (XPCNativeSet*) key;
         XPCNativeSet* Set2 = ((Entry*)entry)->key_value;
 
         if (Set1 == Set2)
-            return JS_TRUE;
+            return true;
 
         PRUint16 count = Set1->GetInterfaceCount();
         if (count != Set2->GetInterfaceCount())
-            return JS_FALSE;
+            return false;
 
         XPCNativeInterface** Current1 = Set1->GetInterfaceArray();
         XPCNativeInterface** Current2 = Set2->GetInterfaceArray();
         for (PRUint16 i = 0; i < count; i++) {
             if (*(Current1++) != *(Current2++))
-                return JS_FALSE;
+                return false;
         }
 
-        return JS_TRUE;
+        return true;
     }
 
     XPCNativeSet*       SetInTable = ((Entry*)entry)->key_value;
     XPCNativeSet*       Set        = Key->GetBaseSet();
     XPCNativeInterface* Addition   = Key->GetAddition();
 
     if (!Set) {
         // This is a special case to deal with the invariant that says:
@@ -334,36 +334,36 @@ NativeSetMap::Entry::Match(JSDHashTable 
 
         return ((SetInTable->GetInterfaceCount() == 1 &&
                  SetInTable->GetInterfaceAt(0) == Addition) ||
                 (SetInTable->GetInterfaceCount() == 2 &&
                  SetInTable->GetInterfaceAt(1) == Addition));
     }
 
     if (!Addition && Set == SetInTable)
-        return JS_TRUE;
+        return true;
 
     PRUint16 count = Set->GetInterfaceCount() + (Addition ? 1 : 0);
     if (count != SetInTable->GetInterfaceCount())
-        return JS_FALSE;
+        return false;
 
     PRUint16 Position = Key->GetPosition();
     XPCNativeInterface** CurrentInTable = SetInTable->GetInterfaceArray();
     XPCNativeInterface** Current = Set->GetInterfaceArray();
     for (PRUint16 i = 0; i < count; i++) {
         if (Addition && i == Position) {
             if (Addition != *(CurrentInTable++))
-                return JS_FALSE;
+                return false;
         } else {
             if (*(Current++) != *(CurrentInTable++))
-                return JS_FALSE;
+                return false;
         }
     }
 
-    return JS_TRUE;
+    return true;
 }
 
 struct JSDHashTableOps NativeSetMap::Entry::sOps =
 {
     JS_DHashAllocTable,
     JS_DHashFreeTable,
     HashNativeKey,
     Match,
@@ -476,17 +476,17 @@ XPCNativeScriptableSharedMap::Entry::Mat
 
     XPCNativeScriptableShared* obj2 =
         (XPCNativeScriptableShared*) key;
 
     // match the flags, the classname string and the interfaces bitmap
 
     if (obj1->GetFlags() != obj2->GetFlags() ||
         obj1->GetInterfacesBitmap() != obj2->GetInterfacesBitmap())
-        return JS_FALSE;
+        return false;
 
     const char* name1 = obj1->GetJSClass()->name;
     const char* name2 = obj2->GetJSClass()->name;
 
     if (!name1 || !name2)
         return name1 == name2;
 
     return 0 == strcmp(name1, name2);
@@ -535,30 +535,30 @@ XPCNativeScriptableSharedMap::GetNewOrUs
 {
     NS_PRECONDITION(name,"bad param");
     NS_PRECONDITION(si,"bad param");
 
     XPCNativeScriptableShared key(flags, name, interfacesBitmap);
     Entry* entry = (Entry*)
         JS_DHashTableOperate(mTable, &key, JS_DHASH_ADD);
     if (!entry)
-        return JS_FALSE;
+        return false;
 
     XPCNativeScriptableShared* shared = entry->key;
 
     if (!shared) {
         entry->key = shared =
             new XPCNativeScriptableShared(flags, key.TransferNameOwnership(),
                                           interfacesBitmap);
         if (!shared)
-            return JS_FALSE;
+            return false;
         shared->PopulateJSClass(isGlobal);
     }
     si->SetScriptableShared(shared);
-    return JS_TRUE;
+    return true;
 }
 
 /***************************************************************************/
 // implement XPCWrappedNativeProtoMap...
 
 // static
 XPCWrappedNativeProtoMap*
 XPCWrappedNativeProtoMap::newMap(int size)
--- a/js/xpconnect/src/XPCQuickStubs.cpp
+++ b/js/xpconnect/src/XPCQuickStubs.cpp
@@ -141,31 +141,31 @@ PropertyOpForwarder(JSContext *cx, uintN
     // Layout:
     //   this = our this
     //   property op to call = callee reserved slot 0
     //   name of the property = callee reserved slot 1
 
     JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
     JSObject *obj = JS_THIS_OBJECT(cx, vp);
     if (!obj)
-        return JS_FALSE;
+        return false;
     jsval v;
 
     if (!JS_GetReservedSlot(cx, callee, 0, &v))
-        return JS_FALSE;
+        return false;
     JSObject *ptrobj = JSVAL_TO_OBJECT(v);
     Op *popp = static_cast<Op *>(JS_GetPrivate(cx, ptrobj));
 
     if (!JS_GetReservedSlot(cx, callee, 1, &v))
-        return JS_FALSE;
+        return false;
 
     jsval argval = (argc > 0) ? JS_ARGV(cx, vp)[0] : JSVAL_VOID;
     jsid id;
     if (!JS_ValueToId(cx, argval, &id))
-        return JS_FALSE;
+        return false;
     JS_SET_RVAL(cx, vp, argval);
     return ApplyPropertyOp<Op>(cx, *popp, obj, id, vp);
 }
 
 static void
 PointerFinalize(JSContext *cx, JSObject *obj)
 {
     JSPropertyOp *popp = static_cast<JSPropertyOp *>(JS_GetPrivate(cx, obj));
@@ -184,30 +184,30 @@ template<typename Op>
 static JSObject *
 GeneratePropertyOp(JSContext *cx, JSObject *obj, jsid id, uintN argc, Op pop)
 {
     // The JS engine provides two reserved slots on function objects for
     // XPConnect to use. Use them to stick the necessary info here.
     JSFunction *fun =
         JS_NewFunctionById(cx, PropertyOpForwarder<Op>, argc, 0, obj, id);
     if (!fun)
-        return JS_FALSE;
+        return false;
 
     JSObject *funobj = JS_GetFunctionObject(fun);
 
     js::AutoObjectRooter tvr(cx, funobj);
 
     // Unfortunately, we cannot guarantee that Op is aligned. Use a
     // second object to work around this.
     JSObject *ptrobj = JS_NewObject(cx, &PointerHolderClass, nsnull, funobj);
     if (!ptrobj)
-        return JS_FALSE;
+        return false;
     Op *popp = new Op;
     if (!popp)
-        return JS_FALSE;
+        return false;
     *popp = pop;
     JS_SetPrivate(cx, ptrobj, popp);
 
     JS_SetReservedSlot(cx, funobj, 0, OBJECT_TO_JSVAL(ptrobj));
     JS_SetReservedSlot(cx, funobj, 1, js::IdToJsval(id));
     return funobj;
 }
 
@@ -220,27 +220,27 @@ ReifyPropertyOps(JSContext *cx, JSObject
     jsval roots[2] = { JSVAL_NULL, JSVAL_NULL };
     js::AutoArrayRooter tvr(cx, ArrayLength(roots), roots);
 
     uintN attrs = JSPROP_SHARED | (orig_attrs & JSPROP_ENUMERATE);
     JSObject *getterobj;
     if (getter) {
         getterobj = GeneratePropertyOp(cx, obj, id, 0, getter);
         if (!getterobj)
-            return JS_FALSE;
+            return false;
         roots[0] = OBJECT_TO_JSVAL(getterobj);
         attrs |= JSPROP_GETTER;
     } else
         getterobj = nsnull;
 
     JSObject *setterobj;
     if (setter) {
         setterobj = GeneratePropertyOp(cx, obj, id, 1, setter);
         if (!setterobj)
-            return JS_FALSE;
+            return false;
         roots[1] = OBJECT_TO_JSVAL(setterobj);
         attrs |= JSPROP_SETTER;
     } else
         setterobj = nsnull;
 
     if (getterobjp)
         *getterobjp = getterobj;
     if (setterobjp)
@@ -253,75 +253,75 @@ ReifyPropertyOps(JSContext *cx, JSObject
 
 static JSBool
 LookupGetterOrSetter(JSContext *cx, JSBool wantGetter, uintN argc, jsval *vp)
 {
     XPC_QS_ASSERT_CONTEXT_OK(cx);
 
     if (argc == 0) {
         JS_SET_RVAL(cx, vp, JSVAL_VOID);
-        return JS_TRUE;
+        return true;
     }
 
     JSObject *obj = JS_THIS_OBJECT(cx, vp);
     if (!obj)
-        return JS_FALSE;
+        return false;
 
     jsval idval = JS_ARGV(cx, vp)[0];
     jsid id;
     JSPropertyDescriptor desc;
     if (!JS_ValueToId(cx, idval, &id) ||
         !JS_GetPropertyDescriptorById(cx, obj, id, JSRESOLVE_QUALIFIED, &desc))
-        return JS_FALSE;
+        return false;
 
     // No property at all means no getters or setters possible.
     if (!desc.obj) {
         JS_SET_RVAL(cx, vp, JSVAL_VOID);
-        return JS_TRUE;
+        return true;
     }
 
     // Inline obj_lookup[GS]etter here.
     if (wantGetter) {
         if (desc.attrs & JSPROP_GETTER) {
             JS_SET_RVAL(cx, vp,
                         OBJECT_TO_JSVAL(JS_FUNC_TO_DATA_PTR(JSObject *, desc.getter)));
-            return JS_TRUE;
+            return true;
         }
     } else {
         if (desc.attrs & JSPROP_SETTER) {
             JS_SET_RVAL(cx, vp,
                         OBJECT_TO_JSVAL(JS_FUNC_TO_DATA_PTR(JSObject *, desc.setter)));
-            return JS_TRUE;
+            return true;
         }
     }
 
     // Since XPConnect doesn't use JSPropertyOps in any other contexts,
     // ensuring that we have an XPConnect prototype object ensures that
     // we are only going to expose quickstubbed properties to script.
     // Also be careful not to overwrite existing properties!
 
     if (!JSID_IS_STRING(id) ||
         !IS_PROTO_CLASS(js::GetObjectClass(desc.obj)) ||
         (desc.attrs & (JSPROP_GETTER | JSPROP_SETTER)) ||
         !(desc.getter || desc.setter) ||
         desc.setter == js::GetObjectJSClass(desc.obj)->setProperty) {
         JS_SET_RVAL(cx, vp, JSVAL_VOID);
-        return JS_TRUE;
+        return true;
     }
 
     JSObject *getterobj, *setterobj;
     if (!ReifyPropertyOps(cx, desc.obj, id, desc.attrs, desc.getter, desc.setter,
                           &getterobj, &setterobj)) {
-        return JS_FALSE;
+        return false;
     }
 
     JSObject *wantedobj = wantGetter ? getterobj : setterobj;
     jsval v = wantedobj ? OBJECT_TO_JSVAL(wantedobj) : JSVAL_VOID;
     JS_SET_RVAL(cx, vp, v);
-    return JS_TRUE;
+    return true;
 }
 
 static JSBool
 SharedLookupGetter(JSContext *cx, uintN argc, jsval *vp)
 {
     return LookupGetterOrSetter(cx, true, argc, vp);
 }
 
@@ -340,41 +340,41 @@ DefineGetterOrSetter(JSContext *cx, uint
     JSStrictPropertyOp setter;
     JSObject *obj2;
     jsval v;
     jsid id;
 
     XPC_QS_ASSERT_CONTEXT_OK(cx);
     JSObject *obj = JS_THIS_OBJECT(cx, vp);
     if (!obj)
-        return JS_FALSE;
+        return false;
     JSNative forward = wantGetter ? js::obj_defineGetter : js::obj_defineSetter;
     jsval idval = (argc >= 1) ? JS_ARGV(cx, vp)[0] : JSVAL_VOID;
     if (!JSVAL_IS_STRING(idval))
         return forward(cx, argc, vp);
 
     if (!JS_ValueToId(cx, idval, &id) ||
         !JS_LookupPropertyWithFlagsById(cx, obj, id,
                                         JSRESOLVE_QUALIFIED, &obj2, &v) ||
         (obj2 &&
          !JS_GetPropertyAttrsGetterAndSetterById(cx, obj2, id, &attrs,
                                                  &found, &getter, &setter)))
-        return JS_FALSE;
+        return false;
 
     // The property didn't exist, already has a getter or setter, or is not
     // our property, then just forward now.
     if (!obj2 ||
         (attrs & (JSPROP_GETTER | JSPROP_SETTER)) ||
         !(getter || setter) ||
         !IS_PROTO_CLASS(js::GetObjectClass(obj2)))
         return forward(cx, argc, vp);
 
     // Reify the getter and setter...
     if (!ReifyPropertyOps(cx, obj2, id, attrs, getter, setter, nsnull, nsnull))
-        return JS_FALSE;
+        return false;
 
     return forward(cx, argc, vp);
 }
 
 static JSBool
 SharedDefineGetter(JSContext *cx, uintN argc, jsval *vp)
 {
     return DefineGetterOrSetter(cx, argc, true, vp);
@@ -411,28 +411,28 @@ xpc_qsDefineQuickStubs(JSContext *cx, JS
                 // Define quick stubs for attributes.
                 const xpc_qsPropertySpec *ps = entry->properties;
                 if (ps) {
                     for (; ps->name; ps++) {
                         definedProperty = true;
                         if (!JS_DefineProperty(cx, proto, ps->name, JSVAL_VOID,
                                                ps->getter, ps->setter,
                                                flags | JSPROP_SHARED))
-                            return JS_FALSE;
+                            return false;
                     }
                 }
 
                 // Define quick stubs for methods.
                 const xpc_qsFunctionSpec *fs = entry->functions;
                 if (fs) {
                     for (; fs->name; fs++) {
                         if (!JS_DefineFunction(cx, proto, fs->name,
                                                reinterpret_cast<JSNative>(fs->native),
                                                fs->arity, flags))
-                            return JS_FALSE;
+                            return false;
                     }
                 }
 
                 // Next.
                 size_t j = entry->parentInterface;
                 if (j == XPC_QS_NULL_INDEX)
                     break;
                 entry = table + j;
@@ -444,26 +444,26 @@ xpc_qsDefineQuickStubs(JSContext *cx, JS
         JS_FN("__lookupGetter__", SharedLookupGetter, 1, 0),
         JS_FN("__lookupSetter__", SharedLookupSetter, 1, 0),
         JS_FN("__defineGetter__", SharedDefineGetter, 2, 0),
         JS_FN("__defineSetter__", SharedDefineSetter, 2, 0),
         JS_FS_END
     };
 
     if (definedProperty && !JS_DefineFunctions(cx, proto, getterfns))
-        return JS_FALSE;
+        return false;
 
-    return JS_TRUE;
+    return true;
 }
 
 JSBool
 xpc_qsThrow(JSContext *cx, nsresult rv)
 {
     XPCThrower::Throw(rv, cx);
-    return JS_FALSE;
+    return false;
 }
 
 /**
  * Get the interface name and member name (for error messages).
  *
  * We could instead have each quick stub pass its name to the error-handling
  * functions, as that name is statically known.  But that would be redundant;
  * the information is handy at runtime anyway.  Also, this code often produces
@@ -528,17 +528,17 @@ ThrowCallFailed(JSContext *cx, nsresult 
 
     /*
      *  If there is a pending exception when the native call returns and
      *  it has the same error result as returned by the native call, then
      *  the native call may be passing through an error from a previous JS
      *  call. So we'll just throw that exception into our JS.
      */
     if (XPCThrower::CheckForPendingException(rv, cx))
-        return JS_FALSE;
+        return false;
 
     // else...
 
     if (!nsXPCException::NameAndFormatForNSResult(NS_ERROR_XPC_NATIVE_RETURNED_FAILURE, nsnull, &format) ||
         !format) {
         format = "";
     }
 
@@ -557,17 +557,17 @@ ThrowCallFailed(JSContext *cx, nsresult 
                          format, rv, ifaceName, memberName);
     }
 
     XPCThrower::BuildAndThrowException(cx, rv, sz);
 
     if (sz)
         JS_smprintf_free(sz);
 
-    return JS_FALSE;
+    return false;
 }
 
 JSBool
 xpc_qsThrowGetterSetterFailed(JSContext *cx, nsresult rv, JSObject *obj,
                               jsid memberId)
 {
     const char *ifaceName;
     GetMemberInfo(obj, memberId, &ifaceName);
@@ -582,17 +582,17 @@ xpc_qsThrowMethodFailed(JSContext *cx, n
     GetMethodInfo(cx, vp, &ifaceName, &memberId);
     return ThrowCallFailed(cx, rv, ifaceName, memberId, NULL);
 }
 
 JSBool
 xpc_qsThrowMethodFailedWithCcx(XPCCallContext &ccx, nsresult rv)
 {
     ThrowBadResult(rv, ccx);
-    return JS_FALSE;
+    return false;
 }
 
 void
 xpc_qsThrowMethodFailedWithDetails(JSContext *cx, nsresult rv,
                                    const char *ifaceName,
                                    const char *memberName)
 {
     ThrowCallFailed(cx, rv, ifaceName, JSID_VOID, memberName);
@@ -677,68 +677,68 @@ xpc_qsDOMString::xpc_qsDOMString(JSConte
     JSString *s = InitOrStringify<traits>(cx, v, pval, nullBehavior,
                                           undefinedBehavior);
     if (!s)
         return;
 
     size_t len;
     const jschar *chars = JS_GetStringCharsZAndLength(cx, s, &len);
     if (!chars) {
-        mValid = JS_FALSE;
+        mValid = false;
         return;
     }
 
     new(mBuf) implementation_type(chars, len);
-    mValid = JS_TRUE;
+    mValid = true;
 }
 
 xpc_qsACString::xpc_qsACString(JSContext *cx, jsval v, jsval *pval,
                                StringificationBehavior nullBehavior,
                                StringificationBehavior undefinedBehavior)
 {
     typedef implementation_type::char_traits traits;
     // From the T_CSTRING case in XPCConvert::JSData2Native.
     JSString *s = InitOrStringify<traits>(cx, v, pval, nullBehavior,
                                           undefinedBehavior);
     if (!s)
         return;
 
     size_t len = JS_GetStringEncodingLength(cx, s);
     if (len == size_t(-1)) {
-        mValid = JS_FALSE;
+        mValid = false;
         return;
     }
 
     JSAutoByteString bytes(cx, s);
     if (!bytes) {
-        mValid = JS_FALSE;
+        mValid = false;
         return;
     }
 
     new(mBuf) implementation_type(bytes.ptr(), len);
-    mValid = JS_TRUE;
+    mValid = true;
 }
 
 xpc_qsAUTF8String::xpc_qsAUTF8String(JSContext *cx, jsval v, jsval *pval)
 {
     typedef nsCharTraits<PRUnichar> traits;
     // From the T_UTF8STRING  case in XPCConvert::JSData2Native.
     JSString *s = InitOrStringify<traits>(cx, v, pval, eNull, eNull);
     if (!s)
         return;
 
     size_t len;
     const PRUnichar *chars = JS_GetStringCharsZAndLength(cx, s, &len);
     if (!chars) {
-        mValid = JS_FALSE;
+        mValid = false;
         return;
     }
 
     new(mBuf) implementation_type(chars, len);
-    mValid = JS_TRUE;
+    mValid = true;
 }
 
 static nsresult
 getNative(nsISupports *idobj,
           QITableEntry* entries,
           JSObject *obj,
           const nsIID &iid,
           void **ppThis,
@@ -861,17 +861,17 @@ xpc_qsUnwrapThisFromCcxImpl(XPCCallConte
     if (!native)
         return xpc_qsThrow(ccx.GetJSContext(), NS_ERROR_XPC_HAS_BEEN_SHUTDOWN);
 
     nsresult rv = getNative(native, GetOffsets(native, ccx.GetProto()),
                             ccx.GetFlattenedJSObject(), iid, ppThis, pThisRef,
                             vp);
     if (NS_FAILED(rv))
         return xpc_qsThrow(ccx.GetJSContext(), rv);
-    return JS_TRUE;
+    return true;
 }
 
 JSObject*
 xpc_qsUnwrapObj(jsval v, nsISupports **ppArgRef, nsresult *rv)
 {
     if (JSVAL_IS_VOID(v) || JSVAL_IS_NULL(v)) {
         *ppArgRef = nsnull;
         *rv = NS_OK;
@@ -994,73 +994,73 @@ JSBool
 xpc_qsJsvalToWcharStr(JSContext *cx, jsval v, jsval *pval, const PRUnichar **pstr)
 {
     JSString *str;
 
     if (JSVAL_IS_STRING(v)) {
         str = JSVAL_TO_STRING(v);
     } else if (JSVAL_IS_VOID(v) || JSVAL_IS_NULL(v)) {
         *pstr = NULL;
-        return JS_TRUE;
+        return true;
     } else {
         if (!(str = JS_ValueToString(cx, v)))
-            return JS_FALSE;
+            return false;
         *pval = STRING_TO_JSVAL(str);  // Root the new string.
     }
 
     const jschar *chars = JS_GetStringCharsZ(cx, str);
     if (!chars)
-        return JS_FALSE;
+        return false;
 
     *pstr = static_cast<const PRUnichar *>(chars);
-    return JS_TRUE;
+    return true;
 }
 
 JSBool
 xpc_qsStringToJsval(JSContext *cx, nsString &str, jsval *rval)
 {
     // From the T_DOMSTRING case in XPCConvert::NativeData2JS.
     if (str.IsVoid()) {
         *rval = JSVAL_NULL;
-        return JS_TRUE;
+        return true;
     }
 
     nsStringBuffer* sharedBuffer;
     jsval jsstr = XPCStringConvert::ReadableToJSVal(cx, str, &sharedBuffer);
     if (JSVAL_IS_NULL(jsstr))
-        return JS_FALSE;
+        return false;
     *rval = jsstr;
     if (sharedBuffer) {
         // The string was shared but ReadableToJSVal didn't addref it.
         // Move the ownership from str to jsstr.
         str.ForgetSharedBuffer();
     }
-    return JS_TRUE;
+    return true;
 }
 
 JSBool
 xpc_qsStringToJsstring(JSContext *cx, nsString &str, JSString **rval)
 {
     // From the T_DOMSTRING case in XPCConvert::NativeData2JS.
     if (str.IsVoid()) {
         *rval = nsnull;
-        return JS_TRUE;
+        return true;
     }
 
     nsStringBuffer* sharedBuffer;
     jsval jsstr = XPCStringConvert::ReadableToJSVal(cx, str, &sharedBuffer);
     if (JSVAL_IS_NULL(jsstr))
-        return JS_FALSE;
+        return false;
     *rval = JSVAL_TO_STRING(jsstr);
     if (sharedBuffer) {
         // The string was shared but ReadableToJSVal didn't addref it.
         // Move the ownership from str to jsstr.
         str.ForgetSharedBuffer();
     }
-    return JS_TRUE;
+    return true;
 }
 
 JSBool
 xpc_qsXPCOMObjectToJsval(XPCLazyCallContext &lccx, qsObjectHelper &aHelper,
                          const nsIID *iid, XPCNativeInterface **iface,
                          jsval *rval)
 {
     NS_PRECONDITION(iface, "Who did that and why?");
@@ -1080,27 +1080,27 @@ xpc_qsXPCOMObjectToJsval(XPCLazyCallCont
     if (!XPCConvert::NativeInterface2JSObject(lccx, rval, nsnull,
                                               aHelper, iid, iface,
                                               true, OBJ_IS_NOT_GLOBAL, &rv)) {
         // I can't tell if NativeInterface2JSObject throws JS exceptions
         // or not.  This is a sloppy stab at the right semantics; the
         // method really ought to be fixed to behave consistently.
         if (!JS_IsExceptionPending(cx))
             xpc_qsThrow(cx, NS_FAILED(rv) ? rv : NS_ERROR_UNEXPECTED);
-        return JS_FALSE;
+        return false;
     }
 
 #ifdef DEBUG
     JSObject* jsobj = JSVAL_TO_OBJECT(*rval);
     if (jsobj && !js::GetObjectParent(jsobj))
         NS_ASSERTION(js::GetObjectClass(jsobj)->flags & JSCLASS_IS_GLOBAL,
                      "Why did we recreate this wrapper?");
 #endif
 
-    return JS_TRUE;
+    return true;
 }
 
 JSBool
 xpc_qsVariantToJsval(XPCLazyCallContext &lccx,
                      nsIVariant *p,
                      jsval *rval)
 {
     // From the T_INTERFACE case in XPCConvert::NativeData2JS.
@@ -1108,17 +1108,17 @@ xpc_qsVariantToJsval(XPCLazyCallContext 
     if (p) {
         nsresult rv;
         JSBool ok = XPCVariant::VariantDataToJS(lccx, p, &rv, rval);
         if (!ok)
             xpc_qsThrow(lccx.GetJSContext(), rv);
         return ok;
     }
     *rval = JSVAL_NULL;
-    return JS_TRUE;
+    return true;
 }
 
 #ifdef DEBUG
 void
 xpc_qsAssertContextOK(JSContext *cx)
 {
     XPCPerThreadData *thread = XPCPerThreadData::GetData(cx);
     XPCJSContextStack* stack = thread->GetJSContextStack();
--- a/js/xpconnect/src/XPCQuickStubs.h
+++ b/js/xpconnect/src/XPCQuickStubs.h
@@ -158,17 +158,17 @@ public:
   }
 };
 
 JSBool
 xpc_qsDefineQuickStubs(JSContext *cx, JSObject *proto, uintN extraFlags,
                        PRUint32 ifacec, const nsIID **interfaces,
                        PRUint32 tableSize, const xpc_qsHashEntry *table);
 
-/** Raise an exception on @a cx and return JS_FALSE. */
+/** Raise an exception on @a cx and return false. */
 JSBool
 xpc_qsThrow(JSContext *cx, nsresult rv);
 
 /**
  * Fail after an XPCOM getter or setter returned rv.
  *
  * NOTE: Here @a obj must be the JSObject whose private data field points to an
  * XPCWrappedNative, not merely an object that has an XPCWrappedNative
@@ -229,27 +229,27 @@ JSBool
 xpc_qsGetterOnlyPropertyStub(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp);
 
 /* Functions for converting values between COM and JS. */
 
 inline JSBool
 xpc_qsInt32ToJsval(JSContext *cx, PRInt32 i, jsval *rv)
 {
     *rv = INT_TO_JSVAL(i);
-    return JS_TRUE;
+    return true;
 }
 
 inline JSBool
 xpc_qsUint32ToJsval(JSContext *cx, PRUint32 u, jsval *rv)
 {
     if (u <= JSVAL_INT_MAX)
         *rv = INT_TO_JSVAL(u);
     else
         *rv = DOUBLE_TO_JSVAL(u);
-    return JS_TRUE;
+    return true;
 }
 
 #ifdef HAVE_LONG_LONG
 
 #define INT64_TO_DOUBLE(i)      ((jsdouble) (i))
 // Win32 can't handle uint64 to double conversion
 #define UINT64_TO_DOUBLE(u)     ((jsdouble) (int64) (u))
 
@@ -365,38 +365,38 @@ protected:
             // If pval is null, that means the argument was optional and
             // not passed; turn those into void strings if they're
             // supposed to be stringified.
             if (behavior != eStringify || !pval) {
                 // Here behavior == eStringify implies !pval, so both eNull and
                 // eStringify should end up with void strings.
                 (new(mBuf) implementation_type(traits::sEmptyBuffer, PRUint32(0)))->
                     SetIsVoid(behavior != eEmpty);
-                mValid = JS_TRUE;
+                mValid = true;
                 return nsnull;
             }
 
             s = JS_ValueToString(cx, v);
             if (!s) {
-                mValid = JS_FALSE;
+                mValid = false;
                 return nsnull;
             }
             *pval = STRING_TO_JSVAL(s);  // Root the new string.
         }
 
         return s;
     }
 };
 
 /**
  * Class for converting a jsval to DOMString.
  *
  *     xpc_qsDOMString arg0(cx, &argv[0]);
  *     if (!arg0.IsValid())
- *         return JS_FALSE;
+ *         return false;
  *
  * The second argument to the constructor is an in-out parameter. It must
  * point to a rooted jsval, such as a JSNative argument or return value slot.
  * The value in the jsval on entry is converted to a string. The constructor
  * may overwrite that jsval with a string value, to protect the characters of
  * the string from garbage collection. The caller must leave the jsval alone
  * for the lifetime of the xpc_qsDOMString.
  */
@@ -447,41 +447,41 @@ struct xpc_qsSelfRef
     xpc_qsSelfRef() : ptr(nsnull) {}
     explicit xpc_qsSelfRef(nsISupports *p) : ptr(p) {}
     ~xpc_qsSelfRef() { NS_IF_RELEASE(ptr); }
 
     nsISupports* ptr;
 };
 
 /**
- * Convert a jsval to char*, returning JS_TRUE on success.
+ * Convert a jsval to char*, returning true on success.
  *
  * @param cx
  *     A context.
  * @param v
  *     A value to convert.
  * @param bytes
  *     Out. On success it receives the converted string unless v is null or
  *     undefinedin which case bytes->ptr() remains null.
  */
 JSBool
 xpc_qsJsvalToCharStr(JSContext *cx, jsval v, JSAutoByteString *bytes);
 
 JSBool
 xpc_qsJsvalToWcharStr(JSContext *cx, jsval v, jsval *pval, const PRUnichar **pstr);
 
 
-/** Convert an nsString to jsval, returning JS_TRUE on success.
+/** Convert an nsString to jsval, returning true on success.
  *  Note, the ownership of the string buffer may be moved from str to rval.
  *  If that happens, str will point to an empty string after this call.
  */
 JSBool
 xpc_qsStringToJsval(JSContext *cx, nsString &str, jsval *rval);
 
-/** Convert an nsString to JSString, returning JS_TRUE on success. This will sometimes modify |str| to be empty. */
+/** Convert an nsString to JSString, returning true on success. This will sometimes modify |str| to be empty. */
 JSBool
 xpc_qsStringToJsstring(JSContext *cx, nsString &str, JSString **rval);
 
 nsresult
 getWrapper(JSContext *cx,
            JSObject *obj,
            JSObject *callee,
            XPCWrappedNative **wrapper,
@@ -500,17 +500,17 @@ castNative(JSContext *cx,
            XPCLazyCallContext *lccx);
 
 /**
  * Search @a obj and its prototype chain for an XPCOM object that implements
  * the interface T.
  *
  * If an object implementing T is found, store a reference to the wrapper
  * JSObject in @a *pThisVal, store a pointer to the T in @a *ppThis, and return
- * JS_TRUE. Otherwise, raise an exception on @a cx and return JS_FALSE.
+ * true. Otherwise, raise an exception on @a cx and return false.
  *
  * @a *pThisRef receives the same pointer as *ppThis if the T was AddRefed.
  * Otherwise it receives null (even on error).
  *
  * This supports split objects and XPConnect tear-offs and it sees through
  * XOWs, XPCNativeWrappers, and SafeJSObjectWrappers.
  *
  * Requires a request on @a cx.
@@ -534,17 +534,17 @@ xpc_qsUnwrapThis(JSContext *cx,
                         reinterpret_cast<void **>(ppThis), pThisRef, pThisVal,
                         lccx);
 
     if (failureFatal)
         return NS_SUCCEEDED(rv) || xpc_qsThrow(cx, rv);
 
     if (NS_FAILED(rv))
         *ppThis = nsnull;
-    return JS_TRUE;
+    return true;
 }
 
 inline nsISupports*
 castNativeFromWrapper(JSContext *cx,
                       JSObject *obj,
                       JSObject *callee,
                       PRUint32 interfaceBit,
                       nsISupports **pRef,
@@ -675,55 +675,55 @@ inline nsWrapperCache*
 xpc_qsGetWrapperCache(nsGlobalWindow *not_allowed);
 
 inline nsWrapperCache*
 xpc_qsGetWrapperCache(void *p)
 {
     return nsnull;
 }
 
-/** Convert an XPCOM pointer to jsval. Return JS_TRUE on success.
+/** Convert an XPCOM pointer to jsval. Return true on success.
  * aIdentity is a performance optimization. Set it to true,
  * only if p is the identity pointer.
  */
 JSBool
 xpc_qsXPCOMObjectToJsval(XPCLazyCallContext &lccx,
                          qsObjectHelper &aHelper,
                          const nsIID *iid,
                          XPCNativeInterface **iface,
                          jsval *rval);
 
 /**
- * Convert a variant to jsval. Return JS_TRUE on success.
+ * Convert a variant to jsval. Return true on success.
  */
 JSBool
 xpc_qsVariantToJsval(XPCLazyCallContext &ccx,
                      nsIVariant *p,
                      jsval *rval);
 
 /**
- * Convert a jsval to PRInt64. Return JS_TRUE on success.
+ * Convert a jsval to PRInt64. Return true on success.
  */
 inline JSBool
 xpc_qsValueToInt64(JSContext *cx,
                    jsval v,
                    PRInt64 *result)
 {
     if (JSVAL_IS_INT(v)) {
         int32 intval;
         if (!JS_ValueToECMAInt32(cx, v, &intval))
-            return JS_FALSE;
+            return false;
         *result = static_cast<PRInt64>(intval);
     } else {
         jsdouble doubleval;
         if (!JS_ValueToNumber(cx, v, &doubleval))
-            return JS_FALSE;
+            return false;
         *result = static_cast<PRInt64>(doubleval);
     }
-    return JS_TRUE;
+    return true;
 }
 
 /**
  * Convert a jsdouble to PRUint64. Needed for traceable quickstubs too.
  */
 inline PRUint64
 xpc_qsDoubleToUint64(jsdouble doubleval)
 {
@@ -731,35 +731,35 @@ xpc_qsDoubleToUint64(jsdouble doubleval)
     // Note: Win32 can't handle double to uint64 directly
     return static_cast<PRUint64>(static_cast<PRInt64>(doubleval));
 #else
     return static_cast<PRUint64>(doubleval);
 #endif
 }
 
 /**
- * Convert a jsval to PRUint64. Return JS_TRUE on success.
+ * Convert a jsval to PRUint64. Return true on success.
  */
 inline JSBool
 xpc_qsValueToUint64(JSContext *cx,
                     jsval v,
                     PRUint64 *result)
 {
     if (JSVAL_IS_INT(v)) {
         uint32 intval;
         if (!JS_ValueToECMAUint32(cx, v, &intval))
-            return JS_FALSE;
+            return false;
         *result = static_cast<PRUint64>(intval);
     } else {
         jsdouble doubleval;
         if (!JS_ValueToNumber(cx, v, &doubleval))
-            return JS_FALSE;
+            return false;
         *result = xpc_qsDoubleToUint64(doubleval);
     }
-    return JS_TRUE;
+    return true;
 }
 
 #ifdef DEBUG
 void
 xpc_qsAssertContextOK(JSContext *cx);
 
 inline bool
 xpc_qsSameResult(nsISupports *result1, nsISupports *result2)
--- a/js/xpconnect/src/XPCStack.cpp
+++ b/js/xpconnect/src/XPCStack.cpp
@@ -192,42 +192,42 @@ XPCJSStackFrame::CreateStack(JSContext* 
 nsresult
 XPCJSStackFrame::CreateStackFrameLocation(PRUint32 aLanguage,
                                           const char* aFilename,
                                           const char* aFunctionName,
                                           PRInt32 aLineNumber,
                                           nsIStackFrame* aCaller,
                                           XPCJSStackFrame** stack)
 {
-    JSBool failed = JS_FALSE;
+    JSBool failed = false;
     XPCJSStackFrame* self = new XPCJSStackFrame();
     if (self)
         NS_ADDREF(self);
     else
-        failed = JS_TRUE;
+        failed = true;
 
     if (!failed) {
         self->mLanguage = aLanguage;
         self->mLineno = aLineNumber;
     }
 
     if (!failed && aFilename) {
         self->mFilename = (char*)
                 nsMemory::Clone(aFilename,
                                 sizeof(char)*(strlen(aFilename)+1));
         if (!self->mFilename)
-            failed = JS_TRUE;
+            failed = true;
     }
 
     if (!failed && aFunctionName) {
         self->mFunname = (char*)
                 nsMemory::Clone(aFunctionName,
                                 sizeof(char)*(strlen(aFunctionName)+1));
         if (!self->mFunname)
-            failed = JS_TRUE;
+            failed = true;
     }
 
     if (!failed && aCaller) {
         self->mCaller = aCaller;
     }
 
     if (failed && self) {
         NS_RELEASE(self);   // sets self to nsnull
--- a/js/xpconnect/src/XPCThreadContext.cpp
+++ b/js/xpconnect/src/XPCThreadContext.cpp
@@ -173,18 +173,18 @@ XPCJSContextStack::Push(JSContext * cx)
 }
 
 #ifdef DEBUG
 JSBool
 XPCJSContextStack::DEBUG_StackHasJSContext(JSContext*  aJSContext)
 {
     for (PRUint32 i = 0; i < mStack.Length(); i++)
         if (aJSContext == mStack[i].cx)
-            return JS_TRUE;
-    return JS_FALSE;
+            return true;
+    return false;
 }
 #endif
 
 static JSBool
 SafeGlobalResolve(JSContext *cx, JSObject *obj, jsid id)
 {
     JSBool resolved;
     return JS_ResolveStandardClass(cx, obj, id, &resolved);
@@ -299,17 +299,17 @@ void *            XPCPerThreadData::sMai
 XPCPerThreadData::XPCPerThreadData()
     :   mJSContextStack(new XPCJSContextStack()),
         mNextThread(nsnull),
         mCallContext(nsnull),
         mResolveName(JSID_VOID),
         mResolvingWrapper(nsnull),
         mExceptionManager(nsnull),
         mException(nsnull),
-        mExceptionManagerNotAvailable(JS_FALSE),
+        mExceptionManagerNotAvailable(false),
         mAutoRoots(nsnull)
 #ifdef XPC_CHECK_WRAPPER_THREADSAFETY
       , mWrappedNativeThreadsafetyReportDepth(0)
 #endif
 {
     MOZ_COUNT_CTOR(xpcPerThreadData);
     if (gLock) {
         MutexAutoLock lock(*gLock);
--- a/js/xpconnect/src/XPCThrower.cpp
+++ b/js/xpconnect/src/XPCThrower.cpp
@@ -38,17 +38,17 @@
  *
  * ***** END LICENSE BLOCK ***** */
 
 /* Code for throwing errors into JavaScript. */
 
 #include "xpcprivate.h"
 #include "XPCWrapper.h"
 
-JSBool XPCThrower::sVerbose = JS_TRUE;
+JSBool XPCThrower::sVerbose = true;
 
 // static
 void
 XPCThrower::Throw(nsresult rv, JSContext* cx)
 {
     const char* format;
     if (JS_IsExceptionPending(cx))
         return;
@@ -63,31 +63,31 @@ XPCThrower::Throw(nsresult rv, JSContext
  * should be the current call context.
  */
 // static
 JSBool
 XPCThrower::CheckForPendingException(nsresult result, JSContext *cx)
 {
     nsXPConnect* xpc = nsXPConnect::GetXPConnect();
     if (!xpc)
-        return JS_FALSE;
+        return false;
 
     nsCOMPtr<nsIException> e;
     xpc->GetPendingException(getter_AddRefs(e));
     if (!e)
-        return JS_FALSE;
+        return false;
     xpc->SetPendingException(nsnull);
 
     nsresult e_result;
     if (NS_FAILED(e->GetResult(&e_result)) || e_result != result)
-        return JS_FALSE;
+        return false;
 
     if (!ThrowExceptionObject(cx, e))
         JS_ReportOutOfMemory(cx);
-    return JS_TRUE;
+    return true;
 }
 
 // static
 void
 XPCThrower::Throw(nsresult rv, XPCCallContext& ccx)
 {
     char* sz;
     const char* format;
@@ -193,17 +193,17 @@ XPCThrower::Verbosify(XPCCallContext& cc
         *psz = sz;
     }
 }
 
 // static
 void
 XPCThrower::BuildAndThrowException(JSContext* cx, nsresult rv, const char* sz)
 {
-    JSBool success = JS_FALSE;
+    JSBool success = false;
 
     /* no need to set an expection if the security manager already has */
     if (rv == NS_ERROR_XPC_SECURITY_MANAGER_VETO && JS_IsExceptionPending(cx))
         return;
     nsCOMPtr<nsIException> finalException;
     nsCOMPtr<nsIException> defaultException;
     nsXPCException::NewException(sz, rv, nsnull, nsnull, getter_AddRefs(defaultException));
     XPCPerThreadData* tls = XPCPerThreadData::GetData(cx);
@@ -262,44 +262,44 @@ IsCallerChrome(JSContext* cx)
     rv = secMan->SubjectPrincipalIsSystem(&isChrome);
     return NS_SUCCEEDED(rv) && isChrome;
 }
 
 // static
 JSBool
 XPCThrower::ThrowExceptionObject(JSContext* cx, nsIException* e)
 {
-    JSBool success = JS_FALSE;
+    JSBool success = false;
     if (e) {
         nsCOMPtr<nsIXPCException> xpcEx;
         jsval thrown;
         nsXPConnect* xpc;
 
         // If we stored the original thrown JS value in the exception
         // (see XPCConvert::ConstructException) and we are in a web
         // context (i.e., not chrome), rethrow the original value.
         if (!IsCallerChrome(cx) &&
             (xpcEx = do_QueryInterface(e)) &&
             NS_SUCCEEDED(xpcEx->StealJSVal(&thrown))) {
             if (!JS_WrapValue(cx, &thrown))
-                return JS_FALSE;
+                return false;
             JS_SetPendingException(cx, thrown);
-            success = JS_TRUE;
+            success = true;
         } else if ((xpc = nsXPConnect::GetXPConnect())) {
             JSObject* glob = JS_GetGlobalForScopeChain(cx);
             if (!glob)
-                return JS_FALSE;
+                return false;
 
             nsCOMPtr<nsIXPConnectJSObjectHolder> holder;
             nsresult rv = xpc->WrapNative(cx, glob, e,
                                           NS_GET_IID(nsIException),
                                           getter_AddRefs(holder));
             if (NS_SUCCEEDED(rv) && holder) {
                 JSObject* obj;
                 if (NS_SUCCEEDED(holder->GetJSObject(&obj))) {
                     JS_SetPendingException(cx, OBJECT_TO_JSVAL(obj));
-                    success = JS_TRUE;
+                    success = true;
                 }
             }
         }
     }
     return success;
 }
--- a/js/xpconnect/src/XPCVariant.cpp
+++ b/js/xpconnect/src/XPCVariant.cpp
@@ -73,17 +73,17 @@ XPCVariant::XPCVariant(XPCCallContext& c
         JSObject* proto;
         XPCWrappedNative* wn =
             XPCWrappedNative::GetWrappedNativeOfJSObject(ccx,
                                                          JSVAL_TO_OBJECT(mJSVal),
                                                          nsnull,
                                                          &proto);
         mReturnRawObject = !wn && !proto;
     } else
-        mReturnRawObject = JS_FALSE;
+        mReturnRawObject = false;
 }
 
 XPCTraceableVariant::~XPCTraceableVariant()
 {
     jsval val = GetJSValPreserveColor();
 
     NS_ASSERTION(JSVAL_IS_GCTHING(val), "Must be traceable or unlinked");
 
@@ -215,17 +215,17 @@ XPCArrayHomogenizer::GetTypeForArray(XPC
                                      nsXPTType* resultType, nsID* resultID)
 {
     Type state = tUnk;
     Type type;
 
     for (jsuint i = 0; i < length; i++) {
         jsval val;
         if (!JS_GetElement(ccx, array, i, &val))
-            return JS_FALSE;
+            return false;
 
         if (JSVAL_IS_INT(val))
             type = tInt;
         else if (JSVAL_IS_DOUBLE(val))
             type = tDbl;
         else if (JSVAL_IS_BOOLEAN(val))
             type = tBool;
         else if (JSVAL_IS_VOID(val)) {
@@ -289,24 +289,24 @@ XPCArrayHomogenizer::GetTypeForArray(XPC
         case tArr :
             // FALL THROUGH
         case tUnk :
             // FALL THROUGH
         case tErr :
             // FALL THROUGH
         default:
             NS_ERROR("bad state");
-            return JS_FALSE;
+            return false;
     }
-    return JS_TRUE;
+    return true;
 }
 
 JSBool XPCVariant::InitializeData(XPCCallContext& ccx)
 {
-    JS_CHECK_RECURSION(ccx.GetJSContext(), return JS_FALSE);
+    JS_CHECK_RECURSION(ccx.GetJSContext(), return false);
 
     jsval val = GetJSVal();
 
     if (JSVAL_IS_INT(val))
         return NS_SUCCEEDED(nsVariant::SetFromInt32(&mData, JSVAL_TO_INT(val)));
     if (JSVAL_IS_DOUBLE(val))
         return NS_SUCCEEDED(nsVariant::SetFromDouble(&mData,
                                                      JSVAL_TO_DOUBLE(val)));
@@ -317,38 +317,38 @@ JSBool XPCVariant::InitializeData(XPCCal
         return NS_SUCCEEDED(nsVariant::SetToVoid(&mData));
     if (JSVAL_IS_NULL(val))
         return NS_SUCCEEDED(nsVariant::SetToEmpty(&mData));
     if (JSVAL_IS_STRING(val)) {
         // Make our string immutable.  This will also ensure null-termination,
         // which nsVariant assumes for its PRUnichar* stuff.
         JSString* str = JSVAL_TO_STRING(val);
         if (!JS_MakeStringImmutable(ccx, str))
-            return JS_FALSE;
+            return false;
 
         // Don't use nsVariant::SetFromWStringWithSize, because that will copy
         // the data.  Just handle this ourselves.  Note that it's ok to not
         // copy because we added mJSVal as a GC root.
         NS_ASSERTION(mData.mType == nsIDataType::VTYPE_EMPTY,
                      "Why do we already have data?");
 
         // Despite the fact that the variant holds the length, there are
         // implicit assumptions that mWStringValue[mWStringLength] == 0
         size_t length;
         const jschar *chars = JS_GetStringCharsZAndLength(ccx, str, &length);
         if (!chars)
-            return JS_FALSE;
+            return false;
 
         mData.u.wstr.mWStringValue = const_cast<jschar *>(chars);
         // Use C-style cast, because reinterpret cast from size_t to
         // PRUint32 is not valid on some platforms.
         mData.u.wstr.mWStringLength = (PRUint32)length;
         mData.mType = nsIDataType::VTYPE_WSTRING_SIZE_IS;
 
-        return JS_TRUE;
+        return true;
     }
 
     // leaving only JSObject...
     NS_ASSERTION(JSVAL_IS_OBJECT(val), "invalid type of jsval!");
 
     JSObject* jsobj = JSVAL_TO_OBJECT(val);
 
     // Let's see if it is a xpcJSID.
@@ -360,36 +360,36 @@ JSBool XPCVariant::InitializeData(XPCCal
     // Let's see if it is a js array object.
 
     jsuint len;
 
     if (JS_IsArrayObject(ccx, jsobj) && JS_GetArrayLength(ccx, jsobj, &len)) {
         if (!len) {
             // Zero length array
             nsVariant::SetToEmptyArray(&mData);
-            return JS_TRUE;
+            return true;
         }
 
         nsXPTType type;
         nsID id;
 
         if (!XPCArrayHomogenizer::GetTypeForArray(ccx, jsobj, len, &type, &id))
-            return JS_FALSE;
+            return false;
 
         if (!XPCConvert::JSArray2Native(ccx, &mData.u.array.mArrayValue,
                                         val, len, type, &id, nsnull))
-            return JS_FALSE;
+            return false;
 
         mData.mType = nsIDataType::VTYPE_ARRAY;
         if (type.IsInterfacePointer())
             mData.u.array.mArrayInterfaceID = id;
         mData.u.array.mArrayCount = len;
         mData.u.array.mArrayType = type.TagPart();
 
-        return JS_TRUE;
+        return true;
     }
 
     // XXX This could be smarter and pick some more interesting iface.
 
     nsXPConnect*  xpc;
     nsCOMPtr<nsISupports> wrapper;
     const nsIID& iid = NS_GET_IID(nsISupports);
 
@@ -411,44 +411,44 @@ XPCVariant::GetAsJSVal(jsval* result)
 JSBool
 XPCVariant::VariantDataToJS(XPCLazyCallContext& lccx,
                             nsIVariant* variant,
                             nsresult* pErr, jsval* pJSVal)
 {
     // Get the type early because we might need to spoof it below.
     PRUint16 type;
     if (NS_FAILED(variant->GetDataType(&type)))
-        return JS_FALSE;
+        return false;
 
     jsval realVal;
     nsresult rv = variant->GetAsJSVal(&realVal);
 
     if (NS_SUCCEEDED(rv) &&
         (JSVAL_IS_PRIMITIVE(realVal) ||
          type == nsIDataType::VTYPE_ARRAY ||
          type == nsIDataType::VTYPE_EMPTY_ARRAY ||
          type == nsIDataType::VTYPE_ID)) {
         JSContext *cx = lccx.GetJSContext();
         if (!JS_WrapValue(cx, &realVal))
-            return JS_FALSE;
+            return false;
         *pJSVal = realVal;
-        return JS_TRUE;
+        return true;
     }
 
     nsCOMPtr<XPCVariant> xpcvariant = do_QueryInterface(variant);
     if (xpcvariant && xpcvariant->mReturnRawObject) {
         NS_ASSERTION(type == nsIDataType::VTYPE_INTERFACE ||
                      type == nsIDataType::VTYPE_INTERFACE_IS,
                      "Weird variant");
 
         JSContext *cx = lccx.GetJSContext();
         if (!JS_WrapValue(cx, &realVal))
-            return JS_FALSE;
+            return false;
         *pJSVal = realVal;
-        return JS_TRUE;
+        return true;
     }
 
     // else, it's an object and we really need to double wrap it if we've
     // already decided that its 'natural' type is as some sort of interface.
 
     // We just fall through to the code below and let it do what it does.
 
     // The nsIVariant is not a XPCVariant (or we act like it isn't).
@@ -478,99 +478,99 @@ XPCVariant::VariantDataToJS(XPCLazyCallC
         case nsIDataType::VTYPE_UINT16:
         case nsIDataType::VTYPE_UINT32:
         case nsIDataType::VTYPE_UINT64:
         case nsIDataType::VTYPE_FLOAT:
         case nsIDataType::VTYPE_DOUBLE:
         {
             // Easy. Handle inline.
             if (NS_FAILED(variant->GetAsDouble(&xpctvar.val.d)))
-                return JS_FALSE;
+                return false;
             return JS_NewNumberValue(cx, xpctvar.val.d, pJSVal);
         }
         case nsIDataType::VTYPE_BOOL:
         {
             // Easy. Handle inline.
             if (NS_FAILED(variant->GetAsBool(&xpctvar.val.b)))
-                return JS_FALSE;
+                return false;
             *pJSVal = BOOLEAN_TO_JSVAL(xpctvar.val.b);
-            return JS_TRUE;
+            return true;
         }
         case nsIDataType::VTYPE_CHAR:
             if (NS_FAILED(variant->GetAsChar(&xpctvar.val.c)))
-                return JS_FALSE;
+                return false;
             xpctvar.type = (uint8)TD_CHAR;
             break;
         case nsIDataType::VTYPE_WCHAR:
             if (NS_FAILED(variant->GetAsWChar(&xpctvar.val.wc)))
-                return JS_FALSE;
+                return false;
             xpctvar.type = (uint8)TD_WCHAR;
             break;
         case nsIDataType::VTYPE_ID:
             if (NS_FAILED(variant->GetAsID(&iid)))
-                return JS_FALSE;
+                return false;
             xpctvar.type = (uint8)(TD_PNSIID | XPT_TDP_POINTER);
             xpctvar.val.p = &iid;
             break;
         case nsIDataType::VTYPE_ASTRING:
             if (NS_FAILED(variant->GetAsAString(astring)))
-                return JS_FALSE;
+                return false;
             xpctvar.type = (uint8)(TD_ASTRING | XPT_TDP_POINTER);
             xpctvar.val.p = &astring;
             break;
         case nsIDataType::VTYPE_DOMSTRING:
             if (NS_FAILED(variant->GetAsAString(astring)))
-                return JS_FALSE;
+                return false;
             xpctvar.type = (uint8)(TD_DOMSTRING | XPT_TDP_POINTER);
             xpctvar.val.p = &astring;
             break;
         case nsIDataType::VTYPE_CSTRING:
             if (NS_FAILED(variant->GetAsACString(cString)))
-                return JS_FALSE;
+                return false;
             xpctvar.type = (uint8)(TD_CSTRING | XPT_TDP_POINTER);
             xpctvar.val.p = &cString;
             break;
         case nsIDataType::VTYPE_UTF8STRING:
             if (NS_FAILED(variant->GetAsAUTF8String(utf8String)))
-                return JS_FALSE;
+                return false;
             xpctvar.type = (uint8)(TD_UTF8STRING | XPT_TDP_POINTER);
             xpctvar.val.p = &utf8String;
             break;
         case nsIDataType::VTYPE_CHAR_STR:
             if (NS_FAILED(variant->GetAsString((char**)&xpctvar.val.p)))
-                return JS_FALSE;
+                return false;
             xpctvar.type = (uint8)(TD_PSTRING | XPT_TDP_POINTER);
             xpctvar.SetValNeedsCleanup();
             break;
         case nsIDataType::VTYPE_STRING_SIZE_IS:
             if (NS_FAILED(variant->GetAsStringWithSize(&size,
                                                        (char**)&xpctvar.val.p)))
-                return JS_FALSE;
+                return false;
             xpctvar.type = (uint8)(TD_PSTRING_SIZE_IS | XPT_TDP_POINTER);
             xpctvar.SetValNeedsCleanup();
             break;
         case nsIDataType::VTYPE_WCHAR_STR:
             if (NS_FAILED(variant->GetAsWString((PRUnichar**)&xpctvar.val.p)))
-                return JS_FALSE;
+                return false;
             xpctvar.type = (uint8)(TD_PWSTRING | XPT_TDP_POINTER);
             xpctvar.SetValNeedsCleanup();
             break;
         case nsIDataType::VTYPE_WSTRING_SIZE_IS:
             if (NS_FAILED(variant->GetAsWStringWithSize(&size,
                                                         (PRUnichar**)&xpctvar.val.p)))
-                return JS_FALSE;
+                return false;
             xpctvar.type = (uint8)(TD_PWSTRING_SIZE_IS | XPT_TDP_POINTER);
             xpctvar.SetValNeedsCleanup();
             break;
         case nsIDataType::VTYPE_INTERFACE:
         case nsIDataType::VTYPE_INTERFACE_IS:
         {
             nsID* piid;
             if (NS_FAILED(variant->GetAsInterface(&piid, &xpctvar.val.p)))
-                return JS_FALSE;
+                return false;
 
             iid = *piid;
             nsMemory::Free((char*)piid);
 
             xpctvar.type = (uint8)(TD_INTERFACE_IS_TYPE | XPT_TDP_POINTER);
             if (xpctvar.val.p)
                 xpctvar.SetValNeedsCleanup();
             break;
@@ -581,21 +581,21 @@ XPCVariant::VariantDataToJS(XPCLazyCallC
             nsVariant::Initialize(&du);
             nsresult rv;
 
             rv = variant->GetAsArray(&du.u.array.mArrayType,
                                      &du.u.array.mArrayInterfaceID,
                                      &du.u.array.mArrayCount,
                                      &du.u.array.mArrayValue);
             if (NS_FAILED(rv))
-                return JS_FALSE;
+                return false;
 
             // must exit via VARIANT_DONE from here on...
             du.mType = nsIDataType::VTYPE_ARRAY;
-            success = JS_FALSE;
+            success = false;
 
             nsXPTType conversionType;
             PRUint16 elementType = du.u.array.mArrayType;
             const nsID* pid = nsnull;
 
             switch (elementType) {
                 case nsIDataType::VTYPE_INT8:
                 case nsIDataType::VTYPE_INT16:
@@ -654,29 +654,29 @@ XPCVariant::VariantDataToJS(XPCLazyCallC
 VARIANT_DONE:
             nsVariant::Cleanup(&du);
             return success;
         }
         case nsIDataType::VTYPE_EMPTY_ARRAY:
         {
             JSObject* array = JS_NewArrayObject(cx, 0, nsnull);
             if (!array)
-                return JS_FALSE;
+                return false;
             *pJSVal = OBJECT_TO_JSVAL(array);
-            return JS_TRUE;
+            return true;
         }
         case nsIDataType::VTYPE_VOID:
             *pJSVal = JSVAL_VOID;
-            return JS_TRUE;
+            return true;
         case nsIDataType::VTYPE_EMPTY:
             *pJSVal = JSVAL_NULL;
-            return JS_TRUE;
+            return true;
         default:
             NS_ERROR("bad type in variant!");
-            return JS_FALSE;
+            return false;
     }
 
     // If we are here then we need to convert the data in the xpctvar.
 
     if (xpctvar.type.TagPart() == TD_PSTRING_SIZE_IS ||
         xpctvar.type.TagPart() == TD_PWSTRING_SIZE_IS) {
         success = XPCConvert::NativeStringWithSize2JS(cx, pJSVal,
                                                       (const void*)&xpctvar.val,
--- a/js/xpconnect/src/XPCWrappedJS.cpp
+++ b/js/xpconnect/src/XPCWrappedJS.cpp
@@ -311,17 +311,17 @@ nsXPCWrappedJS::GetNewOrUsed(XPCCallCont
                              nsXPCWrappedJS** wrapperResult)
 {
     JSObject2WrappedJSMap* map;
     JSObject* rootJSObj;
     nsXPCWrappedJS* root = nsnull;
     nsXPCWrappedJS* wrapper = nsnull;
     nsXPCWrappedJSClass* clazz = nsnull;
     XPCJSRuntime* rt = ccx.GetRuntime();
-    JSBool release_root = JS_FALSE;
+    JSBool release_root = false;
 
     map = rt->GetWrappedJSMap();
     if (!map) {
         NS_ASSERTION(map,"bad map");
         return NS_ERROR_FAILURE;
     }
 
     nsXPCWrappedJSClass::GetNewOrUsed(ccx, aIID, &clazz);
@@ -384,17 +384,17 @@ nsXPCWrappedJS::GetNewOrUsed(XPCCallCont
                 goto return_wrapper;
 
             root = new nsXPCWrappedJS(ccx, rootJSObj, rootClazz, nsnull, aOuter);
             NS_RELEASE(rootClazz);
 
             if (!root)
                 goto return_wrapper;
 
-            release_root = JS_TRUE;
+            release_root = true;
 
             {   // scoped lock
 #if DEBUG_xpc_leaks
                 printf("Created nsXPCWrappedJS %p, JSObject is %p\n",
                        (void*)root, (void*)rootJSObj);
 #endif
                 XPCAutoLock lock(rt->GetMapLock());
                 map->Add(root);
--- a/js/xpconnect/src/XPCWrappedJSClass.cpp
+++ b/js/xpconnect/src/XPCWrappedJSClass.cpp
@@ -123,27 +123,27 @@ AutoScriptEvaluate::~AutoScriptEvaluate(
         JS_SetErrorReporter(mJSContext, NULL);
 }
 
 // It turns out that some errors may be not worth reporting. So, this
 // function is factored out to manage that.
 JSBool xpc_IsReportableErrorCode(nsresult code)
 {
     if (NS_SUCCEEDED(code))
-        return JS_FALSE;
+        return false;
 
     switch (code) {
         // Error codes that we don't want to report as errors...
         // These generally indicate bad interface design AFAIC.
         case NS_ERROR_FACTORY_REGISTER_AGAIN:
         case NS_BASE_STREAM_WOULD_BLOCK:
-            return JS_FALSE;
+            return false;
     }
 
-    return JS_TRUE;
+    return true;
 }
 
 // static
 nsresult
 nsXPCWrappedJSClass::GetNewOrUsed(XPCCallContext& ccx, REFNSIID aIID,
                                   nsXPCWrappedJSClass** resultClazz)
 {
     nsXPCWrappedJSClass* clazz = nsnull;
@@ -235,17 +235,17 @@ JSObject*
 nsXPCWrappedJSClass::CallQueryInterfaceOnJSObject(XPCCallContext& ccx,
                                                   JSObject* jsobj,
                                                   REFNSIID aIID)
 {
     JSContext* cx = ccx.GetJSContext();
     JSObject* id;
     jsval retval;
     JSObject* retObj;
-    JSBool success = JS_FALSE;
+    JSBool success = false;
     jsid funid;
     jsval fun;
 
     // Don't call the actual function on a content object. We'll determine
     // whether or not a content object is capable of implementing the
     // interface (i.e. whether the interface is scriptable) and most content
     // objects don't have QI implementations anyway. Also see bug 503926.
     if (XPCPerThreadData::IsMainThread(ccx) &&
@@ -363,17 +363,17 @@ GetNamedPropertyAsVariantRaw(XPCCallCont
 {
     nsXPTType type = nsXPTType((uint8)(TD_INTERFACE_TYPE | XPT_TDP_POINTER));
     jsval val;
 
     return JS_GetPropertyById(ccx, aJSObj, aName, &val) &&
            // Note that this always takes the T_INTERFACE path through
            // JSData2Native, so the value passed for useAllocator
            // doesn't really matter. We pass true for consistency.
-           XPCConvert::JSData2Native(ccx, aResult, val, type, JS_TRUE,
+           XPCConvert::JSData2Native(ccx, aResult, val, type, true,
                                      &NS_GET_IID(nsIVariant), pErr);
 }
 
 // static
 nsresult
 nsXPCWrappedJSClass::GetNamedPropertyAsVariant(XPCCallContext& ccx,
                                                JSObject* aJSObj,
                                                jsval aName,
@@ -873,77 +873,77 @@ nsXPCWrappedJSClass::GetArraySizeFromPar
                                            nsXPTCMiniVariant* nativeParams,
                                            JSUint32* result)
 {
     uint8 argnum;
     nsresult rv;
 
     rv = mInfo->GetSizeIsArgNumberForParam(methodIndex, &param, 0, &argnum);
     if (NS_FAILED(rv))
-        return JS_FALSE;
+        return false;
 
     const nsXPTParamInfo& arg_param = method->params[argnum];
     const nsXPTType& arg_type = arg_param.GetType();
 
     // This should be enforced by the xpidl compiler, but it's not.
     // See bug 695235.
     NS_ABORT_IF_FALSE(arg_type.TagPart() == nsXPTType::T_U32,
                       "size_is references parameter of invalid type.");
 
     if (arg_param.IsIndirect())
         *result = *(JSUint32*)nativeParams[argnum].val.p;
     else
         *result = nativeParams[argnum].val.u32;
 
-    return JS_TRUE;
+    return true;
 }
 
 JSBool
 nsXPCWrappedJSClass::GetInterfaceTypeFromParam(JSContext* cx,
                                                const XPTMethodDescriptor* method,
                                                const nsXPTParamInfo& param,
                                                uint16 methodIndex,
                                                const nsXPTType& type,
                                                nsXPTCMiniVariant* nativeParams,
                                                nsID* result)
 {
     uint8 type_tag = type.TagPart();
 
     if (type_tag == nsXPTType::T_INTERFACE) {
         if (NS_SUCCEEDED(GetInterfaceInfo()->
                          GetIIDForParamNoAlloc(methodIndex, &param, result))) {
-            return JS_TRUE;
+            return true;
         }
     } else if (type_tag == nsXPTType::T_INTERFACE_IS) {
         uint8 argnum;
         nsresult rv;
         rv = mInfo->GetInterfaceIsArgNumberForParam(methodIndex,
                                                     &param, &argnum);
         if (NS_FAILED(rv))
-            return JS_FALSE;
+            return false;
 
         const nsXPTParamInfo& arg_param = method->params[argnum];
         const nsXPTType& arg_type = arg_param.GetType();
 
         if (arg_type.TagPart() == nsXPTType::T_IID) {
             if (arg_param.IsIndirect()) {
                 nsID** p = (nsID**) nativeParams[argnum].val.p;
                 if (!p || !*p)
-                    return JS_FALSE;
+                    return false;
                 *result = **p;
             } else {
                 nsID* p = (nsID*) nativeParams[argnum].val.p;
                 if (!p)
-                    return JS_FALSE;
+                    return false;
                 *result = *p;
             }
-            return JS_TRUE;
+            return true;
         }
     }
-    return JS_FALSE;
+    return false;
 }
 
 void
 nsXPCWrappedJSClass::CleanupPointerArray(const nsXPTType& datum_type,
                                          JSUint32 array_count,
                                          void** arrayp)
 {
     if (datum_type.IsInterfacePointer()) {
@@ -1185,17 +1185,17 @@ nsXPCWrappedJSClass::CallMethod(nsXPCWra
     jsval* sp = nsnull;
     jsval* argv = nsnull;
     uint8 i;
     uint8 argc=0;
     uint8 paramCount=0;
     nsresult retval = NS_ERROR_FAILURE;
     nsresult pending_result = NS_OK;
     JSBool success;
-    JSBool readyToDoTheCall = JS_FALSE;
+    JSBool readyToDoTheCall = false;
     nsID  param_iid;
     JSObject* obj;
     const char* name = info->name;
     jsval fval;
     JSBool foundDependentParam;
     XPCContext* xpcc;
     JSContext* cx;
     JSObject* thisObj;
@@ -1378,17 +1378,17 @@ nsXPCWrappedJSClass::CallMethod(nsXPCWra
         const nsXPTParamInfo& param = info->params[i];
         const nsXPTType& type = param.GetType();
         nsXPTType datum_type;
         JSUint32 array_count;
         bool isArray = type.IsArray();
         jsval val = JSVAL_NULL;
         AUTO_MARK_JSVAL(ccx, &val);
         bool isSizedString = isArray ?
-                JS_FALSE :
+                false :
                 type.TagPart() == nsXPTType::T_PSTRING_SIZE_IS ||
                 type.TagPart() == nsXPTType::T_PWSTRING_SIZE_IS;
 
 
         // verify that null was not passed for 'out' param
         if (param.IsOut() && !nativeParams[i].val.p) {
             retval = NS_ERROR_INVALID_ARG;
             goto pre_call_clean_up;
@@ -1456,17 +1456,17 @@ nsXPCWrappedJSClass::CallMethod(nsXPCWra
                     goto pre_call_clean_up;
                 }
             }
             *sp++ = OBJECT_TO_JSVAL(out_obj);
         } else
             *sp++ = val;
     }
 
-    readyToDoTheCall = JS_TRUE;
+    readyToDoTheCall = true;
 
 pre_call_clean_up:
     // clean up any 'out' params handed in
     for (i = 0; i < paramCount; i++) {
         const nsXPTParamInfo& param = info->params[i];
         if (!param.IsOut())
             continue;
 
@@ -1545,17 +1545,17 @@ pre_call_clean_up:
 
             nsCOMPtr<nsIException> e;
 
             XPCConvert::ConstructException(code, sz, GetInterfaceName(), name,
                                            nsnull, getter_AddRefs(e), nsnull, nsnull);
             xpcc->SetException(e);
             if (sz)
                 JS_smprintf_free(sz);
-            success = JS_FALSE;
+            success = false;
         }
     }
 
     if (!success) {
         bool forceReport;
         if (NS_FAILED(mInfo->IsFunction(&forceReport)))
             forceReport = false;
 
@@ -1569,26 +1569,26 @@ pre_call_clean_up:
 
     // convert out args and result
     // NOTE: this is the total number of native params, not just the args
     // Convert independent params only.
     // When we later convert the dependent params (if any) we will know that
     // the params upon which they depend will have already been converted -
     // regardless of ordering.
 
-    foundDependentParam = JS_FALSE;
+    foundDependentParam = false;
     for (i = 0; i < paramCount; i++) {
         const nsXPTParamInfo& param = info->params[i];
         NS_ABORT_IF_FALSE(!param.IsShared(), "[shared] implies [noscript]!");
         if (!param.IsOut() && !param.IsDipper())
             continue;
 
         const nsXPTType& type = param.GetType();
         if (type.IsDependent()) {
-            foundDependentParam = JS_TRUE;
+            foundDependentParam = true;
             continue;
         }
 
         jsval val;
         uint8 type_tag = type.TagPart();
         nsXPTCMiniVariant* pv;
 
         if (param.IsDipper())
@@ -1630,17 +1630,17 @@ pre_call_clean_up:
                 continue;
 
             jsval val;
             nsXPTCMiniVariant* pv;
             nsXPTType datum_type;
             JSUint32 array_count;
             bool isArray = type.IsArray();
             bool isSizedString = isArray ?
-                    JS_FALSE :
+                    false :
                     type.TagPart() == nsXPTType::T_PSTRING_SIZE_IS ||
                     type.TagPart() == nsXPTType::T_PWSTRING_SIZE_IS;
 
             pv = (nsXPTCMiniVariant*) nativeParams[i].val.p;
 
             if (param.IsRetval())
                 val = rval;
             else if (!JS_GetPropertyById(cx, JSVAL_TO_OBJECT(argv[i]),
@@ -1679,17 +1679,17 @@ pre_call_clean_up:
             } else if (isSizedString) {
                 if (!XPCConvert::JSStringWithSize2Native(ccx,
                                                          (void*)&pv->val, val,
                                                          array_count, datum_type,
                                                          nsnull))
                     break;
             } else {
                 if (!XPCConvert::JSData2Native(ccx, &pv->val, val, type,
-                                               JS_TRUE, &param_iid,
+                                               true, &param_iid,
                                                nsnull))
                     break;
             }
         }
     }
 
     if (i != paramCount) {
         // We didn't manage all the result conversions!
--- a/js/xpconnect/src/XPCWrappedNative.cpp
+++ b/js/xpconnect/src/XPCWrappedNative.cpp
@@ -371,17 +371,17 @@ XPCWrappedNative::GetNewOrUsed(XPCCallCo
             XPCAutoLock lock(mapLock);
             wrapper = map->Find(identity);
             if (wrapper)
                 wrapper->AddRef();
         }
 
         if (wrapper) {
             if (Interface &&
-                !wrapper->FindTearOff(ccx, Interface, JS_FALSE, &rv)) {
+                !wrapper->FindTearOff(ccx, Interface, false, &rv)) {
                 NS_RELEASE(wrapper);
                 NS_ASSERTION(NS_FAILED(rv), "returning NS_OK on failure");
                 return rv;
             }
             DEBUG_CheckWrapperThreadSafety(wrapper);
             *resultWrapper = wrapper;
             return NS_OK;
         }
@@ -426,30 +426,30 @@ XPCWrappedNative::GetNewOrUsed(XPCCallCo
         isClassInfo ? sci :
         GatherScriptableCreateInfo(identity, info, sciProto, sci);
 
     JSObject* parent = Scope->GetGlobalJSObject();
 
     jsval newParentVal = JSVAL_NULL;
     XPCMarkableJSVal newParentVal_markable(&newParentVal);
     AutoMarkingJSVal newParentVal_automarker(ccx, &newParentVal_markable);
-    JSBool needsSOW = JS_FALSE;
-    JSBool needsCOW = JS_FALSE;
+    JSBool needsSOW = false;
+    JSBool needsCOW = false;
 
     JSAutoEnterCompartment ac;
 
     if (sciWrapper.GetFlags().WantPreCreate()) {
         JSObject* plannedParent = parent;
         nsresult rv = sciWrapper.GetCallback()->PreCreate(identity, ccx,
                                                           parent, &parent);
         if (NS_FAILED(rv))
             return rv;
 
         if (rv == NS_SUCCESS_CHROME_ACCESS_ONLY)
-            needsSOW = JS_TRUE;
+            needsSOW = true;
         rv = NS_OK;
 
         NS_ASSERTION(!xpc::WrapperFactory::IsXrayWrapper(parent),
                      "Xray wrapper being used to parent XPCWrappedNative?");
 
         if (!ac.enter(ccx, parent))
             return NS_ERROR_FAILURE;
 
@@ -488,17 +488,17 @@ XPCWrappedNative::GetNewOrUsed(XPCCallCo
         {   // scoped lock
             XPCAutoLock lock(mapLock);
             wrapper = map->Find(identity);
             if (wrapper)
                 wrapper->AddRef();
         }
 
         if (wrapper) {
-            if (Interface && !wrapper->FindTearOff(ccx, Interface, JS_FALSE, &rv)) {
+            if (Interface && !wrapper->FindTearOff(ccx, Interface, false, &rv)) {
                 NS_RELEASE(wrapper);
                 NS_ASSERTION(NS_FAILED(rv), "returning NS_OK on failure");
                 return rv;
             }
             DEBUG_CheckWrapperThreadSafety(wrapper);
             *resultWrapper = wrapper;
             return NS_OK;
         }
@@ -508,32 +508,32 @@ XPCWrappedNative::GetNewOrUsed(XPCCallCo
 
         nsISupports *Object = helper.Object();
         if (nsXPCWrappedJSClass::IsWrappedJS(Object)) {
             nsCOMPtr<nsIXPConnectWrappedJS> wrappedjs(do_QueryInterface(Object));
             JSObject *obj;
             wrappedjs->GetJSObject(&obj);
             if (xpc::AccessCheck::isChrome(js::GetObjectCompartment(obj)) &&
                 !xpc::AccessCheck::isChrome(js::GetObjectCompartment(Scope->GetGlobalJSObject()))) {
-                needsCOW = JS_TRUE;
+                needsCOW = true;
             }
         }
     }
 
     AutoMarkingWrappedNativeProtoPtr proto(ccx);
 
     // If there is ClassInfo (and we are not building a wrapper for the
     // nsIClassInfo interface) then we use a wrapper that needs a prototype.
 
     // Note that the security check happens inside FindTearOff - after the
     // wrapper is actually created, but before JS code can see it.
 
     if (info && !isClassInfo) {
         proto = XPCWrappedNativeProto::GetNewOrUsed(ccx, Scope, info, &sciProto,
-                                                    JS_FALSE, isGlobal);
+                                                    false, isGlobal);
         if (!proto)
             return NS_ERROR_FAILURE;
 
         proto->CacheOffsets(identity);
 
         wrapper = new XPCWrappedNative(identity, proto);
         if (!wrapper)
             return NS_ERROR_FAILURE;
@@ -564,17 +564,17 @@ XPCWrappedNative::GetNewOrUsed(XPCCallCo
     NS_ASSERTION(!xpc::WrapperFactory::IsXrayWrapper(parent),
                  "Xray wrapper being used to parent XPCWrappedNative?");
 
     if (!wrapper->Init(ccx, parent, isGlobal, &sciWrapper)) {
         NS_RELEASE(wrapper);
         return NS_ERROR_FAILURE;
     }
 
-    if (Interface && !wrapper->FindTearOff(ccx, Interface, JS_FALSE, &rv)) {
+    if (Interface && !wrapper->FindTearOff(ccx, Interface, false, &rv)) {
         // Second reference will be released by the FlatJSObject's finalizer.
         wrapper->Release();
         NS_ASSERTION(NS_FAILED(rv), "returning NS_OK on failure");
         return rv;
     }
 
     if (needsSOW)
         wrapper->SetNeedsSOW();
@@ -734,17 +734,17 @@ XPCWrappedNative::Morph(XPCCallContext& 
 
     JSAutoEnterCompartment ac;
     if (!ac.enter(ccx, existingJSObject) || !wrapper->Init(ccx, existingJSObject)) {
         NS_RELEASE(wrapper);
         return NS_ERROR_FAILURE;
     }
 
     nsresult rv;
-    if (Interface && !wrapper->FindTearOff(ccx, Interface, JS_FALSE, &rv)) {
+    if (Interface && !wrapper->FindTearOff(ccx, Interface, false, &rv)) {
         // Second reference will be released by the FlatJSObject's finalizer.
         wrapper->Release();
         NS_ASSERTION(NS_FAILED(rv), "returning NS_OK on failure");
         return rv;
     }
 
     return FinishCreate(ccx, wrapper->GetScope(), Interface, cache, wrapper,
                         resultWrapper);
@@ -794,17 +794,17 @@ XPCWrappedNative::GetUsedOnly(XPCCallCon
                 *resultWrapper = nsnull;
                 return NS_OK;
             }
             NS_ADDREF(wrapper);
         }
     }
 
     nsresult rv;
-    if (Interface && !wrapper->FindTearOff(ccx, Interface, JS_FALSE, &rv)) {
+    if (Interface && !wrapper->FindTearOff(ccx, Interface, false, &rv)) {
         NS_RELEASE(wrapper);
         NS_ASSERTION(NS_FAILED(rv), "returning NS_OK on failure");
         return rv;
     }
 
     *resultWrapper = wrapper;
     return NS_OK;
 }
@@ -1095,17 +1095,17 @@ XPCWrappedNative::Init(XPCCallContext& c
             if (siProto && siProto->GetCallback() == sci->GetCallback())
                 mScriptableInfo = siProto;
         }
         if (!mScriptableInfo) {
             mScriptableInfo =
                 XPCNativeScriptableInfo::Construct(ccx, isGlobal, sci);
 
             if (!mScriptableInfo)
-                return JS_FALSE;
+                return false;
 
             // If we have a one-off proto, then it should share our scriptable.
             // This allows the proto's JSClass callbacks to do the right things
             // (like respecting the DONT_ENUM_STATIC_PROPS flag) w/o requiring
             // scriptable objects to have an nsIClassInfo.
             if (HasProto() && !HasSharedProto())
                 GetProto()->SetScriptableInfo(mScriptableInfo);
         }
@@ -1138,50 +1138,50 @@ XPCWrappedNative::Init(XPCCallContext& c
                  jsclazz->convert &&
                  jsclazz->finalize, "bad class");
 
     JSObject* protoJSObject = HasProto() ?
                                 GetProto()->GetJSProtoObject() :
                                 GetScope()->GetPrototypeNoHelper(ccx);
 
     if (!protoJSObject) {
-        return JS_FALSE;
+        return false;
     }
 
     mFlatJSObject = xpc_NewSystemInheritingJSObject(ccx, jsclazz, protoJSObject, false, parent);
     if (!mFlatJSObject)
-        return JS_FALSE;
+        return false;
 
     // In the current JS engine JS_SetPrivate can't fail. But if it *did*
     // fail then we would not receive our finalizer call and would not be
     // able to properly cleanup. So, if it fails we null out mFlatJSObject
     // to indicate the invalid state of this object and return false.
     if (!JS_SetPrivate(ccx, mFlatJSObject, this)) {
         mFlatJSObject = nsnull;
-        return JS_FALSE;
+        return false;
     }
 
     return FinishInit(ccx);
 }
 
 JSBool
 XPCWrappedNative::Init(XPCCallContext &ccx, JSObject *existingJSObject)
 {
     // In the current JS engine JS_SetPrivate can't fail. But if it *did*
     // fail then we would not receive our finalizer call and would not be
     // able to properly cleanup. So, if it fails we null out mFlatJSObject
     // to indicate the invalid state of this object and return false.
     if (!JS_SetPrivate(ccx, existingJSObject, this)) {
         mFlatJSObject = nsnull;
-        return JS_FALSE;
+        return false;
     }
 
     // Morph the existing object.
     if (!JS_SetReservedSlot(ccx, existingJSObject, 0, JSVAL_VOID))
-        return JS_FALSE;
+        return false;
 
     mScriptableInfo = GetProto()->GetScriptableInfo();
     mFlatJSObject = existingJSObject;
 
     SLIM_LOG(("----- %i morphed slim wrapper (mFlatJSObject: %p, %p)\n",
               ++sMorphedSlimWrappers, mFlatJSObject,
               static_cast<nsISupports*>(xpc_GetJSPrivate(mFlatJSObject))));
 
@@ -1195,33 +1195,33 @@ XPCWrappedNative::FinishInit(XPCCallCont
     // Since this reference will push the refcount to 2 it will also root
     // mFlatJSObject;
     NS_ASSERTION(1 == mRefCnt, "unexpected refcount value");
     NS_ADDREF(this);
 
     if (mScriptableInfo && mScriptableInfo->GetFlags().WantCreate() &&
         NS_FAILED(mScriptableInfo->GetCallback()->Create(this, ccx,
                                                          mFlatJSObject))) {
-        return JS_FALSE;
+        return false;
     }
 
 #ifdef XPC_CHECK_WRAPPER_THREADSAFETY
     NS_ASSERTION(mThread, "Should have been set at construction time!");
 
     if (HasProto() && GetProto()->ClassIsMainThreadOnly() && !NS_IsMainThread()) {
         DEBUG_ReportWrapperThreadSafetyError(ccx,
                                              "MainThread only wrapper created on the wrong thread", this);
-        return JS_FALSE;
+        return false;
     }
 #endif
 
     // A hack for bug 517665, increase the probability for GC.
     JS_updateMallocCounter(ccx.GetJSContext(), 2 * sizeof(XPCWrappedNative));
 
-    return JS_TRUE;
+    return true;
 }
 
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(XPCWrappedNative)
   NS_INTERFACE_MAP_ENTRY(nsIXPConnectWrappedNative)
   NS_INTERFACE_MAP_ENTRY(nsIXPConnectJSObjectHolder)
   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIXPConnectWrappedNative)
 NS_INTERFACE_MAP_END_THREADSAFE
@@ -1755,23 +1755,23 @@ XPCWrappedNative::ExtendSet(XPCCallConte
 {
     // This is only called while locked (during XPCWrappedNative::FindTearOff).
 
     if (!mSet->HasInterface(aInterface)) {
         AutoMarkingNativeSetPtr newSet(ccx);
         newSet = XPCNativeSet::GetNewOrUsed(ccx, mSet, aInterface,
                                             mSet->GetInterfaceCount());
         if (!newSet)
-            return JS_FALSE;
+            return false;
 
         mSet = newSet;
 
         DEBUG_ReportShadowedMembers(newSet, this, GetProto());
     }
-    return JS_TRUE;
+    return true;
 }
 
 XPCWrappedNativeTearOff*
 XPCWrappedNative::LocateTearOff(XPCCallContext& ccx,
                                 XPCNativeInterface* aInterface)
 {
     XPCAutoLock al(GetLock()); // hold the lock throughout
 
@@ -1790,17 +1790,17 @@ XPCWrappedNative::LocateTearOff(XPCCallC
         }
     }
     return nsnull;
 }
 
 XPCWrappedNativeTearOff*
 XPCWrappedNative::FindTearOff(XPCCallContext& ccx,
                               XPCNativeInterface* aInterface,
-                              JSBool needJSObject /* = JS_FALSE */,
+                              JSBool needJSObject /* = false */,
                               nsresult* pError /* = nsnull */)
 {
     XPCAutoLock al(GetLock()); // hold the lock throughout
 
     nsresult rv = NS_OK;
     XPCWrappedNativeTearOff* to;
     XPCWrappedNativeTearOff* firstAvailable = nsnull;
 
@@ -2049,28 +2049,28 @@ XPCWrappedNative::InitTearOffJSObject(XP
     // This is only called while locked (during XPCWrappedNative::FindTearOff).
 
     JSObject* obj =
         xpc_NewSystemInheritingJSObject(ccx, Jsvalify(&XPC_WN_Tearoff_JSClass),
                                         GetScope()->GetPrototypeJSObject(),
                                         false, mFlatJSObject);
 
     if (!obj || !JS_SetPrivate(ccx, obj, to))
-        return JS_FALSE;
+        return false;
 
     to->SetJSObject(obj);
-    return JS_TRUE;
+    return true;
 }
 
 /***************************************************************************/
 
 static JSBool Throw(uintN errNum, XPCCallContext& ccx)
 {
     XPCThrower::Throw(errNum, ccx);
-    return JS_FALSE;
+    return false;
 }
 
 /***************************************************************************/
 
 class CallMethodHelper
 {
     XPCCallContext& mCallContext;
     nsIInterfaceInfo* const mIFaceInfo;
@@ -2193,29 +2193,29 @@ XPCWrappedNative::CallMethod(XPCCallCont
             secAction = nsIXPCSecurityManager::ACCESS_GET_PROPERTY;
             break;
         case CALL_SETTER:
             secFlag   = nsIXPCSecurityManager::HOOK_SET_PROPERTY;
             secAction = nsIXPCSecurityManager::ACCESS_SET_PROPERTY;
             break;
         default:
             NS_ERROR("bad value");
-            return JS_FALSE;
+            return false;
     }
 
     nsIXPCSecurityManager* sm =
         xpcc->GetAppropriateSecurityManager(secFlag);
     if (sm && NS_FAILED(sm->CanAccess(secAction, &ccx, ccx,
                                       ccx.GetFlattenedJSObject(),
                                       ccx.GetWrapper()->GetIdentityObject(),
                                       ccx.GetWrapper()->GetClassInfo(),
                                       ccx.GetMember()->GetName(),
                                       ccx.GetWrapper()->GetSecurityInfoAddr()))) {
         // the security manager vetoed. It should have set an exception.
-        return JS_FALSE;
+        return false;
     }
 
     return CallMethodHelper(ccx).Call();
 }
 
 JSBool
 CallMethodHelper::Call()
 {
@@ -2225,44 +2225,44 @@ CallMethodHelper::Call()
     mCallContext.GetXPCContext()->SetLastResult(NS_ERROR_UNEXPECTED);
 
     if (mVTableIndex == 0) {
         return QueryInterfaceFastPath();
     }
 
     if (!mMethodInfo) {
         Throw(NS_ERROR_XPC_CANT_GET_METHOD_INFO, mCallContext);
-        return JS_FALSE;
+        return false;
     }
 
     if (!InitializeDispatchParams())
-        return JS_FALSE;
+        return false;
 
     // Iterate through the params doing conversions of independent params only.
     // When we later convert the dependent params (if any) we will know that
     // the params upon which they depend will have already been converted -
     // regardless of ordering.
-    JSBool foundDependentParam = JS_FALSE;
+    JSBool foundDependentParam = false;
     if (!ConvertIndependentParams(&foundDependentParam))
-        return JS_FALSE;
+        return false;
 
     if (foundDependentParam && !ConvertDependentParams())
-        return JS_FALSE;
+        return false;
 
     nsresult invokeResult = Invoke();
 
     mCallContext.GetXPCContext()->SetLastResult(invokeResult);
 
     if (NS_FAILED(invokeResult)) {
         ThrowBadResult(invokeResult, mCallContext);
-        return JS_FALSE;
+        return false;
     }
 
     if (JS_IsExceptionPending(mCallContext)) {
-        return JS_FALSE;
+        return false;
     }
 
     return GatherAndConvertResults();
 }
 
 CallMethodHelper::~CallMethodHelper()
 {
     uint8 paramCount = mMethodInfo->GetParamCount();
@@ -2324,17 +2324,17 @@ CallMethodHelper::GetArraySizeFromParam(
     rv = mIFaceInfo->GetSizeIsArgNumberForParam(mVTableIndex, &paramInfo, 0, &paramIndex);
     if (NS_FAILED(rv))
         return Throw(NS_ERROR_XPC_CANT_GET_ARRAY_INFO, mCallContext);
 
     const nsXPTType& type = mMethodInfo->GetParam(paramIndex).GetType();
 
     *result = GetDispatchParam(paramIndex)->val.u32;
 
-    return JS_TRUE;
+    return true;
 }
 
 JSBool
 CallMethodHelper::GetInterfaceTypeFromParam(uint8 paramIndex,
                                             const nsXPTType& datum_type,
                                             nsID* result) const
 {
     nsresult rv;
@@ -2357,17 +2357,17 @@ CallMethodHelper::GetInterfaceTypeFromPa
         const nsXPTType& type = mMethodInfo->GetParam(paramIndex).GetType();
 
         nsID* p = (nsID*) GetDispatchParam(paramIndex)->val.p;
         if (!p)
             return ThrowBadParam(NS_ERROR_XPC_CANT_GET_PARAM_IFACE_INFO,
                                  paramIndex, mCallContext);
         *result = *p;
     }
-    return JS_TRUE;
+    return true;
 }
 
 JSBool
 CallMethodHelper::GetOutParamSource(uint8 paramIndex, jsval* srcp) const
 {
     const nsXPTParamInfo& paramInfo = mMethodInfo->GetParam(paramIndex);
 
     if ((paramInfo.IsOut() || paramInfo.IsDipper()) &&
@@ -2381,21 +2381,21 @@ CallMethodHelper::GetOutParamSource(uint
                                  JSVAL_TO_OBJECT(arg),
                                  mIdxValueId,
                                  srcp))) {
             // Explicitly passed in unusable value for out param.  Note
             // that if i >= mArgc we already know that |arg| is JSVAL_NULL,
             // and that's ok.
             ThrowBadParam(NS_ERROR_XPC_NEED_OUT_OBJECT, paramIndex,
                           mCallContext);
-            return JS_FALSE;
+            return false;
         }
     }
 
-    return JS_TRUE;
+    return true;
 }
 
 JSBool
 CallMethodHelper::GatherAndConvertResults()
 {
     // now we iterate through the native params to gather and convert results
     uint8 paramCount = mMethodInfo->GetParamCount();
     for (uint8 i = 0; i < paramCount; i++) {
@@ -2406,63 +2406,63 @@ CallMethodHelper::GatherAndConvertResult
         const nsXPTType& type = paramInfo.GetType();
         nsXPTCVariant* dp = GetDispatchParam(i);
         jsval v = JSVAL_NULL;
         AUTO_MARK_JSVAL(mCallContext, &v);
         JSUint32 array_count = 0;
         nsXPTType datum_type;
         bool isArray = type.IsArray();
         bool isSizedString = isArray ?
-                JS_FALSE :
+                false :
                 type.TagPart() == nsXPTType::T_PSTRING_SIZE_IS ||
                 type.TagPart() == nsXPTType::T_PWSTRING_SIZE_IS;
 
         if (isArray) {
             if (NS_FAILED(mIFaceInfo->GetTypeForParam(mVTableIndex, &paramInfo, 1,
                                                       &datum_type))) {
                 Throw(NS_ERROR_XPC_CANT_GET_ARRAY_INFO, mCallContext);
-                return JS_FALSE;
+                return false;
             }
         } else
             datum_type = type;
 
         if (isArray || isSizedString) {
             if (!GetArraySizeFromParam(i, &array_count))
-                return JS_FALSE;
+                return false;
         }
 
         nsID param_iid;
         if (datum_type.IsInterfacePointer() &&
             !GetInterfaceTypeFromParam(i, datum_type, &param_iid))
-            return JS_FALSE;
+            return false;
 
         uintN err;
 
         if (isArray) {
             XPCLazyCallContext lccx(mCallContext);
             if (!XPCConvert::NativeArray2JS(lccx, &v, (const void**)&dp->val,
                                             datum_type, &param_iid,
                                             array_count, &err)) {
                 // XXX need exception scheme for arrays to indicate bad element
                 ThrowBadParam(err, i, mCallContext);
-                return JS_FALSE;
+                return false;
             }
         } else if (isSizedString) {
             if (!XPCConvert::NativeStringWithSize2JS(mCallContext, &v,
                                                      (const void*)&dp->val,
                                                      datum_type,
                                                      array_count, &err)) {
                 ThrowBadParam(err, i, mCallContext);
-                return JS_FALSE;
+                return false;
             }
         } else {
             if (!XPCConvert::NativeData2JS(mCallContext, &v, &dp->val, datum_type,
                                            &param_iid, &err)) {
                 ThrowBadParam(err, i, mCallContext);
-                return JS_FALSE;
+                return false;
             }
         }
 
         if (paramInfo.IsRetval()) {
             if (!mCallContext.GetReturnValueWasSet()) {
                 mCallContext.SetRetVal(v);
             } else {
                 // really, this should assert TagPart() == nsXPTType::T_VOID
@@ -2471,77 +2471,77 @@ CallMethodHelper::GatherAndConvertResult
             }
         } else if (i < mArgc) {
             // we actually assured this before doing the invoke
             NS_ASSERTION(JSVAL_IS_OBJECT(mArgv[i]), "out var is not object");
             if (!JS_SetPropertyById(mCallContext,
                                     JSVAL_TO_OBJECT(mArgv[i]),
                                     mIdxValueId, &v)) {
                 ThrowBadParam(NS_ERROR_XPC_CANT_SET_OUT_VAL, i, mCallContext);
-                return JS_FALSE;
+                return false;
             }
         } else {
             NS_ASSERTION(paramInfo.IsOptional(),
                          "Expected either enough arguments or an optional argument");
         }
     }
 
-    return JS_TRUE;
+    return true;
 }
 
 JSBool
 CallMethodHelper::QueryInterfaceFastPath() const
 {
     NS_ASSERTION(mVTableIndex == 0,
                  "Using the QI fast-path for a method other than QueryInterface");
 
     if (mArgc < 1) {
         Throw(NS_ERROR_XPC_NOT_ENOUGH_ARGS, mCallContext);
-        return JS_FALSE;
+        return false;
     }
     const nsID* iid;
     JSObject* obj;
     if (!JSVAL_IS_OBJECT(mArgv[0]) ||
         (!(obj = JSVAL_TO_OBJECT(mArgv[0]))) ||
         (!(iid = xpc_JSObjectToID(mCallContext, obj)))) {
         ThrowBadParam(NS_ERROR_XPC_BAD_CONVERT_JS, 0, mCallContext);
-        return JS_FALSE;
+        return false;
     }
 
     nsresult invokeResult;
     nsISupports* qiresult = nsnull;
     if (XPCPerThreadData::IsMainThread(mCallContext)) {
         invokeResult = mCallee->QueryInterface(*iid, (void**) &qiresult);
     } else {
         JSAutoSuspendRequest suspended(mCallContext);
         invokeResult = mCallee->QueryInterface(*iid, (void**) &qiresult);
     }
 
     mCallContext.GetXPCContext()->SetLastResult(invokeResult);
 
     if (NS_FAILED(invokeResult)) {
         ThrowBadResult(invokeResult, mCallContext);
-        return JS_FALSE;
+        return false;
     }
 
     jsval v = JSVAL_NULL;
     uintN err;
     JSBool success =
         XPCConvert::NativeData2JS(mCallContext, &v, &qiresult,
                                   nsXPTType::T_INTERFACE_IS | XPT_TDP_POINTER,
                                   iid, &err);
     NS_IF_RELEASE(qiresult);
 
     if (!success) {
         ThrowBadParam(err, 0, mCallContext);
-        return JS_FALSE;
+        return false;
     }
 
     mCallContext.SetRetVal(v);
-    return JS_TRUE;
+    return true;
 }
 
 JSBool
 CallMethodHelper::InitializeDispatchParams()
 {
     const uint8 wantsOptArgc = mMethodInfo->WantsOptArgc() ? 1 : 0;
     const uint8 wantsJSContext = mMethodInfo->WantsContext() ? 1 : 0;
     const uint8 paramCount = mMethodInfo->GetParamCount();
@@ -2559,17 +2559,17 @@ CallMethodHelper::InitializeDispatchPara
             mOptArgcIndex = requiredArgs;
 
         // skip over any optional arguments
         while (requiredArgs && mMethodInfo->GetParam(requiredArgs-1).IsOptional())
             requiredArgs--;
 
         if (mArgc < requiredArgs) {
             Throw(NS_ERROR_XPC_NOT_ENOUGH_ARGS, mCallContext);
-            return JS_FALSE;
+            return false;
         }
     }
 
     if (wantsJSContext) {
         if (wantsOptArgc)
             // Need to bump mOptArgcIndex up one here.
             mJSContextIndex = mOptArgcIndex++;
         else if (mMethodInfo->IsSetter() || mMethodInfo->IsGetter())
@@ -2595,34 +2595,34 @@ CallMethodHelper::InitializeDispatchPara
 
     // Fill in the optional_argc argument
     if (wantsOptArgc) {
         nsXPTCVariant* dp = &mDispatchParams[mOptArgcIndex];
         dp->type = nsXPTType::T_U8;
         dp->val.u8 = NS_MIN<PRUint32>(mArgc, paramCount) - requiredArgs;
     }
 
-    return JS_TRUE;
+    return true;
 }
 
 JSBool
 CallMethodHelper::ConvertIndependentParams(JSBool* foundDependentParam)
 {
     const uint8 paramCount = mMethodInfo->GetParamCount();
     for (uint8 i = 0; i < paramCount; i++) {
         const nsXPTParamInfo& paramInfo = mMethodInfo->GetParam(i);
 
         if (paramInfo.GetType().IsDependent())
-            *foundDependentParam = JS_TRUE;
+            *foundDependentParam = true;
         else if (!ConvertIndependentParam(i))
-            return JS_FALSE;
+            return false;
 
     }
 
-    return JS_TRUE;
+    return true;
 }
 
 JSBool
 CallMethodHelper::ConvertIndependentParam(uint8 i)
 {
     const nsXPTParamInfo& paramInfo = mMethodInfo->GetParam(i);
     const nsXPTType& type = paramInfo.GetType();
     uint8 type_tag = type.TagPart();
@@ -2639,36 +2639,36 @@ CallMethodHelper::ConvertIndependentPara
         dp->SetIndirect();
 
     // The JSVal proper is always stored within the 'val' union and passed
     // indirectly, regardless of in/out-ness.
     if (type_tag == nsXPTType::T_JSVAL) {
         // Root the value.
         dp->val.j = JSVAL_VOID;
         if (!JS_AddValueRoot(mCallContext, &dp->val.j))
-            return JS_FALSE;
+            return false;
     }
 
     // Flag cleanup for anything that isn't self-contained.
     if (!type.IsArithmetic())
         dp->SetValNeedsCleanup();
 
     // Even if there's nothing to convert, we still need to examine the
     // JSObject container for out-params. If it's null or otherwise invalid,
     // we want to know before the call, rather than after.
     //
     // This is a no-op for 'in' params.
     jsval src;
     if (!GetOutParamSource(i, &src))
-        return JS_FALSE;
+        return false;
 
     // All that's left to do is value conversion. Bail early if we don't need
     // to do that.
     if (!paramInfo.IsIn())
-        return JS_TRUE;
+        return true;
 
     // We're definitely some variety of 'in' now, so there's something to
     // convert. The source value for conversion depends on whether we're
     // dealing with an 'in' or an 'inout' parameter. 'inout' was handled above,
     // so all that's left is 'in'.
     if (!paramInfo.IsOut()) {
         // Handle the 'in' case.
         NS_ASSERTION(i < mArgc || paramInfo.IsOptional(),
@@ -2681,67 +2681,67 @@ CallMethodHelper::ConvertIndependentPara
             src = JSVAL_NULL;
     }
 
     nsID param_iid;
     if (type_tag == nsXPTType::T_INTERFACE &&
         NS_FAILED(mIFaceInfo->GetIIDForParamNoAlloc(mVTableIndex, &paramInfo,
                                                     &param_iid))) {
         ThrowBadParam(NS_ERROR_XPC_CANT_GET_PARAM_IFACE_INFO, i, mCallContext);
-        return JS_FALSE;
+        return false;
     }
 
     uintN err;
     if (!XPCConvert::JSData2Native(mCallContext, &dp->val, src, type,
-                                   JS_TRUE, &param_iid, &err)) {
+                                   true, &param_iid, &err)) {
         ThrowBadParam(err, i, mCallContext);
-        return JS_FALSE;
+        return false;
     }
 
-    return JS_TRUE;
+    return true;
 }
 
 JSBool
 CallMethodHelper::ConvertDependentParams()
 {
     const uint8 paramCount = mMethodInfo->GetParamCount();
     for (uint8 i = 0; i < paramCount; i++) {
         const nsXPTParamInfo& paramInfo = mMethodInfo->GetParam(i);
 
         if (!paramInfo.GetType().IsDependent())
             continue;
         if (!ConvertDependentParam(i))
-            return JS_FALSE;
+            return false;
     }
 
-    return JS_TRUE;
+    return true;
 }
 
 JSBool
 CallMethodHelper::ConvertDependentParam(uint8 i)
 {
     const nsXPTParamInfo& paramInfo = mMethodInfo->GetParam(i);
     const nsXPTType& type = paramInfo.GetType();
     nsXPTType datum_type;
     JSUint32 array_count = 0;
     bool isArray = type.IsArray();
 
     bool isSizedString = isArray ?
-        JS_FALSE :
+        false :
         type.TagPart() == nsXPTType::T_PSTRING_SIZE_IS ||
         type.TagPart() == nsXPTType::T_PWSTRING_SIZE_IS;
 
     nsXPTCVariant* dp = GetDispatchParam(i);
     dp->type = type;
 
     if (isArray) {
         if (NS_FAILED(mIFaceInfo->GetTypeForParam(mVTableIndex, &paramInfo, 1,
                                                   &datum_type))) {
             Throw(NS_ERROR_XPC_CANT_GET_ARRAY_INFO, mCallContext);
-            return JS_FALSE;
+            return false;
         }
         NS_ABORT_IF_FALSE(datum_type.TagPart() != nsXPTType::T_JSVAL,
                           "Arrays of JSVals not currently supported - "
                           "see bug 693337.");
     } else {
         datum_type = type;
     }
 
@@ -2759,73 +2759,73 @@ CallMethodHelper::ConvertDependentParam(
 
     // Even if there's nothing to convert, we still need to examine the
     // JSObject container for out-params. If it's null or otherwise invalid,
     // we want to know before the call, rather than after.
     //
     // This is a no-op for 'in' params.
     jsval src;
     if (!GetOutParamSource(i, &src))
-        return JS_FALSE;
+        return false;
 
     // All that's left to do is value conversion. Bail early if we don't need
     // to do that.
     if (!paramInfo.IsIn())
-        return JS_TRUE;
+        return true;
 
     // We're definitely some variety of 'in' now, so there's something to
     // convert. The source value for conversion depends on whether we're
     // dealing with an 'in' or an 'inout' parameter. 'inout' was handled above,
     // so all that's left is 'in'.
     if (!paramInfo.IsOut()) {
         // Handle the 'in' case.
         NS_ASSERTION(i < mArgc || paramInfo.IsOptional(),
                      "Expected either enough arguments or an optional argument");
         src = i < mArgc ? mArgv[i] : JSVAL_NULL;
     }
 
     nsID param_iid;
     if (datum_type.IsInterfacePointer() &&
         !GetInterfaceTypeFromParam(i, datum_type, &param_iid))
-        return JS_FALSE;
+        return false;
 
     uintN err;
 
     if (isArray || isSizedString) {
         if (!GetArraySizeFromParam(i, &array_count))
-            return JS_FALSE;
+            return false;
 
         if (isArray) {
             if (array_count &&
                 !XPCConvert::JSArray2Native(mCallContext, (void**)&dp->val, src,
                                             array_count, datum_type, &param_iid,
                                             &err)) {
                 // XXX need exception scheme for arrays to indicate bad element
                 ThrowBadParam(err, i, mCallContext);
-                return JS_FALSE;
+                return false;
             }
         } else // if (isSizedString)
         {
             if (!XPCConvert::JSStringWithSize2Native(mCallContext,
                                                      (void*)&dp->val,
                                                      src, array_count,
                                                      datum_type, &err)) {
                 ThrowBadParam(err, i, mCallContext);
-                return JS_FALSE;
+                return false;
             }
         }
     } else {
         if (!XPCConvert::JSData2Native(mCallContext, &dp->val, src, type,
-                                       JS_TRUE, &param_iid, &err)) {
+                                       true, &param_iid, &err)) {
             ThrowBadParam(err, i, mCallContext);
-            return JS_FALSE;
+            return false;
         }
     }
 
-    return JS_TRUE;
+    return true;
 }
 
 // Performs all necessary teardown on a parameter after method invocation.
 //
 // This method should only be called if the value in question was flagged
 // for cleanup (ie, if dp->DoesValNeedCleanup()).
 void
 CallMethodHelper::CleanupParam(nsXPTCMiniVariant& param, nsXPTType& type)
@@ -2906,23 +2906,23 @@ CallMethodHelper::HandleDipperParam(nsXP
     if (type_tag == nsXPTType::T_ASTRING || type_tag == nsXPTType::T_DOMSTRING)
         dp->val.p = new nsAutoString();
     else
         dp->val.p = new nsCString();
 
     // Check for OOM, in either case.
     if (!dp->val.p) {
         JS_ReportOutOfMemory(mCallContext);
-        return JS_FALSE;
+        return false;
     }
 
     // We allocated, so we need to deallocate after the method call completes.
     dp->SetValNeedsCleanup();
 
-    return JS_TRUE;
+    return true;
 }
 
 nsresult
 CallMethodHelper::Invoke()
 {
     PRUint32 argc = mDispatchParams.Length();
     nsXPTCVariant* argv = mDispatchParams.Elements();
 
@@ -3300,17 +3300,17 @@ static void ReportSingleMember(jsval ifa
 static void ShowHeader(JSBool* printedHeader,
                        const char* header,
                        XPCNativeSet* set,
                        XPCWrappedNative* wrapper,
                        XPCWrappedNativeProto* proto)
 {
     if (!*printedHeader) {
         DEBUG_PrintShadowObjectInfo(header, set, wrapper, proto);
-        *printedHeader = JS_TRUE;
+        *printedHeader = true;
     }
 
 }
 
 static void ShowOneShadow(jsval ifaceName1,
                           jsval memberName1,
                           jsval ifaceName2,
                           jsval memberName2)
@@ -3356,34 +3356,34 @@ static JSBool MembersAreTheSame(XPCNativ
 
     PRUint16 index1 = member1->GetIndex();
     PRUint16 index2 = member2->GetIndex();
 
     // If they are both constants, then we'll just be sure that they are equivalent.
 
     if (member1->IsConstant()) {
         if (!member2->IsConstant())
-            return JS_FALSE;
+            return false;
 
         const nsXPTConstant* constant1;
         const nsXPTConstant* constant2;
 
         return NS_SUCCEEDED(info1->GetConstant(index1, &constant1)) &&
                NS_SUCCEEDED(info2->GetConstant(index2, &constant2)) &&
                constant1->GetType() == constant2->GetType() &&
                constant1->GetValue() == constant2->GetValue();
     }
 
     // Else we make sure they are of the same 'type' and return true only if
     // they are inherited from the same interface.
 
     if (member1->IsMethod() != member2->IsMethod() ||
         member1->IsWritableAttribute() != member2->IsWritableAttribute() ||
         member1->IsReadOnlyAttribute() != member2->IsReadOnlyAttribute()) {
-        return JS_FALSE;
+        return false;
     }
 
     const nsXPTMethodInfo* mi1;
     const nsXPTMethodInfo* mi2;
 
     return NS_SUCCEEDED(info1->GetMethodInfo(index1, &mi1)) &&
            NS_SUCCEEDED(info2->GetMethodInfo(index2, &mi2)) &&
            mi1 == mi2;
@@ -3429,45 +3429,45 @@ void DEBUG_ReportShadowedMembers(XPCNati
             "Window",
             "HTMLDocument",
             "HTMLCollection",
             "Event",
             "ChromeWindow",
             nsnull
         };
 
-        static bool warned = JS_FALSE;
+        static bool warned = false;
         if (!warned) {
             printf("!!! XPConnect won't warn about Shadowed Members of...\n  ");
             for (const char** name = skipClasses; *name; name++)
                 printf("%s %s", name == skipClasses ? "" : ",", *name);
              printf("\n");
-            warned = JS_TRUE;
+            warned = true;
         }
 
-        bool quit = JS_FALSE;
+        bool quit = false;
         char* className = nsnull;
         si->GetCallback()->GetClassName(&className);
         if (className) {
             for (const char** name = skipClasses; *name; name++) {
                 if (!strcmp(*name, className)) {
-                    quit = JS_TRUE;
+                    quit = true;
                     break;
                 }
             }
             nsMemory::Free(className);
         }
         if (quit)
             return;
     }
 
     const char header[] =
         "!!!Object wrapped by XPConnect has members whose names shadow each other!!!";
 
-    JSBool printedHeader = JS_FALSE;
+    JSBool printedHeader = false;
 
     jsval QIName = rt->GetStringJSVal(XPCJSRuntime::IDX_QUERY_INTERFACE);
 
     PRUint16 ifaceCount = set->GetInterfaceCount();
     PRUint16 i, j, k, m;
 
     // First look for duplicate interface entries
 
@@ -3554,17 +3554,17 @@ void DEBUG_ReportWrapperThreadSafetyErro
     char* wrapperDump = wrapper->ToString(ccx);
     if (wrapperDump) {
         printf("  %s\n  wrapper: %s\n", msg, wrapperDump);
         JS_smprintf_free(wrapperDump);
     } else
         printf("  %s\n  wrapper @ 0x%p\n", msg, (void *)wrapper);
 
     printf("  JS call stack...\n");
-    xpc_DumpJSStack(ccx, JS_TRUE, JS_TRUE, JS_TRUE);
+    xpc_DumpJSStack(ccx, true, true, true);
     printf("---------------------------------------------------------------\n");
 
     tls->ClearWrappedNativeThreadsafetyReportDepth();
 }
 
 void DEBUG_CheckWrapperThreadSafety(const XPCWrappedNative* wrapper)
 {
     XPCWrappedNativeProto* proto = wrapper->GetProto();
@@ -3678,91 +3678,91 @@ ConstructSlimWrapper(XPCCallContext &ccx
     NS_ASSERTION(flags.DontAskInstanceForScriptable(),
                  "Not supported for cached wrappers!");
 
     JSObject* parent = xpcScope->GetGlobalJSObject();
     if (!flags.WantPreCreate()) {
         SLIM_LOG_NOT_CREATED(ccx, identityObj,
                              "scriptable helper has no PreCreate hook");
 
-        return JS_FALSE;
+        return false;
     }
 
     JSObject* plannedParent = parent;
     rv = classInfoHelper->PreCreate(identityObj, ccx, parent, &parent);
     if (rv != NS_SUCCESS_ALLOW_SLIM_WRAPPERS) {
         SLIM_LOG_NOT_CREATED(ccx, identityObj, "PreCreate hook refused");
 
-        return JS_FALSE;
+        return false;
     }
 
     if (ccx.GetJSContext()->compartment != js::GetObjectCompartment(parent)) {
         SLIM_LOG_NOT_CREATED(ccx, identityObj, "wrong compartment");
 
-        return JS_FALSE;
+        return false;
     }
 
     JSAutoEnterCompartment ac;
     if (!ac.enter(ccx, parent)) {
         SLIM_LOG_NOT_CREATED(ccx, identityObj, "unable to enter compartment");
 
-        return JS_FALSE;
+        return false;
     }
 
     if (parent != plannedParent) {
         XPCWrappedNativeScope *newXpcScope =
             XPCWrappedNativeScope::FindInJSObjectScope(ccx, parent);
         if (newXpcScope != xpcScope) {
             SLIM_LOG_NOT_CREATED(ccx, identityObj, "crossing origins");
 
-            return JS_FALSE;
+            return false;
         }
     }
 
     // The PreCreate hook could have forced the creation of a wrapper, need
     // to check for that here and return early.
     nsWrapperCache *cache = aHelper.GetWrapperCache();
     JSObject* wrapper = cache->GetWrapper();
     if (wrapper) {
         *rval = OBJECT_TO_JSVAL(wrapper);
 
-        return JS_TRUE;
+        return true;
     }
 
     PRUint32 interfacesBitmap = classInfoHelper->GetInterfacesBitmap();
     XPCNativeScriptableCreateInfo
         sciProto(aHelper.forgetXPCClassInfo(), flags, interfacesBitmap);
 
     AutoMarkingWrappedNativeProtoPtr xpcproto(ccx);
-    JSBool isGlobal = JS_FALSE;
+    JSBool isGlobal = false;
     xpcproto = XPCWrappedNativeProto::GetNewOrUsed(ccx, xpcScope,
                                                    classInfoHelper, &sciProto,
-                                                   JS_FALSE, isGlobal);
+                                                   false, isGlobal);
     if (!xpcproto)
-        return JS_FALSE;
+        return false;
 
     xpcproto->CacheOffsets(identityObj);
 
     XPCNativeScriptableInfo* si = xpcproto->GetScriptableInfo();
     JSClass* jsclazz = si->GetSlimJSClass();
     if (!jsclazz)
-        return JS_FALSE;
+        return false;
 
     wrapper = xpc_NewSystemInheritingJSObject(ccx, jsclazz,
                                               xpcproto->GetJSProtoObject(),
                                               false, parent);
     if (!wrapper ||
         !JS_SetPrivate(ccx, wrapper, identityObj) ||
         !JS_SetReservedSlot(ccx, wrapper, 0, PRIVATE_TO_JSVAL(xpcproto.get())))
-        return JS_FALSE;
+        return false;
 
     // Transfer ownership to the wrapper's private.
     aHelper.forgetCanonical();
 
     cache->SetWrapper(wrapper);
 
     SLIM_LOG(("+++++ %i created slim wrapper (%p, %p, %p)\n", ++sSlimWrappers,
               wrapper, p, xpcScope));
 
     *rval = OBJECT_TO_JSVAL(wrapper);
 
-    return JS_TRUE;
+    return true;
 }
--- a/js/xpconnect/src/XPCWrappedNativeInfo.cpp
+++ b/js/xpconnect/src/XPCWrappedNativeInfo.cpp
@@ -56,17 +56,17 @@ XPCNativeMember::GetCallInfo(XPCCallCont
 {
     funobj = js::UnwrapObject(funobj);
     jsval ifaceVal = js::GetReservedSlot(funobj, 0);
     jsval memberVal = js::GetReservedSlot(funobj, 1);
 
     *pInterface = (XPCNativeInterface*) JSVAL_TO_PRIVATE(ifaceVal);
     *pMember = (XPCNativeMember*) JSVAL_TO_PRIVATE(memberVal);
 
-    return JS_TRUE;
+    return true;
 }
 
 JSBool
 XPCNativeMember::NewFunctionObject(XPCCallContext& ccx,
                                    XPCNativeInterface* iface, JSObject *parent,
                                    jsval* pval)
 {
     NS_ASSERTION(!IsConstant(),
@@ -77,74 +77,74 @@ XPCNativeMember::NewFunctionObject(XPCCa
 
 JSBool
 XPCNativeMember::Resolve(XPCCallContext& ccx, XPCNativeInterface* iface,
                          JSObject *parent, jsval *vp)
 {
     if (IsConstant()) {
         const nsXPTConstant* constant;
         if (NS_FAILED(iface->GetInterfaceInfo()->GetConstant(mIndex, &constant)))
-            return JS_FALSE;
+            return false;
 
         const nsXPTCMiniVariant& mv = *constant->GetValue();
 
         // XXX Big Hack!
         nsXPTCVariant v;
         v.flags = 0;
         v.type = constant->GetType();
         memcpy(&v.val, &mv.val, sizeof(mv.val));
 
         jsval resultVal;
 
         if (!XPCConvert::NativeData2JS(ccx, &resultVal, &v.val, v.type,
                                        nsnull, nsnull))
-            return JS_FALSE;
+            return false;
 
         *vp = resultVal;
 
-        return JS_TRUE;
+        return true;
     }
     // else...
 
     // This is a method or attribute - we'll be needing a function object
 
     intN argc;
     JSNative callback;
 
     if (IsMethod()) {
         const nsXPTMethodInfo* info;
         if (NS_FAILED(iface->GetInterfaceInfo()->GetMethodInfo(mIndex, &info)))
-            return JS_FALSE;
+            return false;
 
         // Note: ASSUMES that retval is last arg.
         argc = (intN) info->GetParamCount();
         if (argc && info->GetParam((uint8)(argc-1)).IsRetval())
             argc-- ;
 
         callback = XPC_WN_CallMethod;
     } else {
         argc = 0;
         callback = XPC_WN_GetterSetter;
     }
 
     JSFunction *fun = JS_NewFunctionById(ccx, callback, argc, 0, parent, GetName());
     if (!fun)
-        return JS_FALSE;
+        return false;
 
     JSObject* funobj = JS_GetFunctionObject(fun);
     if (!funobj)
-        return JS_FALSE;
+        return false;
 
     if (!JS_SetReservedSlot(ccx, funobj, 0, PRIVATE_TO_JSVAL(iface))||
         !JS_SetReservedSlot(ccx, funobj, 1, PRIVATE_TO_JSVAL(this)))
-        return JS_FALSE;
+        return false;
 
     *vp = OBJECT_TO_JSVAL(funobj);
 
-    return JS_TRUE;
+    return true;
 }
 
 /***************************************************************************/
 // XPCNativeInterface
 
 // static
 XPCNativeInterface*
 XPCNativeInterface::GetNewOrUsed(XPCCallContext& ccx, const nsIID* iid)
@@ -256,17 +256,17 @@ XPCNativeInterface::NewInstance(XPCCallC
                                 nsIInterfaceInfo* aInfo)
 {
     static const PRUint16 MAX_LOCAL_MEMBER_COUNT = 16;
     XPCNativeMember local_members[MAX_LOCAL_MEMBER_COUNT];
     XPCNativeInterface* obj = nsnull;
     XPCNativeMember* members = nsnull;
 
     int i;
-    JSBool failed = JS_FALSE;
+    JSBool failed = false;
     PRUint16 constCount;
     PRUint16 methodCount;
     PRUint16 totalCount;
     PRUint16 realTotalCount = 0;
     XPCNativeMember* cur;
     JSString* str = NULL;
     jsid name;
     jsid interfaceName;
@@ -305,31 +305,31 @@ XPCNativeInterface::NewInstance(XPCCallC
     }
 
     // NOTE: since getters and setters share a member, we might not use all
     // of the member objects.
 
     for (i = 0; i < methodCount; i++) {
         const nsXPTMethodInfo* info;
         if (NS_FAILED(aInfo->GetMethodInfo(i, &info))) {
-            failed = JS_TRUE;
+            failed = true;
             break;
         }
 
         // don't reflect Addref or Release
         if (i == 1 || i == 2)
             continue;
 
         if (!XPCConvert::IsMethodReflectable(*info))
             continue;
 
         str = JS_InternString(ccx, info->GetName());
         if (!str) {
             NS_ERROR("bad method name");
-            failed = JS_TRUE;
+            failed = true;
             break;
         }
         name = INTERNED_STRING_TO_JSID(ccx, str);
 
         if (info->IsSetter()) {
             NS_ASSERTION(realTotalCount,"bad setter");
             // Note: ASSUMES Getter/Setter pairs are next to each other
             // This is a rule of the typelib spec.
@@ -349,24 +349,24 @@ XPCNativeInterface::NewInstance(XPCCallC
                 cur->SetMethod(i);
         }
     }
 
     if (!failed) {
         for (i = 0; i < constCount; i++) {
             const nsXPTConstant* constant;
             if (NS_FAILED(aInfo->GetConstant(i, &constant))) {
-                failed = JS_TRUE;
+                failed = true;
                 break;
             }
 
             str = JS_InternString(ccx, constant->GetName());
             if (!str) {
                 NS_ERROR("bad constant name");
-                failed = JS_TRUE;
+                failed = true;
                 break;
             }
             name = INTERNED_STRING_TO_JSID(ccx, str);
 
             // XXX need better way to find dups
             //NS_ASSERTION(!LookupMemberByID(name),"duplicate method/constant name");
 
             cur = &members[realTotalCount++];
@@ -374,17 +374,17 @@ XPCNativeInterface::NewInstance(XPCCallC
             cur->SetConstant(i);
         }
     }
 
     if (!failed) {
         const char* bytes;
         if (NS_FAILED(aInfo->GetNameShared(&bytes)) || !bytes ||
             nsnull == (str = JS_InternString(ccx, bytes))) {
-            failed = JS_TRUE;
+            failed = true;
         }
         interfaceName = INTERNED_STRING_TO_JSID(ccx, str);
     }
 
     if (!failed) {
         // Use placement new to create an object with the right amount of space
         // to hold the members array
         int size = sizeof(XPCNativeInterface);
--- a/js/xpconnect/src/XPCWrappedNativeJSOps.cpp
+++ b/js/xpconnect/src/XPCWrappedNativeJSOps.cpp
@@ -48,17 +48,17 @@
 /***************************************************************************/
 
 // All of the exceptions thrown into JS from this file go through here.
 // That makes this a nice place to set a breakpoint.
 
 static JSBool Throw(uintN errNum, JSContext* cx)
 {
     XPCThrower::Throw(errNum, cx);
-    return JS_FALSE;
+    return false;
 }
 
 // Handy macro used in many callback stub below.
 
 #define MORPH_SLIM_WRAPPER(cx, obj)                                           \
     PR_BEGIN_MACRO                                                            \
     SLIM_LOG_WILL_MORPH(cx, obj);                                             \
     if (IS_SLIM_WRAPPER(obj) && !MorphSlimWrapper(cx, obj))                   \
@@ -83,79 +83,79 @@ ToStringGuts(XPCCallContext& ccx)
 
     if (wrapper)
         sz = wrapper->ToString(ccx, ccx.GetTearOff());
     else
         sz = JS_smprintf("[xpconnect wrapped native prototype]");
 
     if (!sz) {
         JS_ReportOutOfMemory(ccx);
-        return JS_FALSE;
+        return false;
     }
 
     JSString* str = JS_NewStringCopyZ(ccx, sz);
     JS_smprintf_free(sz);
     if (!str)
-        return JS_FALSE;
+        return false;
 
     ccx.SetRetVal(STRING_TO_JSVAL(str));
-    return JS_TRUE;
+    return true;
 }
 
 /***************************************************************************/
 
 static JSBool
 XPC_WN_Shared_ToString(JSContext *cx, uintN argc, jsval *vp)
 {
     JSObject *obj = JS_THIS_OBJECT(cx, vp);
     if (!obj)
-        return JS_FALSE;
+        return false;
 
     if (IS_SLIM_WRAPPER(obj)) {
         XPCNativeScriptableInfo *si =
             GetSlimWrapperProto(obj)->GetScriptableInfo();
 #ifdef DEBUG
 #  define FMT_ADDR " @ 0x%p"
 #  define FMT_STR(str) str
 #  define PARAM_ADDR(w) , w
 #else
 #  define FMT_ADDR ""
 #  define FMT_STR(str)
 #  define PARAM_ADDR(w)
 #endif
         char *sz = JS_smprintf("[object %s" FMT_ADDR FMT_STR(" (native") FMT_ADDR FMT_STR(")") "]", si->GetJSClass()->name PARAM_ADDR(obj) PARAM_ADDR(xpc_GetJSPrivate(obj)));
         if (!sz)
-            return JS_FALSE;
+            return false;
 
         JSString* str = JS_NewStringCopyZ(cx, sz);
         JS_smprintf_free(sz);
         if (!str)
-            return JS_FALSE;
+            return false;
 
         *vp = STRING_TO_JSVAL(str);
 
-        return JS_TRUE;
+        return true;
     }
 
     XPCCallContext ccx(JS_CALLER, cx, obj);
     ccx.SetName(ccx.GetRuntime()->GetStringID(XPCJSRuntime::IDX_TO_STRING));
     ccx.SetArgsAndResultPtr(argc, JS_ARGV(cx, vp), vp);
     return ToStringGuts(ccx);
 }
 
 static JSBool
 XPC_WN_Shared_ToSource(JSContext *cx, uintN argc, jsval *vp)
 {
     static const char empty[] = "({})";
     JSString *str = JS_NewStringCopyN(cx, empty, sizeof(empty)-1);
     if (!str)
-        return JS_FALSE;
+        return false;
     *vp = STRING_TO_JSVAL(str);
 
-    return JS_TRUE;
+    return true;
 }
 
 /***************************************************************************/
 
 // A "double wrapped object" is a user JSObject that has been wrapped as a
 // wrappedJS in order to be used by native code and then re-wrapped by a
 // wrappedNative wrapper to be used by JS code. One might think of it as:
 //    wrappedNative(wrappedJS(underlying_JSObject))
@@ -194,32 +194,32 @@ GetDoubleWrappedJSObject(XPCCallContext&
 // This is the getter native function we use to handle 'wrappedJSObject' for
 // double wrapped JSObjects.
 
 static JSBool
 XPC_WN_DoubleWrappedGetter(JSContext *cx, uintN argc, jsval *vp)
 {
     JSObject *obj = JS_THIS_OBJECT(cx, vp);
     if (!obj)
-        return JS_FALSE;
+        return false;
 
     MORPH_SLIM_WRAPPER(cx, obj);
     XPCCallContext ccx(JS_CALLER, cx, obj);
     XPCWrappedNative* wrapper = ccx.GetWrapper();
     THROW_AND_RETURN_IF_BAD_WRAPPER(cx, wrapper);
 
     NS_ASSERTION(JS_TypeOfValue(cx, JS_CALLEE(cx, vp)) == JSTYPE_FUNCTION, "bad function");
 
     JSObject* realObject = GetDoubleWrappedJSObject(ccx, wrapper);
     if (!realObject) {
         // This is pretty unexpected at this point. The object originally
         // responded to this get property call and now gives no object.
         // XXX Should this throw something at the caller?
         *vp = JSVAL_NULL;
-        return JS_TRUE;
+        return true;
     }
 
     // It is a double wrapped object. Figure out if the caller
     // is allowed to see it.
 
     nsIXPCSecurityManager* sm;
     XPCContext* xpcc = ccx.GetXPCContext();
 
@@ -228,26 +228,26 @@ XPC_WN_DoubleWrappedGetter(JSContext *cx
         AutoMarkingNativeInterfacePtr iface(ccx);
         iface = XPCNativeInterface::
                     GetNewOrUsed(ccx, &NS_GET_IID(nsIXPCWrappedJSObjectGetter));
 
         if (iface) {
             jsid id = ccx.GetRuntime()->
                         GetStringID(XPCJSRuntime::IDX_WRAPPED_JSOBJECT);
 
-            ccx.SetCallInfo(iface, iface->GetMemberAt(1), JS_FALSE);
+            ccx.SetCallInfo(iface, iface->GetMemberAt(1), false);
             if (NS_FAILED(sm->
                           CanAccess(nsIXPCSecurityManager::ACCESS_GET_PROPERTY,
                                     &ccx, ccx,
                                     ccx.GetFlattenedJSObject(),
                                     wrapper->GetIdentityObject(),
                                     wrapper->GetClassInfo(), id,
                                     wrapper->GetSecurityInfoAddr()))) {
                 // The SecurityManager should have set an exception.
-                return JS_FALSE;
+                return false;
             }
         }
     }
     *vp = OBJECT_TO_JSVAL(realObject);
     return JS_WrapValue(cx, vp);
 }
 
 /***************************************************************************/
@@ -275,17 +275,17 @@ DefinePropertyIfFound(XPCCallContext& cc
                       JSBool* resolved)
 {
     XPCJSRuntime* rt = ccx.GetRuntime();
     JSBool found;
     const char* name;
 
     if (set) {
         if (iface)
-            found = JS_TRUE;
+            found = true;
         else
             found = set->FindMember(id, &member, &iface);
     } else
         found = (nsnull != (member = iface->FindMember(id)));
 
     if (!found) {
         if (reflectToStringAndToSource) {
             JSNative call;
@@ -302,22 +302,22 @@ DefinePropertyIfFound(XPCCallContext& cc
 
             else
                 call = nsnull;
 
             if (call) {
                 JSFunction* fun = JS_NewFunction(ccx, call, 0, 0, obj, name);
                 if (!fun) {
                     JS_ReportOutOfMemory(ccx);
-                    return JS_FALSE;
+                    return false;
                 }
 
                 AutoResolveName arn(ccx, id);
                 if (resolved)
-                    *resolved = JS_TRUE;
+                    *resolved = true;
                 return JS_DefinePropertyById(ccx, obj, id,
                                              OBJECT_TO_JSVAL(JS_GetFunctionObject(fun)),
                                              nsnull, nsnull,
                                              propFlags & ~JSPROP_ENUMERATE);
             }
         }
         // This *might* be a tearoff name that is not yet part of our
         // set. Let's lookup the name and see if it is the name of an
@@ -330,23 +330,23 @@ DefinePropertyIfFound(XPCCallContext& cc
             XPCWrappedNativeTearOff* to;
             JSObject* jso;
             nsresult rv = NS_OK;
 
             if (JSID_IS_STRING(id) &&
                 name.encode(ccx, JSID_TO_STRING(id)) &&
                 (iface2 = XPCNativeInterface::GetNewOrUsed(ccx, name.ptr()), iface2) &&
                 nsnull != (to = wrapperToReflectInterfaceNames->
-                           FindTearOff(ccx, iface2, JS_TRUE, &rv)) &&
+                           FindTearOff(ccx, iface2, true, &rv)) &&
                 nsnull != (jso = to->GetJSObject()))
 
             {
                 AutoResolveName arn(ccx, id);
                 if (resolved)
-                    *resolved = JS_TRUE;
+                    *resolved = true;
                 return JS_DefinePropertyById(ccx, obj, id, OBJECT_TO_JSVAL(jso),
                                              nsnull, nsnull,
                                              propFlags & ~JSPROP_ENUMERATE);
             } else if (NS_FAILED(rv) && rv != NS_ERROR_NO_INTERFACE) {
                 return Throw(rv, ccx);
             }
         }
 
@@ -361,98 +361,98 @@ DefinePropertyIfFound(XPCCallContext& cc
 
             id = rt->GetStringID(XPCJSRuntime::IDX_WRAPPED_JSOBJECT);
             name = rt->GetStringName(XPCJSRuntime::IDX_WRAPPED_JSOBJECT);
 
             fun = JS_NewFunction(ccx, XPC_WN_DoubleWrappedGetter,
                                  0, 0, obj, name);
 
             if (!fun)
-                return JS_FALSE;
+                return false;
 
             JSObject* funobj = JS_GetFunctionObject(fun);
             if (!funobj)
-                return JS_FALSE;
+                return false;
 
             propFlags |= JSPROP_GETTER;
             propFlags &= ~JSPROP_ENUMERATE;
 
             AutoResolveName arn(ccx, id);
             if (resolved)
-                *resolved = JS_TRUE;
+                *resolved = true;
             return JS_DefinePropertyById(ccx, obj, id, JSVAL_VOID,
                                          JS_DATA_TO_FUNC_PTR(JSPropertyOp,
                                                              funobj),
                                          nsnull, propFlags);
         }
 
         if (resolved)
-            *resolved = JS_FALSE;
-        return JS_TRUE;
+            *resolved = false;
+        return true;
     }
 
     if (!member) {
         if (wrapperToReflectInterfaceNames) {
             XPCWrappedNativeTearOff* to =
-              wrapperToReflectInterfaceNames->FindTearOff(ccx, iface, JS_TRUE);
+              wrapperToReflectInterfaceNames->FindTearOff(ccx, iface, true);
 
             if (!to)
-                return JS_FALSE;
+                return false;
             JSObject* jso = to->GetJSObject();
             if (!jso)
-                return JS_FALSE;
+                return false;
 
             AutoResolveName arn(ccx, id);
             if (resolved)
-                *resolved = JS_TRUE;
+                *resolved = true;
             return JS_DefinePropertyById(ccx, obj, id, OBJECT_TO_JSVAL(jso),
                                          nsnull, nsnull,
                                          propFlags & ~JSPROP_ENUMERATE);
         }
         if (resolved)
-            *resolved = JS_FALSE;
-        return JS_TRUE;
+            *resolved = false;
+        return true;
     }
 
     if (member->IsConstant()) {
         jsval val;
         AutoResolveName arn(ccx, id);
         if (resolved)
-            *resolved = JS_TRUE;
+            *resolved = true;
         return member->GetConstantValue(ccx, iface, &val) &&
                JS_DefinePropertyById(ccx, obj, id, val, nsnull, nsnull,
                                      propFlags);
     }
 
     if (id == rt->GetStringID(XPCJSRuntime::IDX_TO_STRING) ||
         id == rt->GetStringID(XPCJSRuntime::IDX_TO_SOURCE) ||
         (scriptableInfo &&
          scriptableInfo->GetFlags().DontEnumQueryInterface() &&
          id == rt->GetStringID(XPCJSRuntime::IDX_QUERY_INTERFACE)))
         propFlags &= ~JSPROP_ENUMERATE;
 
     jsval funval;
     if (!member->NewFunctionObject(ccx, iface, obj, &funval))
-        return JS_FALSE;
+        return false;
 
     // protect funobj until it is actually attached
     AUTO_MARK_JSVAL(ccx, funval);
 
 #ifdef off_DEBUG_jband
     {
         static int cloneCount = 0;
         if (!(++cloneCount%10))
             printf("<><><> %d cloned functions created\n", cloneCount);
     }
 #endif
 
     if (member->IsMethod()) {
         AutoResolveName arn(ccx, id);
         if (resolved)
-            *resolved = JS_TRUE;
+            *resolved = true;
         return JS_DefinePropertyById(ccx, obj, id, funval, nsnull, nsnull,
                                      propFlags);
     }
 
     // else...
 
     NS_ASSERTION(member->IsAttribute(), "way broken!");
 
@@ -465,17 +465,17 @@ DefinePropertyIfFound(XPCCallContext& cc
         propFlags &= ~JSPROP_READONLY;
         setter = JS_DATA_TO_FUNC_PTR(JSStrictPropertyOp, funobj);
     } else {
         setter = js_GetterOnlyPropertyStub;
     }
 
     AutoResolveName arn(ccx, id);
     if (resolved)
-        *resolved = JS_TRUE;
+        *resolved = true;
 
     return JS_DefinePropertyById(ccx, obj, id, JSVAL_VOID, getter, setter,
                                  propFlags);
 }
 
 /***************************************************************************/
 /***************************************************************************/
 
@@ -483,17 +483,17 @@ static JSBool
 XPC_WN_OnlyIWrite_AddPropertyStub(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
 {
     XPCCallContext ccx(JS_CALLER, cx, obj, nsnull, id);
     XPCWrappedNative* wrapper = ccx.GetWrapper();
     THROW_AND_RETURN_IF_BAD_WRAPPER(cx, wrapper);
 
     // Allow only XPConnect to add/set the property
     if (ccx.GetResolveName() == id)
-        return JS_TRUE;
+        return true;
 
     return Throw(NS_ERROR_XPC_CANT_MODIFY_PROP_ON_WN, cx);
 }
 
 static JSBool
 XPC_WN_OnlyIWrite_SetPropertyStub(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
 {
     return XPC_WN_OnlyIWrite_AddPropertyStub(cx, obj, id, vp);
@@ -512,81 +512,81 @@ XPC_WN_CannotModifyStrictPropertyStub(JS
     return XPC_WN_CannotModifyPropertyStub(cx, obj, id, vp);
 }
 
 static JSBool
 XPC_WN_Shared_Convert(JSContext *cx, JSObject *obj, JSType type, jsval *vp)
 {
     if (type == JSTYPE_OBJECT) {
         *vp = OBJECT_TO_JSVAL(obj);
-        return JS_TRUE;
+        return true;
     }
 
     MORPH_SLIM_WRAPPER(cx, obj);
     XPCCallContext ccx(JS_CALLER, cx, obj);
     XPCWrappedNative* wrapper = ccx.GetWrapper();
     THROW_AND_RETURN_IF_BAD_WRAPPER(cx, wrapper);
 
     switch (type) {
         case JSTYPE_FUNCTION:
             {
                 if (!ccx.GetTearOff()) {
                     XPCNativeScriptableInfo* si = wrapper->GetScriptableInfo();
                     if (si && (si->GetFlags().WantCall() ||
                                si->GetFlags().WantConstruct())) {
                         *vp = OBJECT_TO_JSVAL(obj);
-                        return JS_TRUE;
+                        return true;
                     }
                 }
             }
             return Throw(NS_ERROR_XPC_CANT_CONVERT_WN_TO_FUN, cx);
         case JSTYPE_NUMBER:
             *vp = JS_GetNaNValue(cx);
-            return JS_TRUE;
+            return true;
         case JSTYPE_BOOLEAN:
             *vp = JSVAL_TRUE;
-            return JS_TRUE;
+            return true;
         case JSTYPE_VOID:
         case JSTYPE_STRING:
         {
             ccx.SetName(ccx.GetRuntime()->GetStringID(XPCJSRuntime::IDX_TO_STRING));
             ccx.SetArgsAndResultPtr(0, nsnull, vp);
 
             XPCNativeMember* member = ccx.GetMember();
             if (member && member->IsMethod()) {
                 if (!XPCWrappedNative::CallMethod(ccx))
-                    return JS_FALSE;
+                    return false;
 
                 if (JSVAL_IS_PRIMITIVE(*vp))
-                    return JS_TRUE;
+                    return true;
             }
 
             // else...
             return ToStringGuts(ccx);
         }
         default:
             NS_ERROR("bad type in conversion");
-            return JS_FALSE;
+            return false;
     }
     NS_NOTREACHED("huh?");
-    return JS_FALSE;
+    return false;
 }
 
 static JSBool
 XPC_WN_Shared_Enumerate(JSContext *cx, JSObject *obj)
 {
     MORPH_SLIM_WRAPPER(cx, obj);
     XPCCallContext ccx(JS_CALLER, cx, obj);
     XPCWrappedNative* wrapper = ccx.GetWrapper();
     THROW_AND_RETURN_IF_BAD_WRAPPER(cx, wrapper);
 
     // Since we aren't going to enumerate tearoff names and the prototype
     // handles non-mutated members, we can do this potential short-circuit.
     if (!wrapper->HasMutatedSet())
-        return JS_TRUE;
+        return true;
 
     XPCNativeSet* set = wrapper->GetSet();
     XPCNativeSet* protoSet = wrapper->HasProto() ?
                                 wrapper->GetProto()->GetSet() : nsnull;
 
     PRUint16 interface_count = set->GetInterfaceCount();
     XPCNativeInterface** interfaceArray = set->GetInterfaceArray();
     for (PRUint16 i = 0; i < interface_count; i++) {
@@ -597,20 +597,20 @@ XPC_WN_Shared_Enumerate(JSContext *cx, J
             jsid name = member->GetName();
 
             // Skip if this member is going to come from the proto.
             PRUint16 index;
             if (protoSet &&
                 protoSet->FindMember(name, nsnull, &index) && index == i)
                 continue;
             if (!xpc_ForcePropertyResolve(cx, obj, name))
-                return JS_FALSE;
+                return false;
         }
     }
-    return JS_TRUE;
+    return true;
 }
 
 /***************************************************************************/
 
 #ifdef DEBUG_slimwrappers
 static PRUint32 sFinalizedSlimWrappers;
 #endif
 
@@ -720,25 +720,25 @@ XPC_WN_NoHelper_Resolve(JSContext *cx, J
 {
     MORPH_SLIM_WRAPPER(cx, obj);
     XPCCallContext ccx(JS_CALLER, cx, obj, nsnull, id);
     XPCWrappedNative* wrapper = ccx.GetWrapper();
     THROW_AND_RETURN_IF_BAD_WRAPPER(cx, wrapper);
 
     XPCNativeSet* set = ccx.GetSet();
     if (!set)
-        return JS_TRUE;
+        return true;
 
     // Don't resolve properties that are on our prototype.
     if (ccx.GetInterface() && !ccx.GetStaticMemberIsLocal())
-        return JS_TRUE;
+        return true;
 
     return DefinePropertyIfFound(ccx, obj, id,
                                  set, nsnull, nsnull, wrapper->GetScope(),
-                                 JS_TRUE, wrapper, wrapper, nsnull,
+                                 true, wrapper, wrapper, nsnull,
                                  JSPROP_ENUMERATE |
                                  JSPROP_READONLY |
                                  JSPROP_PERMANENT, nsnull);
 }
 
 nsISupports *
 XPC_GetIdentityObject(JSContext *cx, JSObject *obj)
 {
@@ -747,25 +747,25 @@ XPC_GetIdentityObject(JSContext *cx, JSO
 
     return wrapper ? wrapper->GetIdentityObject() : nsnull;
 }
 
 JSBool
 XPC_WN_Equality(JSContext *cx, JSObject *obj, const jsval *valp, JSBool *bp)
 {
     jsval v = *valp;
-    *bp = JS_FALSE;
+    *bp = false;
 
     JSObject *obj2;
     XPCWrappedNative *wrapper =
         XPCWrappedNative::GetWrappedNativeOfJSObject(cx, obj, nsnull, &obj2);
     if (obj2) {
         *bp = !JSVAL_IS_PRIMITIVE(v) && (JSVAL_TO_OBJECT(v) == obj2);
 
-        return JS_TRUE;
+        return true;
     }
 
     THROW_AND_RETURN_IF_BAD_WRAPPER(cx, wrapper);
 
     XPCNativeScriptableInfo* si = wrapper->GetScriptableInfo();
     if (si && si->GetFlags().WantEquality()) {
         bool res;
         nsresult rv = si->GetCallback()->Equality(wrapper, cx, obj, v, &res);
@@ -775,17 +775,17 @@ XPC_WN_Equality(JSContext *cx, JSObject 
     } else if (!JSVAL_IS_PRIMITIVE(v)) {
         JSObject *other = JSVAL_TO_OBJECT(v);
 
         *bp = (obj == other ||
                XPC_GetIdentityObject(cx, obj) ==
                XPC_GetIdentityObject(cx, other));
     }
 
-    return JS_TRUE;
+    return true;
 }
 
 static JSObject *
 XPC_WN_OuterObject(JSContext *cx, JSObject *obj)
 {
     XPCWrappedNative *wrapper =
         static_cast<XPCWrappedNative *>(js::GetObjectPrivate(obj));
     if (!wrapper) {
@@ -899,49 +899,49 @@ static JSBool
 XPC_WN_MaybeResolvingPropertyStub(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
 {
     MORPH_SLIM_WRAPPER(cx, obj);
     XPCCallContext ccx(JS_CALLER, cx, obj);
     XPCWrappedNative* wrapper = ccx.GetWrapper();
     THROW_AND_RETURN_IF_BAD_WRAPPER(cx, wrapper);
 
     if (ccx.GetResolvingWrapper() == wrapper)
-        return JS_TRUE;
+        return true;
     return Throw(NS_ERROR_XPC_CANT_MODIFY_PROP_ON_WN, cx);
 }
 
 static JSBool
 XPC_WN_MaybeResolvingStrictPropertyStub(JSContext *cx, JSObject *obj, jsid id, JSBool strict,
                                         jsval *vp)
 {
     return XPC_WN_MaybeResolvingPropertyStub(cx, obj, id, vp);
 }
 
 // macro fun!
 #define PRE_HELPER_STUB_NO_SLIM                                               \
     XPCWrappedNative* wrapper =                                               \
         XPCWrappedNative::GetAndMorphWrappedNativeOfJSObject(cx, obj);        \
     THROW_AND_RETURN_IF_BAD_WRAPPER(cx, wrapper);                             \
-    bool retval = JS_TRUE;                                                    \
+    bool retval = true;                                                       \
     nsresult rv = wrapper->GetScriptableCallback()->
 
 #define PRE_HELPER_STUB                                                       \
     XPCWrappedNative* wrapper;                                                \
     nsIXPCScriptable* si;                                                     \
     if (IS_SLIM_WRAPPER(obj)) {                                               \
         wrapper = nsnull;                                                     \
         si = GetSlimWrapperProto(obj)->GetScriptableInfo()->GetCallback();    \
     }                                                                         \
     else                                                                      \
     {                                                                         \
         wrapper = XPCWrappedNative::GetWrappedNativeOfJSObject(cx, obj);      \
         THROW_AND_RETURN_IF_BAD_WRAPPER(cx, wrapper);                         \
         si = wrapper->GetScriptableCallback();                                \
     }                                                                         \
-    bool retval = JS_TRUE;                                                    \
+    bool retval = true;                                                       \
     nsresult rv = si->
 
 #define POST_HELPER_STUB                                                      \
     if (NS_FAILED(rv))                                                        \
         return Throw(rv, cx);                                                 \
     return retval;
 
 static JSBool
@@ -998,37 +998,37 @@ static JSBool
 XPC_WN_Helper_Call(JSContext *cx, uintN argc, jsval *vp)
 {
     // N.B. we want obj to be the callee, not JS_THIS(cx, vp)
     JSObject *obj = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
 
     XPCCallContext ccx(JS_CALLER, cx, obj, nsnull, JSID_VOID,
                        argc, JS_ARGV(cx, vp), vp);
     if (!ccx.IsValid())
-        return JS_FALSE;
+        return false;
 
     JS_ASSERT(obj == ccx.GetFlattenedJSObject());
 
     SLIM_LOG_WILL_MORPH(cx, obj);
     PRE_HELPER_STUB_NO_SLIM
     Call(wrapper, cx, obj, argc, JS_ARGV(cx, vp), vp, &retval);
     POST_HELPER_STUB
 }
 
 static JSBool
 XPC_WN_Helper_Construct(JSContext *cx, uintN argc, jsval *vp)
 {
     JSObject *obj = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
     if (!obj)
-        return JS_FALSE;
+        return false;
 
     XPCCallContext ccx(JS_CALLER, cx, obj, nsnull, JSID_VOID,
                        argc, JS_ARGV(cx, vp), vp);
     if (!ccx.IsValid())
-        return JS_FALSE;
+        return false;
 
     JS_ASSERT(obj == ccx.GetFlattenedJSObject());
 
     SLIM_LOG_WILL_MORPH(cx, obj);
     PRE_HELPER_STUB_NO_SLIM
     Construct(wrapper, cx, obj, argc, JS_ARGV(cx, vp), vp, &retval);
     POST_HELPER_STUB
 }
@@ -1072,17 +1072,17 @@ XPC_WN_Helper_Trace(JSTracer *trc, JSObj
     MarkWrappedNative(trc, obj, true);
 }
 
 static JSBool
 XPC_WN_Helper_NewResolve(JSContext *cx, JSObject *obj, jsid id, uintN flags,
                          JSObject **objp)
 {
     nsresult rv = NS_OK;
-    bool retval = JS_TRUE;
+    bool retval = true;
     JSObject* obj2FromScriptable = nsnull;
     if (IS_SLIM_WRAPPER(obj)) {
         XPCNativeScriptableInfo *si =
             GetSlimWrapperProto(obj)->GetScriptableInfo();
         if (!si->GetFlags().WantNewResolve())
             return retval;
 
         NS_ASSERTION(si->GetFlags().AllowPropModsToPrototype() &&
@@ -1155,17 +1155,17 @@ XPC_WN_Helper_NewResolve(JSContext *cx, 
             XPCWrappedNative* wrapperForInterfaceNames =
                 siFlags.DontReflectInterfaceNames() ? nsnull : wrapper;
 
             JSBool resolved;
             oldResolvingWrapper = ccx.SetResolvingWrapper(wrapper);
             retval = DefinePropertyIfFound(ccx, obj, id,
                                            set, iface, member,
                                            wrapper->GetScope(),
-                                           JS_FALSE,
+                                           false,
                                            wrapperForInterfaceNames,
                                            nsnull, si,
                                            enumFlag, &resolved);
             (void)ccx.SetResolvingWrapper(oldResolvingWrapper);
             if (retval && resolved)
                 *objp = obj;
         }
     }
@@ -1228,27 +1228,27 @@ XPC_WN_JSOp_Enumerate(JSContext *cx, JSO
     XPCCallContext ccx(JS_CALLER, cx, obj);
     XPCWrappedNative* wrapper = ccx.GetWrapper();
     THROW_AND_RETURN_IF_BAD_WRAPPER(cx, wrapper);
 
     XPCNativeScriptableInfo* si = wrapper->GetScriptableInfo();
     if (!si)
         return Throw(NS_ERROR_XPC_BAD_OP_ON_WN_PROTO, cx);
 
-    bool retval = JS_TRUE;
+    bool retval = true;
     nsresult rv;
 
     if (si->GetFlags().WantNewEnumerate()) {
         if (((enum_op == JSENUMERATE_INIT &&
               !si->GetFlags().DontEnumStaticProps()) ||
              enum_op == JSENUMERATE_INIT_ALL) &&
             wrapper->HasMutatedSet() &&
             !XPC_WN_Shared_Enumerate(cx, obj)) {
             *statep = JSVAL_NULL;
-            return JS_FALSE;
+            return false;
         }
 
         // XXX Might we really need to wrap this call and *also* call
         // js_ObjectOps.enumerate ???
 
         rv = si->GetCallback()->
             NewEnumerate(wrapper, cx, obj, enum_op, statep, idp, &retval);
 
@@ -1264,28 +1264,28 @@ XPC_WN_JSOp_Enumerate(JSContext *cx, JSO
 
     if (si->GetFlags().WantEnumerate()) {
         if (enum_op == JSENUMERATE_INIT || enum_op == JSENUMERATE_INIT_ALL) {
             if ((enum_op == JSENUMERATE_INIT_ALL ||
                  !si->GetFlags().DontEnumStaticProps()) &&
                 wrapper->HasMutatedSet() &&
                 !XPC_WN_Shared_Enumerate(cx, obj)) {
                 *statep = JSVAL_NULL;
-                return JS_FALSE;
+                return false;
             }
             rv = si->GetCallback()->
                 Enumerate(wrapper, cx, obj, &retval);
 
             if (NS_FAILED(rv) || !retval)
                 *statep = JSVAL_NULL;
 
             if (NS_FAILED(rv))
                 return Throw(rv, cx);
             if (!retval)
-                return JS_FALSE;
+                return false;
             // Then fall through and call the default implementation...
         }
     }
 
     // else call js_ObjectOps.enumerate...
 
     return JS_EnumerateState(cx, obj, enum_op, statep, idp);
 }
@@ -1506,33 +1506,33 @@ XPCNativeScriptableShared::PopulateJSCla
         mJSClass.base.trace = XPC_WN_Helper_Trace;
     else
         mJSClass.base.trace = XPC_WN_Shared_Trace;
 
     if (mFlags.WantOuterObject())
         mJSClass.base.ext.outerObject = XPC_WN_OuterObject;
 
     if (!(mFlags & nsIXPCScriptable::WANT_OUTER_OBJECT))
-        mCanBeSlim = JS_TRUE;
+        mCanBeSlim = true;
 
     mJSClass.base.ext.isWrappedNative = true;
 }
 
 /***************************************************************************/
 /***************************************************************************/
 
 JSBool
 XPC_WN_CallMethod(JSContext *cx, uintN argc, jsval *vp)
 {
     NS_ASSERTION(JS_TypeOfValue(cx, JS_CALLEE(cx, vp)) == JSTYPE_FUNCTION, "bad function");
     JSObject* funobj = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
 
     JSObject* obj = JS_THIS_OBJECT(cx, vp);
     if (!obj)
-        return JS_FALSE;
+        return false;
 
 #ifdef DEBUG_slimwrappers
     {
         JSFunction* fun = funobj->getFunctionPrivate();
         JSString *funid = JS_GetFunctionId(fun);
         JSAutoByteString bytes;
         const char *funname = !funid ? "" : bytes.encode(cx, funid) ? bytes.ptr() : "<error>";
         SLIM_LOG_WILL_MORPH_FOR_PROP(cx, obj, funname);
@@ -1545,29 +1545,29 @@ XPC_WN_CallMethod(JSContext *cx, uintN a
     XPCWrappedNative* wrapper = ccx.GetWrapper();
     THROW_AND_RETURN_IF_BAD_WRAPPER(cx, wrapper);
 
     XPCNativeInterface* iface;
     XPCNativeMember*    member;
 
     if (!XPCNativeMember::GetCallInfo(ccx, funobj, &iface, &member))
         return Throw(NS_ERROR_XPC_CANT_GET_METHOD_INFO, cx);
-    ccx.SetCallInfo(iface, member, JS_FALSE);
+    ccx.SetCallInfo(iface, member, false);
     return XPCWrappedNative::CallMethod(ccx);
 }
 
 JSBool
 XPC_WN_GetterSetter(JSContext *cx, uintN argc, jsval *vp)
 {
     NS_ASSERTION(JS_TypeOfValue(cx, JS_CALLEE(cx, vp)) == JSTYPE_FUNCTION, "bad function");
     JSObject* funobj = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
 
     JSObject* obj = JS_THIS_OBJECT(cx, vp);
     if (!obj)
-        return JS_FALSE;
+        return false;
 
 #ifdef DEBUG_slimwrappers
     {
         const char* funname = nsnull;
         JSAutoByteString bytes;
         if (JS_TypeOfValue(cx, JS_CALLEE(cx, vp)) == JSTYPE_FUNCTION) {
             JSString *funid = JS_GetFunctionId(funobj->getFunctionPrivate());
             funname = !funid ? "" : bytes.encode(cx, funid) ? bytes.ptr() : "<error>";
@@ -1585,69 +1585,69 @@ XPC_WN_GetterSetter(JSContext *cx, uintN
     XPCNativeInterface* iface;
     XPCNativeMember*    member;
 
     if (!XPCNativeMember::GetCallInfo(ccx, funobj, &iface, &member))
         return Throw(NS_ERROR_XPC_CANT_GET_METHOD_INFO, cx);
 
     ccx.SetArgsAndResultPtr(argc, JS_ARGV(cx, vp), vp);
     if (argc && member->IsWritableAttribute()) {
-        ccx.SetCallInfo(iface, member, JS_TRUE);
+        ccx.SetCallInfo(iface, member, true);
         JSBool retval = XPCWrappedNative::SetAttribute(ccx);
         if (retval)
             *vp = JS_ARGV(cx, vp)[0];
         return retval;
     }
     // else...
 
-    ccx.SetCallInfo(iface, member, JS_FALSE);
+    ccx.SetCallInfo(iface, member, false);
     return XPCWrappedNative::GetAttribute(ccx);
 }
 
 /***************************************************************************/
 
 static JSBool
 XPC_WN_Shared_Proto_Enumerate(JSContext *cx, JSObject *obj)
 {
     NS_ASSERTION(js::GetObjectClass(obj) == &XPC_WN_ModsAllowed_WithCall_Proto_JSClass ||
                  js::GetObjectClass(obj) == &XPC_WN_ModsAllowed_NoCall_Proto_JSClass ||
                  js::GetObjectClass(obj) == &XPC_WN_NoMods_WithCall_Proto_JSClass ||
                  js::GetObjectClass(obj) == &XPC_WN_NoMods_NoCall_Proto_JSClass,
                  "bad proto");
     XPCWrappedNativeProto* self =
         (XPCWrappedNativeProto*) xpc_GetJSPrivate(obj);
     if (!self)
-        return JS_FALSE;
+        return false;
 
     if (self->GetScriptableInfo() &&
         self->GetScriptableInfo()->GetFlags().DontEnumStaticProps())
-        return JS_TRUE;
+        return true;
 
     XPCNativeSet* set = self->GetSet();
     if (!set)
-        return JS_FALSE;
+        return false;
 
     XPCCallContext ccx(JS_CALLER, cx);
     if (!ccx.IsValid())
-        return JS_FALSE;
+        return false;
     ccx.SetScopeForNewJSObjects(obj);
 
     PRUint16 interface_count = set->GetInterfaceCount();
     XPCNativeInterface** interfaceArray = set->GetInterfaceArray();
     for (PRUint16 i = 0; i < interface_count; i++) {
         XPCNativeInterface* iface = interfaceArray[i];
         PRUint16 member_count = iface->GetMemberCount();
 
         for (PRUint16 k = 0; k < member_count; k++) {
             if (!xpc_ForcePropertyResolve(cx, obj, iface->GetMemberAt(k)->GetName()))
-                return JS_FALSE;
+                return false;
         }
     }
 
-    return JS_TRUE;
+    return true;
 }
 
 static void
 XPC_WN_Shared_Proto_Finalize(JSContext *cx, JSObject *obj)
 {
     // This can be null if xpc shutdown has already happened
     XPCWrappedNativeProto* p = (XPCWrappedNativeProto*) xpc_GetJSPrivate(obj);
     if (p)
@@ -1671,31 +1671,31 @@ XPC_WN_ModsAllowed_Proto_Resolve(JSConte
 {
     NS_ASSERTION(js::GetObjectClass(obj) == &XPC_WN_ModsAllowed_WithCall_Proto_JSClass ||
                  js::GetObjectClass(obj) == &XPC_WN_ModsAllowed_NoCall_Proto_JSClass,
                  "bad proto");
 
     XPCWrappedNativeProto* self =
         (XPCWrappedNativeProto*) xpc_GetJSPrivate(obj);
     if (!self)
-        return JS_FALSE;
+        return false;
 
     XPCCallContext ccx(JS_CALLER, cx);
     if (!ccx.IsValid())
-        return JS_FALSE;
+        return false;
     ccx.SetScopeForNewJSObjects(obj);
 
     XPCNativeScriptableInfo* si = self->GetScriptableInfo();
     uintN enumFlag = (si && si->GetFlags().DontEnumStaticProps()) ?
                                                 0 : JSPROP_ENUMERATE;
 
     return DefinePropertyIfFound(ccx, obj, id,
                                  self->GetSet(), nsnull, nsnull,
                                  self->GetScope(),
-                                 JS_TRUE, nsnull, nsnull, si,
+                                 true, nsnull, nsnull, si,
                                  enumFlag, nsnull);
 }
 
 js::Class XPC_WN_ModsAllowed_WithCall_Proto_JSClass = {
     "XPC_WN_ModsAllowed_WithCall_Proto_JSClass", // name;
     WRAPPER_SLOTS, // flags;
 
     /* Mandatory non-null function pointer members. */
@@ -1755,26 +1755,26 @@ XPC_WN_OnlyIWrite_Proto_AddPropertyStub(
 {
     NS_ASSERTION(js::GetObjectClass(obj) == &XPC_WN_NoMods_WithCall_Proto_JSClass ||
                  js::GetObjectClass(obj) == &XPC_WN_NoMods_NoCall_Proto_JSClass,
                  "bad proto");
 
     XPCWrappedNativeProto* self =
         (XPCWrappedNativeProto*) xpc_GetJSPrivate(obj);
     if (!self)
-        return JS_FALSE;
+        return false;
 
     XPCCallContext ccx(JS_CALLER, cx);
     if (!ccx.IsValid())
-        return JS_FALSE;
+        return false;
     ccx.SetScopeForNewJSObjects(obj);
 
     // Allow XPConnect to add the property only
     if (ccx.GetResolveName() == id)
-        return JS_TRUE;
+        return true;
 
     return Throw(NS_ERROR_XPC_BAD_OP_ON_WN_PROTO, cx);
 }
 
 static JSBool
 XPC_WN_OnlyIWrite_Proto_SetPropertyStub(JSContext *cx, JSObject *obj, jsid id, JSBool strict,
                                         jsval *vp)
 {
@@ -1786,31 +1786,31 @@ XPC_WN_NoMods_Proto_Resolve(JSContext *c
 {
     NS_ASSERTION(js::GetObjectClass(obj) == &XPC_WN_NoMods_WithCall_Proto_JSClass ||
                  js::GetObjectClass(obj) == &XPC_WN_NoMods_NoCall_Proto_JSClass,
                  "bad proto");
 
     XPCWrappedNativeProto* self =
         (XPCWrappedNativeProto*) xpc_GetJSPrivate(obj);
     if (!self)
-        return JS_FALSE;
+        return false;
 
     XPCCallContext ccx(JS_CALLER, cx);
     if (!ccx.IsValid())
-        return JS_FALSE;
+        return false;
     ccx.SetScopeForNewJSObjects(obj);
 
     XPCNativeScriptableInfo* si = self->GetScriptableInfo();
     uintN enumFlag = (si && si->GetFlags().DontEnumStaticProps()) ?
                                                 0 : JSPROP_ENUMERATE;
 
     return DefinePropertyIfFound(ccx, obj, id,
                                  self->GetSet(), nsnull, nsnull,
                                  self->GetScope(),
-                                 JS_TRUE, nsnull, nsnull, si,
+                                 true, nsnull, nsnull, si,
                                  JSPROP_READONLY |
                                  JSPROP_PERMANENT |
                                  enumFlag, nsnull);
 }
 
 js::Class XPC_WN_NoMods_WithCall_Proto_JSClass = {
     "XPC_WN_NoMods_WithCall_Proto_JSClass",    // name;
     WRAPPER_SLOTS,                             // flags;
@@ -1879,20 +1879,20 @@ XPC_WN_TearOff_Enumerate(JSContext *cx, 
     XPCNativeInterface* iface;
 
     if (!to || nsnull == (iface = to->GetInterface()))
         return Throw(NS_ERROR_XPC_BAD_OP_ON_WN_PROTO, cx);
 
     PRUint16 member_count = iface->GetMemberCount();
     for (PRUint16 k = 0; k < member_count; k++) {
         if (!xpc_ForcePropertyResolve(cx, obj, iface->GetMemberAt(k)->GetName()))
-            return JS_FALSE;
+            return false;
     }
 
-    return JS_TRUE;
+    return true;
 }
 
 static JSBool
 XPC_WN_TearOff_Resolve(JSContext *cx, JSObject *obj, jsid id)
 {
     MORPH_SLIM_WRAPPER(cx, obj);
     XPCCallContext ccx(JS_CALLER, cx, obj);
     XPCWrappedNative* wrapper = ccx.GetWrapper();
@@ -1901,17 +1901,17 @@ XPC_WN_TearOff_Resolve(JSContext *cx, JS
     XPCWrappedNativeTearOff* to = ccx.GetTearOff();
     XPCNativeInterface* iface;
 
     if (!to || nsnull == (iface = to->GetInterface()))
         return Throw(NS_ERROR_XPC_BAD_OP_ON_WN_PROTO, cx);
 
     return DefinePropertyIfFound(ccx, obj, id, nsnull, iface, nsnull,
                                  wrapper->GetScope(),
-                                 JS_TRUE, nsnull, nsnull, nsnull,
+                                 true, nsnull, nsnull, nsnull,
                                  JSPROP_READONLY |
                                  JSPROP_PERMANENT |
                                  JSPROP_ENUMERATE, nsnull);
 }
 
 static void
 XPC_WN_TearOff_Finalize(JSContext *cx, JSObject *obj)
 {
--- a/js/xpconnect/src/XPCWrappedNativeProto.cpp
+++ b/js/xpconnect/src/XPCWrappedNativeProto.cpp
@@ -94,17 +94,17 @@ XPCWrappedNativeProto::Init(XPCCallConte
 {
     nsIXPCScriptable *callback = scriptableCreateInfo ?
                                  scriptableCreateInfo->GetCallback() :
                                  nsnull;
     if (callback) {
         mScriptableInfo =
             XPCNativeScriptableInfo::Construct(ccx, isGlobal, scriptableCreateInfo);
         if (!mScriptableInfo)
-            return JS_FALSE;
+            return false;
     }
 
     js::Class* jsclazz;
 
 
     if (mScriptableInfo) {
         const XPCNativeScriptableFlags& flags(mScriptableInfo->GetFlags());
 
@@ -131,17 +131,17 @@ XPCWrappedNativeProto::Init(XPCCallConte
     JSBool ok = mJSProtoObject && JS_SetPrivate(ccx, mJSProtoObject, this);
 
     if (ok && callback) {
         nsresult rv = callback->PostCreatePrototype(ccx, mJSProtoObject);
         if (NS_FAILED(rv)) {
             JS_SetPrivate(ccx, mJSProtoObject, nsnull);
             mJSProtoObject = nsnull;
             XPCThrower::Throw(rv, ccx);
-            return JS_FALSE;
+            return false;
         }
     }
 
     DEBUG_ReportShadowedMembers(mSet, nsnull, this);
 
     return ok;
 }
 
@@ -214,19 +214,19 @@ XPCWrappedNativeProto::GetNewOrUsed(XPCC
         NS_ERROR("reserved flag set!");
         ciFlags &= ~XPC_PROTO_DONT_SHARE;
     }
 
     if (ForceNoSharing || (ciFlags & nsIClassInfo::PLUGIN_OBJECT) ||
         (ScriptableCreateInfo &&
          ScriptableCreateInfo->GetFlags().DontSharePrototype())) {
         ciFlags |= XPC_PROTO_DONT_SHARE;
-        shared = JS_FALSE;
+        shared = false;
     } else {
-        shared = JS_TRUE;
+        shared = true;
     }
 
     if (shared) {
         JSBool mainThreadOnly = !!(ciFlags & nsIClassInfo::MAIN_THREAD_ONLY);
         map = Scope->GetWrappedNativeProtoMap(mainThreadOnly);
         lock = mainThreadOnly ? nsnull : Scope->GetRuntime()->GetMapLock();
         {   // scoped lock
             XPCAutoLock al(lock);
--- a/js/xpconnect/src/XPCWrappedNativeScope.cpp
+++ b/js/xpconnect/src/XPCWrappedNativeScope.cpp
@@ -110,17 +110,17 @@ static void DEBUG_TrackScopeShutdown()
 XPCWrappedNativeScope* XPCWrappedNativeScope::gScopes = nsnull;
 XPCWrappedNativeScope* XPCWrappedNativeScope::gDyingScopes = nsnull;
 
 // static
 XPCWrappedNativeScope*
 XPCWrappedNativeScope::GetNewOrUsed(XPCCallContext& ccx, JSObject* aGlobal)
 {
 
-    XPCWrappedNativeScope* scope = FindInJSObjectScope(ccx, aGlobal, JS_TRUE);
+    XPCWrappedNativeScope* scope = FindInJSObjectScope(ccx, aGlobal, true);
     if (!scope)
         scope = new XPCWrappedNativeScope(ccx, aGlobal);
     else {
         // We need to call SetGlobal in order to refresh our cached
         // mPrototypeJSObject and mPrototypeJSFunction and to clear
         // mPrototypeNoHelper (so we get a new one if requested in the
         // new scope) in the case where the global object is being
         // reused (JS_ClearScope has been called).  NOTE: We are only
@@ -174,19 +174,19 @@ XPCWrappedNativeScope::XPCWrappedNativeS
 }
 
 // static
 JSBool
 XPCWrappedNativeScope::IsDyingScope(XPCWrappedNativeScope *scope)
 {
     for (XPCWrappedNativeScope *cur = gDyingScopes; cur; cur = cur->mNext) {
         if (scope == cur)
-            return JS_TRUE;
+            return true;
     }
-    return JS_FALSE;
+    return false;
 }
 
 void
 XPCWrappedNativeScope::SetComponents(nsXPCComponents* aComponents)
 {
     NS_IF_ADDREF(aComponents);
     NS_IF_RELEASE(mComponents);
     mComponents = aComponents;
@@ -725,17 +725,17 @@ void DEBUG_CheckForComponentsInScope(JSC
     // This is pretty much always bad. It usually means that native code is
     // making a callback to an interface implemented in JavaScript, but the
     // document where the JS object was created has already been cleared and the
     // global properties of that document's window are *gone*. Generally this
     // indicates a problem that should be addressed in the design and use of the
     // callback code.
     NS_ERROR("XPConnect is being called on a scope without a 'Components' property!  (stack and details follow)");
     printf("The current JS stack is:\n");
-    xpc_DumpJSStack(cx, JS_TRUE, JS_TRUE, JS_TRUE);
+    xpc_DumpJSStack(cx, true, true, true);
 
     printf("And the object whose scope lacks a 'Components' property is:\n");
     js_DumpObject(startingObj);
 
     JSObject *p = startingObj;
     while (js::IsWrapper(p)) {
         p = js::GetProxyPrivate(p).toObjectOrNull();
         if (!p)
--- a/js/xpconnect/src/XPCWrapper.cpp
+++ b/js/xpconnect/src/XPCWrapper.cpp
@@ -47,17 +47,17 @@
 namespace XPCNativeWrapper {
 
 static inline
 JSBool
 ThrowException(nsresult ex, JSContext *cx)
 {
   XPCThrower::Throw(ex, cx);
 
-  return JS_FALSE;
+  return false;
 }
 
 static JSBool
 UnwrapNW(JSContext *cx, uintN argc, jsval *vp)
 {
   if (argc != 1) {
     return ThrowException(NS_ERROR_XPC_NOT_ENOUGH_ARGS, cx);
   }
@@ -65,43 +65,43 @@ UnwrapNW(JSContext *cx, uintN argc, jsva
   jsval v = JS_ARGV(cx, vp)[0];
   if (JSVAL_IS_PRIMITIVE(v)) {
     return ThrowException(NS_ERROR_INVALID_ARG, cx);
   }
 
   JSObject *obj = JSVAL_TO_OBJECT(v);
   if (!js::IsWrapper(obj)) {
     JS_SET_RVAL(cx, vp, v);
-    return JS_TRUE;
+    return true;
   }
 
   if (xpc::WrapperFactory::IsXrayWrapper(obj) &&
       !xpc::WrapperFactory::IsPartiallyTransparent(obj)) {
     return JS_GetProperty(cx, obj, "wrappedJSObject", vp);
   }
 
   JS_SET_RVAL(cx, vp, v);
-  return JS_TRUE;
+  return true;
 }
 
 static JSBool
 XrayWrapperConstructor(JSContext *cx, uintN argc, jsval *vp)
 {
   if (argc == 0) {
     return ThrowException(NS_ERROR_XPC_NOT_ENOUGH_ARGS, cx);
   }
 
   if (JSVAL_IS_PRIMITIVE(vp[2])) {
     return ThrowException(NS_ERROR_ILLEGAL_VALUE, cx);
   }
 
   JSObject *obj = JSVAL_TO_OBJECT(vp[2]);
   if (!js::IsWrapper(obj)) {
     *vp = OBJECT_TO_JSVAL(obj);
-    return JS_TRUE;
+    return true;
   }
 
   obj = js::UnwrapObject(obj);
 
   *vp = OBJECT_TO_JSVAL(obj);
   return JS_WrapValue(cx, vp);
 }
 // static
--- a/js/xpconnect/src/dombindings.cpp
+++ b/js/xpconnect/src/dombindings.cpp
@@ -88,17 +88,17 @@ DefineStaticJSVals(JSContext *cx)
 
 int HandlerFamily;
 
 
 JSBool
 Throw(JSContext *cx, nsresult rv)
 {
     XPCThrower::Throw(rv, cx);
-    return JS_FALSE;
+    return false;
 }
 
 
 // Only set allowNativeWrapper to false if you really know you need it, if in
 // doubt use true. Setting it to false disables security wrappers.
 static bool
 XPCOMObjectToJsval(JSContext *cx, JSObject *scope, xpcObjectHelper &helper,
                    bool allowNativeWrapper, jsval *rval)
@@ -354,42 +354,42 @@ JSBool
 interface_hasInstance(JSContext *cx, JSObject *obj, const js::Value *vp, JSBool *bp)
 {
     if (vp->isObject()) {
         jsval prototype;
         if (!JS_GetPropertyById(cx, obj, s_prototype_id, &prototype) ||
             JSVAL_IS_PRIMITIVE(prototype)) {
             JS_ReportErrorFlagsAndNumber(cx, JSREPORT_ERROR, js_GetErrorMessage, NULL,
                                          JSMSG_THROW_TYPE_ERROR);
-            return JS_FALSE;
+            return false;
         }
 
         JSObject *other = &vp->toObject();
         if (instanceIsProxy(other)) {
             ProxyHandler *handler = static_cast<ProxyHandler*>(js::GetProxyHandler(other));
             if (handler->isInstanceOf(JSVAL_TO_OBJECT(prototype))) {
-                *bp = JS_TRUE;
+                *bp = true;
             } else {
                 JSObject *protoObj = JSVAL_TO_OBJECT(prototype);
                 JSObject *proto = other;
                 while ((proto = JS_GetPrototype(cx, proto))) {
                     if (proto == protoObj) {
-                        *bp = JS_TRUE;
-                        return JS_TRUE;
+                        *bp = true;
+                        return true;
                     }
                 }
-                *bp = JS_FALSE;
+                *bp = false;
             }
 
-            return JS_TRUE;
+            return true;
         }
     }
 
-    *bp = JS_FALSE;
-    return JS_TRUE;
+    *bp = false;
+    return true;
 }
 
 template<class LC>
 JSObject *
 ListBase<LC>::getPrototype(JSContext *cx, XPCWrappedNativeScope *scope, bool *enabled)
 {
     if (!scope->NewDOMBindingsEnabled()) {
         *enabled = false;
@@ -789,17 +789,17 @@ ListBase<LC>::hasOwn(JSContext *cx, JSOb
             IndexGetterType result;
             *bp = getItemAt(getListObject(proxy), PRUint32(index), result);
             return true;
         }
     }
 
     JSObject *expando = getExpandoObject(proxy);
     if (expando) {
-        JSBool b = JS_TRUE;
+        JSBool b = true;
         JSBool ok = JS_HasPropertyById(cx, expando, id, &b);
         *bp = !!b;
         if (!ok || *bp)
             return ok;
     }
 
     if (hasNameGetter && JSID_IS_STRING(id) && !hasPropertyOnPrototype(cx, proxy, id)) {
         jsval name = STRING_TO_JSVAL(JSID_TO_STRING(id));
--- a/js/xpconnect/src/nsDOMQS.h
+++ b/js/xpconnect/src/nsDOMQS.h
@@ -54,17 +54,17 @@ xpc_qsUnwrapThis<_interface>(JSContext *
     nsresult rv;                                                              \
     nsISupports *native = castNativeFromWrapper(cx, obj, callee, _bit,        \
                                                 pThisRef, pThisVal, lccx,     \
                                                 &rv);                         \
     *ppThis = NULL;  /* avoids uninitialized warnings in callers */           \
     if (failureFatal && !native)                                              \
         return xpc_qsThrow(cx, rv);                                           \
     *ppThis = static_cast<_interface*>(static_cast<_base*>(native));          \
-    return JS_TRUE;                                                           \
+    return true;                                                              \
 }                                                                             \
                                                                               \
 NS_SPECIALIZE_TEMPLATE                                                        \
 inline nsresult                                                               \
 xpc_qsUnwrapArg<_interface>(JSContext *cx,                                    \
                             jsval v,                                          \
                             _interface **ppArg,                               \
                             nsISupports **ppArgRef,                           \
@@ -93,20 +93,20 @@ DOMCI_CASTABLE_INTERFACES(unused)
 // an Element) so we have to special-case nsGenericElement and use
 // nsIContent::IsElement().
 // FIXME: bug 563659.
 inline JSBool
 castToElement(nsIContent *content, jsval val, nsGenericElement **ppInterface,
               jsval *pVal)
 {
     if (!content->IsElement())
-        return JS_FALSE;
+        return false;
     *ppInterface = static_cast<nsGenericElement*>(content->AsElement());
     *pVal = val;
-    return JS_TRUE;
+    return true;
 }
 
 NS_SPECIALIZE_TEMPLATE
 inline JSBool
 xpc_qsUnwrapThis<nsGenericElement>(JSContext *cx,
                                    JSObject *obj,
                                    JSObject *callee,
                                    nsGenericElement **ppThis,
@@ -123,17 +123,17 @@ xpc_qsUnwrapThis<nsGenericElement>(JSCon
     if (ok) {
         if (failureFatal || content)
           ok = castToElement(content, val, ppThis, pThisVal);
         if (failureFatal && !ok)
             xpc_qsThrow(cx, NS_ERROR_XPC_BAD_OP_ON_WN_PROTO);
     }
 
     if (!failureFatal && (!ok || !content)) {
-      ok = JS_TRUE;
+      ok = true;
       *ppThis = nsnull;
     }
 
     return ok;
 }
 
 NS_SPECIALIZE_TEMPLATE
 inline nsresult
--- a/js/xpconnect/src/nsXPConnect.cpp
+++ b/js/xpconnect/src/nsXPConnect.cpp
@@ -74,20 +74,20 @@ NS_IMPL_THREADSAFE_ISUPPORTS7(nsXPConnec
                               nsISupportsWeakReference,
                               nsIThreadObserver,
                               nsIJSRuntimeService,
                               nsIJSContextStack,
                               nsIThreadJSContextStack,
                               nsIJSEngineTelemetryStats)
 
 nsXPConnect* nsXPConnect::gSelf = nsnull;
-JSBool       nsXPConnect::gOnceAliveNowDead = JS_FALSE;
+JSBool       nsXPConnect::gOnceAliveNowDead = false;
 PRUint32     nsXPConnect::gReportAllJSExceptions = 0;
-JSBool       nsXPConnect::gDebugMode = JS_FALSE;
-JSBool       nsXPConnect::gDesiredDebugMode = JS_FALSE;
+JSBool       nsXPConnect::gDebugMode = false;
+JSBool       nsXPConnect::gDesiredDebugMode = false;
 
 // Global cache of the default script security manager (QI'd to
 // nsIScriptSecurityManager)
 nsIScriptSecurityManager *nsXPConnect::gScriptSecurityManager = nsnull;
 
 const char XPC_CONTEXT_STACK_CONTRACTID[] = "@mozilla.org/js/xpc/ContextStack;1";
 const char XPC_RUNTIME_CONTRACTID[]       = "@mozilla.org/js/xpc/RuntimeService;1";
 const char XPC_EXCEPTION_CONTRACTID[]     = "@mozilla.org/js/xpc/Exception;1";
@@ -98,18 +98,18 @@ const char XPC_XPCONNECT_CONTRACTID[]   
 
 /***************************************************************************/
 
 nsXPConnect::nsXPConnect()
     :   mRuntime(nsnull),
         mInterfaceInfoManager(do_GetService(NS_INTERFACEINFOMANAGER_SERVICE_CONTRACTID)),
         mDefaultSecurityManager(nsnull),
         mDefaultSecurityManagerFlags(0),
-        mShuttingDown(JS_FALSE),
-        mNeedGCBeforeCC(JS_TRUE),
+        mShuttingDown(false),
+        mNeedGCBeforeCC(true),
         mCycleCollectionContext(nsnull)
 {
     mRuntime = XPCJSRuntime::newXPCJSRuntime(this);
 
     nsCycleCollector_registerRuntime(nsIProgrammingLanguage::JAVASCRIPT, this);
 #ifdef DEBUG_CC
     mJSRoots.ops = nsnull;
 #endif
@@ -129,17 +129,17 @@ nsXPConnect::~nsXPConnect()
         // otherwise we will create a new safe JS context and attach a
         // components object that won't get GCed.
         // And do this before calling CleanupAllThreads, so that we
         // don't create an extra xpcPerThreadData.
         cx = JS_NewContext(mRuntime->GetJSRuntime(), 8192);
     }
 
     XPCPerThreadData::CleanupAllThreads();
-    mShuttingDown = JS_TRUE;
+    mShuttingDown = true;
     if (cx) {
         JS_BeginRequest(cx);
 
         // XXX Call even if |mRuntime| null?
         XPCWrappedNativeScope::SystemIsBeingShutDown(cx);
 
         mRuntime->SystemIsBeingShutDown(cx);
 
@@ -152,17 +152,17 @@ nsXPConnect::~nsXPConnect()
     gScriptSecurityManager = nsnull;
 
     // shutdown the logging system
     XPC_LOG_FINISH();
 
     delete mRuntime;
 
     gSelf = nsnull;
-    gOnceAliveNowDead = JS_TRUE;
+    gOnceAliveNowDead = true;
 }
 
 // static
 nsXPConnect*
 nsXPConnect::GetXPConnect()
 {
     if (!gSelf) {
         if (gOnceAliveNowDead)
@@ -383,17 +383,17 @@ nsXPConnect::Collect()
     // will already be marked by the JS GC and will thus be colored black
     // themselves. Any C++ objects they hold will have a missing (untraversed)
     // edge from the JS object to the C++ object and so it will be marked black
     // too. This decreases the number of objects that the cycle collector has to
     // deal with.
     // To improve debugging, if DEBUG_CC is defined all JS objects are
     // traversed.
 
-    mNeedGCBeforeCC = JS_FALSE;
+    mNeedGCBeforeCC = false;
 
     XPCCallContext ccx(NATIVE_CALLER);
     if (!ccx.IsValid())
         return;
 
     JSContext *cx = ccx.GetJSContext();
 
     // We want to scan the current thread for GC roots only if it was in a
@@ -924,17 +924,17 @@ nsXPConnect::Traverse(void *p, nsCycleCo
     // if DEBUG_CC is not defined, else we do want to know about all JS objects
     // to get better graphs and explanations.
     if (!cb.WantAllTraces() && isMarked)
         return NS_OK;
 
     TraversalTracer trc(cb);
 
     JS_TRACER_INIT(&trc, cx, NoteJSChild);
-    trc.eagerlyTraceWeakMaps = JS_FALSE;
+    trc.eagerlyTraceWeakMaps = false;
     JS_TraceChildren(&trc, p, traceKind);
 
     if (traceKind != JSTRACE_OBJECT || dontTraverse)
         return NS_OK;
 
     if (clazz == &XPC_WN_Tearoff_JSClass) {
         // A tearoff holds a strong reference to its native object
         // (see XPCWrappedNative::FlatJSObjectFinalized). Its XPCWrappedNative
@@ -1134,17 +1134,17 @@ VerifyTraceXPCGlobalCalled(JSTracer *trc
 
 void
 TraceXPCGlobal(JSTracer *trc, JSObject *obj)
 {
 #ifdef DEBUG
     if (trc->callback == VerifyTraceXPCGlobalCalled) {
         // We don't do anything here, we only want to verify that TraceXPCGlobal
         // was called.
-        reinterpret_cast<VerifyTraceXPCGlobalCalledTracer*>(trc)->ok = JS_TRUE;
+        reinterpret_cast<VerifyTraceXPCGlobalCalledTracer*>(trc)->ok = true;
         return;
     }
 #endif
 
     XPCWrappedNativeScope *scope =
         XPCWrappedNativeScope::GetNativeScope(trc->context, obj);
     if (scope)
         scope->TraceDOMPrototypes(trc);
@@ -1180,17 +1180,17 @@ xpc_CreateGlobalObject(JSContext *cx, JS
             return UnexpectedFailure(NS_ERROR_FAILURE);
         *global = tempGlobal;
     }
 
 #ifdef DEBUG
     if (clasp->flags & JSCLASS_XPCONNECT_GLOBAL) {
         VerifyTraceXPCGlobalCalledTracer trc;
         JS_TRACER_INIT(&trc.base, cx, VerifyTraceXPCGlobalCalled);
-        trc.ok = JS_FALSE;
+        trc.ok = false;
         JS_TraceChildren(&trc.base, *global, JSTRACE_OBJECT);
         NS_ABORT_IF_FALSE(trc.ok, "Trace hook needs to call TraceXPCGlobal if JSCLASS_XPCONNECT_GLOBAL is set.");
     }
 #endif
 
     return NS_OK;
 }
 
@@ -2212,17 +2212,17 @@ nsXPConnect::GetWrappedNativePrototype(J
     if (!scope)
         return UnexpectedFailure(NS_ERROR_FAILURE);
 
     XPCNativeScriptableCreateInfo sciProto;
     XPCWrappedNative::GatherProtoScriptableCreateInfo(aClassInfo, sciProto);
 
     AutoMarkingWrappedNativeProtoPtr proto(ccx);
     proto = XPCWrappedNativeProto::GetNewOrUsed(ccx, scope, aClassInfo,
-                                                &sciProto, JS_FALSE,
+                                                &sciProto, false,
                                                 OBJ_IS_NOT_GLOBAL);
     if (!proto)
         return UnexpectedFailure(NS_ERROR_FAILURE);
 
     nsIXPConnectJSObjectHolder* holder;
     *_retval = holder = XPCJSObjectHolder::newHolder(ccx,
                                                      proto->GetJSProtoObject());
     if (!holder)
@@ -2249,17 +2249,17 @@ nsXPConnect::ReleaseJSContext(JSContext 
             }
         }
 
         if (ccx) {
 #ifdef DEBUG_xpc_hacker
             printf("!xpc - deferring destruction of JSContext @ %p\n",
                    (void *)aJSContext);
 #endif
-            ccx->SetDestroyJSContextInDestructor(JS_TRUE);
+            ccx->SetDestroyJSContextInDestructor(true);
             return NS_OK;
         }
         // else continue on and synchronously destroy the JSContext ...
 
         NS_ASSERTION(!tls->GetJSContextStack() ||
                      !tls->GetJSContextStack()->
                      DEBUG_StackHasJSContext(aJSContext),
                      "JSContext still in threadjscontextstack!");
@@ -2644,18 +2644,18 @@ fail:
         jsds->DeactivateDebugger();
 
     /*
      * If an attempt to turn debug mode on fails, cancel the request. It's
      * always safe to turn debug mode off, since DeactivateDebugger prevents
      * debugger callbacks from having any effect.
      */
     if (gDesiredDebugMode)
-        JS_SetRuntimeDebugMode(rt, JS_FALSE);
-    gDesiredDebugMode = gDebugMode = JS_FALSE;
+        JS_SetRuntimeDebugMode(rt, false);
+    gDesiredDebugMode = gDebugMode = false;
 }
 
 NS_EXPORT_(void)
 xpc_ActivateDebugMode()
 {
     XPCJSRuntime* rt = nsXPConnect::GetRuntimeInstance();
     nsXPConnect::GetXPConnect()->SetDebugModeWhenPossible(true, true);
     nsXPConnect::CheckForDebugMode(rt->GetJSRuntime());
@@ -2845,30 +2845,30 @@ nsXPConnect::Base64Encode(JSContext *cx,
 {
     NS_ASSERTION(cx, "Null context!");
     NS_ASSERTION(out, "Null jsval pointer!");
 
     jsval root = val;
     xpc_qsACString encodedString(cx, root, &root, xpc_qsACString::eNull,
                                  xpc_qsACString::eStringify);
     if (!encodedString.IsValid())
-        return JS_FALSE;
+        return false;
 
     nsCAutoString result;
     if (NS_FAILED(nsXPConnect::Base64Encode(encodedString, result))) {
         JS_ReportError(cx, "Failed to encode base64 data!");
-        return JS_FALSE;
+        return false;
     }
 
     JSString *str = JS_NewStringCopyN(cx, result.get(), result.Length());
     if (!str)
-        return JS_FALSE;
+        return false;
 
     *out = STRING_TO_JSVAL(str);
-    return JS_TRUE;
+    return true;
 }
 
 // static
 nsresult
 nsXPConnect::Base64Decode(const nsACString &aString, nsACString &aBinaryData)
 {
   // Check for overflow.
   if (aString.Length() > PR_UINT32_MAX / 3)
@@ -2923,30 +2923,30 @@ nsXPConnect::Base64Decode(JSContext *cx,
 {
     NS_ASSERTION(cx, "Null context!");
     NS_ASSERTION(out, "Null jsval pointer!");
 
     jsval root = val;
     xpc_qsACString encodedString(cx, root, &root, xpc_qsACString::eNull,
                                  xpc_qsACString::eNull);
     if (!encodedString.IsValid())
-        return JS_FALSE;
+        return false;
 
     nsCAutoString result;
     if (NS_FAILED(nsXPConnect::Base64Decode(encodedString, result))) {
         JS_ReportError(cx, "Failed to decode base64 string!");
-        return JS_FALSE;
+        return false;
     }
 
     JSString *str = JS_NewStringCopyN(cx, result.get(), result.Length());
     if (!str)
-        return JS_FALSE;
+        return false;
 
     *out = STRING_TO_JSVAL(str);
-    return JS_TRUE;
+    return true;
 }
 
 NS_IMETHODIMP
 nsXPConnect::SetDebugModeWhenPossible(bool mode, bool allowSyncDisable)
 {
     gDesiredDebugMode = mode;
     if (!mode && allowSyncDisable)
         CheckForDebugMode(mRuntime->GetJSRuntime());
--- a/js/xpconnect/src/xpcprivate.h
+++ b/js/xpconnect/src/xpcprivate.h
@@ -512,45 +512,45 @@ public:
         {return mDefaultSecurityManagerFlags;}
 
     // This returns an AddRef'd pointer. It does not do this with an 'out' param
     // only because this form is required by the generic module macro:
     // NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR
     static nsXPConnect* GetSingleton();
 
     // Called by module code in dll startup
-    static void InitStatics() { gSelf = nsnull; gOnceAliveNowDead = JS_FALSE; }
+    static void InitStatics() { gSelf = nsnull; gOnceAliveNowDead = false; }
     // Called by module code on dll shutdown.
     static void ReleaseXPConnectSingleton();
 
     virtual ~nsXPConnect();
 
     JSBool IsShuttingDown() const {return mShuttingDown;}
 
-    void EnsureGCBeforeCC() { mNeedGCBeforeCC = JS_TRUE; }
+    void EnsureGCBeforeCC() { mNeedGCBeforeCC = true; }
 
     nsresult GetInfoForIID(const nsIID * aIID, nsIInterfaceInfo** info);
     nsresult GetInfoForName(const char * name, nsIInterfaceInfo** info);
 
     static nsresult Base64Encode(const nsACString &aString,
                                  nsACString &aBinary);
 
     static nsresult Base64Encode(const nsAString &aString,
                                  nsAString &aBinaryData);
 
-    // If this returns JS_FALSE then an exception will be set on cx.
+    // If this returns false then an exception will be set on cx.
     static JSBool Base64Encode(JSContext *cx, jsval val, jsval *out);
 
     static nsresult Base64Decode(const nsACString &aBinaryData,
                                  nsACString &aString);
 
     static nsresult Base64Decode(const nsAString &aBinaryData,
                                  nsAString &aString);
 
-    // If this returns JS_FALSE then an exception will be set on cx.
+    // If this returns false then an exception will be set on cx.
     static JSBool Base64Decode(JSContext *cx, jsval val, jsval *out);
 
     // nsCycleCollectionParticipant
     NS_IMETHOD Root(void *p);
     NS_IMETHOD Unlink(void *p);
     NS_IMETHOD Unroot(void *p);
     NS_IMETHOD Traverse(void *p,
                         nsCycleCollectionTraversalCallback &cb);
@@ -997,21 +997,21 @@ public:
         nsDependentString(char_traits::sEmptyBuffer, char_traits::sEmptyBuffer)
     { SetIsVoid(true); }
 
     JSBool init(JSContext* aContext, JSString* str)
     {
         size_t length;
         const jschar* chars = JS_GetStringCharsZAndLength(aContext, str, &length);
         if (!chars)
-            return JS_FALSE;
+            return false;
 
         NS_ASSERTION(IsEmpty(), "init() on initialized string");
         new(static_cast<nsDependentString *>(this)) nsDependentString(chars, length);
-        return JS_TRUE;
+        return true;
     }
 };
 
 // No virtuals
 // XPCCallContext is ALWAYS declared as a local variable in some function;
 // i.e. instance lifetime is always controled by some C++ function returning.
 //
 // These things are created frequently in many places. We *intentionally* do
@@ -1555,22 +1555,22 @@ public:
 
     JSObject*
     GetPrototypeJSFunction() const {return mPrototypeJSFunction;}
 
     void RemoveWrappedNativeProtos();
 
     static XPCWrappedNativeScope*
     FindInJSObjectScope(JSContext* cx, JSObject* obj,
-                        JSBool OKIfNotInitialized = JS_FALSE,
+                        JSBool OKIfNotInitialized = false,
                         XPCJSRuntime* runtime = nsnull);
 
     static XPCWrappedNativeScope*
     FindInJSObjectScope(XPCCallContext& ccx, JSObject* obj,
-                        JSBool OKIfNotInitialized = JS_FALSE)
+                        JSBool OKIfNotInitialized = false)
     {
         return FindInJSObjectScope(ccx, obj, OKIfNotInitialized,
                                    ccx.GetRuntime());
     }
 
     static void
     SystemIsBeingShutDown(JSContext* cx);
 
@@ -2069,17 +2069,17 @@ public:
     JSClass*                        GetJSClass()
         {return Jsvalify(&mJSClass.base);}
     JSClass*                        GetSlimJSClass()
         {if (mCanBeSlim) return GetJSClass(); return nsnull;}
 
     XPCNativeScriptableShared(JSUint32 aFlags, char* aName,
                               PRUint32 interfacesBitmap)
         : mFlags(aFlags),
-          mCanBeSlim(JS_FALSE)
+          mCanBeSlim(false)
         {memset(&mJSClass, 0, sizeof(mJSClass));
          mJSClass.base.name = aName;  // take ownership
          mJSClass.interfacesBitmap = interfacesBitmap;
          MOZ_COUNT_CTOR(XPCNativeScriptableShared);}
 
     ~XPCNativeScriptableShared()
         {if (mJSClass.base.name)nsMemory::Free((void*)mJSClass.base.name);
          MOZ_COUNT_DTOR(XPCNativeScriptableShared);}
@@ -2673,17 +2673,17 @@ public:
         {return CallMethod(ccx, CALL_SETTER);}
 
     inline JSBool HasInterfaceNoQI(const nsIID& iid);
 
     XPCWrappedNativeTearOff* LocateTearOff(XPCCallContext& ccx,
                                            XPCNativeInterface* aInterface);
     XPCWrappedNativeTearOff* FindTearOff(XPCCallContext& ccx,
                                          XPCNativeInterface* aInterface,
-                                         JSBool needJSObject = JS_FALSE,
+                                         JSBool needJSObject = false,
                                          nsresult* pError = nsnull);
     void Mark() const
     {
         mSet->Mark();
         if (mScriptableInfo) mScriptableInfo->Mark();
         if (HasProto()) GetProto()->Mark();
     }
 
@@ -3459,17 +3459,17 @@ public:
                                   const char** format,
                                   void** iterp);
 
     static PRUint32 GetNSResultCount();
 
     nsXPCException();
     virtual ~nsXPCException();
 
-    static void InitStatics() { sEverMadeOneFromFactory = JS_FALSE; }
+    static void InitStatics() { sEverMadeOneFromFactory = false; }
 
 protected:
     void Reset();
 private:
     char*           mMessage;
     nsresult        mResult;
     char*           mName;
     nsIStackFrame*  mLocation;
@@ -3693,30 +3693,30 @@ public:
         if (EnsureExceptionManager())
             return mExceptionManager;
         return nsnull;
     }
 
     JSBool EnsureExceptionManager()
     {
         if (mExceptionManager)
-            return JS_TRUE;
+            return true;
 
         if (mExceptionManagerNotAvailable)
-            return JS_FALSE;
+            return false;
 
         nsCOMPtr<nsIExceptionService> xs =
             do_GetService(NS_EXCEPTIONSERVICE_CONTRACTID);
         if (xs)
             xs->GetCurrentExceptionManager(&mExceptionManager);
         if (mExceptionManager)
-            return JS_TRUE;
-
-        mExceptionManagerNotAvailable = JS_TRUE;
-        return JS_FALSE;
+            return true;
+
+        mExceptionManagerNotAvailable = true;
+        return false;
     }
 
     XPCJSContextStack* GetJSContextStack() {return mJSContextStack;}
 
     XPCCallContext*  GetCallContext() const {return mCallContext;}
     XPCCallContext*  SetCallContext(XPCCallContext* ccx)
         {XPCCallContext* old = mCallContext; mCallContext = ccx; return old;}
 
--- a/js/xpconnect/src/xpcpublic.h
+++ b/js/xpconnect/src/xpcpublic.h
@@ -84,17 +84,17 @@ xpc_MorphSlimWrapper(JSContext *cx, nsIS
 #define IS_WRAPPER_CLASS(clazz)                                               \
     ((clazz)->ext.isWrappedNative)
 
 inline JSBool
 DebugCheckWrapperClass(JSObject* obj)
 {
     NS_ASSERTION(IS_WRAPPER_CLASS(js::GetObjectClass(obj)),
                  "Forgot to check if this is a wrapper?");
-    return JS_TRUE;
+    return true;
 }
 
 // If IS_WRAPPER_CLASS for the JSClass of an object is true, the object can be
 // a slim wrapper, holding a native in its private slot, or a wrappednative
 // wrapper, holding the XPCWrappedNative in its private slot. A slim wrapper
 // also holds a pointer to its XPCWrappedNativeProto in a reserved slot, we can
 // check that slot for a non-void value to distinguish between the two.
 
--- a/js/xpconnect/wrappers/AccessCheck.cpp
+++ b/js/xpconnect/wrappers/AccessCheck.cpp
@@ -483,17 +483,17 @@ ExposedPropertiesOnly::check(JSContext *
         perm = PermitObjectAccess;
         return true;
     }
 
     perm = DenyAccess;
 
     jsid exposedPropsId = GetRTIdByIndex(cx, XPCJSRuntime::IDX_EXPOSEDPROPS);
 
-    JSBool found = JS_FALSE;
+    JSBool found = false;
     JSAutoEnterCompartment ac;
     if (!ac.enter(cx, wrappedObject) ||
         !JS_HasPropertyById(cx, wrappedObject, exposedPropsId, &found))
         return false;
 
     // Always permit access to "length" and indexed properties of arrays.
     if (JS_IsArrayObject(cx, wrappedObject) &&
         ((JSID_IS_INT(id) && JSID_TO_INT(id) >= 0) ||