Bug 901750 - Change return type of |JSNative| from |JSBool| to |bool|. code=nnethercote,jandem. r=luke,bz.
authorNicholas Nethercote <nnethercote@mozilla.com>
Fri, 02 Aug 2013 00:41:57 -0700
changeset 154462 c9829bff3ae4bf7b770b93a86eb5452cbc0ed020
parent 154395 612f8a4c81788c32bfcae240501a7cf91b033dbe
child 154463 2174a2ce7b02b863d6a9adec6a9c0ca8f501bf35
push idunknown
push userunknown
push dateunknown
reviewersluke, bz
bugs901750
milestone26.0a1
Bug 901750 - Change return type of |JSNative| from |JSBool| to |bool|. code=nnethercote,jandem. r=luke,bz.
caps/src/nsSecurityManagerFactory.cpp
content/base/src/nsDocument.cpp
content/xbl/src/nsXBLProtoImplField.cpp
dom/base/nsDOMClassInfo.cpp
dom/base/nsDOMClassInfo.h
dom/base/nsJSEnvironment.cpp
dom/bindings/BindingUtils.cpp
dom/bindings/BindingUtils.h
dom/bindings/Codegen.py
dom/indexedDB/IDBKeyRange.cpp
dom/plugins/base/nsJSNPRuntime.cpp
dom/system/gonk/SystemWorkerManager.cpp
dom/workers/Events.cpp
dom/workers/Exceptions.cpp
dom/workers/File.cpp
dom/workers/Worker.cpp
dom/workers/WorkerScope.cpp
ipc/testshell/XPCShellEnvironment.cpp
js/public/CallArgs.h
js/src/builtin/BinaryData.cpp
js/src/builtin/BinaryData.h
js/src/builtin/Eval.cpp
js/src/builtin/Eval.h
js/src/builtin/Intl.cpp
js/src/builtin/Intl.h
js/src/builtin/MapObject.cpp
js/src/builtin/MapObject.h
js/src/builtin/Object.cpp
js/src/builtin/Object.h
js/src/builtin/ParallelArray.cpp
js/src/builtin/ParallelArray.h
js/src/builtin/Profilers.cpp
js/src/builtin/RegExp.cpp
js/src/builtin/RegExp.h
js/src/builtin/TestingFunctions.cpp
js/src/builtin/TestingFunctions.h
js/src/ctypes/CTypes.cpp
js/src/ctypes/CTypes.h
js/src/ctypes/Library.cpp
js/src/ctypes/Library.h
js/src/ion/AsmJS.cpp
js/src/ion/AsmJS.h
js/src/ion/AsmJSLink.cpp
js/src/ion/AsmJSLink.h
js/src/ion/BaselineIC.cpp
js/src/ion/CodeGenerator.cpp
js/src/ion/IonCaches.cpp
js/src/jsapi-tests/testCallNonGenericMethodOnProxy.cpp
js/src/jsapi-tests/testChromeBuffer.cpp
js/src/jsapi-tests/testClassGetter.cpp
js/src/jsapi-tests/testContexts.cpp
js/src/jsapi-tests/testCustomIterator.cpp
js/src/jsapi-tests/testDebugger.cpp
js/src/jsapi-tests/testDefineGetterSetterNonEnumerable.cpp
js/src/jsapi-tests/testEnclosingFunction.cpp
js/src/jsapi-tests/testNewObject.cpp
js/src/jsapi-tests/testObjectEmulatingUndefined.cpp
js/src/jsapi-tests/testOps.cpp
js/src/jsapi-tests/testParseJSON.cpp
js/src/jsapi-tests/testProfileStrings.cpp
js/src/jsapi.cpp
js/src/jsapi.h
js/src/jsarray.cpp
js/src/jsarray.h
js/src/jsbool.cpp
js/src/jscntxt.h
js/src/jscntxtinlines.h
js/src/jsdate.cpp
js/src/jsdate.h
js/src/jsexn.cpp
js/src/jsfriendapi.h
js/src/jsfun.cpp
js/src/jsfun.h
js/src/jsiter.cpp
js/src/jsiter.h
js/src/jsmath.cpp
js/src/jsmath.h
js/src/jsnum.cpp
js/src/jsnum.h
js/src/json.cpp
js/src/jsproxy.cpp
js/src/jsreflect.cpp
js/src/jsstr.cpp
js/src/jsstr.h
js/src/jsweakmap.cpp
js/src/perf/jsperf.cpp
js/src/shell/js.cpp
js/src/shell/jsheaptools.cpp
js/src/shell/jsheaptools.h
js/src/vm/Debugger.cpp
js/src/vm/Debugger.h
js/src/vm/GlobalObject.cpp
js/src/vm/SelfHosting.cpp
js/src/vm/TypedArrayObject.cpp
js/src/vm/TypedArrayObject.h
js/xpconnect/loader/mozJSComponentLoader.cpp
js/xpconnect/shell/xpcshell.cpp
js/xpconnect/src/XPCComponents.cpp
js/xpconnect/src/XPCQuickStubs.cpp
js/xpconnect/src/XPCQuickStubs.h
js/xpconnect/src/XPCWrappedNativeJSOps.cpp
js/xpconnect/src/XPCWrapper.cpp
js/xpconnect/src/qsgen.py
js/xpconnect/src/xpcprivate.h
js/xpconnect/wrappers/XrayWrapper.cpp
netwerk/base/src/ProxyAutoConfig.cpp
storage/src/mozStorageStatementJSHelper.cpp
toolkit/components/telemetry/Telemetry.cpp
--- a/caps/src/nsSecurityManagerFactory.cpp
+++ b/caps/src/nsSecurityManagerFactory.cpp
@@ -42,17 +42,17 @@ nsSecurityNameSet::nsSecurityNameSet()
 }
 
 nsSecurityNameSet::~nsSecurityNameSet()
 {
 }
 
 NS_IMPL_ISUPPORTS1(nsSecurityNameSet, nsIScriptExternalNameSet)
 
-static JSBool
+static bool
 netscape_security_enablePrivilege(JSContext *cx, unsigned argc, JS::Value *vp)
 {
     Telemetry::Accumulate(Telemetry::ENABLE_PRIVILEGE_EVER_CALLED, true);
     return xpc::EnableUniversalXPConnect(cx);
 }
 
 static const JSFunctionSpec PrivilegeManager_static_methods[] = {
     JS_FS("enablePrivilege", netscape_security_enablePrivilege, 1, 0),
--- a/content/base/src/nsDocument.cpp
+++ b/content/base/src/nsDocument.cpp
@@ -5150,17 +5150,17 @@ nsIDocument::CreateAttributeNS(const nsA
     return nullptr;
   }
 
   nsRefPtr<Attr> attribute = new Attr(nullptr, nodeInfo.forget(),
                                       EmptyString(), true);
   return attribute.forget();
 }
 
-static JSBool
+static bool
 CustomElementConstructor(JSContext *aCx, unsigned aArgc, JS::Value* aVp)
 {
   JS::CallArgs args = JS::CallArgsFromVp(aArgc, aVp);
 
   JS::Rooted<JSObject*> global(aCx,
     JS_GetGlobalForObject(aCx, &args.callee()));
   nsCOMPtr<nsPIDOMWindow> window = do_QueryWrapper(aCx, global);
   MOZ_ASSERT(window, "Should have a non-null window");
--- a/content/xbl/src/nsXBLProtoImplField.cpp
+++ b/content/xbl/src/nsXBLProtoImplField.cpp
@@ -246,17 +246,17 @@ FieldGetterImpl(JSContext *cx, JS::CallA
   JS::Rooted<JS::Value> v(cx);
   if (!JS_GetPropertyById(cx, thisObj, id, &v)) {
     return false;
   }
   args.rval().set(v);
   return true;
 }
 
-static JSBool
+static bool
 FieldGetter(JSContext *cx, unsigned argc, JS::Value *vp)
 {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
   return JS::CallNonGenericMethod<ValueHasISupportsPrivate, FieldGetterImpl>
                                  (cx, args);
 }
 
 bool
@@ -283,17 +283,17 @@ FieldSetterImpl(JSContext *cx, JS::CallA
     if (!::JS_SetPropertyById(cx, thisObj, id, args.get(0))) {
       return false;
     }
   }
   args.rval().setUndefined();
   return true;
 }
 
-static JSBool
+static bool
 FieldSetter(JSContext *cx, unsigned argc, JS::Value *vp)
 {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
   return JS::CallNonGenericMethod<ValueHasISupportsPrivate, FieldSetterImpl>
                                  (cx, args);
 }
 
 nsresult
--- a/dom/base/nsDOMClassInfo.cpp
+++ b/dom/base/nsDOMClassInfo.cpp
@@ -3777,22 +3777,22 @@ nsWindowSH::GlobalResolve(nsGlobalWindow
     *did_resolve = true;
   }
 
   return rv;
 }
 
 // Native code for window._content getter, this simply maps
 // window._content to window.content for backwards compatibility only.
-static JSBool
+static bool
 ContentWindowGetter(JSContext *cx, unsigned argc, jsval *vp)
 {
   JSObject *obj = JS_THIS_OBJECT(cx, vp);
   if (!obj)
-    return JS_FALSE;
+    return false;
 
   JS::Rooted<JS::Value> value(cx);
   bool result = ::JS_GetProperty(cx, obj, "content", &value);
   *vp = value;
   return result;
 }
 
 template<class Interface>
@@ -4812,54 +4812,54 @@ void
 nsHTMLDocumentSH::ReleaseDocument(JSFreeOp *fop, JSObject *obj)
 {
   nsIHTMLDocument* doc = GetDocument(obj);
   if (doc) {
     nsContentUtils::DeferredFinalize(doc);
   }
 }
 
-JSBool
+bool
 nsHTMLDocumentSH::CallToGetPropMapper(JSContext *cx, unsigned argc, jsval *vp)
 {
   // Handle document.all("foo") style access to document.all.
 
   if (argc != 1) {
     // XXX: Should throw NS_ERROR_XPC_NOT_ENOUGH_ARGS for argc < 1,
     // and create a new NS_ERROR_XPC_TOO_MANY_ARGS for argc > 1? IE
     // accepts nothing other than one arg.
     xpc::Throw(cx, NS_ERROR_INVALID_ARG);
 
-    return JS_FALSE;
+    return false;
   }
 
   // Convert all types to string.
   JS::Rooted<JSString*> str(cx, ::JS_ValueToString(cx, JS_ARGV(cx, vp)[0]));
   if (!str) {
-    return JS_FALSE;
+    return false;
   }
 
   // If we are called via document.all(id) instead of document.all.item(i) or
   // another method, use the document.all callee object as self.
   JSObject *self;
   JS::Value callee = JS_CALLEE(cx, vp);
   if (callee.isObject() &&
       JS_GetClass(&callee.toObject()) == &sHTMLDocumentAllClass) {
     self = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
   } else {
     self = JS_THIS_OBJECT(cx, vp);
     if (!self)
-      return JS_FALSE;
+      return false;
   }
 
   size_t length;
   JS::Anchor<JSString *> anchor(str);
   const jschar *chars = ::JS_GetStringCharsAndLength(cx, str, &length);
   if (!chars) {
-    return JS_FALSE;
+    return false;
   }
 
   JS::Rooted<JS::Value> value(cx);
   if (!::JS_GetUCProperty(cx, self, chars, length, &value)) {
     return false;
   }
 
   *vp = value;
--- a/dom/base/nsDOMClassInfo.h
+++ b/dom/base/nsDOMClassInfo.h
@@ -447,17 +447,17 @@ protected:
                                        nsDocument *doc,
                                        nsContentList **nodeList);
 public:
   static JSBool DocumentAllGetProperty(JSContext *cx, JS::Handle<JSObject*> obj, JS::Handle<jsid> id,
                                        JS::MutableHandle<JS::Value> vp);
   static JSBool DocumentAllNewResolve(JSContext *cx, JS::Handle<JSObject*> obj, JS::Handle<jsid> id,
                                       unsigned flags, JS::MutableHandle<JSObject*> objp);
   static void ReleaseDocument(JSFreeOp *fop, JSObject *obj);
-  static JSBool CallToGetPropMapper(JSContext *cx, unsigned argc, jsval *vp);
+  static bool CallToGetPropMapper(JSContext *cx, unsigned argc, jsval *vp);
 };
 
 
 // String array helper
 
 class nsStringArraySH : public nsGenericArraySH
 {
 protected:
--- a/dom/base/nsJSEnvironment.cpp
+++ b/dom/base/nsJSEnvironment.cpp
@@ -1985,148 +1985,148 @@ nsJSContext::AddSupportsPrimitiveTojsval
 #ifdef XP_UNIX
 #include <unistd.h>
 #endif
 #ifdef XP_WIN32
 #include <io.h>
 #endif
 #include "nsTraceMalloc.h"
 
-static JSBool
+static bool
 CheckUniversalXPConnectForTraceMalloc(JSContext *cx)
 {
     if (nsContentUtils::IsCallerChrome())
-        return JS_TRUE;
+        return true;
     JS_ReportError(cx, "trace-malloc functions require UniversalXPConnect");
-    return JS_FALSE;
+    return false;
 }
 
-static JSBool
+static bool
 TraceMallocDisable(JSContext *cx, unsigned argc, JS::Value *vp)
 {
     if (!CheckUniversalXPConnectForTraceMalloc(cx))
-        return JS_FALSE;
+        return false;
 
     NS_TraceMallocDisable();
     JS_SET_RVAL(cx, vp, JSVAL_VOID);
-    return JS_TRUE;
+    return true;
 }
 
-static JSBool
+static bool
 TraceMallocEnable(JSContext *cx, unsigned argc, JS::Value *vp)
 {
     if (!CheckUniversalXPConnectForTraceMalloc(cx))
-        return JS_FALSE;
+        return false;
 
     NS_TraceMallocEnable();
     JS_SET_RVAL(cx, vp, JSVAL_VOID);
-    return JS_TRUE;
+    return true;
 }
 
-static JSBool
+static bool
 TraceMallocOpenLogFile(JSContext *cx, unsigned argc, JS::Value *vp)
 {
     int fd;
     JSString *str;
 
     if (!CheckUniversalXPConnectForTraceMalloc(cx))
-        return JS_FALSE;
+        return false;
 
     if (argc == 0) {
         fd = -1;
     } else {
         str = JS_ValueToString(cx, JS_ARGV(cx, vp)[0]);
         if (!str)
-            return JS_FALSE;
+            return false;
         JSAutoByteString filename(cx, str);
         if (!filename)
-            return JS_FALSE;
+            return false;
         fd = open(filename.ptr(), O_CREAT | O_WRONLY | O_TRUNC, 0644);
         if (fd < 0) {
             JS_ReportError(cx, "can't open %s: %s", filename.ptr(), strerror(errno));
-            return JS_FALSE;
+            return false;
         }
     }
     JS_SET_RVAL(cx, vp, INT_TO_JSVAL(fd));
-    return JS_TRUE;
+    return true;
 }
 
-static JSBool
+static bool
 TraceMallocChangeLogFD(JSContext *cx, unsigned argc, JS::Value *vp)
 {
     if (!CheckUniversalXPConnectForTraceMalloc(cx))
-        return JS_FALSE;
+        return false;
 
     int32_t fd, oldfd;
     if (argc == 0) {
         oldfd = -1;
     } else {
         if (!JS_ValueToECMAInt32(cx, JS_ARGV(cx, vp)[0], &fd))
-            return JS_FALSE;
+            return false;
         oldfd = NS_TraceMallocChangeLogFD(fd);
         if (oldfd == -2) {
             JS_ReportOutOfMemory(cx);
-            return JS_FALSE;
+            return false;
         }
     }
     JS_SET_RVAL(cx, vp, INT_TO_JSVAL(oldfd));
-    return JS_TRUE;
+    return true;
 }
 
-static JSBool
+static bool
 TraceMallocCloseLogFD(JSContext *cx, unsigned argc, JS::Value *vp)
 {
     if (!CheckUniversalXPConnectForTraceMalloc(cx))
-        return JS_FALSE;
+        return false;
 
     int32_t fd;
     JS_SET_RVAL(cx, vp, JSVAL_VOID);
     if (argc == 0)
-        return JS_TRUE;
+        return true;
     if (!JS_ValueToECMAInt32(cx, JS_ARGV(cx, vp)[0], &fd))
-        return JS_FALSE;
+        return false;
     NS_TraceMallocCloseLogFD((int) fd);
-    return JS_TRUE;
+    return true;
 }
 
-static JSBool
+static bool
 TraceMallocLogTimestamp(JSContext *cx, unsigned argc, JS::Value *vp)
 {
     if (!CheckUniversalXPConnectForTraceMalloc(cx))
-        return JS_FALSE;
+        return false;
 
     JSString *str = JS_ValueToString(cx, argc ? JS_ARGV(cx, vp)[0] : JSVAL_VOID);
     if (!str)
-        return JS_FALSE;
+        return false;
     JSAutoByteString caption(cx, str);
     if (!caption)
-        return JS_FALSE;
+        return false;
     NS_TraceMallocLogTimestamp(caption.ptr());
     JS_SET_RVAL(cx, vp, JSVAL_VOID);
-    return JS_TRUE;
+    return true;
 }
 
-static JSBool
+static bool
 TraceMallocDumpAllocations(JSContext *cx, unsigned argc, JS::Value *vp)
 {
     if (!CheckUniversalXPConnectForTraceMalloc(cx))
-        return JS_FALSE;
+        return false;
 
     JSString *str = JS_ValueToString(cx, argc ? JS_ARGV(cx, vp)[0] : JSVAL_VOID);
     if (!str)
-        return JS_FALSE;
+        return false;
     JSAutoByteString pathname(cx, str);
     if (!pathname)
-        return JS_FALSE;
+        return false;
     if (NS_TraceMallocDumpAllocations(pathname.ptr()) < 0) {
         JS_ReportError(cx, "can't dump to %s: %s", pathname.ptr(), strerror(errno));
-        return JS_FALSE;
+        return false;
     }
     JS_SET_RVAL(cx, vp, JSVAL_VOID);
-    return JS_TRUE;
+    return true;
 }
 
 static const JSFunctionSpec TraceMallocFunctions[] = {
     JS_FS("TraceMallocDisable",         TraceMallocDisable,         0, 0),
     JS_FS("TraceMallocEnable",          TraceMallocEnable,          0, 0),
     JS_FS("TraceMallocOpenLogFile",     TraceMallocOpenLogFile,     1, 0),
     JS_FS("TraceMallocChangeLogFD",     TraceMallocChangeLogFD,     1, 0),
     JS_FS("TraceMallocCloseLogFD",      TraceMallocCloseLogFD,      1, 0),
@@ -2142,43 +2142,43 @@ static const JSFunctionSpec TraceMallocF
 #include <errno.h>
 
 namespace mozilla {
 namespace dmd {
 
 // See https://wiki.mozilla.org/Performance/MemShrink/DMD for instructions on
 // how to use DMD.
 
-static JSBool
+static bool
 ReportAndDump(JSContext *cx, unsigned argc, JS::Value *vp)
 {
   JSString *str = JS_ValueToString(cx, argc ? JS_ARGV(cx, vp)[0] : JSVAL_VOID);
   if (!str)
-    return JS_FALSE;
+    return false;
   JSAutoByteString pathname(cx, str);
   if (!pathname)
-    return JS_FALSE;
+    return false;
 
   FILE* fp = fopen(pathname.ptr(), "w");
   if (!fp) {
     JS_ReportError(cx, "DMD can't open %s: %s",
                    pathname.ptr(), strerror(errno));
-    return JS_FALSE;
+    return false;
   }
 
   dmd::ClearReports();
   fprintf(stderr, "DMD: running reporters...\n");
   dmd::RunReporters();
   dmd::Writer writer(FpWrite, fp);
   dmd::Dump(writer);
 
   fclose(fp);
 
   JS_SET_RVAL(cx, vp, JSVAL_VOID);
-  return JS_TRUE;
+  return true;
 }
 
 } // namespace dmd
 } // namespace mozilla
 
 static const JSFunctionSpec DMDFunctions[] = {
     JS_FS("DMDReportAndDump", dmd::ReportAndDump, 1, 0),
     JS_FS_END
@@ -2196,21 +2196,21 @@ IsJProfAction(struct sigaction *action)
     return (action->sa_sigaction &&
             (action->sa_flags & (SA_RESTART | SA_SIGINFO)) == (SA_RESTART | SA_SIGINFO));
 }
 
 void NS_JProfStartProfiling();
 void NS_JProfStopProfiling();
 void NS_JProfClearCircular();
 
-static JSBool
+static bool
 JProfStartProfilingJS(JSContext *cx, unsigned argc, JS::Value *vp)
 {
   NS_JProfStartProfiling();
-  return JS_TRUE;
+  return true;
 }
 
 void NS_JProfStartProfiling()
 {
     // Figure out whether we're dealing with SIGPROF, SIGALRM, or
     // SIGPOLL profiling (SIGALRM for JP_REALTIME, SIGPOLL for
     // JP_RTC_HZ)
     struct sigaction action;
@@ -2238,51 +2238,51 @@ void NS_JProfStartProfiling()
         //printf("Beginning rtc-based jprof profiling.\n");
         raise(SIGPOLL);
         return;
     }
 
     printf("Could not start jprof-profiling since JPROF_FLAGS was not set.\n");
 }
 
-static JSBool
+static bool
 JProfStopProfilingJS(JSContext *cx, unsigned argc, JS::Value *vp)
 {
   NS_JProfStopProfiling();
-  return JS_TRUE;
+  return true;
 }
 
 void
 NS_JProfStopProfiling()
 {
     raise(SIGUSR1);
     //printf("Stopped jprof profiling.\n");
 }
 
-static JSBool
+static bool
 JProfClearCircularJS(JSContext *cx, unsigned argc, JS::Value *vp)
 {
   NS_JProfClearCircular();
-  return JS_TRUE;
+  return true;
 }
 
 void
 NS_JProfClearCircular()
 {
     raise(SIGUSR2);
     //printf("cleared jprof buffer\n");
 }
 
-static JSBool
+static bool
 JProfSaveCircularJS(JSContext *cx, unsigned argc, JS::Value *vp)
 {
   // Not ideal...
   NS_JProfStopProfiling();
   NS_JProfStartProfiling();
-  return JS_TRUE;
+  return true;
 }
 
 static const JSFunctionSpec JProfFunctions[] = {
     JS_FS("JProfStartProfiling",        JProfStartProfilingJS,      0, 0),
     JS_FS("JProfStopProfiling",         JProfStopProfilingJS,       0, 0),
     JS_FS("JProfClearCircular",         JProfClearCircularJS,       0, 0),
     JS_FS("JProfSaveCircular",          JProfSaveCircularJS,        0, 0),
     JS_FS_END
--- a/dom/bindings/BindingUtils.cpp
+++ b/dom/bindings/BindingUtils.cpp
@@ -272,17 +272,17 @@ DefineUnforgeableAttributes(JSContext* c
 // passed a non-Function object we also need to provide our own toString method
 // for interface objects.
 
 enum {
   TOSTRING_CLASS_RESERVED_SLOT = 0,
   TOSTRING_NAME_RESERVED_SLOT = 1
 };
 
-JSBool
+bool
 InterfaceObjectToString(JSContext* cx, unsigned argc, JS::Value *vp)
 {
   JS::Rooted<JSObject*> callee(cx, JSVAL_TO_OBJECT(JS_CALLEE(cx, vp)));
 
   JS::Rooted<JSObject*> obj(cx, JS_THIS_OBJECT(cx, vp));
   if (!obj) {
     JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL, JSMSG_CANT_CONVERT_TO,
                          "null", "object");
@@ -312,17 +312,17 @@ InterfaceObjectToString(JSContext* cx, u
   str.Append('\n');
   str.AppendLiteral("    [native code]");
   str.Append('\n');
   str.AppendLiteral("}");
 
   return xpc::NonVoidStringToJsval(cx, str, vp);
 }
 
-JSBool
+bool
 Constructor(JSContext* cx, unsigned argc, JS::Value* vp)
 {
   JSObject* callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
   const JS::Value& v =
     js::GetFunctionNativeReserved(callee,
                                   CONSTRUCTOR_NATIVE_HOLDER_RESERVED_SLOT);
   const JSNativeHolder* nativeHolder =
     static_cast<const JSNativeHolder*>(v.toPrivate());
@@ -712,17 +712,17 @@ VariantToJsval(JSContext* aCx, JS::Handl
       Throw<true>(aCx, NS_FAILED(rv) ? rv : NS_ERROR_UNEXPECTED);
     }
     return false;
   }
 
   return true;
 }
 
-JSBool
+bool
 QueryInterface(JSContext* cx, unsigned argc, JS::Value* vp)
 {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
   JS::Rooted<JS::Value> thisv(cx, JS_THIS(cx, vp));
   if (thisv.isNull())
     return false;
 
   // Get the object. It might be a security wrapper, in which case we do a checked
@@ -771,17 +771,17 @@ QueryInterface(JSContext* cx, unsigned a
   if (NS_FAILED(rv)) {
     return Throw<true>(cx, rv);
   }
 
   *vp = thisv;
   return true;
 }
 
-JSBool
+bool
 ThrowingConstructor(JSContext* cx, unsigned argc, JS::Value* vp)
 {
   return ThrowErrorMessage(cx, MSG_ILLEGAL_CONSTRUCTOR);
 }
 
 inline const NativePropertyHooks*
 GetNativePropertyHooks(JSContext *cx, JS::Handle<JSObject*> obj,
                        DOMObjectType& type)
--- a/dom/bindings/BindingUtils.h
+++ b/dom/bindings/BindingUtils.h
@@ -1381,17 +1381,17 @@ InitIds(JSContext* cx, const Prefable<Sp
     // corresponding to the list terminator for the pref.
     *ids = JSID_VOID;
     ++ids;
   } while ((++prefableSpecs)->specs);
 
   return true;
 }
 
-JSBool
+bool
 QueryInterface(JSContext* cx, unsigned argc, JS::Value* vp);
 
 template <class T, bool isISupports=IsBaseOf<nsISupports, T>::value>
 struct
 WantsQueryInterface
 {
   static bool Enabled(JSContext* aCx, JSObject* aGlobal)
   {
@@ -1403,17 +1403,17 @@ struct
 WantsQueryInterface<T, true>
 {
   static bool Enabled(JSContext* aCx, JSObject* aGlobal)
   {
     return IsChromeOrXBL(aCx, aGlobal);
   }
 };
 
-JSBool
+bool
 ThrowingConstructor(JSContext* cx, unsigned argc, JS::Value* vp);
 
 bool
 GetPropertyOnPrototype(JSContext* cx, JS::Handle<JSObject*> proxy,
                        JS::Handle<jsid> id, bool* found,
                        JS::Value* vp);
 
 bool
@@ -1948,17 +1948,17 @@ extern NativePropertyHooks sWorkerNative
 // Note that some interface objects are not yet a JSFunction but a normal
 // JSObject with a DOMJSClass, those do not use these slots.
 
 enum {
   CONSTRUCTOR_NATIVE_HOLDER_RESERVED_SLOT = 0,
   CONSTRUCTOR_XRAY_EXPANDO_SLOT
 };
 
-JSBool
+bool
 Constructor(JSContext* cx, unsigned argc, JS::Value* vp);
 
 inline bool
 UseDOMXray(JSObject* obj)
 {
   const js::Class* clasp = js::GetObjectClass(obj);
   return IsDOMClass(clasp) ||
          IsDOMProxy(obj, clasp) ||
--- a/dom/bindings/Codegen.py
+++ b/dom/bindings/Codegen.py
@@ -1012,17 +1012,17 @@ class CGClassTraceHook(CGAbstractClassHo
   }""" % (self.name, self.args[0].name)
 
 class CGClassConstructor(CGAbstractStaticMethod):
     """
     JS-visible constructor for our objects
     """
     def __init__(self, descriptor, ctor, name=CONSTRUCT_HOOK_NAME):
         args = [Argument('JSContext*', 'cx'), Argument('unsigned', 'argc'), Argument('JS::Value*', 'vp')]
-        CGAbstractStaticMethod.__init__(self, descriptor, name, 'JSBool', args)
+        CGAbstractStaticMethod.__init__(self, descriptor, name, 'bool', args)
         self._ctor = ctor
 
     def define(self):
         if not self._ctor:
             return ""
         return CGAbstractStaticMethod.define(self)
 
     def definition_body(self):
@@ -5189,17 +5189,17 @@ class CGAbstractBindingMethod(CGAbstract
     setters.  This will generate the function declaration and unwrap the
     |this| object.  Subclasses are expected to override the generate_code
     function to do the rest of the work.  This function should return a
     CGThing which is already properly indented.
     """
     def __init__(self, descriptor, name, args, unwrapFailureCode=None,
                  getThisObj="args.computeThis(cx).toObjectOrNull()",
                  callArgs="JS::CallArgs args = JS::CallArgsFromVp(argc, vp);",
-                 returnType="JSBool"):
+                 returnType="bool"):
         CGAbstractStaticMethod.__init__(self, descriptor, name, returnType, args)
 
         if unwrapFailureCode is None:
             self.unwrapFailureCode = 'return ThrowErrorMessage(cx, MSG_THIS_DOES_NOT_IMPLEMENT_INTERFACE, "Value", "%s");' % descriptor.interface.identifier.name
         else:
             self.unwrapFailureCode = unwrapFailureCode
         self.getThisObj = getThisObj
         self.callArgs = callArgs
@@ -5233,17 +5233,17 @@ class CGAbstractStaticBindingMethod(CGAb
     and setters.  This will generate the function declaration and unwrap the
     global object.  Subclasses are expected to override the generate_code
     function to do the rest of the work.  This function should return a
     CGThing which is already properly indented.
     """
     def __init__(self, descriptor, name):
         args = [Argument('JSContext*', 'cx'), Argument('unsigned', 'argc'),
                 Argument('JS::Value*', 'vp')]
-        CGAbstractStaticMethod.__init__(self, descriptor, name, "JSBool", args)
+        CGAbstractStaticMethod.__init__(self, descriptor, name, "bool", args)
 
     def definition_body(self):
         unwrap = CGGeneric("""JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
 JS::RootedObject obj(cx, args.computeThis(cx).toObjectOrNull());
 if (!obj) {
   return false;
 }""")
         return CGList([ CGIndenter(unwrap),
@@ -5357,17 +5357,17 @@ class CGNewResolveHook(CGAbstractBinding
     def __init__(self, descriptor):
         assert descriptor.interface.getExtendedAttribute("NeedNewResolve")
         args = [Argument('JSContext*', 'cx'), Argument('JS::Handle<JSObject*>', 'obj'),
                 Argument('JS::Handle<jsid>', 'id'), Argument('unsigned', 'flags'),
                 Argument('JS::MutableHandle<JSObject*>', 'objp')]
         # Our "self" is actually the "obj" argument in this case, not the thisval.
         CGAbstractBindingMethod.__init__(
             self, descriptor, NEWRESOLVE_HOOK_NAME,
-            args, getThisObj="", callArgs="")
+            args, getThisObj="", callArgs="", returnType="JSBool")
 
     def generate_code(self):
         return CGIndenter(CGGeneric(
                 "JS::Rooted<JS::Value> value(cx);\n"
                 "if (!self->DoNewResolve(cx, obj, id, &value)) {\n"
                 "  return false;\n"
                 "}\n"
                 "if (value.isUndefined()) {\n"
@@ -5385,17 +5385,17 @@ class CGEnumerateHook(CGAbstractBindingM
     """
     def __init__(self, descriptor):
         assert descriptor.interface.getExtendedAttribute("NeedNewResolve")
         args = [Argument('JSContext*', 'cx'),
                 Argument('JS::Handle<JSObject*>', 'obj')]
         # Our "self" is actually the "obj" argument in this case, not the thisval.
         CGAbstractBindingMethod.__init__(
             self, descriptor, ENUMERATE_HOOK_NAME,
-            args, getThisObj="", callArgs="")
+            args, getThisObj="", callArgs="", returnType="JSBool")
 
     def generate_code(self):
         return CGIndenter(CGGeneric(
                 "nsAutoTArray<nsString, 8> names;\n"
                 "ErrorResult rv;\n"
                 "self->GetOwnPropertyNames(cx, names, rv);\n"
                 "rv.WouldReportJSException();\n"
                 "if (rv.Failed()) {\n"
@@ -6929,17 +6929,17 @@ class CGResolveOwnPropertyViaNewresolve(
                 Argument('JS::Handle<JSObject*>', 'wrapper'),
                 Argument('JS::Handle<JSObject*>', 'obj'),
                 Argument('JS::Handle<jsid>', 'id'),
                 Argument('JSPropertyDescriptor*', 'desc'), Argument('unsigned', 'flags'),
                 ]
         CGAbstractBindingMethod.__init__(self, descriptor,
                                          "ResolveOwnPropertyViaNewresolve",
                                          args, getThisObj="",
-                                         callArgs="", returnType="bool")
+                                         callArgs="")
     def generate_code(self):
         return CGIndenter(CGGeneric(
                 "JS::Rooted<JS::Value> value(cx);\n"
                 "if (!self->DoNewResolve(cx, obj, id, &value)) {\n"
                 "  return false;\n"
                 "}\n"
                 "if (!value.isUndefined()) {\n"
                 "  FillPropertyDescriptor(desc, wrapper, value, /* readonly = */ false);\n"
@@ -6966,17 +6966,17 @@ class CGEnumerateOwnPropertiesViaGetOwnP
     def __init__(self, descriptor):
         args = [Argument('JSContext*', 'cx'),
                 Argument('JS::Handle<JSObject*>', 'wrapper'),
                 Argument('JS::Handle<JSObject*>', 'obj'),
                 Argument('JS::AutoIdVector&', 'props')]
         CGAbstractBindingMethod.__init__(self, descriptor,
                                          "EnumerateOwnPropertiesViaGetOwnPropertyNames",
                                          args, getThisObj="",
-                                         callArgs="", returnType="bool")
+                                         callArgs="")
     def generate_code(self):
         return CGIndenter(CGGeneric(
                 "nsAutoTArray<nsString, 8> names;\n"
                 "ErrorResult rv;\n"
                 "self->GetOwnPropertyNames(cx, names, rv);\n"
                 "rv.WouldReportJSException();\n"
                 "if (rv.Failed()) {\n"
                 '  return ThrowMethodFailedWithDetails<true>(cx, rv, "%s", "enumerate");\n'
@@ -9683,17 +9683,17 @@ class CGJSImplClass(CGBindingImplClass):
             [Argument("JS::Handle<JSObject*>", "aJSImplObject"),
              Argument("nsPIDOMWindow*", "aParent")],
             visibility="public",
             baseConstructors=baseConstructors,
             body=constructorBody)
 
         self.methodDecls.append(
             ClassMethod("_Create",
-                        "JSBool",
+                        "bool",
                         [Argument("JSContext*", "cx"),
                          Argument("unsigned", "argc"),
                          Argument("JS::Value*", "vp")],
                         static=True,
                         body=self.getCreateFromExistingBody()))
 
         CGClass.__init__(self, descriptor.name,
                          bases=baseClasses,
--- a/dom/indexedDB/IDBKeyRange.cpp
+++ b/dom/indexedDB/IDBKeyRange.cpp
@@ -101,17 +101,17 @@ GetKeyFromJSValOrThrow(JSContext* aCx,
   nsresult rv = GetKeyFromJSVal(aCx, aVal, aKey);
   if (NS_FAILED(rv)) {
     ThrowException(aCx, rv);
     return false;
   }
   return true;
 }
 
-JSBool
+bool
 MakeOnlyKeyRange(JSContext* aCx,
                  unsigned aArgc,
                  jsval* aVp)
 {
   NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
 
   JS::Rooted<JS::Value> val(aCx);
   if (!JS_ConvertArguments(aCx, aArgc, JS_ARGV(aCx, aVp), "v", val.address())) {
@@ -122,17 +122,17 @@ MakeOnlyKeyRange(JSContext* aCx,
 
   if (!GetKeyFromJSValOrThrow(aCx, val, keyRange->Lower())) {
     return false;
   }
 
   return ReturnKeyRange(aCx, aVp, keyRange);
 }
 
-JSBool
+bool
 MakeLowerBoundKeyRange(JSContext* aCx,
                        unsigned aArgc,
                        jsval* aVp)
 {
   NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
 
   JS::Rooted<JS::Value> val(aCx);
   JSBool open = false;
@@ -145,17 +145,17 @@ MakeLowerBoundKeyRange(JSContext* aCx,
 
   if (!GetKeyFromJSValOrThrow(aCx, val, keyRange->Lower())) {
     return false;
   }
 
   return ReturnKeyRange(aCx, aVp, keyRange);
 }
 
-JSBool
+bool
 MakeUpperBoundKeyRange(JSContext* aCx,
                        unsigned aArgc,
                        jsval* aVp)
 {
   NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
 
   JS::Rooted<JS::Value> val(aCx);
   JSBool open = false;
@@ -168,17 +168,17 @@ MakeUpperBoundKeyRange(JSContext* aCx,
 
   if (!GetKeyFromJSValOrThrow(aCx, val, keyRange->Upper())) {
     return false;
   }
 
   return ReturnKeyRange(aCx, aVp, keyRange);
 }
 
-JSBool
+bool
 MakeBoundKeyRange(JSContext* aCx,
                   unsigned aArgc,
                   jsval* aVp)
 {
   NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
 
   JS::Rooted<JS::Value> lowerVal(aCx), upperVal(aCx);
   JSBool lowerOpen = false, upperOpen = false;
--- a/dom/plugins/base/nsJSNPRuntime.cpp
+++ b/dom/plugins/base/nsJSNPRuntime.cpp
@@ -130,20 +130,20 @@ NPObjWrapper_NewResolve(JSContext *cx, J
                         JS::MutableHandle<JSObject*> objp);
 
 static JSBool
 NPObjWrapper_Convert(JSContext *cx, JS::Handle<JSObject*> obj, JSType type, JS::MutableHandle<JS::Value> vp);
 
 static void
 NPObjWrapper_Finalize(JSFreeOp *fop, JSObject *obj);
 
-static JSBool
+static bool
 NPObjWrapper_Call(JSContext *cx, unsigned argc, JS::Value *vp);
 
-static JSBool
+static bool
 NPObjWrapper_Construct(JSContext *cx, unsigned argc, JS::Value *vp);
 
 static JSBool
 CreateNPObjectMember(NPP npp, JSContext *cx, JSObject *obj, NPObject *npobj,
                      JS::Handle<jsid> id, NPVariant* getPropertyResult, JS::Value *vp);
 
 JSClass sNPObjectJSWrapperClass =
   {
@@ -171,17 +171,17 @@ typedef struct NPObjectMemberPrivate {
 } NPObjectMemberPrivate;
 
 static JSBool
 NPObjectMember_Convert(JSContext *cx, JS::Handle<JSObject*> obj, JSType type, JS::MutableHandle<JS::Value> vp);
 
 static void
 NPObjectMember_Finalize(JSFreeOp *fop, JSObject *obj);
 
-static JSBool
+static bool
 NPObjectMember_Call(JSContext *cx, unsigned argc, JS::Value *vp);
 
 static void
 NPObjectMember_Trace(JSTracer *trc, JSObject *obj);
 
 static JSClass sNPObjectMemberClass =
   {
     "NPObject Ambiguous Member class", JSCLASS_HAS_PRIVATE | JSCLASS_IMPLEMENTS_BARRIERS,
@@ -1447,22 +1447,22 @@ CallNPMethodInternal(JSContext *cx, JS::
   *rval = NPVariantToJSVal(npp, cx, &v);
 
   // *rval now owns the value, release our reference.
   _releasevariantvalue(&v);
 
   return ReportExceptionIfPending(cx);
 }
 
-static JSBool
+static bool
 CallNPMethod(JSContext *cx, unsigned argc, JS::Value *vp)
 {
   JS::Rooted<JSObject*> obj(cx, JS_THIS_OBJECT(cx, vp));
   if (!obj)
-      return JS_FALSE;
+      return false;
 
   return CallNPMethodInternal(cx, obj, argc, JS_ARGV(cx, vp), vp, false);
 }
 
 struct NPObjectEnumerateState {
   uint32_t     index;
   uint32_t     length;
   NPIdentifier *value;
@@ -1648,30 +1648,28 @@ NPObjWrapper_Finalize(JSFreeOp *fop, JSO
     }
   }
 
   if (!sDelayedReleases)
     sDelayedReleases = new nsTArray<NPObject*>;
   sDelayedReleases->AppendElement(npobj);
 }
 
-static JSBool
+static bool
 NPObjWrapper_Call(JSContext *cx, unsigned argc, JS::Value *vp)
 {
   JS::Rooted<JSObject*> obj(cx, JSVAL_TO_OBJECT(JS_CALLEE(cx, vp)));
-  return CallNPMethodInternal(cx, obj, argc,
-                              JS_ARGV(cx, vp), vp, false);
+  return CallNPMethodInternal(cx, obj, argc, JS_ARGV(cx, vp), vp, false);
 }
 
-static JSBool
+static bool
 NPObjWrapper_Construct(JSContext *cx, unsigned argc, JS::Value *vp)
 {
   JS::Rooted<JSObject*> obj(cx, JSVAL_TO_OBJECT(JS_CALLEE(cx, vp)));
-  return CallNPMethodInternal(cx, obj, argc,
-                              JS_ARGV(cx, vp), vp, true);
+  return CallNPMethodInternal(cx, obj, argc, JS_ARGV(cx, vp), vp, true);
 }
 
 class NPObjWrapperHashEntry : public PLDHashEntryHdr
 {
 public:
   NPObject *mNPObj; // Must be the first member for the PLDHash stubs to work
   JSObject *mJSObj;
   NPP mNpp;
@@ -2063,63 +2061,63 @@ NPObjectMember_Finalize(JSFreeOp *fop, J
 
   memberPrivate = (NPObjectMemberPrivate *)::JS_GetPrivate(obj);
   if (!memberPrivate)
     return;
 
   PR_Free(memberPrivate);
 }
 
-static JSBool
+static bool
 NPObjectMember_Call(JSContext *cx, unsigned argc, JS::Value *vp)
 {
   JSObject *memobj = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
-  NS_ENSURE_TRUE(memobj, JS_FALSE);
+  NS_ENSURE_TRUE(memobj, false);
 
   NPObjectMemberPrivate *memberPrivate =
     (NPObjectMemberPrivate *)::JS_GetInstancePrivate(cx, memobj,
                                                      &sNPObjectMemberClass,
                                                      JS_ARGV(cx, vp));
   if (!memberPrivate || !memberPrivate->npobjWrapper)
-    return JS_FALSE;
+    return false;
 
   NPObject *npobj = GetNPObject(cx, memberPrivate->npobjWrapper);
   if (!npobj) {
     ThrowJSException(cx, "Call on invalid member object");
 
-    return JS_FALSE;
+    return false;
   }
 
   NPVariant npargs_buf[8];
   NPVariant *npargs = npargs_buf;
 
   if (argc > (sizeof(npargs_buf) / sizeof(NPVariant))) {
     // Our stack buffer isn't large enough to hold all arguments,
     // malloc a buffer.
     npargs = (NPVariant *)PR_Malloc(argc * sizeof(NPVariant));
 
     if (!npargs) {
       ThrowJSException(cx, "Out of memory!");
 
-      return JS_FALSE;
+      return false;
     }
   }
 
   // Convert arguments
   uint32_t i;
   JS::Value *argv = JS_ARGV(cx, vp);
   for (i = 0; i < argc; ++i) {
     if (!JSValToNPVariant(memberPrivate->npp, cx, argv[i], npargs + i)) {
       ThrowJSException(cx, "Error converting jsvals to NPVariants!");
 
       if (npargs != npargs_buf) {
         PR_Free(npargs);
       }
 
-      return JS_FALSE;
+      return false;
     }
   }
 
 
   NPVariant npv;
   JSBool ok;
   ok = npobj->_class->invoke(npobj, JSIdToNPIdentifier(memberPrivate->methodName),
                              npargs, argc, &npv);
@@ -2134,17 +2132,17 @@ NPObjectMember_Call(JSContext *cx, unsig
   }
 
   if (!ok) {
     // ReportExceptionIfPending returns a return value, which is JS_TRUE
     // if no exception was thrown. In that case, throw our own.
     if (ReportExceptionIfPending(cx))
       ThrowJSException(cx, "Error calling method on NPObject!");
 
-    return JS_FALSE;
+    return false;
   }
 
   JS_SET_RVAL(cx, vp, NPVariantToJSVal(memberPrivate->npp, cx, &npv));
 
   // *vp now owns the value, release our reference.
   _releasevariantvalue(&npv);
 
   return ReportExceptionIfPending(cx);
--- a/dom/system/gonk/SystemWorkerManager.cpp
+++ b/dom/system/gonk/SystemWorkerManager.cpp
@@ -83,17 +83,17 @@ public:
     return NS_OK;
   }
 
 private:
   UnixSocketRawData *mRawData;
   unsigned long mClientId;
 };
 
-JSBool
+bool
 PostToRIL(JSContext *cx, unsigned argc, JS::Value *vp)
 {
   NS_ASSERTION(!NS_IsMainThread(), "Expecting to be on the worker thread");
 
   if (argc != 2) {
     JS_ReportError(cx, "Expecting two arguments with the RIL message");
     return false;
   }
@@ -155,17 +155,17 @@ ConnectWorkerToRIL::RunTask(JSContext *a
   JSObject *workerGlobal = JS::CurrentGlobalOrNull(aCx);
 
   return !!JS_DefineFunction(aCx, workerGlobal, "postRILMessage", PostToRIL, 1,
                              0);
 }
 
 #ifdef MOZ_WIDGET_GONK
 
-JSBool
+bool
 DoNetdCommand(JSContext *cx, unsigned argc, JS::Value *vp)
 {
   NS_ASSERTION(!NS_IsMainThread(), "Expecting to be on the worker thread");
 
   if (argc != 1) {
     JS_ReportError(cx, "Expecting a single argument with the Netd message");
     return false;
   }
--- a/dom/workers/Events.cpp
+++ b/dom/workers/Events.cpp
@@ -199,17 +199,17 @@ protected:
                        aCancelable ? JSVAL_TRUE : JSVAL_FALSE);
     JS_SetReservedSlot(aObj, SLOT_timeStamp, JS::NumberValue(double(JS_Now())));
     JS_SetReservedSlot(aObj, SLOT_defaultPrevented, JSVAL_FALSE);
     JS_SetReservedSlot(aObj, SLOT_isTrusted,
                        aIsTrusted ? JSVAL_TRUE : JSVAL_FALSE);
   }
 
 private:
-  static JSBool
+  static bool
   Construct(JSContext* aCx, unsigned aArgc, jsval* aVp)
   {
     JS_ReportErrorNumber(aCx, js_GetErrorMessage, NULL, JSMSG_WRONG_CONSTRUCTOR,
                          sClass.name);
     return false;
   }
 
   static void
@@ -243,17 +243,17 @@ private:
     JS_ASSERT(JSID_IS_INT(idval));
     JS_ASSERT(JSID_TO_INT(idval) >= CAPTURING_PHASE &&
               JSID_TO_INT(idval) <= BUBBLING_PHASE);
 
     aVp.set(INT_TO_JSVAL(JSID_TO_INT(idval)));
     return true;
   }
 
-  static JSBool
+  static bool
   StopPropagation(JSContext* aCx, unsigned aArgc, jsval* aVp)
   {
     JSObject* obj = JS_THIS_OBJECT(aCx, aVp);
     if (!obj) {
       return false;
     }
 
     Event* event = GetInstancePrivate(aCx, obj, sFunctions[0].name);
@@ -261,35 +261,35 @@ private:
       return false;
     }
 
     event->mStopPropagationCalled = true;
 
     return true;
   }
 
-  static JSBool
+  static bool
   StopImmediatePropagation(JSContext* aCx, unsigned aArgc, jsval* aVp)
   {
     JSObject* obj = JS_THIS_OBJECT(aCx, aVp);
     if (!obj) {
       return false;
     }
 
     Event* event = GetInstancePrivate(aCx, obj, sFunctions[3].name);
     if (!event) {
       return false;
     }
 
     event->mStopImmediatePropagationCalled = true;
 
     return true;
   }
-  
-  static JSBool
+
+  static bool
   PreventDefault(JSContext* aCx, unsigned aArgc, jsval* aVp)
   {
     JS::Rooted<JSObject*> obj(aCx, JS_THIS_OBJECT(aCx, aVp));
     if (!obj) {
       return false;
     }
 
     Event* event = GetInstancePrivate(aCx, obj, sFunctions[1].name);
@@ -299,17 +299,17 @@ private:
 
     jsval cancelableVal = JS_GetReservedSlot(obj, SLOT_cancelable);
 
     if (JSVAL_TO_BOOLEAN(cancelableVal))
       JS_SetReservedSlot(obj, SLOT_defaultPrevented, cancelableVal);
     return true;
   }
 
-  static JSBool
+  static bool
   InitEvent(JSContext* aCx, unsigned aArgc, jsval* aVp)
   {
     JS::Rooted<JSObject*> obj(aCx, JS_THIS_OBJECT(aCx, aVp));
     if (!obj) {
       return false;
     }
 
     Event* event = GetInstancePrivate(aCx, obj, sFunctions[2].name);
@@ -485,17 +485,17 @@ private:
                            aIsTrusted);
     JS_SetReservedSlot(aObj, SLOT_data,
                        aData ? STRING_TO_JSVAL(aData) : emptyString);
     JS_SetReservedSlot(aObj, SLOT_origin,
                        aOrigin ? STRING_TO_JSVAL(aOrigin) : emptyString);
     JS_SetReservedSlot(aObj, SLOT_source, OBJECT_TO_JSVAL(aSource));
   }
 
-  static JSBool
+  static bool
   Construct(JSContext* aCx, unsigned aArgc, jsval* aVp)
   {
     JS_ReportErrorNumber(aCx, js_GetErrorMessage, NULL, JSMSG_WRONG_CONSTRUCTOR,
                          sClass.name);
     return false;
   }
 
   static void
@@ -542,17 +542,17 @@ private:
       aVp.set(data);
       return true;
     }
 
     aVp.set(JS_GetReservedSlot(aObj, slot));
     return true;
   }
 
-  static JSBool
+  static bool
   InitMessageEvent(JSContext* aCx, unsigned aArgc, jsval* aVp)
   {
     JS::Rooted<JSObject*> obj(aCx, JS_THIS_OBJECT(aCx, aVp));
     if (!obj) {
       return false;
     }
 
     MessageEvent* event = GetInstancePrivate(aCx, obj, sFunctions[0].name);
@@ -694,17 +694,17 @@ private:
   {
     Event::InitEventCommon(aObj, aEvent, aType, aBubbles, aCancelable,
                            aIsTrusted);
     JS_SetReservedSlot(aObj, SLOT_message, STRING_TO_JSVAL(aMessage));
     JS_SetReservedSlot(aObj, SLOT_filename, STRING_TO_JSVAL(aFilename));
     JS_SetReservedSlot(aObj, SLOT_lineno, INT_TO_JSVAL(aLineNumber));
   }
 
-  static JSBool
+  static bool
   Construct(JSContext* aCx, unsigned aArgc, jsval* aVp)
   {
     JS_ReportErrorNumber(aCx, js_GetErrorMessage, NULL, JSMSG_WRONG_CONSTRUCTOR,
                          sClass.name);
     return false;
   }
 
   static void
@@ -729,17 +729,17 @@ private:
     if (!event) {
       return false;
     }
 
     aVp.set(JS_GetReservedSlot(aObj, slot));
     return true;
   }
 
-  static JSBool
+  static bool
   InitErrorEvent(JSContext* aCx, unsigned aArgc, jsval* aVp)
   {
     JS::Rooted<JSObject*> obj(aCx, JS_THIS_OBJECT(aCx, aVp));
     if (!obj) {
       return false;
     }
 
     ErrorEvent* event = GetInstancePrivate(aCx, obj, sFunctions[0].name);
@@ -874,17 +874,17 @@ private:
     Event::InitEventCommon(aObj, aEvent, aType, aBubbles, aCancelable,
                            aIsTrusted);
     JS_SetReservedSlot(aObj, SLOT_lengthComputable,
                        aLengthComputable ? JSVAL_TRUE : JSVAL_FALSE);
     JS_SetReservedSlot(aObj, SLOT_loaded, DOUBLE_TO_JSVAL(aLoaded));
     JS_SetReservedSlot(aObj, SLOT_total, DOUBLE_TO_JSVAL(aTotal));
   }
 
-  static JSBool
+  static bool
   Construct(JSContext* aCx, unsigned aArgc, jsval* aVp)
   {
     JS_ReportErrorNumber(aCx, js_GetErrorMessage, NULL, JSMSG_WRONG_CONSTRUCTOR,
                          sClass.name);
     return false;
   }
 
   static void
--- a/dom/workers/Exceptions.cpp
+++ b/dom/workers/Exceptions.cpp
@@ -64,32 +64,32 @@ private:
     MOZ_COUNT_CTOR(mozilla::dom::workers::exceptions::DOMException);
   }
 
   ~DOMException()
   {
     MOZ_COUNT_DTOR(mozilla::dom::workers::exceptions::DOMException);
   }
 
-  static JSBool
+  static bool
   Construct(JSContext* aCx, unsigned aArgc, jsval* aVp)
   {
     JS_ReportErrorNumber(aCx, js_GetErrorMessage, NULL, JSMSG_WRONG_CONSTRUCTOR,
                          sClass.name);
     return false;
   }
 
   static void
   Finalize(JSFreeOp* aFop, JSObject* aObj)
   {
     JS_ASSERT(JS_GetClass(aObj) == &sClass);
     delete GetJSPrivateSafeish<DOMException>(aObj);
   }
 
-  static JSBool
+  static bool
   ToString(JSContext* aCx, unsigned aArgc, jsval* aVp)
   {
     JS::Rooted<JSObject*> obj(aCx, JS_THIS_OBJECT(aCx, aVp));
     if (!obj) {
       return false;
     }
 
     JSClass* classPtr = JS_GetClass(obj);
--- a/dom/workers/File.cpp
+++ b/dom/workers/File.cpp
@@ -79,17 +79,17 @@ private:
   }
 
   static nsIDOMBlob*
   Unwrap(JSContext* aCx, JSObject* aObj)
   {
     return GetPrivate(aObj);
   }
 
-  static JSBool
+  static bool
   Construct(JSContext* aCx, unsigned aArgc, jsval* aVp)
   {
     nsRefPtr<nsDOMMultipartFile> file = new nsDOMMultipartFile();
     nsresult rv = file->InitBlob(aCx, aArgc, JS_ARGV(aCx, aVp), Unwrap);
     if (NS_FAILED(rv)) {
       ThrowDOMExceptionForNSResult(aCx, rv);
       return false;
     }
@@ -152,17 +152,17 @@ private:
       return false;
     }
 
     aVp.set(STRING_TO_JSVAL(jsType));
 
     return true;
   }
 
-  static JSBool
+  static bool
   Slice(JSContext* aCx, unsigned aArgc, jsval* aVp)
   {
     JS::Rooted<JSObject*> obj(aCx, JS_THIS_OBJECT(aCx, aVp));
     if (!obj) {
       return false;
     }
 
     nsIDOMBlob* blob = GetInstancePrivate(aCx, obj, "slice");
@@ -281,17 +281,17 @@ private:
     }
 
     JS_ReportErrorNumber(aCx, js_GetErrorMessage, NULL,
                          JSMSG_INCOMPATIBLE_PROTO, sClass.name, aFunctionName,
                          JS_GetClass(aObj)->name);
     return NULL;
   }
 
-  static JSBool
+  static bool
   Construct(JSContext* aCx, unsigned aArgc, jsval* aVp)
   {
     JS_ReportErrorNumber(aCx, js_GetErrorMessage, NULL, JSMSG_WRONG_CONSTRUCTOR,
                          sClass.name);
     return false;
   }
 
   static void
--- a/dom/workers/Worker.cpp
+++ b/dom/workers/Worker.cpp
@@ -98,17 +98,17 @@ public:
 
     return proto;
   }
 
   static WorkerPrivate*
   GetInstancePrivate(JSContext* aCx, JSObject* aObj, const char* aFunctionName);
 
 protected:
-  static JSBool
+  static bool
   ConstructInternal(JSContext* aCx, unsigned aArgc, jsval* aVp,
                     bool aIsChromeWorker, JSClass* aClass)
   {
     if (!aArgc) {
       JS_ReportError(aCx, "Constructor requires at least one argument!");
       return false;
     }
 
@@ -225,17 +225,17 @@ private:
     if (rv.Failed()) {
       JS_ReportError(aCx, "Failed to set listener!");
       return false;
     }
 
     return true;
   }
 
-  static JSBool
+  static bool
   Construct(JSContext* aCx, unsigned aArgc, jsval* aVp)
   {
     return ConstructInternal(aCx, aArgc, aVp, false, Class());
   }
 
   static void
   Finalize(JSFreeOp* aFop, JSObject* aObj)
   {
@@ -251,34 +251,34 @@ private:
   {
     JS_ASSERT(JS_GetClass(aObj) == Class());
     WorkerPrivate* worker = UnwrapDOMObject<WorkerPrivate>(aObj);
     if (worker) {
       worker->_trace(aTrc);
     }
   }
 
-  static JSBool
+  static bool
   Terminate(JSContext* aCx, unsigned aArgc, jsval* aVp)
   {
     JSObject* obj = JS_THIS_OBJECT(aCx, aVp);
     if (!obj) {
       return false;
     }
 
     const char* name = sFunctions[0].name;
     WorkerPrivate* worker = GetInstancePrivate(aCx, obj, name);
     if (!worker) {
       return !JS_IsExceptionPending(aCx);
     }
 
     return worker->Terminate(aCx);
   }
 
-  static JSBool
+  static bool
   PostMessage(JSContext* aCx, unsigned aArgc, jsval* aVp)
   {
     JSObject* obj = JS_THIS_OBJECT(aCx, aVp);
     if (!obj) {
       return false;
     }
 
     const char* name = sFunctions[1].name;
@@ -430,17 +430,17 @@ private:
       if (classPtr == Class()) {
         return UnwrapDOMObject<WorkerPrivate>(aObj);
       }
     }
 
     return Worker::GetInstancePrivate(aCx, aObj, aFunctionName);
   }
 
-  static JSBool
+  static bool
   Construct(JSContext* aCx, unsigned aArgc, jsval* aVp)
   {
     return ConstructInternal(aCx, aArgc, aVp, true, Class());
   }
 
   static void
   Finalize(JSFreeOp* aFop, JSObject* aObj)
   {
--- a/dom/workers/WorkerScope.cpp
+++ b/dom/workers/WorkerScope.cpp
@@ -199,17 +199,17 @@ private:
     }
 
     return true;
   }
 
   static WorkerGlobalScope*
   GetInstancePrivate(JSContext* aCx, JSObject* aObj, const char* aFunctionName);
 
-  static JSBool
+  static bool
   Construct(JSContext* aCx, unsigned aArgc, jsval* aVp)
   {
     JS_ReportErrorNumber(aCx, js_GetErrorMessage, NULL, JSMSG_WRONG_CONSTRUCTOR,
                          sClass.name);
     return false;
   }
 
   static JSBool
@@ -245,17 +245,17 @@ private:
 
       scope->mSlots[SLOT_location] = OBJECT_TO_JSVAL(location->GetJSObject());
     }
 
     aVp.set(scope->mSlots[SLOT_location]);
     return true;
   }
 
-  static JSBool
+  static bool
   UnwrapErrorEvent(JSContext* aCx, unsigned aArgc, jsval* aVp)
   {
     JS_ASSERT(aArgc == 1);
     JS_ASSERT((JS_ARGV(aCx, aVp)[0]).isObject());
 
     JSObject* wrapper = &JS_CALLEE(aCx, aVp).toObject();
     JS_ASSERT(JS_ObjectIsFunction(aCx, wrapper));
 
@@ -382,33 +382,33 @@ private:
 
       scope->mSlots[SLOT_navigator] = OBJECT_TO_JSVAL(navigator->GetJSObject());
     }
 
     aVp.set(scope->mSlots[SLOT_navigator]);
     return true;
   }
 
-  static JSBool
+  static bool
   Close(JSContext* aCx, unsigned aArgc, jsval* aVp)
   {
     JSObject* obj = JS_THIS_OBJECT(aCx, aVp);
     if (!obj) {
       return false;
     }
 
     WorkerGlobalScope* scope = GetInstancePrivate(aCx, obj, sFunctions[0].name);
     if (!scope) {
       return false;
     }
 
     return scope->mWorker->CloseInternal(aCx);
   }
 
-  static JSBool
+  static bool
   ImportScripts(JSContext* aCx, unsigned aArgc, jsval* aVp)
   {
     JSObject* obj = JS_THIS_OBJECT(aCx, aVp);
     if (!obj) {
       return false;
     }
 
     WorkerGlobalScope* scope = GetInstancePrivate(aCx, obj, sFunctions[1].name);
@@ -418,17 +418,17 @@ private:
 
     if (aArgc && !scriptloader::Load(aCx, aArgc, JS_ARGV(aCx, aVp))) {
       return false;
     }
 
     return true;
   }
 
-  static JSBool
+  static bool
   SetTimeout(JSContext* aCx, unsigned aArgc, jsval* aVp)
   {
     JSObject* obj = JS_THIS_OBJECT(aCx, aVp);
     if (!obj) {
       return false;
     }
 
     WorkerGlobalScope* scope = GetInstancePrivate(aCx, obj, sFunctions[2].name);
@@ -439,17 +439,17 @@ private:
     JS::Rooted<JS::Value> dummy(aCx);
     if (!JS_ConvertArguments(aCx, aArgc, JS_ARGV(aCx, aVp), "v", dummy.address())) {
       return false;
     }
 
     return scope->mWorker->SetTimeout(aCx, aArgc, aVp, false);
   }
 
-  static JSBool
+  static bool
   ClearTimeout(JSContext* aCx, unsigned aArgc, jsval* aVp)
   {
     JSObject* obj = JS_THIS_OBJECT(aCx, aVp);
     if (!obj) {
       return false;
     }
 
     WorkerGlobalScope* scope = GetInstancePrivate(aCx, obj, sFunctions[3].name);
@@ -460,17 +460,17 @@ private:
     uint32_t id;
     if (!JS_ConvertArguments(aCx, aArgc, JS_ARGV(aCx, aVp), "u", &id)) {
       return false;
     }
 
     return scope->mWorker->ClearTimeout(aCx, id);
   }
 
-  static JSBool
+  static bool
   SetInterval(JSContext* aCx, unsigned aArgc, jsval* aVp)
   {
     JSObject* obj = JS_THIS_OBJECT(aCx, aVp);
     if (!obj) {
       return false;
     }
 
     WorkerGlobalScope* scope = GetInstancePrivate(aCx, obj, sFunctions[4].name);
@@ -502,17 +502,17 @@ private:
     uint32_t id;
     if (!JS_ConvertArguments(aCx, aArgc, JS_ARGV(aCx, aVp), "u", &id)) {
       return false;
     }
 
     return scope->mWorker->ClearTimeout(aCx, id);
   }
 
-  static JSBool
+  static bool
   Dump(JSContext* aCx, unsigned aArgc, jsval* aVp)
   {
     JSObject* obj = JS_THIS_OBJECT(aCx, aVp);
     if (!obj) {
       return false;
     }
 
     if (!GetInstancePrivate(aCx, obj, sFunctions[6].name)) {
@@ -535,17 +535,17 @@ private:
 #endif
       fputs(buffer.ptr(), stdout);
       fflush(stdout);
     }
 
     return true;
   }
 
-  static JSBool
+  static bool
   AtoB(JSContext* aCx, unsigned aArgc, jsval* aVp)
   {
     JSObject* obj = JS_THIS_OBJECT(aCx, aVp);
     if (!obj) {
       return false;
     }
 
     if (!GetInstancePrivate(aCx, obj, sFunctions[7].name)) {
@@ -561,17 +561,17 @@ private:
     if (!xpc::Base64Decode(aCx, string, result.address())) {
       return false;
     }
 
     JS_SET_RVAL(aCx, aVp, result);
     return true;
   }
 
-  static JSBool
+  static bool
   BtoA(JSContext* aCx, unsigned aArgc, jsval* aVp)
   {
     JSObject* obj = JS_THIS_OBJECT(aCx, aVp);
     if (!obj) {
       return false;
     }
 
     if (!GetInstancePrivate(aCx, obj, sFunctions[8].name)) {
@@ -782,17 +782,17 @@ private:
     }
 
     JS_ReportErrorNumber(aCx, js_GetErrorMessage, NULL,
                          JSMSG_INCOMPATIBLE_PROTO, Class()->name, aFunctionName,
                          classPtr->name);
     return NULL;
   }
 
-  static JSBool
+  static bool
   Construct(JSContext* aCx, unsigned aArgc, jsval* aVp)
   {
     JS_ReportErrorNumber(aCx, js_GetErrorMessage, NULL, JSMSG_WRONG_CONSTRUCTOR,
                          Class()->name);
     return false;
   }
 
   static JSBool
@@ -827,17 +827,17 @@ private:
     DedicatedWorkerGlobalScope* scope =
       UnwrapDOMObject<DedicatedWorkerGlobalScope>(aObj);
     if (scope) {
       TraceProtoAndIfaceCache(aTrc, aObj);
       scope->_trace(aTrc);
     }
   }
 
-  static JSBool
+  static bool
   PostMessage(JSContext* aCx, unsigned aArgc, jsval* aVp)
   {
     JSObject* obj = JS_THIS_OBJECT(aCx, aVp);
     if (!obj) {
       return false;
     }
 
     const char* name = sFunctions[0].name;
--- a/ipc/testshell/XPCShellEnvironment.cpp
+++ b/ipc/testshell/XPCShellEnvironment.cpp
@@ -81,206 +81,206 @@ Environment(JSObject* global)
     if (!JS_GetProperty(cx, global, "__XPCShellEnvironment", &v) ||
         !v.get().isDouble())
     {
         return nullptr;
     }
     return static_cast<XPCShellEnvironment*>(v.get().toPrivate());
 }
 
-static JSBool
+static bool
 Print(JSContext *cx,
       unsigned argc,
       JS::Value *vp)
 {
     unsigned i, n;
     JSString *str;
 
     JS::Value *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 bytes(cx, str);
         if (!bytes)
-            return JS_FALSE;
+            return false;
         fprintf(stdout, "%s%s", i ? " " : "", bytes.ptr());
         fflush(stdout);
     }
     n++;
     if (n)
         fputc('\n', stdout);
     JS_SET_RVAL(cx, vp, JSVAL_VOID);
-    return JS_TRUE;
+    return true;
 }
 
 static JSBool
 GetLine(char *bufp,
         FILE *file,
         const char *prompt)
 {
     char line[256];
     fputs(prompt, stdout);
     fflush(stdout);
     if (!fgets(line, sizeof line, file))
         return JS_FALSE;
     strcpy(bufp, line);
     return JS_TRUE;
 }
 
-static JSBool
+static bool
 Dump(JSContext *cx,
      unsigned argc,
      JS::Value *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;
 
     fputs(bytes.ptr(), stdout);
     fflush(stdout);
-    return JS_TRUE;
+    return true;
 }
 
-static JSBool
+static bool
 Load(JSContext *cx,
      unsigned argc,
      JS::Value *vp)
 {
     JS::Rooted<JS::Value> result(cx);
 
     JS::Rooted<JSObject*> obj(cx, JS_THIS_OBJECT(cx, vp));
     if (!obj)
-        return JS_FALSE;
+        return false;
 
     JS::Value *argv = JS_ARGV(cx, vp);
     for (unsigned i = 0; i < argc; i++) {
         JSString *str = JS_ValueToString(cx, argv[i]);
         if (!str)
-            return JS_FALSE;
+            return false;
         argv[i] = STRING_TO_JSVAL(str);
         JSAutoByteString filename(cx, str);
         if (!filename)
-            return JS_FALSE;
+            return false;
         FILE *file = fopen(filename.ptr(), "r");
         if (!file) {
             JS_ReportError(cx, "cannot open file '%s' for reading", filename.ptr());
-            return JS_FALSE;
+            return false;
         }
         JS::CompileOptions options(cx);
         options.setUTF8(true)
                .setFileAndLine(filename.ptr(), 1)
                .setPrincipals(Environment(JS::CurrentGlobalOrNull(cx))->GetPrincipal());
         JS::RootedObject rootedObj(cx, obj);
         JSScript *script = JS::Compile(cx, rootedObj, options, file);
         fclose(file);
         if (!script)
-            return JS_FALSE;
+            return false;
 
         if (!JS_ExecuteScript(cx, obj, script, result.address())) {
-            return JS_FALSE;
+            return false;
         }
     }
     JS_SET_RVAL(cx, vp, JSVAL_VOID);
-    return JS_TRUE;
+    return true;
 }
 
-static JSBool
+static bool
 Version(JSContext *cx,
         unsigned argc,
         JS::Value *vp)
 {
     JS::Value *argv = JS_ARGV(cx, vp);
     JS_SET_RVAL(cx, vp, INT_TO_JSVAL(JS_GetVersion(cx)));
     if (argc > 0 && JSVAL_IS_INT(argv[0]))
         JS_SetVersionForCompartment(js::GetContextCompartment(cx),
                                     JSVersion(JSVAL_TO_INT(argv[0])));
-    return JS_TRUE;
+    return true;
 }
 
-static JSBool
+static bool
 BuildDate(JSContext *cx, unsigned argc, JS::Value *vp)
 {
     fprintf(stdout, "built on %s at %s\n", __DATE__, __TIME__);
-    return JS_TRUE;
+    return true;
 }
 
-static JSBool
+static bool
 Quit(JSContext *cx,
      unsigned argc,
      JS::Value *vp)
 {
     XPCShellEnvironment* env = Environment(JS::CurrentGlobalOrNull(cx));
     env->SetIsQuitting();
 
-    return JS_FALSE;
+    return false;
 }
 
-static JSBool
+static bool
 DumpXPC(JSContext *cx,
         unsigned argc,
         JS::Value *vp)
 {
     int32_t 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_t(depth));
     JS_SET_RVAL(cx, vp, JSVAL_VOID);
-    return JS_TRUE;
+    return true;
 }
 
-static JSBool
+static bool
 GC(JSContext *cx,
    unsigned argc,
    JS::Value *vp)
 {
     JSRuntime *rt = JS_GetRuntime(cx);
     JS_GC(rt);
 #ifdef JS_GCMETER
     js_DumpGCStats(rt, stdout);
 #endif
     JS_SET_RVAL(cx, vp, JSVAL_VOID);
-    return JS_TRUE;
+    return true;
 }
 
 #ifdef JS_GC_ZEAL
-static JSBool
+static bool
 GCZeal(JSContext *cx, 
        unsigned argc,
        JS::Value *vp)
 {
   JS::Value* argv = JS_ARGV(cx, vp);
 
   uint32_t zeal;
   if (!JS_ValueToECMAUint32(cx, argv[0], &zeal))
-    return JS_FALSE;
+    return false;
 
   JS_SetGCZeal(cx, uint8_t(zeal), JS_DEFAULT_ZEAL_FREQ);
-  return JS_TRUE;
+  return true;
 }
 #endif
 
 #ifdef DEBUG
 
-static JSBool
+static bool
 DumpHeap(JSContext *cx,
          unsigned argc,
          JS::Value *vp)
 {
     JSAutoByteString fileName;
     void* startThing = NULL;
     JSGCTraceKind startTraceKind = JSTRACE_OBJECT;
     void *thingToFind = NULL;
@@ -293,20 +293,20 @@ DumpHeap(JSContext *cx,
     JS_SET_RVAL(cx, vp, JSVAL_VOID);
 
     vp = argv + 0;
     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.encodeLatin1(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);
@@ -319,17 +319,17 @@ DumpHeap(JSContext *cx,
         thingToFind = JSVAL_TO_TRACEABLE(*vp);
     }
 
     vp = argv + 3;
     if (argc > 3 && *vp != JSVAL_NULL && *vp != JSVAL_VOID) {
         uint32_t 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);
@@ -337,33 +337,33 @@ DumpHeap(JSContext *cx,
 
     if (!fileName) {
         dumpFile = stdout;
     } else {
         dumpFile = fopen(fileName.ptr(), "w");
         if (!dumpFile) {
             fprintf(stderr, "dumpHeap: can't open %s: %s\n",
                     fileName.ptr(), strerror(errno));
-            return JS_FALSE;
+            return false;
         }
     }
 
     ok = JS_DumpHeap(JS_GetRuntime(cx), dumpFile, startThing, startTraceKind, thingToFind,
                      maxDepth, thingToIgnore);
     if (dumpFile != stdout)
         fclose(dumpFile);
     if (!ok)
         JS_ReportOutOfMemory(cx);
     return ok;
 
   not_traceable_arg:
     fprintf(stderr,
             "dumpHeap: argument %u is not null or a heap-allocated thing\n",
             (unsigned)(vp - argv));
-    return JS_FALSE;
+    return false;
 }
 
 #endif /* DEBUG */
 
 const JSFunctionSpec gGlobalFunctions[] =
 {
     JS_FS("print",           Print,          0,0),
     JS_FS("load",            Load,           1,0),
--- a/js/public/CallArgs.h
+++ b/js/public/CallArgs.h
@@ -37,36 +37,36 @@
 
 #include "js/RootingAPI.h"
 #include "js/Value.h"
 
 struct JSContext;
 class JSObject;
 
 /* Typedef for native functions called by the JS VM. */
-typedef JSBool
+typedef bool
 (* JSNative)(JSContext *cx, unsigned argc, JS::Value *vp);
 
 /* Typedef for native functions that may be called in parallel. */
 typedef js::ParallelResult
 (* JSParallelNative)(js::ForkJoinSlice *slice, unsigned argc, JS::Value *vp);
 
 /*
  * Typedef for native functions that may be called either in parallel or
  * sequential execution.
  */
-typedef JSBool
+typedef bool
 (* JSThreadSafeNative)(js::ThreadSafeContext *cx, unsigned argc, JS::Value *vp);
 
 /*
  * Convenience wrappers for passing in ThreadSafeNative to places that expect
  * a JSNative or a JSParallelNative.
  */
 template <JSThreadSafeNative threadSafeNative>
-inline JSBool
+inline bool
 JSNativeThreadSafeWrapper(JSContext *cx, unsigned argc, JS::Value *vp);
 
 template <JSThreadSafeNative threadSafeNative>
 inline js::ParallelResult
 JSParallelNativeThreadSafeWrapper(js::ForkJoinSlice *slice, unsigned argc, JS::Value *vp);
 
 /*
  * Compute |this| for the |vp| inside a JSNative, either boxing primitives or
--- a/js/src/builtin/BinaryData.cpp
+++ b/js/src/builtin/BinaryData.cpp
@@ -39,23 +39,23 @@ static bool Reify(JSContext *cx, HandleO
 /*
  * ConvertAndCopyTo() converts `from` to type `type` and stores the result in
  * `mem`, which MUST be pre-allocated to the appropriate size for instances of
  * `type`.
  */
 static bool ConvertAndCopyTo(JSContext *cx, HandleObject type,
                              HandleValue from, uint8_t *mem);
 
-static JSBool
+static bool
 TypeThrowError(JSContext *cx, unsigned argc, Value *vp)
 {
     return ReportIsNotFunction(cx, *vp);
 }
 
-static JSBool
+static bool
 DataThrowError(JSContext *cx, unsigned argc, Value *vp)
 {
     return ReportIsNotFunction(cx, *vp);
 }
 
 static void
 ReportTypeError(JSContext *cx, HandleValue fromValue, const char *toType)
 {
@@ -396,17 +396,17 @@ NumericType<T>::convert(JSContext *cx, H
         int32_t n = ToInt32(d);
         *converted = T(n);
     }
 
     return true;
 }
 
 template <typename T>
-JSBool
+bool
 NumericType<T>::call(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     if (args.length() < 1) {
         JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL, JSMSG_MORE_ARGS_NEEDED,
                              args.callee().getClass()->name, "0", "s");
         return false;
     }
@@ -421,17 +421,17 @@ NumericType<T>::call(JSContext *cx, unsi
         return false;
     }
 
     args.rval().set(reified);
     return true;
 }
 
 template<unsigned int N>
-JSBool
+bool
 NumericTypeToString(JSContext *cx, unsigned int argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     JS_ASSERT(NUMERICTYPE_UINT8 <= N && N <= NUMERICTYPE_FLOAT64);
     JSString *s = JS_NewStringCopyZ(cx, NumericTypeClasses[N].name);
     args.rval().set(StringValue(s));
     return true;
 }
@@ -713,17 +713,17 @@ ArrayType::create(JSContext *cx, HandleO
     RootedValue value(cx);
     if (!DefineNativeProperty(cx, prototypeObj, id, value,
                                 JS_DATA_TO_FUNC_PTR(PropertyOp, getter), NULL,
                                 flags, 0, 0))
         return NULL;
     return obj;
 }
 
-JSBool
+bool
 ArrayType::construct(JSContext *cx, unsigned argc, Value *vp)
 {
     if (!JS_IsConstructing(cx, vp)) {
         JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL,
                              JSMSG_NOT_FUNCTION, "ArrayType");
         return false;
     }
 
@@ -750,17 +750,17 @@ ArrayType::construct(JSContext *cx, unsi
 
     JSObject *obj = create(cx, arrayTypeGlobal, elementType, args[1].toInt32());
     if (!obj)
         return false;
     args.rval().setObject(*obj);
     return true;
 }
 
-JSBool
+bool
 DataInstanceUpdate(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
 
     if (args.length() < 1) {
         JS_ReportErrorNumber(cx, js_GetErrorMessage,
                              NULL, JSMSG_MORE_ARGS_NEEDED,
                              "update()", "0", "s");
@@ -808,17 +808,17 @@ FillBinaryArrayWithValue(JSContext *cx, 
     for (uint32_t i = 1; i < ArrayType::length(cx, type); i++) {
         uint8_t *dest = base + elementSize * i;
         memcpy(dest, base, elementSize);
     }
 
     return true;
 }
 
-JSBool
+bool
 ArrayType::repeat(JSContext *cx, unsigned int argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
 
     if (args.length() < 1) {
         JS_ReportErrorNumber(cx, js_GetErrorMessage,
                              NULL, JSMSG_MORE_ARGS_NEEDED,
                              "repeat()", "0", "s");
@@ -840,17 +840,17 @@ ArrayType::repeat(JSContext *cx, unsigne
     RootedValue val(cx, args[0]);
     if (!FillBinaryArrayWithValue(cx, binaryArray, val))
         return false;
 
     args.rval().setObject(*binaryArray);
     return true;
 }
 
-JSBool
+bool
 ArrayType::toString(JSContext *cx, unsigned int argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
 
     RootedObject thisObj(cx, args.thisv().isObject() ?
                                 args.thisv().toObjectOrNull() : NULL);
     if (!IsArrayType(thisObj)) {
         JS_ReportErrorNumber(cx, js_GetErrorMessage,
@@ -933,17 +933,17 @@ BinaryArray::create(JSContext *cx, Handl
     if (!obj)
         return NULL;
 
     obj->setPrivate(((uint8_t *) owner->getPrivate()) + offset);
     obj->setFixedSlot(SLOT_BLOCKREFOWNER, ObjectValue(*owner));
     return obj;
 }
 
-JSBool
+bool
 BinaryArray::construct(JSContext *cx, unsigned int argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
 
     RootedObject callee(cx, &args.callee());
 
     if (!IsArrayType(callee)) {
         ReportTypeError(cx, args.calleev(), "is not an ArrayType");
@@ -976,17 +976,17 @@ BinaryArray::obj_trace(JSTracer *tracer,
 {
     Value val = obj->getFixedSlot(SLOT_BLOCKREFOWNER);
     if (val.isObject()) {
         HeapPtrObject owner(val.toObjectOrNull());
         MarkObject(tracer, &owner, "binaryarray.blockRefOwner");
     }
 }
 
-JSBool
+bool
 BinaryArray::lengthGetter(JSContext *cx, unsigned int argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     RootedObject thisObj(cx, args.thisv().toObjectOrNull());
     JS_ASSERT(IsBinaryArray(thisObj));
 
     RootedObject type(cx, GetType(thisObj));
     vp->setInt32(ArrayType::length(cx, type));
@@ -1008,17 +1008,18 @@ BinaryArray::lengthGetter(JSContext *cx,
  *     return ret
  *
  * The range specified by the begin and end values is clamped to the valid
  * index range for the current array. If the computed length of the new
  * TypedArray would be negative, it is clamped to zero.
  * see: http://www.khronos.org/registry/typedarray/specs/latest/#7
  *
  */
-JSBool BinaryArray::subarray(JSContext *cx, unsigned int argc, Value *vp)
+bool
+BinaryArray::subarray(JSContext *cx, unsigned int argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
 
     if (args.length() < 1) {
         JS_ReportErrorNumber(cx, js_GetErrorMessage,
                              NULL, JSMSG_MORE_ARGS_NEEDED,
                              "subarray()", "0", "s");
         return false;
@@ -1081,17 +1082,17 @@ JSBool BinaryArray::subarray(JSContext *
     RootedObject subarray(cx, BinaryArray::create(cx, subArrayType, thisObj, offset));
     if (!subarray)
         return false;
 
     args.rval().setObject(*subarray);
     return true;
 }
 
-JSBool
+bool
 BinaryArray::fill(JSContext *cx, unsigned int argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
 
     if (args.length() < 1) {
         JS_ReportErrorNumber(cx, js_GetErrorMessage,
                              NULL, JSMSG_MORE_ARGS_NEEDED,
                              "fill()", "0", "s");
@@ -1676,17 +1677,17 @@ StructType::create(JSContext *cx, Handle
         return NULL;
 
     if (!LinkConstructorAndPrototype(cx, obj, prototypeObj))
         return NULL;
 
     return obj;
 }
 
-JSBool
+bool
 StructType::construct(JSContext *cx, unsigned int argc, Value *vp)
 {
     if (!JS_IsConstructing(cx, vp)) {
         JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL,
                              JSMSG_NOT_FUNCTION, "StructType");
         return false;
     }
 
@@ -1721,17 +1722,17 @@ StructType::trace(JSTracer *tracer, JSOb
     JS_ASSERT(fieldList);
     for (uint32_t i = 0; i < fieldList->length(); ++i) {
         FieldInfo *info = &(*fieldList)[i];
         gc::MarkId(tracer, &(info->name), "structtype.field.name");
         MarkObject(tracer, &(info->type), "structtype.field.type");
     }
 }
 
-JSBool
+bool
 StructType::toString(JSContext *cx, unsigned int argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
 
     if (!args.thisv().isObject()) {
         JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL, JSMSG_INCOMPATIBLE_PROTO,
                              "StructType", "toString", InformalValueTypeName(args.thisv()));
         return false;
@@ -1818,17 +1819,17 @@ BinaryStruct::create(JSContext *cx, Hand
     if (!obj)
         return NULL;
 
     obj->setPrivate(static_cast<uint8_t*>(owner->getPrivate()) + offset);
     obj->setFixedSlot(SLOT_BLOCKREFOWNER, ObjectValue(*owner));
     return obj;
 }
 
-JSBool
+bool
 BinaryStruct::construct(JSContext *cx, unsigned int argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
 
     RootedObject callee(cx, &args.callee());
 
     if (!IsStructType(callee)) {
         ReportTypeError(cx, args.calleev(), "is not an StructType");
--- a/js/src/builtin/BinaryData.h
+++ b/js/src/builtin/BinaryData.h
@@ -50,17 +50,17 @@ extern Class TypeClass;
 template <typename T>
 class NumericType
 {
   private:
     static Class * typeToClass();
   public:
     static bool convert(JSContext *cx, HandleValue val, T *converted);
     static bool reify(JSContext *cx, void *mem, MutableHandleValue vp);
-    static JSBool call(JSContext *cx, unsigned argc, Value *vp);
+    static bool call(JSContext *cx, unsigned argc, Value *vp);
 };
 
 template <typename T>
 JS_ALWAYS_INLINE
 bool NumericType<T>::reify(JSContext *cx, void *mem, MutableHandleValue vp)
 {
     vp.setInt32(* ((T*)mem) );
     return true;
@@ -124,20 +124,20 @@ extern Class NumericTypeClasses[NUMERICT
 class ArrayType : public JSObject
 {
   private:
   public:
     static Class class_;
 
     static JSObject *create(JSContext *cx, HandleObject arrayTypeGlobal,
                             HandleObject elementType, uint32_t length);
-    static JSBool construct(JSContext *cx, unsigned int argc, jsval *vp);
-    static JSBool repeat(JSContext *cx, unsigned int argc, jsval *vp);
+    static bool construct(JSContext *cx, unsigned int argc, jsval *vp);
+    static bool repeat(JSContext *cx, unsigned int argc, jsval *vp);
 
-    static JSBool toString(JSContext *cx, unsigned int argc, jsval *vp);
+    static bool toString(JSContext *cx, unsigned int argc, jsval *vp);
 
     static uint32_t length(JSContext *cx, HandleObject obj);
     static JSObject *elementType(JSContext *cx, HandleObject obj);
     static bool convertAndCopyTo(JSContext *cx, HandleObject exemplar,
                                  HandleValue from, uint8_t *mem);
     static bool reify(JSContext *cx, HandleObject type, HandleObject owner,
                       size_t offset, MutableHandleValue to);
 };
@@ -155,23 +155,23 @@ class BinaryArray
   public:
     static Class class_;
 
     // creates initialized memory of size of type
     static JSObject *create(JSContext *cx, HandleObject type);
     // uses passed block as memory
     static JSObject *create(JSContext *cx, HandleObject type,
                             HandleObject owner, size_t offset);
-    static JSBool construct(JSContext *cx, unsigned int argc, jsval *vp);
+    static bool construct(JSContext *cx, unsigned int argc, jsval *vp);
 
     static void finalize(FreeOp *op, JSObject *obj);
     static void obj_trace(JSTracer *tracer, JSObject *obj);
 
-    static JSBool subarray(JSContext *cx, unsigned int argc, jsval *vp);
-    static JSBool fill(JSContext *cx, unsigned int argc, jsval *vp);
+    static bool subarray(JSContext *cx, unsigned int argc, jsval *vp);
+    static bool fill(JSContext *cx, unsigned int argc, jsval *vp);
 
     static JSBool obj_lookupGeneric(JSContext *cx, HandleObject obj,
                                     HandleId id, MutableHandleObject objp,
                                     MutableHandleShape propp);
 
     static JSBool obj_lookupProperty(JSContext *cx, HandleObject obj,
                                      HandlePropertyName name,
                                      MutableHandleObject objp,
@@ -244,18 +244,17 @@ class BinaryArray
                                            HandleSpecialId sid,
                                            unsigned *attrsp);
 
     static JSBool obj_enumerate(JSContext *cx, HandleObject obj,
                                 JSIterateOp enum_op,
                                 MutableHandleValue statep,
                                 MutableHandleId idp);
 
-    static JSBool lengthGetter(JSContext *cx, unsigned int argc, jsval *vp);
-
+    static bool lengthGetter(JSContext *cx, unsigned int argc, jsval *vp);
 };
 
 class StructType : public JSObject
 {
   private:
     static JSObject *create(JSContext *cx, HandleObject structTypeGlobal,
                             HandleObject fields);
     /**
@@ -263,18 +262,18 @@ class StructType : public JSObject
      * and alignment and stores fieldmap as well.
      */
     static bool layout(JSContext *cx, HandleObject structType,
                        HandleObject fields);
 
   public:
     static Class class_;
 
-    static JSBool construct(JSContext *cx, unsigned int argc, jsval *vp);
-    static JSBool toString(JSContext *cx, unsigned int argc, jsval *vp);
+    static bool construct(JSContext *cx, unsigned int argc, jsval *vp);
+    static bool toString(JSContext *cx, unsigned int argc, jsval *vp);
 
     static bool convertAndCopyTo(JSContext *cx, HandleObject exemplar,
                                  HandleValue from, uint8_t *mem);
 
     static bool reify(JSContext *cx, HandleObject type, HandleObject owner,
                       size_t offset, MutableHandleValue to);
 
     static void finalize(js::FreeOp *op, JSObject *obj);
@@ -287,17 +286,17 @@ class BinaryStruct : public JSObject
     static JSObject *createEmpty(JSContext *cx, HandleObject type);
     static JSObject *create(JSContext *cx, HandleObject type);
 
   public:
     static Class class_;
 
     static JSObject *create(JSContext *cx, HandleObject type,
                             HandleObject owner, size_t offset);
-    static JSBool construct(JSContext *cx, unsigned int argc, jsval *vp);
+    static bool construct(JSContext *cx, unsigned int argc, jsval *vp);
 
     static void finalize(js::FreeOp *op, JSObject *obj);
     static void obj_trace(JSTracer *tracer, JSObject *obj);
 
     static JSBool obj_enumerate(JSContext *cx, HandleObject obj,
                                 JSIterateOp enum_op,
                                 MutableHandleValue statep,
                                 MutableHandleId idp);
--- a/js/src/builtin/Eval.cpp
+++ b/js/src/builtin/Eval.cpp
@@ -419,17 +419,17 @@ WarnOnTooManyArgs(JSContext *cx, const C
             // In the case of an indirect call without a caller frame, avoid a
             // potential warning-flood by doing nothing.
         }
     }
 
     return true;
 }
 
-JSBool
+bool
 js::IndirectEval(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     if (!WarnOnTooManyArgs(cx, args))
         return false;
 
     Rooted<GlobalObject*> global(cx, &args.callee().global());
     return EvalKernel(cx, args, INDIRECT_EVAL, NullFramePtr(), global, NULL);
--- a/js/src/builtin/Eval.h
+++ b/js/src/builtin/Eval.h
@@ -11,17 +11,17 @@
 
 namespace js {
 
 // The C++ native for 'eval' (ES5 15.1.2.1). The function is named "indirect
 // eval" because "direct eval" calls (as defined by the spec) will emit
 // JSOP_EVAL which in turn calls DirectEval. Thus, even though IndirectEval is
 // the callee function object for *all* calls to eval, it is by construction
 // only ever called in the case indirect eval.
-extern JSBool
+extern bool
 IndirectEval(JSContext *cx, unsigned argc, Value *vp);
 
 // Performs a direct eval for the given arguments, which must correspond to the
 // currently-executing stack frame, which must be a script frame. On completion
 // the result is returned in args.rval.
 extern bool
 DirectEval(JSContext *cx, const CallArgs &args);
 
--- a/js/src/builtin/Intl.cpp
+++ b/js/src/builtin/Intl.cpp
@@ -554,17 +554,17 @@ static Class CollatorClass = {
     JS_StrictPropertyStub,   /* setProperty */
     JS_EnumerateStub,
     JS_ResolveStub,
     JS_ConvertStub,
     collator_finalize
 };
 
 #if JS_HAS_TOSOURCE
-static JSBool
+static bool
 collator_toSource(JSContext *cx, unsigned argc, Value *vp)
 {
     vp->setString(cx->names().Collator);
     return true;
 }
 #endif
 
 static const JSFunctionSpec collator_static_methods[] = {
@@ -632,24 +632,24 @@ Collator(JSContext *cx, CallArgs args, b
     if (!IntlInitialize(cx, obj, cx->names().InitializeCollator, locales, options))
         return false;
 
     // 10.1.2.1 steps 3.a and 7
     args.rval().setObject(*obj);
     return true;
 }
 
-static JSBool
+static bool
 Collator(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return Collator(cx, args, args.isConstructing());
 }
 
-JSBool
+bool
 js::intl_Collator(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     JS_ASSERT(args.length() == 2);
     // intl_Collator is an intrinsic for self-hosted JavaScript, so it cannot
     // be used with "new", but it still has to be treated as a constructor.
     return Collator(cx, args, true);
 }
@@ -722,30 +722,30 @@ GlobalObject::initCollatorProto(JSContex
     RootedObject proto(cx, global->createBlankPrototype(cx, &CollatorClass));
     if (!proto)
         return false;
     proto->setReservedSlot(UCOLLATOR_SLOT, PrivateValue(NULL));
     global->setReservedSlot(COLLATOR_PROTO, ObjectValue(*proto));
     return true;
 }
 
-JSBool
+bool
 js::intl_Collator_availableLocales(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     JS_ASSERT(args.length() == 0);
 
     RootedValue result(cx);
     if (!intl_availableLocales(cx, ucol_countAvailable, ucol_getAvailable, &result))
         return false;
     args.rval().set(result);
     return true;
 }
 
-JSBool
+bool
 js::intl_availableCollations(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     JS_ASSERT(args.length() == 1);
     JS_ASSERT(args[0].isString());
 
     JSAutoByteString locale(cx, args[0].toString());
     if (!locale)
@@ -968,17 +968,17 @@ intl_CompareStrings(JSContext *cx, UColl
         case UCOL_LESS: res = -1; break;
         case UCOL_EQUAL: res = 0; break;
         case UCOL_GREATER: res = 1; break;
     }
     result.setInt32(res);
     return true;
 }
 
-JSBool
+bool
 js::intl_CompareStrings(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     JS_ASSERT(args.length() == 3);
     JS_ASSERT(args[0].isObject());
     JS_ASSERT(args[1].isString());
     JS_ASSERT(args[2].isString());
 
@@ -1037,17 +1037,17 @@ static Class NumberFormatClass = {
     JS_StrictPropertyStub,   /* setProperty */
     JS_EnumerateStub,
     JS_ResolveStub,
     JS_ConvertStub,
     numberFormat_finalize
 };
 
 #if JS_HAS_TOSOURCE
-static JSBool
+static bool
 numberFormat_toSource(JSContext *cx, unsigned argc, Value *vp)
 {
     vp->setString(cx->names().NumberFormat);
     return true;
 }
 #endif
 
 static const JSFunctionSpec numberFormat_static_methods[] = {
@@ -1115,24 +1115,24 @@ NumberFormat(JSContext *cx, CallArgs arg
     if (!IntlInitialize(cx, obj, cx->names().InitializeNumberFormat, locales, options))
         return false;
 
     // 11.1.2.1 steps 3.a and 7
     args.rval().setObject(*obj);
     return true;
 }
 
-static JSBool
+static bool
 NumberFormat(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return NumberFormat(cx, args, args.isConstructing());
 }
 
-JSBool
+bool
 js::intl_NumberFormat(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     JS_ASSERT(args.length() == 2);
     // intl_NumberFormat is an intrinsic for self-hosted JavaScript, so it
     // cannot be used with "new", but it still has to be treated as a
     // constructor.
     return NumberFormat(cx, args, true);
@@ -1207,30 +1207,30 @@ GlobalObject::initNumberFormatProto(JSCo
     RootedObject proto(cx, global->createBlankPrototype(cx, &NumberFormatClass));
     if (!proto)
         return false;
     proto->setReservedSlot(UNUMBER_FORMAT_SLOT, PrivateValue(NULL));
     global->setReservedSlot(NUMBER_FORMAT_PROTO, ObjectValue(*proto));
     return true;
 }
 
-JSBool
+bool
 js::intl_NumberFormat_availableLocales(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     JS_ASSERT(args.length() == 0);
 
     RootedValue result(cx);
     if (!intl_availableLocales(cx, unum_countAvailable, unum_getAvailable, &result))
         return false;
     args.rval().set(result);
     return true;
 }
 
-JSBool
+bool
 js::intl_numberingSystem(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     JS_ASSERT(args.length() == 1);
     JS_ASSERT(args[0].isString());
 
     JSAutoByteString locale(cx, args[0].toString());
     if (!locale)
@@ -1428,17 +1428,17 @@ intl_FormatNumber(JSContext *cx, UNumber
     RootedString str(cx, chars.finishString());
     if (!str)
         return false;
 
     result.setString(str);
     return true;
 }
 
-JSBool
+bool
 js::intl_FormatNumber(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     JS_ASSERT(args.length() == 2);
     JS_ASSERT(args[0].isObject());
     JS_ASSERT(args[1].isNumber());
 
     RootedObject numberFormat(cx, &args[0].toObject());
@@ -1493,17 +1493,17 @@ static Class DateTimeFormatClass = {
     JS_StrictPropertyStub,   /* setProperty */
     JS_EnumerateStub,
     JS_ResolveStub,
     JS_ConvertStub,
     dateTimeFormat_finalize
 };
 
 #if JS_HAS_TOSOURCE
-static JSBool
+static bool
 dateTimeFormat_toSource(JSContext *cx, unsigned argc, Value *vp)
 {
     vp->setString(cx->names().DateTimeFormat);
     return true;
 }
 #endif
 
 static const JSFunctionSpec dateTimeFormat_static_methods[] = {
@@ -1571,24 +1571,24 @@ DateTimeFormat(JSContext *cx, CallArgs a
     if (!IntlInitialize(cx, obj, cx->names().InitializeDateTimeFormat, locales, options))
         return false;
 
     // 12.1.2.1 steps 3.a and 7
     args.rval().setObject(*obj);
     return true;
 }
 
-static JSBool
+static bool
 DateTimeFormat(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return DateTimeFormat(cx, args, args.isConstructing());
 }
 
-JSBool
+bool
 js::intl_DateTimeFormat(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     JS_ASSERT(args.length() == 2);
     // intl_DateTimeFormat is an intrinsic for self-hosted JavaScript, so it
     // cannot be used with "new", but it still has to be treated as a
     // constructor.
     return DateTimeFormat(cx, args, true);
@@ -1662,17 +1662,17 @@ GlobalObject::initDateTimeFormatProto(JS
     RootedObject proto(cx, global->createBlankPrototype(cx, &DateTimeFormatClass));
     if (!proto)
         return false;
     proto->setReservedSlot(UDATE_FORMAT_SLOT, PrivateValue(NULL));
     global->setReservedSlot(DATE_TIME_FORMAT_PROTO, ObjectValue(*proto));
     return true;
 }
 
-JSBool
+bool
 js::intl_DateTimeFormat_availableLocales(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     JS_ASSERT(args.length() == 0);
 
     RootedValue result(cx);
     if (!intl_availableLocales(cx, udat_countAvailable, udat_getAvailable, &result))
         return false;
@@ -1689,17 +1689,17 @@ bcp47CalendarName(const char *icuName)
         return "ethioaa";
     if (equal(icuName, "gregorian"))
         return "gregory";
     if (equal(icuName, "islamic-civil"))
         return "islamicc";
     return icuName;
 }
 
-JSBool
+bool
 js::intl_availableCalendars(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     JS_ASSERT(args.length() == 1);
     JS_ASSERT(args[0].isString());
 
     JSAutoByteString locale(cx, args[0].toString());
     if (!locale)
@@ -1754,17 +1754,17 @@ js::intl_availableCalendars(JSContext *c
         if (!JSObject::defineElement(cx, calendars, index++, element))
             return false;
     }
 
     args.rval().setObject(*calendars);
     return true;
 }
 
-JSBool
+bool
 js::intl_patternForSkeleton(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     JS_ASSERT(args.length() == 2);
     JS_ASSERT(args[0].isString());
     JS_ASSERT(args[1].isString());
 
     JSAutoByteString locale(cx, args[0].toString());
@@ -1915,17 +1915,17 @@ intl_FormatDateTime(JSContext *cx, UDate
     RootedString str(cx, chars.finishString());
     if (!str)
         return false;
 
     result.setString(str);
     return true;
 }
 
-JSBool
+bool
 js::intl_FormatDateTime(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     JS_ASSERT(args.length() == 2);
     JS_ASSERT(args[0].isObject());
     JS_ASSERT(args[1].isNumber());
 
     RootedObject dateTimeFormat(cx, &args[0].toObject());
@@ -1974,17 +1974,17 @@ Class js::IntlClass = {
     JS_PropertyStub,         /* getProperty */
     JS_StrictPropertyStub,   /* setProperty */
     JS_EnumerateStub,
     JS_ResolveStub,
     JS_ConvertStub
 };
 
 #if JS_HAS_TOSOURCE
-static JSBool
+static bool
 intl_toSource(JSContext *cx, unsigned argc, Value *vp)
 {
     vp->setString(cx->names().Intl);
     return true;
 }
 #endif
 
 static const JSFunctionSpec intl_static_methods[] = {
--- a/js/src/builtin/Intl.h
+++ b/js/src/builtin/Intl.h
@@ -38,152 +38,152 @@ namespace js {
 
 /**
  * Returns a new instance of the standard built-in Collator constructor.
  * Self-hosted code cannot cache this constructor (as it does for others in
  * Utilities.js) because it is initialized after self-hosted code is compiled.
  *
  * Usage: collator = intl_Collator(locales, options)
  */
-extern JSBool
+extern bool
 intl_Collator(JSContext *cx, unsigned argc, Value *vp);
 
 /**
  * Returns an object indicating the supported locales for collation
  * by having a true-valued property for each such locale with the
  * canonicalized language tag as the property name. The object has no
  * prototype.
  *
  * Usage: availableLocales = intl_Collator_availableLocales()
  */
-extern JSBool
+extern bool
 intl_Collator_availableLocales(JSContext *cx, unsigned argc, Value *vp);
 
 /**
  * Returns an array with the collation type identifiers per Unicode
  * Technical Standard 35, Unicode Locale Data Markup Language, for the
  * collations supported for the given locale. "standard" and "search" are
  * excluded.
  *
  * Usage: collations = intl_availableCollations(locale)
  */
-extern JSBool
+extern bool
 intl_availableCollations(JSContext *cx, unsigned argc, Value *vp);
 
 /**
  * Compares x and y (which must be String values), and returns a number less
  * than 0 if x < y, 0 if x = y, or a number greater than 0 if x > y according
  * to the sort order for the locale and collation options of the given
  * Collator.
  *
  * Spec: ECMAScript Internationalization API Specification, 10.3.2.
  *
  * Usage: result = intl_CompareStrings(collator, x, y)
  */
-extern JSBool
+extern bool
 intl_CompareStrings(JSContext *cx, unsigned argc, Value *vp);
 
 
 /******************** NumberFormat ********************/
 
 /**
  * Returns a new instance of the standard built-in NumberFormat constructor.
  * Self-hosted code cannot cache this constructor (as it does for others in
  * Utilities.js) because it is initialized after self-hosted code is compiled.
  *
  * Usage: numberFormat = intl_NumberFormat(locales, options)
  */
-extern JSBool
+extern bool
 intl_NumberFormat(JSContext *cx, unsigned argc, Value *vp);
 
 /**
  * Returns an object indicating the supported locales for number formatting
  * by having a true-valued property for each such locale with the
  * canonicalized language tag as the property name. The object has no
  * prototype.
  *
  * Usage: availableLocales = intl_NumberFormat_availableLocales()
  */
-extern JSBool
+extern bool
 intl_NumberFormat_availableLocales(JSContext *cx, unsigned argc, Value *vp);
 
 /**
  * Returns the numbering system type identifier per Unicode
  * Technical Standard 35, Unicode Locale Data Markup Language, for the
  * default numbering system for the given locale.
  *
  * Usage: defaultNumberingSystem = intl_numberingSystem(locale)
  */
-extern JSBool
+extern bool
 intl_numberingSystem(JSContext *cx, unsigned argc, Value *vp);
 
 /**
  * Returns a string representing the number x according to the effective
  * locale and the formatting options of the given NumberFormat.
  *
  * Spec: ECMAScript Internationalization API Specification, 11.3.2.
  *
  * Usage: formatted = intl_FormatNumber(numberFormat, x)
  */
-extern JSBool
+extern bool
 intl_FormatNumber(JSContext *cx, unsigned argc, Value *vp);
 
 
 /******************** DateTimeFormat ********************/
 
 /**
  * Returns a new instance of the standard built-in DateTimeFormat constructor.
  * Self-hosted code cannot cache this constructor (as it does for others in
  * Utilities.js) because it is initialized after self-hosted code is compiled.
  *
  * Usage: dateTimeFormat = intl_DateTimeFormat(locales, options)
  */
-extern JSBool
+extern bool
 intl_DateTimeFormat(JSContext *cx, unsigned argc, Value *vp);
 
 /**
  * Returns an object indicating the supported locales for date and time
  * formatting by having a true-valued property for each such locale with the
  * canonicalized language tag as the property name. The object has no
  * prototype.
  *
  * Usage: availableLocales = intl_DateTimeFormat_availableLocales()
  */
-extern JSBool
+extern bool
 intl_DateTimeFormat_availableLocales(JSContext *cx, unsigned argc, Value *vp);
 
 /**
  * Returns an array with the calendar type identifiers per Unicode
  * Technical Standard 35, Unicode Locale Data Markup Language, for the
  * supported calendars for the given locale. The default calendar is
  * element 0.
  *
  * Usage: calendars = intl_availableCalendars(locale)
  */
-extern JSBool
+extern bool
 intl_availableCalendars(JSContext *cx, unsigned argc, Value *vp);
 
 /**
  * Return a pattern in the date-time format pattern language of Unicode
  * Technical Standard 35, Unicode Locale Data Markup Language, for the
  * best-fit date-time format pattern corresponding to skeleton for the
  * given locale.
  *
  * Usage: pattern = intl_patternForSkeleton(locale, skeleton)
  */
-extern JSBool
+extern bool
 intl_patternForSkeleton(JSContext *cx, unsigned argc, Value *vp);
 
 /**
  * Returns a String value representing x (which must be a Number value)
  * according to the effective locale and the formatting options of the
  * given DateTimeFormat.
  *
  * Spec: ECMAScript Internationalization API Specification, 12.3.2.
  *
  * Usage: formatted = intl_FormatDateTime(dateTimeFormat, x)
  */
-extern JSBool
+extern bool
 intl_FormatDateTime(JSContext *cx, unsigned argc, Value *vp);
 
 } // namespace js
 
 #endif /* builtin_Intl_h */
--- a/js/src/builtin/MapObject.cpp
+++ b/js/src/builtin/MapObject.cpp
@@ -863,17 +863,17 @@ class MapIteratorObject : public JSObjec
                                      MapObject::IteratorKind kind);
     static void finalize(FreeOp *fop, JSObject *obj);
 
   private:
     static inline bool is(const Value &v);
     inline ValueMap::Range *range();
     inline MapObject::IteratorKind kind() const;
     static bool next_impl(JSContext *cx, CallArgs args);
-    static JSBool next(JSContext *cx, unsigned argc, Value *vp);
+    static bool next(JSContext *cx, unsigned argc, Value *vp);
 };
 
 Class MapIteratorObject::class_ = {
     "Map Iterator",
     JSCLASS_IMPLEMENTS_BARRIERS |
     JSCLASS_HAS_RESERVED_SLOTS(MapIteratorObject::SlotCount),
     JS_PropertyStub,         /* addProperty */
     JS_DeletePropertyStub,   /* delProperty */
@@ -989,17 +989,17 @@ MapIteratorObject::next_impl(JSContext *
         args.rval().setObject(*pairobj);
         break;
       }
     }
     range->popFront();
     return true;
 }
 
-JSBool
+bool
 MapIteratorObject::next(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod(cx, is, next_impl, args);
 }
 
 
 /*** Map *****************************************************************************************/
@@ -1147,17 +1147,17 @@ WriteBarrierPost(JSRuntime *rt, TableTyp
 
 void
 MapObject::finalize(FreeOp *fop, JSObject *obj)
 {
     if (ValueMap *map = obj->as<MapObject>().getData())
         fop->delete_(map);
 }
 
-JSBool
+bool
 MapObject::construct(JSContext *cx, unsigned argc, Value *vp)
 {
     Rooted<JSObject*> obj(cx, NewBuiltinClassInstance(cx, &class_));
     if (!obj)
         return false;
 
     ValueMap *map = cx->new_<ValueMap>(cx->runtime());
     if (!map)
@@ -1228,17 +1228,17 @@ MapObject::size_impl(JSContext *cx, Call
     JS_ASSERT(MapObject::is(args.thisv()));
 
     ValueMap &map = extract(args);
     JS_STATIC_ASSERT(sizeof map.count() <= sizeof(uint32_t));
     args.rval().setNumber(map.count());
     return true;
 }
 
-JSBool
+bool
 MapObject::size(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod<MapObject::is, MapObject::size_impl>(cx, args);
 }
 
 bool
 MapObject::get_impl(JSContext *cx, CallArgs args)
@@ -1250,17 +1250,17 @@ MapObject::get_impl(JSContext *cx, CallA
 
     if (ValueMap::Entry *p = map.get(key))
         args.rval().set(p->value);
     else
         args.rval().setUndefined();
     return true;
 }
 
-JSBool
+bool
 MapObject::get(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod<MapObject::is, MapObject::get_impl>(cx, args);
 }
 
 bool
 MapObject::has_impl(JSContext *cx, CallArgs args)
@@ -1268,17 +1268,17 @@ MapObject::has_impl(JSContext *cx, CallA
     JS_ASSERT(MapObject::is(args.thisv()));
 
     ValueMap &map = extract(args);
     ARG0_KEY(cx, args, key);
     args.rval().setBoolean(map.has(key));
     return true;
 }
 
-JSBool
+bool
 MapObject::has(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod<MapObject::is, MapObject::has_impl>(cx, args);
 }
 
 bool
 MapObject::set_impl(JSContext *cx, CallArgs args)
@@ -1292,17 +1292,17 @@ MapObject::set_impl(JSContext *cx, CallA
         js_ReportOutOfMemory(cx);
         return false;
     }
     WriteBarrierPost(cx->runtime(), &map, key);
     args.rval().setUndefined();
     return true;
 }
 
-JSBool
+bool
 MapObject::set(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod<MapObject::is, MapObject::set_impl>(cx, args);
 }
 
 bool
 MapObject::delete_impl(JSContext *cx, CallArgs args)
@@ -1324,17 +1324,17 @@ MapObject::delete_impl(JSContext *cx, Ca
     if (!map.remove(key, &found)) {
         js_ReportOutOfMemory(cx);
         return false;
     }
     args.rval().setBoolean(found);
     return true;
 }
 
-JSBool
+bool
 MapObject::delete_(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod<MapObject::is, MapObject::delete_impl>(cx, args);
 }
 
 bool
 MapObject::iterator_impl(JSContext *cx, CallArgs args, IteratorKind kind)
@@ -1349,43 +1349,43 @@ MapObject::iterator_impl(JSContext *cx, 
 }
 
 bool
 MapObject::keys_impl(JSContext *cx, CallArgs args)
 {
     return iterator_impl(cx, args, Keys);
 }
 
-JSBool
+bool
 MapObject::keys(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod(cx, is, keys_impl, args);
 }
 
 bool
 MapObject::values_impl(JSContext *cx, CallArgs args)
 {
     return iterator_impl(cx, args, Values);
 }
 
-JSBool
+bool
 MapObject::values(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod(cx, is, values_impl, args);
 }
 
 bool
 MapObject::entries_impl(JSContext *cx, CallArgs args)
 {
     return iterator_impl(cx, args, Entries);
 }
 
-JSBool
+bool
 MapObject::entries(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod(cx, is, entries_impl, args);
 }
 
 bool
 MapObject::clear_impl(JSContext *cx, CallArgs args)
@@ -1394,17 +1394,17 @@ MapObject::clear_impl(JSContext *cx, Cal
     if (!mapobj->getData()->clear()) {
         js_ReportOutOfMemory(cx);
         return false;
     }
     args.rval().setUndefined();
     return true;
 }
 
-JSBool
+bool
 MapObject::clear(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod(cx, is, clear_impl, args);
 }
 
 JSObject *
 js_InitMapClass(JSContext *cx, HandleObject obj)
@@ -1426,17 +1426,17 @@ class SetIteratorObject : public JSObjec
                                      SetObject::IteratorKind kind);
     static void finalize(FreeOp *fop, JSObject *obj);
 
   private:
     static inline bool is(const Value &v);
     inline ValueSet::Range *range();
     inline SetObject::IteratorKind kind() const;
     static bool next_impl(JSContext *cx, CallArgs args);
-    static JSBool next(JSContext *cx, unsigned argc, Value *vp);
+    static bool next(JSContext *cx, unsigned argc, Value *vp);
 };
 
 Class SetIteratorObject::class_ = {
     "Set Iterator",
     JSCLASS_IMPLEMENTS_BARRIERS |
     JSCLASS_HAS_RESERVED_SLOTS(SetIteratorObject::SlotCount),
     JS_PropertyStub,         /* addProperty */
     JS_DeletePropertyStub,   /* delProperty */
@@ -1548,17 +1548,17 @@ SetIteratorObject::next_impl(JSContext *
         break;
       }
     }
 
     range->popFront();
     return true;
 }
 
-JSBool
+bool
 SetIteratorObject::next(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod(cx, is, next_impl, args);
 }
 
 
 /*** Set *****************************************************************************************/
@@ -1632,17 +1632,17 @@ SetObject::mark(JSTracer *trc, JSObject 
 void
 SetObject::finalize(FreeOp *fop, JSObject *obj)
 {
     SetObject *setobj = static_cast<SetObject *>(obj);
     if (ValueSet *set = setobj->getData())
         fop->delete_(set);
 }
 
-JSBool
+bool
 SetObject::construct(JSContext *cx, unsigned argc, Value *vp)
 {
     Rooted<JSObject*> obj(cx, NewBuiltinClassInstance(cx, &class_));
     if (!obj)
         return false;
 
     ValueSet *set = cx->new_<ValueSet>(cx->runtime());
     if (!set)
@@ -1694,17 +1694,17 @@ SetObject::size_impl(JSContext *cx, Call
     JS_ASSERT(is(args.thisv()));
 
     ValueSet &set = extract(args);
     JS_STATIC_ASSERT(sizeof set.count() <= sizeof(uint32_t));
     args.rval().setNumber(set.count());
     return true;
 }
 
-JSBool
+bool
 SetObject::size(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod<SetObject::is, SetObject::size_impl>(cx, args);
 }
 
 bool
 SetObject::has_impl(JSContext *cx, CallArgs args)
@@ -1712,17 +1712,17 @@ SetObject::has_impl(JSContext *cx, CallA
     JS_ASSERT(is(args.thisv()));
 
     ValueSet &set = extract(args);
     ARG0_KEY(cx, args, key);
     args.rval().setBoolean(set.has(key));
     return true;
 }
 
-JSBool
+bool
 SetObject::has(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod<SetObject::is, SetObject::has_impl>(cx, args);
 }
 
 bool
 SetObject::add_impl(JSContext *cx, CallArgs args)
@@ -1735,17 +1735,17 @@ SetObject::add_impl(JSContext *cx, CallA
         js_ReportOutOfMemory(cx);
         return false;
     }
     WriteBarrierPost(cx->runtime(), &set, key);
     args.rval().setUndefined();
     return true;
 }
 
-JSBool
+bool
 SetObject::add(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod<SetObject::is, SetObject::add_impl>(cx, args);
 }
 
 bool
 SetObject::delete_impl(JSContext *cx, CallArgs args)
@@ -1758,17 +1758,17 @@ SetObject::delete_impl(JSContext *cx, Ca
     if (!set.remove(key, &found)) {
         js_ReportOutOfMemory(cx);
         return false;
     }
     args.rval().setBoolean(found);
     return true;
 }
 
-JSBool
+bool
 SetObject::delete_(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod<SetObject::is, SetObject::delete_impl>(cx, args);
 }
 
 bool
 SetObject::iterator_impl(JSContext *cx, CallArgs args, IteratorKind kind)
@@ -1783,30 +1783,30 @@ SetObject::iterator_impl(JSContext *cx, 
 }
 
 bool
 SetObject::values_impl(JSContext *cx, CallArgs args)
 {
     return iterator_impl(cx, args, Values);
 }
 
-JSBool
+bool
 SetObject::values(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod(cx, is, values_impl, args);
 }
 
 bool
 SetObject::entries_impl(JSContext *cx, CallArgs args)
 {
     return iterator_impl(cx, args, Entries);
 }
 
-JSBool
+bool
 SetObject::entries(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod(cx, is, entries_impl, args);
 }
 
 bool
 SetObject::clear_impl(JSContext *cx, CallArgs args)
@@ -1815,17 +1815,17 @@ SetObject::clear_impl(JSContext *cx, Cal
     if (!setobj->getData()->clear()) {
         js_ReportOutOfMemory(cx);
         return false;
     }
     args.rval().setUndefined();
     return true;
 }
 
-JSBool
+bool
 SetObject::clear(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod(cx, is, clear_impl, args);
 }
 
 JSObject *
 js_InitSetClass(JSContext *cx, HandleObject obj)
--- a/js/src/builtin/MapObject.h
+++ b/js/src/builtin/MapObject.h
@@ -92,74 +92,74 @@ class MapObject : public JSObject {
     static Class class_;
   private:
     static const JSPropertySpec properties[];
     static const JSFunctionSpec methods[];
     ValueMap *getData() { return static_cast<ValueMap *>(getPrivate()); }
     static ValueMap & extract(CallReceiver call);
     static void mark(JSTracer *trc, JSObject *obj);
     static void finalize(FreeOp *fop, JSObject *obj);
-    static JSBool construct(JSContext *cx, unsigned argc, Value *vp);
+    static bool construct(JSContext *cx, unsigned argc, Value *vp);
 
     static bool is(const Value &v);
 
     static bool iterator_impl(JSContext *cx, CallArgs args, IteratorKind kind);
 
     static bool size_impl(JSContext *cx, CallArgs args);
-    static JSBool size(JSContext *cx, unsigned argc, Value *vp);
+    static bool size(JSContext *cx, unsigned argc, Value *vp);
     static bool get_impl(JSContext *cx, CallArgs args);
-    static JSBool get(JSContext *cx, unsigned argc, Value *vp);
+    static bool get(JSContext *cx, unsigned argc, Value *vp);
     static bool has_impl(JSContext *cx, CallArgs args);
-    static JSBool has(JSContext *cx, unsigned argc, Value *vp);
+    static bool has(JSContext *cx, unsigned argc, Value *vp);
     static bool set_impl(JSContext *cx, CallArgs args);
-    static JSBool set(JSContext *cx, unsigned argc, Value *vp);
+    static bool set(JSContext *cx, unsigned argc, Value *vp);
     static bool delete_impl(JSContext *cx, CallArgs args);
-    static JSBool delete_(JSContext *cx, unsigned argc, Value *vp);
+    static bool delete_(JSContext *cx, unsigned argc, Value *vp);
     static bool keys_impl(JSContext *cx, CallArgs args);
-    static JSBool keys(JSContext *cx, unsigned argc, Value *vp);
+    static bool keys(JSContext *cx, unsigned argc, Value *vp);
     static bool values_impl(JSContext *cx, CallArgs args);
-    static JSBool values(JSContext *cx, unsigned argc, Value *vp);
+    static bool values(JSContext *cx, unsigned argc, Value *vp);
     static bool entries_impl(JSContext *cx, CallArgs args);
-    static JSBool entries(JSContext *cx, unsigned argc, Value *vp);
+    static bool entries(JSContext *cx, unsigned argc, Value *vp);
     static bool clear_impl(JSContext *cx, CallArgs args);
-    static JSBool clear(JSContext *cx, unsigned argc, Value *vp);
+    static bool clear(JSContext *cx, unsigned argc, Value *vp);
 };
 
 class SetObject : public JSObject {
   public:
     enum IteratorKind { Values, Entries };
     static JSObject *initClass(JSContext *cx, JSObject *obj);
     static Class class_;
   private:
     static const JSPropertySpec properties[];
     static const JSFunctionSpec methods[];
     ValueSet *getData() { return static_cast<ValueSet *>(getPrivate()); }
     static ValueSet & extract(CallReceiver call);
     static void mark(JSTracer *trc, JSObject *obj);
     static void finalize(FreeOp *fop, JSObject *obj);
-    static JSBool construct(JSContext *cx, unsigned argc, Value *vp);
+    static bool construct(JSContext *cx, unsigned argc, Value *vp);
 
     static bool is(const Value &v);
 
     static bool iterator_impl(JSContext *cx, CallArgs args, IteratorKind kind);
 
     static bool size_impl(JSContext *cx, CallArgs args);
-    static JSBool size(JSContext *cx, unsigned argc, Value *vp);
+    static bool size(JSContext *cx, unsigned argc, Value *vp);
     static bool has_impl(JSContext *cx, CallArgs args);
-    static JSBool has(JSContext *cx, unsigned argc, Value *vp);
+    static bool has(JSContext *cx, unsigned argc, Value *vp);
     static bool add_impl(JSContext *cx, CallArgs args);
-    static JSBool add(JSContext *cx, unsigned argc, Value *vp);
+    static bool add(JSContext *cx, unsigned argc, Value *vp);
     static bool delete_impl(JSContext *cx, CallArgs args);
-    static JSBool delete_(JSContext *cx, unsigned argc, Value *vp);
+    static bool delete_(JSContext *cx, unsigned argc, Value *vp);
     static bool values_impl(JSContext *cx, CallArgs args);
-    static JSBool values(JSContext *cx, unsigned argc, Value *vp);
+    static bool values(JSContext *cx, unsigned argc, Value *vp);
     static bool entries_impl(JSContext *cx, CallArgs args);
-    static JSBool entries(JSContext *cx, unsigned argc, Value *vp);
+    static bool entries(JSContext *cx, unsigned argc, Value *vp);
     static bool clear_impl(JSContext *cx, CallArgs args);
-    static JSBool clear(JSContext *cx, unsigned argc, Value *vp);
+    static bool clear(JSContext *cx, unsigned argc, Value *vp);
 };
 
 } /* namespace js */
 
 extern JSObject *
 js_InitMapClass(JSContext *cx, js::HandleObject obj);
 
 extern JSObject *
--- a/js/src/builtin/Object.cpp
+++ b/js/src/builtin/Object.cpp
@@ -18,17 +18,17 @@
 
 using namespace js;
 using namespace js::types;
 
 using js::frontend::IsIdentifier;
 using mozilla::ArrayLength;
 
 
-JSBool
+bool
 js::obj_construct(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
 
     RootedObject obj(cx, NULL);
     if (args.length() > 0) {
         /* If argv[0] is null or undefined, obj comes back null. */
         if (!js_ValueToObjectOrNull(cx, args[0], &obj))
@@ -41,17 +41,17 @@ js::obj_construct(JSContext *cx, unsigne
             return false;
     }
 
     args.rval().setObject(*obj);
     return true;
 }
 
 /* ES5 15.2.4.7. */
-static JSBool
+static bool
 obj_propertyIsEnumerable(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
 
     /* Step 1. */
     RootedId id(cx);
     if (!ValueToId<CanGC>(cx, args.get(0), &id))
         return false;
@@ -83,17 +83,17 @@ obj_propertyIsEnumerable(JSContext *cx, 
     if (!JSObject::getGenericAttributes(cx, pobj, id, &attrs))
         return false;
 
     args.rval().setBoolean((attrs & JSPROP_ENUMERATE) != 0);
     return true;
 }
 
 #if JS_HAS_TOSOURCE
-static JSBool
+static bool
 obj_toSource(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     JS_CHECK_RECURSION(cx, return false);
 
     RootedObject obj(cx, ToObject(cx, args.thisv()));
     if (!obj)
         return false;
@@ -278,17 +278,17 @@ JS_BasicObjectToString(JSContext *cx, Ha
         !sb.append("]"))
     {
         return NULL;
     }
     return sb.finishString();
 }
 
 /* ES5 15.2.4.2.  Note steps 1 and 2 are errata. */
-static JSBool
+static bool
 obj_toString(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
 
     /* Step 1. */
     if (args.thisv().isUndefined()) {
         args.rval().setString(cx->names().objectUndefined);
         return true;
@@ -309,34 +309,34 @@ obj_toString(JSContext *cx, unsigned arg
     JSString *str = JS_BasicObjectToString(cx, obj);
     if (!str)
         return false;
     args.rval().setString(str);
     return true;
 }
 
 /* ES5 15.2.4.3. */
-static JSBool
+static bool
 obj_toLocaleString(JSContext *cx, unsigned argc, Value *vp)
 {
     JS_CHECK_RECURSION(cx, return false);
 
     CallArgs args = CallArgsFromVp(argc, vp);
 
     /* Step 1. */
     RootedObject obj(cx, ToObject(cx, args.thisv()));
     if (!obj)
         return false;
 
     /* Steps 2-4. */
     RootedId id(cx, NameToId(cx->names().toString));
     return obj->callMethod(cx, id, 0, NULL, args.rval());
 }
 
-static JSBool
+static bool
 obj_valueOf(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     RootedObject obj(cx, ToObject(cx, args.thisv()));
     if (!obj)
         return false;
     args.rval().setObject(*obj);
     return true;
@@ -392,103 +392,103 @@ DefineAccessor(JSContext *cx, unsigned a
     RootedValue descObjValue(cx, ObjectValue(*descObj));
     if (!DefineOwnProperty(cx, thisObj, id, descObjValue, &dummy))
         return false;
 
     args.rval().setUndefined();
     return true;
 }
 
-JS_FRIEND_API(JSBool)
+JS_FRIEND_API(bool)
 js::obj_defineGetter(JSContext *cx, unsigned argc, Value *vp)
 {
     return DefineAccessor<Getter>(cx, argc, vp);
 }
 
-JS_FRIEND_API(JSBool)
+JS_FRIEND_API(bool)
 js::obj_defineSetter(JSContext *cx, unsigned argc, Value *vp)
 {
     return DefineAccessor<Setter>(cx, argc, vp);
 }
 
-static JSBool
+static bool
 obj_lookupGetter(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
 
     RootedId id(cx);
     if (!ValueToId<CanGC>(cx, args.get(0), &id))
-        return JS_FALSE;
+        return false;
     RootedObject obj(cx, ToObject(cx, args.thisv()));
     if (!obj)
-        return JS_FALSE;
+        return false;
     if (obj->is<ProxyObject>()) {
         // The vanilla getter lookup code below requires that the object is
         // native. Handle proxies separately.
         args.rval().setUndefined();
         AutoPropertyDescriptorRooter desc(cx);
         if (!Proxy::getPropertyDescriptor(cx, obj, id, &desc, 0))
-            return JS_FALSE;
+            return false;
         if (desc.obj && (desc.attrs & JSPROP_GETTER) && desc.getter)
             args.rval().set(CastAsObjectJsval(desc.getter));
-        return JS_TRUE;
+        return true;
     }
     RootedObject pobj(cx);
     RootedShape shape(cx);
     if (!JSObject::lookupGeneric(cx, obj, id, &pobj, &shape))
-        return JS_FALSE;
+        return false;
     args.rval().setUndefined();
     if (shape) {
         if (pobj->isNative() && !IsImplicitDenseElement(shape)) {
             if (shape->hasGetterValue())
                 args.rval().set(shape->getterValue());
         }
     }
-    return JS_TRUE;
+    return true;
 }
 
-static JSBool
+static bool
 obj_lookupSetter(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
 
     RootedId id(cx);
     if (!ValueToId<CanGC>(cx, args.get(0), &id))
-        return JS_FALSE;
+        return false;
     RootedObject obj(cx, ToObject(cx, args.thisv()));
     if (!obj)
-        return JS_FALSE;
+        return false;
     if (obj->is<ProxyObject>()) {
         // The vanilla setter lookup code below requires that the object is
         // native. Handle proxies separately.
         args.rval().setUndefined();
         AutoPropertyDescriptorRooter desc(cx);
         if (!Proxy::getPropertyDescriptor(cx, obj, id, &desc, 0))
-            return JS_FALSE;
+            return false;
         if (desc.obj && (desc.attrs & JSPROP_SETTER) && desc.setter)
             args.rval().set(CastAsObjectJsval(desc.setter));
-        return JS_TRUE;
+        return true;
     }
     RootedObject pobj(cx);
     RootedShape shape(cx);
     if (!JSObject::lookupGeneric(cx, obj, id, &pobj, &shape))
-        return JS_FALSE;
+        return false;
     args.rval().setUndefined();
     if (shape) {
         if (pobj->isNative() && !IsImplicitDenseElement(shape)) {
             if (shape->hasSetterValue())
                 args.rval().set(shape->setterValue());
         }
     }
-    return JS_TRUE;
+    return true;
 }
 #endif /* OLD_GETTER_SETTER_METHODS */
 
 /* ES5 15.2.3.2. */
-JSBool
+bool
 obj_getPrototypeOf(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
 
     /* Step 1. */
     if (args.length() == 0) {
         js_ReportMissingArg(cx, args.calleev(), 0);
         return false;
@@ -541,17 +541,17 @@ obj_watch_handler(JSContext *cx, JSObjec
     RootedValue rv(cx);
     if (!Invoke(cx, ObjectValue(*obj), ObjectOrNullValue(callable), ArrayLength(argv), argv, &rv))
         return false;
 
     *nvp = rv;
     return true;
 }
 
-static JSBool
+static bool
 obj_watch(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
 
     if (args.length() <= 1) {
         js_ReportMissingArg(cx, args.calleev(), 1);
         return false;
     }
@@ -573,17 +573,17 @@ obj_watch(JSContext *cx, unsigned argc, 
     if (!CheckAccess(cx, obj, propid, JSACC_WATCH, &tmp, &attrs))
         return false;
 
     args.rval().setUndefined();
 
     return JS_SetWatchPoint(cx, obj, propid, obj_watch_handler, callable);
 }
 
-static JSBool
+static bool
 obj_unwatch(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
 
     RootedObject obj(cx, ToObject(cx, args.thisv()));
     if (!obj)
         return false;
     args.rval().setUndefined();
@@ -595,17 +595,17 @@ obj_unwatch(JSContext *cx, unsigned argc
         id = JSID_VOID;
     }
     return JS_ClearWatchPoint(cx, obj, id, NULL, NULL);
 }
 
 #endif /* JS_HAS_OBJ_WATCHPOINT */
 
 /* ECMA 15.2.4.5. */
-static JSBool
+static bool
 obj_hasOwnProperty(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
 
     HandleValue idValue = args.get(0);
 
     /* Step 1, 2. */
     jsid id;
@@ -645,17 +645,17 @@ obj_hasOwnProperty(JSContext *cx, unsign
     if (!HasOwnProperty<CanGC>(cx, obj->getOps()->lookupGeneric, obj, idRoot, &obj2, &prop))
         return false;
     /* Step 4,5. */
     args.rval().setBoolean(!!prop);
     return true;
 }
 
 /* ES5 15.2.4.6. */
-static JSBool
+static bool
 obj_isPrototypeOf(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
 
     /* Step 1. */
     if (args.length() < 1 || !args[0].isObject()) {
         args.rval().setBoolean(false);
         return true;
@@ -670,17 +670,17 @@ obj_isPrototypeOf(JSContext *cx, unsigne
     bool isDelegate;
     if (!IsDelegate(cx, obj, args[0], &isDelegate))
         return false;
     args.rval().setBoolean(isDelegate);
     return true;
 }
 
 /* ES5 15.2.3.5: Object.create(O [, Properties]) */
-static JSBool
+static bool
 obj_create(JSContext *cx, unsigned argc, Value *vp)
 {
     if (argc == 0) {
         JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL, JSMSG_MORE_ARGS_NEEDED,
                              "Object.create", "0", "s");
         return false;
     }
 
@@ -718,30 +718,30 @@ obj_create(JSContext *cx, unsigned argc,
             return false;
     }
 
     /* 5. Return obj. */
     args.rval().setObject(*obj);
     return true;
 }
 
-static JSBool
+static bool
 obj_getOwnPropertyDescriptor(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     RootedObject obj(cx);
     if (!GetFirstArgumentAsObject(cx, args, "Object.getOwnPropertyDescriptor", &obj))
-        return JS_FALSE;
+        return false;
     RootedId id(cx);
     if (!ValueToId<CanGC>(cx, args.get(1), &id))
-        return JS_FALSE;
+        return false;
     return GetOwnPropertyDescriptor(cx, obj, id, args.rval());
 }
 
-static JSBool
+static bool
 obj_keys(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     RootedObject obj(cx);
     if (!GetFirstArgumentAsObject(cx, args, "Object.keys", &obj))
         return false;
 
     AutoIdVector props(cx);
@@ -770,30 +770,30 @@ obj_keys(JSContext *cx, unsigned argc, V
     if (!aobj)
         return false;
 
     args.rval().setObject(*aobj);
     return true;
 }
 
 /* ES6 draft 15.2.3.16 */
-static JSBool
+static bool
 obj_is(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
 
     bool same;
     if (!SameValue(cx, args.get(0), args.get(1), &same))
         return false;
 
     args.rval().setBoolean(same);
     return true;
 }
 
-static JSBool
+static bool
 obj_getOwnPropertyNames(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     RootedObject obj(cx);
     if (!GetFirstArgumentAsObject(cx, args, "Object.getOwnPropertyNames", &obj))
         return false;
 
     AutoIdVector keys(cx);
@@ -822,38 +822,38 @@ obj_getOwnPropertyNames(JSContext *cx, u
     if (!aobj)
         return false;
 
     args.rval().setObject(*aobj);
     return true;
 }
 
 /* ES5 15.2.3.6: Object.defineProperty(O, P, Attributes) */
-static JSBool
+static bool
 obj_defineProperty(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     RootedObject obj(cx);
     if (!GetFirstArgumentAsObject(cx, args, "Object.defineProperty", &obj))
         return false;
 
     RootedId id(cx);
     if (!ValueToId<CanGC>(cx, args.get(1), &id))
-        return JS_FALSE;
+        return false;
 
     JSBool junk;
     if (!DefineOwnProperty(cx, obj, id, args.get(2), &junk))
         return false;
 
     args.rval().setObject(*obj);
     return true;
 }
 
 /* ES5 15.2.3.7: Object.defineProperties(O, Properties) */
-static JSBool
+static bool
 obj_defineProperties(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
 
     /* Steps 1 and 7. */
     RootedObject obj(cx);
     if (!GetFirstArgumentAsObject(cx, args, "Object.defineProperties", &obj))
         return false;
@@ -869,32 +869,32 @@ obj_defineProperties(JSContext *cx, unsi
     RootedObject props(cx, ToObject(cx, val));
     if (!props)
         return false;
 
     /* Steps 3-6. */
     return DefineProperties(cx, obj, props);
 }
 
-static JSBool
+static bool
 obj_isExtensible(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     RootedObject obj(cx);
     if (!GetFirstArgumentAsObject(cx, args, "Object.isExtensible", &obj))
         return false;
 
     bool extensible;
     if (!JSObject::isExtensible(cx, obj, &extensible))
         return false;
     args.rval().setBoolean(extensible);
     return true;
 }
 
-static JSBool
+static bool
 obj_preventExtensions(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     RootedObject obj(cx);
     if (!GetFirstArgumentAsObject(cx, args, "Object.preventExtensions", &obj))
         return false;
 
     args.rval().setObject(*obj);
@@ -903,58 +903,58 @@ obj_preventExtensions(JSContext *cx, uns
     if (!JSObject::isExtensible(cx, obj, &extensible))
         return false;
     if (!extensible)
         return true;
 
     return JSObject::preventExtensions(cx, obj);
 }
 
-static JSBool
+static bool
 obj_freeze(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     RootedObject obj(cx);
     if (!GetFirstArgumentAsObject(cx, args, "Object.freeze", &obj))
         return false;
 
     args.rval().setObject(*obj);
 
     return JSObject::freeze(cx, obj);
 }
 
-static JSBool
+static bool
 obj_isFrozen(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     RootedObject obj(cx);
     if (!GetFirstArgumentAsObject(cx, args, "Object.preventExtensions", &obj))
         return false;
 
     bool frozen;
     if (!JSObject::isFrozen(cx, obj, &frozen))
         return false;
     args.rval().setBoolean(frozen);
     return true;
 }
 
-static JSBool
+static bool
 obj_seal(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     RootedObject obj(cx);
     if (!GetFirstArgumentAsObject(cx, args, "Object.seal", &obj))
         return false;
 
     args.rval().setObject(*obj);
 
     return JSObject::seal(cx, obj);
 }
 
-static JSBool
+static bool
 obj_isSealed(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     RootedObject obj(cx);
     if (!GetFirstArgumentAsObject(cx, args, "Object.isSealed", &obj))
         return false;
 
     bool sealed;
--- a/js/src/builtin/Object.h
+++ b/js/src/builtin/Object.h
@@ -10,14 +10,14 @@
 #include "jsobj.h"
 
 namespace js {
 
 extern const JSFunctionSpec object_methods[];
 extern const JSFunctionSpec object_static_methods[];
 
 /* Object constructor native. Exposed only so the JIT can know its address. */
-extern JSBool
+extern bool
 obj_construct(JSContext *cx, unsigned argc, js::Value *vp);
 
 } /* namespace js */
 
 #endif /* builtin_Object_h */
--- a/js/src/builtin/ParallelArray.cpp
+++ b/js/src/builtin/ParallelArray.cpp
@@ -81,17 +81,17 @@ ParallelArrayObject::initProps(JSContext
     if (!JSObject::defineProperty(cx, obj, cx->names().shape, undef))
         return false;
     if (!JSObject::defineProperty(cx, obj, cx->names().get, undef))
         return false;
 
     return true;
 }
 
-/*static*/ JSBool
+/*static*/ bool
 ParallelArrayObject::construct(JSContext *cx, unsigned argc, Value *vp)
 {
     RootedFunction ctor(cx, getConstructor(cx, argc));
     if (!ctor)
         return false;
     CallArgs args = CallArgsFromVp(argc, vp);
     return constructHelper(cx, &ctor, args);
 }
@@ -118,17 +118,17 @@ ParallelArrayObject::newInstance(JSConte
 
     // Add in the basic PA properties now with default values:
     if (!initProps(cx, result))
         return NULL;
 
     return result;
 }
 
-/*static*/ JSBool
+/*static*/ bool
 ParallelArrayObject::constructHelper(JSContext *cx, MutableHandleFunction ctor, CallArgs &args0)
 {
     RootedObject result(cx, newInstance(cx, TenuredObject));
     if (!result)
         return false;
 
     if (cx->typeInferenceEnabled()) {
         jsbytecode *pc;
--- a/js/src/builtin/ParallelArray.h
+++ b/js/src/builtin/ParallelArray.h
@@ -25,18 +25,18 @@ class ParallelArrayObject : public JSObj
     static const uint32_t NumCtors = 4;
     static FixedHeapPtr<PropertyName> ctorNames[NumCtors];
 
     static bool initProps(JSContext *cx, HandleObject obj);
 
   public:
     static Class class_;
 
-    static JSBool construct(JSContext *cx, unsigned argc, Value *vp);
-    static JSBool constructHelper(JSContext *cx, MutableHandleFunction ctor, CallArgs &args);
+    static bool construct(JSContext *cx, unsigned argc, Value *vp);
+    static bool constructHelper(JSContext *cx, MutableHandleFunction ctor, CallArgs &args);
 
     // Creates a new ParallelArray instance with the correct number of slots
     // and so forth.
     //
     // NOTE: This object will NOT have the correct type object! It is
     // up to the caller to adjust the type object appropriately
     // before releasing the object into the wild.  You probably want
     // to be calling construct() above, which will adjust the type
--- a/js/src/builtin/Profilers.cpp
+++ b/js/src/builtin/Profilers.cpp
@@ -211,152 +211,152 @@ struct RequiredStringArg {
         return (void*) mBytes;
     }
     ~RequiredStringArg() {
         if (mBytes)
             js_free(mBytes);
     }
 };
 
-static JSBool
+static bool
 StartProfiling(JSContext *cx, unsigned argc, jsval *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     if (args.length() == 0) {
         args.rval().setBoolean(JS_StartProfiling(NULL));
-        return JS_TRUE;
+        return true;
     }
 
     RequiredStringArg profileName(cx, args, 0, "startProfiling");
     if (!profileName)
-        return JS_FALSE;
+        return false;
     args.rval().setBoolean(JS_StartProfiling(profileName.mBytes));
-    return JS_TRUE;
+    return true;
 }
 
-static JSBool
+static bool
 StopProfiling(JSContext *cx, unsigned argc, jsval *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     if (args.length() == 0) {
         args.rval().setBoolean(JS_StopProfiling(NULL));
-        return JS_TRUE;
+        return true;
     }
 
     RequiredStringArg profileName(cx, args, 0, "stopProfiling");
     if (!profileName)
-        return JS_FALSE;
+        return false;
     args.rval().setBoolean(JS_StopProfiling(profileName.mBytes));
-    return JS_TRUE;
+    return true;
 }
 
-static JSBool
+static bool
 PauseProfilers(JSContext *cx, unsigned argc, jsval *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     if (args.length() == 0) {
         args.rval().setBoolean(JS_PauseProfilers(NULL));
-        return JS_TRUE;
+        return true;
     }
 
     RequiredStringArg profileName(cx, args, 0, "pauseProfiling");
     if (!profileName)
-        return JS_FALSE;
+        return false;
     args.rval().setBoolean(JS_PauseProfilers(profileName.mBytes));
-    return JS_TRUE;
+    return true;
 }
 
-static JSBool
+static bool
 ResumeProfilers(JSContext *cx, unsigned argc, jsval *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     if (args.length() == 0) {
         args.rval().setBoolean(JS_ResumeProfilers(NULL));
-        return JS_TRUE;
+        return true;
     }
 
     RequiredStringArg profileName(cx, args, 0, "resumeProfiling");
     if (!profileName)
-        return JS_FALSE;
+        return false;
     args.rval().setBoolean(JS_ResumeProfilers(profileName.mBytes));
-    return JS_TRUE;
+    return true;
 }
 
 /* Usage: DumpProfile([filename[, profileName]]) */
-static JSBool
+static bool
 DumpProfile(JSContext *cx, unsigned argc, jsval *vp)
 {
     bool ret;
     CallArgs args = CallArgsFromVp(argc, vp);
     if (args.length() == 0) {
         ret = JS_DumpProfile(NULL, NULL);
     } else {
         RequiredStringArg filename(cx, args, 0, "dumpProfile");
         if (!filename)
-            return JS_FALSE;
+            return false;
 
         if (args.length() == 1) {
             ret = JS_DumpProfile(filename.mBytes, NULL);
         } else {
             RequiredStringArg profileName(cx, args, 1, "dumpProfile");
             if (!profileName)
-                return JS_FALSE;
+                return false;
 
             ret = JS_DumpProfile(filename.mBytes, profileName.mBytes);
         }
     }
 
     args.rval().setBoolean(ret);
     return true;
 }
 
 #if defined(MOZ_SHARK) || defined(MOZ_INSTRUMENTS)
 
-static JSBool
+static bool
 IgnoreAndReturnTrue(JSContext *cx, unsigned argc, jsval *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     args.rval().setBoolean(true);
     return true;
 }
 
 #endif
 
 #ifdef MOZ_CALLGRIND
-static JSBool
+static bool
 StartCallgrind(JSContext *cx, unsigned argc, jsval *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     args.rval().setBoolean(js_StartCallgrind());
-    return JS_TRUE;
+    return true;
 }
 
-static JSBool
+static bool
 StopCallgrind(JSContext *cx, unsigned argc, jsval *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     args.rval().setBoolean(js_StopCallgrind());
-    return JS_TRUE;
+    return true;
 }
 
-static JSBool
+static bool
 DumpCallgrind(JSContext *cx, unsigned argc, jsval *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     if (args.length() == 0) {
         args.rval().setBoolean(js_DumpCallgrind(NULL));
-        return JS_TRUE;
+        return true;
     }
 
     RequiredStringArg outFile(cx, args, 0, "dumpCallgrind");
     if (!outFile)
-        return JS_FALSE;
+        return false;
 
     args.rval().setBoolean(js_DumpCallgrind(outFile.mBytes));
-    return JS_TRUE;
+    return true;
 }
 #endif
 
 static const JSFunctionSpec profiling_functions[] = {
     JS_FN("startProfiling",  StartProfiling,      1,0),
     JS_FN("stopProfiling",   StopProfiling,       1,0),
     JS_FN("pauseProfilers",  PauseProfilers,      1,0),
     JS_FN("resumeProfilers", ResumeProfilers,     1,0),
--- a/js/src/builtin/RegExp.cpp
+++ b/js/src/builtin/RegExp.cpp
@@ -313,24 +313,24 @@ IsRegExp(const Value &v)
 JS_ALWAYS_INLINE bool
 regexp_compile_impl(JSContext *cx, CallArgs args)
 {
     JS_ASSERT(IsRegExp(args.thisv()));
     RegExpObjectBuilder builder(cx, &args.thisv().toObject().as<RegExpObject>());
     return CompileRegExpObject(cx, builder, args);
 }
 
-JSBool
+static bool
 regexp_compile(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod<IsRegExp, regexp_compile_impl>(cx, args);
 }
 
-static JSBool
+static bool
 regexp_construct(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
 
     if (!args.isConstructing()) {
         /*
          * If first arg is regexp and no flags are given, just return the arg.
          * Otherwise, delegate to the standard constructor.
@@ -357,17 +357,17 @@ regexp_toString_impl(JSContext *cx, Call
     JSString *str = args.thisv().toObject().as<RegExpObject>().toString(cx);
     if (!str)
         return false;
 
     args.rval().setString(str);
     return true;
 }
 
-JSBool
+static bool
 regexp_toString(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod<IsRegExp, regexp_toString_impl>(cx, args);
 }
 
 static const JSFunctionSpec regexp_methods[] = {
 #if JS_HAS_TOSOURCE
@@ -639,24 +639,24 @@ regexp_exec_impl(JSContext *cx, CallArgs
     RootedObject regexp(cx, &args.thisv().toObject());
     RootedString string(cx, ToString<CanGC>(cx, args.get(0)));
     if (!string)
         return false;
 
     return regexp_exec_impl(cx, args, regexp, string, UpdateRegExpStatics);
 }
 
-JSBool
+bool
 js::regexp_exec(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod(cx, IsRegExp, regexp_exec_impl, args);
 }
 
-JSBool
+bool
 js::regexp_exec_no_statics(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     JS_ASSERT(args.length() == 2);
     JS_ASSERT(IsRegExp(args[0]));
     JS_ASSERT(args[1].isString());
 
     RootedObject regexp(cx, &args[0].toObject());
@@ -682,24 +682,24 @@ js::regexp_test_raw(JSContext *cx, Handl
 {
     MatchPair match;
     MatchConduit conduit(&match);
     RegExpRunStatus status = ExecuteRegExp(cx, regexp, input, conduit, UpdateRegExpStatics);
     *result = (status == RegExpRunStatus_Success);
     return (status != RegExpRunStatus_Error);
 }
 
-JSBool
+bool
 js::regexp_test(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod(cx, IsRegExp, regexp_test_impl, args);
 }
 
-JSBool
+bool
 js::regexp_test_no_statics(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     JS_ASSERT(args.length() == 2);
     JS_ASSERT(IsRegExp(args[0]));
     JS_ASSERT(args[1].isString());
 
     RootedObject regexp(cx, &args[0].toObject());
--- a/js/src/builtin/RegExp.h
+++ b/js/src/builtin/RegExp.h
@@ -46,40 +46,40 @@ ExecuteRegExpLegacy(JSContext *cx, RegEx
 bool
 CreateRegExpMatchResult(JSContext *cx, HandleString string, MatchPairs &matches,
                         MutableHandleValue rval);
 
 bool
 CreateRegExpMatchResult(JSContext *cx, HandleString input, const jschar *chars, size_t length,
                         MatchPairs &matches, MutableHandleValue rval);
 
-extern JSBool
+extern bool
 regexp_exec(JSContext *cx, unsigned argc, Value *vp);
 
 bool
 regexp_test_raw(JSContext *cx, HandleObject regexp, HandleString input, bool *result);
 
-extern JSBool
+extern bool
 regexp_test(JSContext *cx, unsigned argc, Value *vp);
 
 /*
  * The following functions are for use by self-hosted code.
  */
 
 /*
  * Behaves like regexp.exec(string), but doesn't set RegExp statics.
  *
  * Usage: match = regexp_exec_no_statics(regexp, string)
  */
-extern JSBool
+extern bool
 regexp_exec_no_statics(JSContext *cx, unsigned argc, Value *vp);
 
 /*
  * Behaves like regexp.test(string), but doesn't set RegExp statics.
  *
  * Usage: does_match = regexp_test_no_statics(regexp, string)
  */
-extern JSBool
+extern bool
 regexp_test_no_statics(JSContext *cx, unsigned argc, Value *vp);
 
 } /* namespace js */
 
 #endif /* builtin_RegExp_h */
--- a/js/src/builtin/TestingFunctions.cpp
+++ b/js/src/builtin/TestingFunctions.cpp
@@ -21,17 +21,17 @@
 
 #include "vm/ObjectImpl-inl.h"
 
 using namespace js;
 using namespace JS;
 
 using mozilla::ArrayLength;
 
-static JSBool
+static bool
 GetBuildConfiguration(JSContext *cx, unsigned argc, jsval *vp)
 {
     RootedObject info(cx, JS_NewObject(cx, NULL, NULL, NULL));
     if (!info)
         return false;
     RootedValue value(cx);
 
 #ifdef JSGC_ROOT_ANALYSIS
@@ -185,17 +185,17 @@ GetBuildConfiguration(JSContext *cx, uns
 #endif
     if (!JS_SetProperty(cx, info, "binary-data", value))
         return false;
 
     *vp = ObjectValue(*info);
     return true;
 }
 
-static JSBool
+static bool
 GC(JSContext *cx, unsigned argc, jsval *vp)
 {
     /*
      * If the first argument is 'compartment', we collect any compartments
      * previously scheduled for GC via schedulegc. If the first argument is an
      * object, we collect the object's compartment (and any other compartments
      * scheduled for GC). Otherwise, we collect all compartments.
      */
@@ -228,17 +228,17 @@ GC(JSContext *cx, unsigned argc, jsval *
 #endif
     JSString *str = JS_NewStringCopyZ(cx, buf);
     if (!str)
         return false;
     *vp = STRING_TO_JSVAL(str);
     return true;
 }
 
-static JSBool
+static bool
 MinorGC(JSContext *cx, unsigned argc, jsval *vp)
 {
 #ifdef JSGC_GENERATIONAL
     CallArgs args = CallArgsFromVp(argc, vp);
 
     if (args.get(0) == BooleanValue(true))
         cx->runtime()->gcStoreBuffer.setAboutToOverflow();
 
@@ -254,27 +254,27 @@ static const struct ParamPair {
     {"maxBytes",            JSGC_MAX_BYTES },
     {"maxMallocBytes",      JSGC_MAX_MALLOC_BYTES},
     {"gcBytes",             JSGC_BYTES},
     {"gcNumber",            JSGC_NUMBER},
     {"sliceTimeBudget",     JSGC_SLICE_TIME_BUDGET},
     {"markStackLimit",      JSGC_MARK_STACK_LIMIT}
 };
 
-static JSBool
+static bool
 GCParameter(JSContext *cx, unsigned argc, jsval *vp)
 {
     JSString *str;
     if (argc == 0) {
         str = JS_ValueToString(cx, JSVAL_VOID);
         JS_ASSERT(str);
     } else {
         str = JS_ValueToString(cx, vp[2]);
         if (!str)
-            return JS_FALSE;
+            return false;
         vp[2] = STRING_TO_JSVAL(str);
     }
 
     JSFlatString *flatStr = JS_FlattenString(cx, str);
     if (!flatStr)
         return false;
 
     size_t paramIndex = 0;
@@ -323,33 +323,33 @@ GCParameter(JSContext *cx, unsigned argc
         }
     }
 
     JS_SetGCParameter(cx->runtime(), param, value);
     *vp = JSVAL_VOID;
     return true;
 }
 
-static JSBool
+static bool
 IsProxy(JSContext *cx, unsigned argc, jsval *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     if (argc != 1) {
         JS_ReportError(cx, "the function takes exactly one argument");
         return false;
     }
     if (!args[0].isObject()) {
         args.rval().setBoolean(false);
         return true;
     }
     args.rval().setBoolean(args[0].toObject().is<ProxyObject>());
     return true;
 }
 
-static JSBool
+static bool
 InternalConst(JSContext *cx, unsigned argc, jsval *vp)
 {
     if (argc != 1) {
         JS_ReportError(cx, "the function takes exactly one argument");
         return false;
     }
 
     JSString *str = JS_ValueToString(cx, vp[2]);
@@ -363,129 +363,129 @@ InternalConst(JSContext *cx, unsigned ar
         vp[0] = UINT_TO_JSVAL(js::MARK_STACK_LENGTH);
     } else {
         JS_ReportError(cx, "unknown const name");
         return false;
     }
     return true;
 }
 
-static JSBool
+static bool
 GCPreserveCode(JSContext *cx, unsigned argc, jsval *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
 
     if (argc != 0) {
         RootedObject callee(cx, &args.callee());
         ReportUsageError(cx, callee, "Wrong number of arguments");
-        return JS_FALSE;
+        return false;
     }
 
     cx->runtime()->alwaysPreserveCode = true;
 
     *vp = JSVAL_VOID;
-    return JS_TRUE;
+    return true;
 }
 
 #ifdef JS_GC_ZEAL
-static JSBool
+static bool
 GCZeal(JSContext *cx, unsigned argc, jsval *vp)
 {
     uint32_t zeal, frequency = JS_DEFAULT_ZEAL_FREQ;
     CallArgs args = CallArgsFromVp(argc, vp);
 
     if (argc > 2) {
         RootedObject callee(cx, &args.callee());
         ReportUsageError(cx, callee, "Too many arguments");
-        return JS_FALSE;
+        return false;
     }
     if (!JS_ValueToECMAUint32(cx, argc < 1 ? JSVAL_VOID : args[0], &zeal))
-        return JS_FALSE;
+        return false;
     if (argc >= 2)
         if (!JS_ValueToECMAUint32(cx, args[1], &frequency))
-            return JS_FALSE;
+            return false;
 
     JS_SetGCZeal(cx, (uint8_t)zeal, frequency);
     *vp = JSVAL_VOID;
-    return JS_TRUE;
+    return true;
 }
 
-static JSBool
+static bool
 ScheduleGC(JSContext *cx, unsigned argc, jsval *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
 
     if (argc != 1) {
         RootedObject callee(cx, &args.callee());
         ReportUsageError(cx, callee, "Wrong number of arguments");
-        return JS_FALSE;
+        return false;
     }
 
     if (args[0].isInt32()) {
         /* Schedule a GC to happen after |arg| allocations. */
         JS_ScheduleGC(cx, args[0].toInt32());
     } else if (args[0].isObject()) {
         /* Ensure that |zone| is collected during the next GC. */
         Zone *zone = UncheckedUnwrap(&args[0].toObject())->zone();
         PrepareZoneForGC(zone);
     } else if (args[0].isString()) {
         /* This allows us to schedule atomsCompartment for GC. */
         PrepareZoneForGC(args[0].toString()->zone());
     }
 
     *vp = JSVAL_VOID;
-    return JS_TRUE;
+    return true;
 }
 
-static JSBool
+static bool
 SelectForGC(JSContext *cx, unsigned argc, jsval *vp)
 {
     JSRuntime *rt = cx->runtime();
 
     for (unsigned i = 0; i < argc; i++) {
         Value arg(JS_ARGV(cx, vp)[i]);
         if (arg.isObject()) {
             if (!rt->gcSelectedForMarking.append(&arg.toObject()))
                 return false;
         }
     }
 
     *vp = JSVAL_VOID;
     return true;
 }
 
-static JSBool
+static bool
 VerifyPreBarriers(JSContext *cx, unsigned argc, jsval *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
 
     if (argc) {
         RootedObject callee(cx, &args.callee());
         ReportUsageError(cx, callee, "Too many arguments");
-        return JS_FALSE;
+        return false;
     }
     gc::VerifyBarriers(cx->runtime(), gc::PreBarrierVerifier);
     *vp = JSVAL_VOID;
-    return JS_TRUE;
+    return true;
 }
 
-static JSBool
+static bool
 VerifyPostBarriers(JSContext *cx, unsigned argc, jsval *vp)
 {
     if (argc) {
         RootedObject callee(cx, &JS_CALLEE(cx, vp).toObject());
         ReportUsageError(cx, callee, "Too many arguments");
-        return JS_FALSE;
+        return false;
     }
     gc::VerifyBarriers(cx->runtime(), gc::PostBarrierVerifier);
     *vp = JSVAL_VOID;
-    return JS_TRUE;
+    return true;
 }
 
-static JSBool
+static bool
 GCState(JSContext *cx, unsigned argc, jsval *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
 
     if (argc != 0) {
         RootedObject callee(cx, &args.callee());
         ReportUsageError(cx, callee, "Too many arguments");
         return false;
@@ -504,92 +504,92 @@ GCState(JSContext *cx, unsigned argc, js
 
     JSString *str = JS_NewStringCopyZ(cx, state);
     if (!str)
         return false;
     *vp = StringValue(str);
     return true;
 }
 
-static JSBool
+static bool
 DeterministicGC(JSContext *cx, unsigned argc, jsval *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
 
     if (argc != 1) {
         RootedObject callee(cx, &args.callee());
         ReportUsageError(cx, callee, "Wrong number of arguments");
-        return JS_FALSE;
+        return false;
     }
 
     gc::SetDeterministicGC(cx, ToBoolean(vp[2]));
     *vp = JSVAL_VOID;
-    return JS_TRUE;
+    return true;
 }
 #endif /* JS_GC_ZEAL */
 
-static JSBool
+static bool
 GCSlice(JSContext *cx, unsigned argc, jsval *vp)
 {
     bool limit = true;
     uint32_t budget = 0;
     CallArgs args = CallArgsFromVp(argc, vp);
 
     if (argc > 1) {
         RootedObject callee(cx, &args.callee());
         ReportUsageError(cx, callee, "Wrong number of arguments");
-        return JS_FALSE;
+        return false;
     }
 
     if (argc == 1) {
         if (!JS_ValueToECMAUint32(cx, args[0], &budget))
             return false;
     } else {
         limit = false;
     }
 
     GCDebugSlice(cx->runtime(), limit, budget);
     *vp = JSVAL_VOID;
-    return JS_TRUE;
+    return true;
 }
 
-static JSBool
+static bool
 ValidateGC(JSContext *cx, unsigned argc, jsval *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
 
     if (argc != 1) {
         RootedObject callee(cx, &args.callee());
         ReportUsageError(cx, callee, "Wrong number of arguments");
-        return JS_FALSE;
+        return false;
     }
 
     gc::SetValidateGC(cx, ToBoolean(vp[2]));
     *vp = JSVAL_VOID;
-    return JS_TRUE;
+    return true;
 }
 
-static JSBool
+static bool
 FullCompartmentChecks(JSContext *cx, unsigned argc, jsval *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
 
     if (argc != 1) {
         RootedObject callee(cx, &args.callee());
         ReportUsageError(cx, callee, "Wrong number of arguments");
-        return JS_FALSE;
+        return false;
     }
 
     gc::SetFullCompartmentChecks(cx, ToBoolean(vp[2]));
     *vp = JSVAL_VOID;
-    return JS_TRUE;
+    return true;
 }
 
-static JSBool
-NondeterminsticGetWeakMapKeys(JSContext *cx, unsigned argc, jsval *vp)
+static bool
+NondeterministicGetWeakMapKeys(JSContext *cx, unsigned argc, jsval *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
 
     if (argc != 1) {
         RootedObject callee(cx, &args.callee());
         ReportUsageError(cx, callee, "Wrong number of arguments");
         return false;
     }
@@ -668,17 +668,17 @@ static const struct TraceKindPair {
     const char       *name;
     int32_t           kind;
 } traceKindNames[] = {
     { "all",        -1                  },
     { "object",     JSTRACE_OBJECT      },
     { "string",     JSTRACE_STRING      },
 };
 
-static JSBool
+static bool
 CountHeap(JSContext *cx, unsigned argc, jsval *vp)
 {
     jsval v;
     int32_t traceKind;
     JSString *str;
     JSCountHeapTracer countTracer;
     JSCountHeapNode *node;
     size_t counter;
@@ -687,46 +687,46 @@ CountHeap(JSContext *cx, unsigned argc, 
     if (argc > 0) {
         v = JS_ARGV(cx, vp)[0];
         if (JSVAL_IS_TRACEABLE(v)) {
             startValue = v;
         } else if (!JSVAL_IS_NULL(v)) {
             JS_ReportError(cx,
                            "the first argument is not null or a heap-allocated "
                            "thing");
-            return JS_FALSE;
+            return false;
         }
     }
 
     traceKind = -1;
     if (argc > 1) {
         str = JS_ValueToString(cx, JS_ARGV(cx, vp)[1]);
         if (!str)
-            return JS_FALSE;
+            return false;
         JSFlatString *flatStr = JS_FlattenString(cx, str);
         if (!flatStr)
-            return JS_FALSE;
+            return false;
         for (size_t i = 0; ;) {
             if (JS_FlatStringEqualsAscii(flatStr, traceKindNames[i].name)) {
                 traceKind = traceKindNames[i].kind;
                 break;
             }
             if (++i == ArrayLength(traceKindNames)) {
                 JSAutoByteString bytes(cx, str);
                 if (!!bytes)
                     JS_ReportError(cx, "trace kind name '%s' is unknown", bytes.ptr());
-                return JS_FALSE;
+                return false;
             }
         }
     }
 
     JS_TracerInit(&countTracer.base, JS_GetRuntime(cx), CountHeapNotify);
     if (!countTracer.visited.init()) {
         JS_ReportOutOfMemory(cx);
-        return JS_FALSE;
+        return false;
     }
     countTracer.ok = true;
     countTracer.traceList = NULL;
     countTracer.recycleList = NULL;
 
     if (startValue.isUndefined()) {
         JS_TraceRuntime(&countTracer.base);
     } else {
@@ -751,17 +751,17 @@ CountHeap(JSContext *cx, unsigned argc, 
         return false;
     }
 
     *vp = JS_NumberValue((double) counter);
     return true;
 }
 
 #ifdef DEBUG
-static JSBool
+static bool
 OOMAfterAllocations(JSContext *cx, unsigned argc, jsval *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     if (args.length() != 1) {
         JS_ReportError(cx, "count argument required");
         return false;
     }
 
@@ -793,39 +793,39 @@ static JSClass FinalizeCounterClass = {
     JS_PropertyStub,       /* getProperty */
     JS_StrictPropertyStub, /* setProperty */
     JS_EnumerateStub,
     JS_ResolveStub,
     JS_ConvertStub,
     finalize_counter_finalize
 };
 
-static JSBool
+static bool
 MakeFinalizeObserver(JSContext *cx, unsigned argc, jsval *vp)
 {
     RootedObject scope(cx, JS::CurrentGlobalOrNull(cx));
     if (!scope)
         return false;
 
     JSObject *obj = JS_NewObjectWithGivenProto(cx, &FinalizeCounterClass, NULL, scope);
     if (!obj)
         return false;
 
     *vp = OBJECT_TO_JSVAL(obj);
     return true;
 }
 
-static JSBool
+static bool
 FinalizeCount(JSContext *cx, unsigned argc, jsval *vp)
 {
     *vp = INT_TO_JSVAL(finalizeCount);
     return true;
 }
 
-static JSBool
+static bool
 DumpHeapComplete(JSContext *cx, unsigned argc, jsval *vp)
 {
     const char *fileName = NULL;
     JSAutoByteString fileNameBytes;
     if (argc > 0) {
         Value v = JS_ARGV(cx, vp)[0];
         if (v.isString()) {
             JSString *str = v.toString();
@@ -849,24 +849,24 @@ DumpHeapComplete(JSContext *cx, unsigned
     js::DumpHeapComplete(JS_GetRuntime(cx), dumpFile);
 
     fclose(dumpFile);
 
     JS_SET_RVAL(cx, vp, JSVAL_VOID);
     return true;
 }
 
-static JSBool
+static bool
 Terminate(JSContext *cx, unsigned arg, jsval *vp)
 {
     JS_ClearPendingException(cx);
-    return JS_FALSE;
+    return false;
 }
 
-static JSBool
+static bool
 EnableSPSProfilingAssertions(JSContext *cx, unsigned argc, jsval *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     if (argc == 0 || !args[0].isBoolean()) {
         RootedObject arg(cx, &args.callee());
         ReportUsageError(cx, arg, "Must have one boolean argument");
         return false;
     }
@@ -877,41 +877,41 @@ EnableSPSProfilingAssertions(JSContext *
     SetRuntimeProfilingStack(cx->runtime(), stack, &stack_size, 1000);
     cx->runtime()->spsProfiler.enableSlowAssertions(args[0].toBoolean());
     cx->runtime()->spsProfiler.enable(true);
 
     JS_SET_RVAL(cx, vp, JSVAL_VOID);
     return true;
 }
 
-static JSBool
+static bool
 DisableSPSProfiling(JSContext *cx, unsigned argc, jsval *vp)
 {
     if (cx->runtime()->spsProfiler.installed())
         cx->runtime()->spsProfiler.enable(false);
     return true;
 }
 
-static JSBool
+static bool
 DisplayName(JSContext *cx, unsigned argc, jsval *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     if (argc == 0 || !args[0].isObject() || !args[0].toObject().is<JSFunction>()) {
         RootedObject arg(cx, &args.callee());
         ReportUsageError(cx, arg, "Must have one function argument");
         return false;
     }
 
     JSFunction *fun = &args[0].toObject().as<JSFunction>();
     JSString *str = fun->displayAtom();
     vp->setString(str == NULL ? cx->runtime()->emptyString : str);
     return true;
 }
 
-JSBool
+bool
 js::testingFunc_inParallelSection(JSContext *cx, unsigned argc, jsval *vp)
 {
     // If we were actually *in* a parallel section, then this function
     // would be inlined to TRUE in ion-generated code.
     JS_ASSERT(!InParallelSection());
     JS_SET_RVAL(cx, vp, JSVAL_FALSE);
     return true;
 }
@@ -928,17 +928,17 @@ ShellObjectMetadataCallback(JSContext *c
         return false;
 
     if (rval.isObject())
         *pmetadata = &rval.toObject();
 
     return true;
 }
 
-static JSBool
+static bool
 SetObjectMetadataCallback(JSContext *cx, unsigned argc, jsval *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
 
     args.rval().setUndefined();
 
     if (argc == 0 || !args[0].isObject() || !args[0].toObject().is<JSFunction>()) {
         if (objectMetadataFunction)
@@ -951,46 +951,46 @@ SetObjectMetadataCallback(JSContext *cx,
     if (!objectMetadataFunction && !JS_AddObjectRoot(cx, &objectMetadataFunction))
         return false;
 
     objectMetadataFunction = &args[0].toObject();
     js::SetObjectMetadataCallback(cx, ShellObjectMetadataCallback);
     return true;
 }
 
-static JSBool
+static bool
 SetObjectMetadata(JSContext *cx, unsigned argc, jsval *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     if (argc != 2 || !args[0].isObject() || !args[1].isObject()) {
         JS_ReportError(cx, "Both arguments must be objects");
         return false;
     }
 
     args.rval().setUndefined();
 
     RootedObject obj(cx, &args[0].toObject());
     RootedObject metadata(cx, &args[1].toObject());
     return SetObjectMetadata(cx, obj, metadata);
 }
 
-static JSBool
+static bool
 GetObjectMetadata(JSContext *cx, unsigned argc, jsval *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     if (argc != 1 || !args[0].isObject()) {
         JS_ReportError(cx, "Argument must be an object");
         return false;
     }
 
     args.rval().setObjectOrNull(GetObjectMetadata(&args[0].toObject()));
     return true;
 }
 
-JSBool
+bool
 js::testingFunc_bailout(JSContext *cx, unsigned argc, jsval *vp)
 {
     // NOP when not in IonMonkey
     JS_SET_RVAL(cx, vp, JSVAL_VOID);
     return true;
 }
 
 static const JSFunctionSpecWithHelp TestingFunctions[] = {
@@ -1096,17 +1096,17 @@ static const JSFunctionSpecWithHelp Test
     JS_FN_HELP("validategc", ValidateGC, 1, 0,
 "validategc(true|false)",
 "  If true, a separate validation step is performed after an incremental GC."),
 
     JS_FN_HELP("fullcompartmentchecks", FullCompartmentChecks, 1, 0,
 "fullcompartmentchecks(true|false)",
 "  If true, check for compartment mismatches before every GC."),
 
-    JS_FN_HELP("nondeterministicGetWeakMapKeys", NondeterminsticGetWeakMapKeys, 1, 0,
+    JS_FN_HELP("nondeterministicGetWeakMapKeys", NondeterministicGetWeakMapKeys, 1, 0,
 "nondeterministicGetWeakMapKeys(weakmap)",
 "  Return an array of the keys in the given WeakMap."),
 
     JS_FN_HELP("internalConst", InternalConst, 1, 0,
 "internalConst(name)",
 "  Query an internal constant for the engine. See InternalConst source for\n"
 "  the list of constant names."),
 
--- a/js/src/builtin/TestingFunctions.h
+++ b/js/src/builtin/TestingFunctions.h
@@ -9,17 +9,17 @@
 
 #include "jsapi.h"
 
 namespace js {
 
 bool
 DefineTestingFunctions(JSContext *cx, HandleObject obj);
 
-JSBool
+bool
 testingFunc_inParallelSection(JSContext *cx, unsigned argc, jsval *vp);
 
-JSBool
+bool
 testingFunc_bailout(JSContext *cx, unsigned argc, jsval *vp);
 
 } /* namespace js */
 
 #endif /* builtin_TestingFunctions_h */
--- a/js/src/ctypes/CTypes.cpp
+++ b/js/src/ctypes/CTypes.cpp
@@ -128,128 +128,128 @@ DeflateStringToUTF8Buffer(JSContext *may
             if (utf8Len > dstlen)
                 goto bufferTooSmall;
             for (i = 0; i < utf8Len; i++)
                 *dst++ = (char) utf8buf[i];
         }
         dstlen -= utf8Len;
     }
     *dstlenp = (origDstlen - dstlen);
-    return JS_TRUE;
+    return true;
 
 badSurrogate:
     *dstlenp = (origDstlen - dstlen);
     /* Delegate error reporting to the measurement function. */
     if (maybecx)
         GetDeflatedUTF8StringLength(maybecx, src - 1, srclen + 1);
-    return JS_FALSE;
+    return false;
 
 bufferTooSmall:
     *dstlenp = (origDstlen - dstlen);
     if (maybecx) {
         JS_ReportErrorNumber(maybecx, js_GetErrorMessage, NULL,
                              JSMSG_BUFFER_TOO_SMALL);
     }
-    return JS_FALSE;
+    return false;
 }
 
 /*******************************************************************************
 ** JSAPI function prototypes
 *******************************************************************************/
 
-static JSBool ConstructAbstract(JSContext* cx, unsigned argc, jsval* vp);
+static bool ConstructAbstract(JSContext* cx, unsigned argc, jsval* vp);
 
 namespace CType {
-  static JSBool ConstructData(JSContext* cx, unsigned argc, jsval* vp);
+  static bool ConstructData(JSContext* cx, unsigned argc, jsval* vp);
   static JSBool ConstructBasic(JSContext* cx, HandleObject obj, const CallArgs& args);
 
   static void Trace(JSTracer* trc, JSObject* obj);
   static void Finalize(JSFreeOp *fop, JSObject* obj);
   static void FinalizeProtoClass(JSFreeOp *fop, JSObject* obj);
 
   static JSBool PrototypeGetter(JSContext* cx, HandleObject obj, HandleId idval,
     MutableHandleValue vp);
   static JSBool NameGetter(JSContext* cx, HandleObject obj, HandleId idval,
     MutableHandleValue vp);
   static JSBool SizeGetter(JSContext* cx, HandleObject obj, HandleId idval,
     MutableHandleValue vp);
   static JSBool PtrGetter(JSContext* cx, HandleObject obj, HandleId idval, MutableHandleValue vp);
-  static JSBool CreateArray(JSContext* cx, unsigned argc, jsval* vp);
-  static JSBool ToString(JSContext* cx, unsigned argc, jsval* vp);
-  static JSBool ToSource(JSContext* cx, unsigned argc, jsval* vp);
+  static bool CreateArray(JSContext* cx, unsigned argc, jsval* vp);
+  static bool ToString(JSContext* cx, unsigned argc, jsval* vp);
+  static bool ToSource(JSContext* cx, unsigned argc, jsval* vp);
   static JSBool HasInstance(JSContext* cx, HandleObject obj, MutableHandleValue v, JSBool* bp);
 
 
   /*
    * Get the global "ctypes" object.
    *
    * |obj| must be a CType object.
    *
    * This function never returns NULL.
    */
   static JSObject* GetGlobalCTypes(JSContext* cx, JSObject* obj);
 
 }
 
 namespace ABI {
   bool IsABI(JSObject* obj);
-  static JSBool ToSource(JSContext* cx, unsigned argc, jsval* vp);
+  static bool ToSource(JSContext* cx, unsigned argc, jsval* vp);
 }
 
 namespace PointerType {
-  static JSBool Create(JSContext* cx, unsigned argc, jsval* vp);
+  static bool Create(JSContext* cx, unsigned argc, jsval* vp);
   static JSBool ConstructData(JSContext* cx, HandleObject obj, const CallArgs& args);
 
   static JSBool TargetTypeGetter(JSContext* cx, HandleObject obj, HandleId idval,
     MutableHandleValue vp);
   static JSBool ContentsGetter(JSContext* cx, HandleObject obj, HandleId idval,
     MutableHandleValue vp);
   static JSBool ContentsSetter(JSContext* cx, HandleObject obj, HandleId idval, JSBool strict,
     MutableHandleValue vp);
-  static JSBool IsNull(JSContext* cx, unsigned argc, jsval* vp);
-  static JSBool Increment(JSContext* cx, unsigned argc, jsval* vp);
-  static JSBool Decrement(JSContext* cx, unsigned argc, jsval* vp);
+  static bool IsNull(JSContext* cx, unsigned argc, jsval* vp);
+  static bool Increment(JSContext* cx, unsigned argc, jsval* vp);
+  static bool Decrement(JSContext* cx, unsigned argc, jsval* vp);
   // The following is not an instance function, since we don't want to expose arbitrary
   // pointer arithmetic at this moment.
   static JSBool OffsetBy(JSContext* cx, const CallArgs& args, int offset);
 }
 
 namespace ArrayType {
-  static JSBool Create(JSContext* cx, unsigned argc, jsval* vp);
+  static bool Create(JSContext* cx, unsigned argc, jsval* vp);
   static JSBool ConstructData(JSContext* cx, HandleObject obj, const CallArgs& args);
 
   static JSBool ElementTypeGetter(JSContext* cx, HandleObject obj, HandleId idval,
     MutableHandleValue vp);
   static JSBool LengthGetter(JSContext* cx, HandleObject obj, HandleId idval,
     MutableHandleValue vp);
   static JSBool Getter(JSContext* cx, HandleObject obj, HandleId idval, MutableHandleValue vp);
   static JSBool Setter(JSContext* cx, HandleObject obj, HandleId idval, JSBool strict, MutableHandleValue vp);
-  static JSBool AddressOfElement(JSContext* cx, unsigned argc, jsval* vp);
+  static bool AddressOfElement(JSContext* cx, unsigned argc, jsval* vp);
 }
 
 namespace StructType {
-  static JSBool Create(JSContext* cx, unsigned argc, jsval* vp);
+  static bool Create(JSContext* cx, unsigned argc, jsval* vp);
   static JSBool ConstructData(JSContext* cx, HandleObject obj, const CallArgs& args);
 
   static JSBool FieldsArrayGetter(JSContext* cx, HandleObject obj, HandleId idval,
     MutableHandleValue vp);
   static JSBool FieldGetter(JSContext* cx, HandleObject obj, HandleId idval,
     MutableHandleValue vp);
   static JSBool FieldSetter(JSContext* cx, HandleObject obj, HandleId idval, JSBool strict,
                             MutableHandleValue vp);
-  static JSBool AddressOfField(JSContext* cx, unsigned argc, jsval* vp);
-  static JSBool Define(JSContext* cx, unsigned argc, jsval* vp);
+  static bool AddressOfField(JSContext* cx, unsigned argc, jsval* vp);
+  static bool Define(JSContext* cx, unsigned argc, jsval* vp);
 }
 
 namespace FunctionType {
-  static JSBool Create(JSContext* cx, unsigned argc, jsval* vp);
+  static bool Create(JSContext* cx, unsigned argc, jsval* vp);
   static JSBool ConstructData(JSContext* cx, HandleObject typeObj,
     HandleObject dataObj, HandleObject fnObj, HandleObject thisObj, jsval errVal);
 
-  static JSBool Call(JSContext* cx, unsigned argc, jsval* vp);
+  static bool Call(JSContext* cx, unsigned argc, jsval* vp);
 
   static JSBool ArgTypesGetter(JSContext* cx, HandleObject obj, HandleId idval,
     MutableHandleValue vp);
   static JSBool ReturnTypeGetter(JSContext* cx, HandleObject obj, HandleId idval,
     MutableHandleValue vp);
   static JSBool ABIGetter(JSContext* cx, HandleObject obj, HandleId idval, MutableHandleValue vp);
   static JSBool IsVariadicGetter(JSContext* cx, HandleObject obj, HandleId idval,
     MutableHandleValue vp);
@@ -266,20 +266,20 @@ namespace CClosure {
 
 namespace CData {
   static void Finalize(JSFreeOp *fop, JSObject* obj);
 
   static JSBool ValueGetter(JSContext* cx, HandleObject obj, HandleId idval,
                             MutableHandleValue vp);
   static JSBool ValueSetter(JSContext* cx, HandleObject obj, HandleId idval,
                             JSBool strict, MutableHandleValue vp);
-  static JSBool Address(JSContext* cx, unsigned argc, jsval* vp);
-  static JSBool ReadString(JSContext* cx, unsigned argc, jsval* vp);
-  static JSBool ReadStringReplaceMalformed(JSContext* cx, unsigned argc, jsval* vp);
-  static JSBool ToSource(JSContext* cx, unsigned argc, jsval* vp);
+  static bool Address(JSContext* cx, unsigned argc, jsval* vp);
+  static bool ReadString(JSContext* cx, unsigned argc, jsval* vp);
+  static bool ReadStringReplaceMalformed(JSContext* cx, unsigned argc, jsval* vp);
+  static bool ToSource(JSContext* cx, unsigned argc, jsval* vp);
   static JSString *GetSourceString(JSContext *cx, HandleObject typeObj,
                                    void *data);
   static JSBool ErrnoGetter(JSContext* cx, HandleObject obj, HandleId idval,
                             MutableHandleValue vp);
 
 #if defined(XP_WIN)
   static JSBool LastErrorGetter(JSContext* cx, HandleObject obj, HandleId idval,
                                 MutableHandleValue vp);
@@ -294,17 +294,17 @@ namespace CDataFinalizer {
    *
    * JavaScript signature:
    * function(CData, CData):   CDataFinalizer
    *          value  finalizer finalizable
    *
    * Where |finalizer| is a one-argument function taking a value
    * with the same type as |value|.
    */
-  static JSBool Construct(JSContext* cx, unsigned argc, jsval *vp);
+  static bool Construct(JSContext* cx, unsigned argc, jsval *vp);
 
   /*
    * Private data held by |CDataFinalizer|.
    *
    * See also |enum CDataFinalizerSlot| for the slots of
    * |CDataFinalizer|.
    *
    * Note: the private data may be NULL, if |dispose|, |forget| or the
@@ -340,20 +340,20 @@ namespace CDataFinalizer {
      */
     void *rvalue;
   };
 
   /*
    * Methods of instances of |CDataFinalizer|
    */
   namespace Methods {
-    static JSBool Dispose(JSContext* cx, unsigned argc, jsval *vp);
-    static JSBool Forget(JSContext* cx, unsigned argc, jsval *vp);
-    static JSBool ToSource(JSContext* cx, unsigned argc, jsval *vp);
-    static JSBool ToString(JSContext* cx, unsigned argc, jsval *vp);
+    static bool Dispose(JSContext* cx, unsigned argc, jsval *vp);
+    static bool Forget(JSContext* cx, unsigned argc, jsval *vp);
+    static bool ToSource(JSContext* cx, unsigned argc, jsval *vp);
+    static bool ToString(JSContext* cx, unsigned argc, jsval *vp);
   }
 
   /*
    * Utility functions
    *
    * @return true if |obj| is a CDataFinalizer, false otherwise.
    */
   static bool IsCDataFinalizer(JSObject *obj);
@@ -402,47 +402,47 @@ namespace CDataFinalizer {
 
 // Int64Base provides functions common to Int64 and UInt64.
 namespace Int64Base {
   JSObject* Construct(JSContext* cx, HandleObject proto, uint64_t data,
     bool isUnsigned);
 
   uint64_t GetInt(JSObject* obj);
 
-  JSBool ToString(JSContext* cx, JSObject* obj, const CallArgs& args,
-                  bool isUnsigned);
-
-  JSBool ToSource(JSContext* cx, JSObject* obj, const CallArgs& args,
-                  bool isUnsigned);
+  bool ToString(JSContext* cx, JSObject* obj, const CallArgs& args,
+                bool isUnsigned);
+
+  bool ToSource(JSContext* cx, JSObject* obj, const CallArgs& args,
+                bool isUnsigned);
 
   static void Finalize(JSFreeOp *fop, JSObject* obj);
 }
 
 namespace Int64 {
-  static JSBool Construct(JSContext* cx, unsigned argc, jsval* vp);
-
-  static JSBool ToString(JSContext* cx, unsigned argc, jsval* vp);
-  static JSBool ToSource(JSContext* cx, unsigned argc, jsval* vp);
-
-  static JSBool Compare(JSContext* cx, unsigned argc, jsval* vp);
-  static JSBool Lo(JSContext* cx, unsigned argc, jsval* vp);
-  static JSBool Hi(JSContext* cx, unsigned argc, jsval* vp);
-  static JSBool Join(JSContext* cx, unsigned argc, jsval* vp);
+  static bool Construct(JSContext* cx, unsigned argc, jsval* vp);
+
+  static bool ToString(JSContext* cx, unsigned argc, jsval* vp);
+  static bool ToSource(JSContext* cx, unsigned argc, jsval* vp);
+
+  static bool Compare(JSContext* cx, unsigned argc, jsval* vp);
+  static bool Lo(JSContext* cx, unsigned argc, jsval* vp);
+  static bool Hi(JSContext* cx, unsigned argc, jsval* vp);
+  static bool Join(JSContext* cx, unsigned argc, jsval* vp);
 }
 
 namespace UInt64 {
-  static JSBool Construct(JSContext* cx, unsigned argc, jsval* vp);
-
-  static JSBool ToString(JSContext* cx, unsigned argc, jsval* vp);
-  static JSBool ToSource(JSContext* cx, unsigned argc, jsval* vp);
-
-  static JSBool Compare(JSContext* cx, unsigned argc, jsval* vp);
-  static JSBool Lo(JSContext* cx, unsigned argc, jsval* vp);
-  static JSBool Hi(JSContext* cx, unsigned argc, jsval* vp);
-  static JSBool Join(JSContext* cx, unsigned argc, jsval* vp);
+  static bool Construct(JSContext* cx, unsigned argc, jsval* vp);
+
+  static bool ToString(JSContext* cx, unsigned argc, jsval* vp);
+  static bool ToSource(JSContext* cx, unsigned argc, jsval* vp);
+
+  static bool Compare(JSContext* cx, unsigned argc, jsval* vp);
+  static bool Lo(JSContext* cx, unsigned argc, jsval* vp);
+  static bool Hi(JSContext* cx, unsigned argc, jsval* vp);
+  static bool Join(JSContext* cx, unsigned argc, jsval* vp);
 }
 
 /*******************************************************************************
 ** JSClass definitions and initialization functions
 *******************************************************************************/
 
 // Class representing the 'ctypes' object itself. This exists to contain the
 // JSCTypesCallbacks set of function pointers.
@@ -3062,54 +3062,54 @@ BuildDataSource(JSContext* cx,
 
   return true;
 }
 
 /*******************************************************************************
 ** JSAPI callback function implementations
 *******************************************************************************/
 
-JSBool
+bool
 ConstructAbstract(JSContext* cx,
                   unsigned argc,
                   jsval* vp)
 {
   // Calling an abstract base class constructor is disallowed.
   JS_ReportError(cx, "cannot construct from abstract type");
-  return JS_FALSE;
+  return false;
 }
 
 /*******************************************************************************
 ** CType implementation
 *******************************************************************************/
 
-JSBool
+bool
 CType::ConstructData(JSContext* cx,
                      unsigned argc,
                      jsval* vp)
 {
   CallArgs args = CallArgsFromVp(argc, vp);
   // get the callee object...
   RootedObject obj(cx, &args.callee());
   if (!CType::IsCType(obj)) {
     JS_ReportError(cx, "not a CType");
-    return JS_FALSE;
+    return false;
   }
 
   // How we construct the CData object depends on what type we represent.
   // An instance 'd' of a CData object of type 't' has:
   //   * [[Class]] "CData"
   //   * __proto__ === t.prototype
   switch (GetTypeCode(obj)) {
   case TYPE_void_t:
     JS_ReportError(cx, "cannot construct from void_t");
-    return JS_FALSE;
+    return false;
   case TYPE_function:
     JS_ReportError(cx, "cannot construct from FunctionType; use FunctionType.ptr instead");
-    return JS_FALSE;
+    return false;
   case TYPE_pointer:
     return PointerType::ConstructData(cx, obj, args);
   case TYPE_array:
     return ArrayType::ConstructData(cx, obj, args);
   case TYPE_struct:
     return StructType::ConstructData(cx, obj, args);
   default:
     return ConstructBasic(cx, obj, args);
@@ -3646,108 +3646,108 @@ CType::PtrGetter(JSContext* cx, HandleOb
   JSObject* pointerType = PointerType::CreateInternal(cx, obj);
   if (!pointerType)
     return JS_FALSE;
 
   vp.setObject(*pointerType);
   return JS_TRUE;
 }
 
-JSBool
+bool
 CType::CreateArray(JSContext* cx, unsigned argc, jsval* vp)
 {
   CallArgs args = CallArgsFromVp(argc, vp);
   RootedObject baseType(cx, JS_THIS_OBJECT(cx, vp));
   if (!baseType)
-    return JS_FALSE;
+    return false;
   if (!CType::IsCType(baseType)) {
     JS_ReportError(cx, "not a CType");
-    return JS_FALSE;
+    return false;
   }
 
   // Construct and return a new ArrayType object.
   if (args.length() > 1) {
     JS_ReportError(cx, "array takes zero or one argument");
-    return JS_FALSE;
+    return false;
   }
 
   // Convert the length argument to a size_t.
   size_t length = 0;
   if (args.length() == 1 && !jsvalToSize(cx, args[0], false, &length)) {
     JS_ReportError(cx, "argument must be a nonnegative integer");
-    return JS_FALSE;
+    return false;
   }
 
   JSObject* result = ArrayType::CreateInternal(cx, baseType, length, args.length() == 1);
   if (!result)
-    return JS_FALSE;
+    return false;
 
   args.rval().setObject(*result);
-  return JS_TRUE;
-}
-
-JSBool
+  return true;
+}
+
+bool
 CType::ToString(JSContext* cx, unsigned argc, jsval* vp)
 {
   CallArgs args = CallArgsFromVp(argc, vp);
   RootedObject obj(cx, JS_THIS_OBJECT(cx, vp));
   if (!obj)
-    return JS_FALSE;
+    return false;
   if (!CType::IsCType(obj) && !CType::IsCTypeProto(obj)) {
     JS_ReportError(cx, "not a CType");
-    return JS_FALSE;
+    return false;
   }
 
   // Create the appropriate string depending on whether we're sCTypeClass or
   // sCTypeProtoClass.
   JSString* result;
   if (CType::IsCType(obj)) {
     AutoString type;
     AppendString(type, "type ");
     AppendString(type, GetName(cx, obj));
     result = NewUCString(cx, type);
   }
   else {
     result = JS_NewStringCopyZ(cx, "[CType proto object]");
   }
   if (!result)
-    return JS_FALSE;
+    return false;
 
   args.rval().setString(result);
-  return JS_TRUE;
-}
-
-JSBool
+  return true;
+}
+
+bool
 CType::ToSource(JSContext* cx, unsigned argc, jsval* vp)
 {
   CallArgs args = CallArgsFromVp(argc, vp);
   JSObject* obj = JS_THIS_OBJECT(cx, vp);
   if (!obj)
-    return JS_FALSE;
+    return false;
   if (!CType::IsCType(obj) && !CType::IsCTypeProto(obj))
   {
     JS_ReportError(cx, "not a CType");
-    return JS_FALSE;
+    return false;
   }
 
   // Create the appropriate string depending on whether we're sCTypeClass or
   // sCTypeProtoClass.
   JSString* result;
   if (CType::IsCType(obj)) {
     AutoString source;
     BuildTypeSource(cx, obj, false, source);
     result = NewUCString(cx, source);
   } else {
     result = JS_NewStringCopyZ(cx, "[CType proto object]");
   }
   if (!result)
-    return JS_FALSE;
+    return false;
 
   args.rval().setString(result);
-  return JS_TRUE;
+  return true;
 }
 
 JSBool
 CType::HasInstance(JSContext* cx, HandleObject obj, MutableHandleValue v, JSBool* bp)
 {
   JS_ASSERT(CType::IsCType(obj));
 
   jsval slot = JS_GetReservedSlot(obj, SLOT_PROTO);
@@ -3797,83 +3797,83 @@ CType::GetGlobalCTypes(JSContext* cx, JS
 *******************************************************************************/
 
 bool
 ABI::IsABI(JSObject* obj)
 {
   return JS_GetClass(obj) == &sCABIClass;
 }
 
-JSBool
+bool
 ABI::ToSource(JSContext* cx, unsigned argc, jsval* vp)
 {
   CallArgs args = CallArgsFromVp(argc, vp);
   if (args.length() != 0) {
     JS_ReportError(cx, "toSource takes zero arguments");
-    return JS_FALSE;
+    return false;
   }
 
   JSObject* obj = JS_THIS_OBJECT(cx, vp);
   if (!obj)
-    return JS_FALSE;
+    return false;
   if (!ABI::IsABI(obj)) {
     JS_ReportError(cx, "not an ABI");
-    return JS_FALSE;
+    return false;
   }
 
   JSString* result;
   switch (GetABICode(obj)) {
     case ABI_DEFAULT:
       result = JS_NewStringCopyZ(cx, "ctypes.default_abi");
       break;
     case ABI_STDCALL:
       result = JS_NewStringCopyZ(cx, "ctypes.stdcall_abi");
       break;
     case ABI_WINAPI:
       result = JS_NewStringCopyZ(cx, "ctypes.winapi_abi");
       break;
     default:
       JS_ReportError(cx, "not a valid ABICode");
-      return JS_FALSE;
+      return false;
   }
   if (!result)
-    return JS_FALSE;
+    return false;
 
   args.rval().setString(result);
-  return JS_TRUE;
+  return true;
 }
 
 
 /*******************************************************************************
 ** PointerType implementation
 *******************************************************************************/
 
-JSBool
+bool
 PointerType::Create(JSContext* cx, unsigned argc, jsval* vp)
 {
   CallArgs args = CallArgsFromVp(argc, vp);
   // Construct and return a new PointerType object.
   if (args.length() != 1) {
     JS_ReportError(cx, "PointerType takes one argument");
-    return JS_FALSE;
+    return false;
   }
 
   jsval arg = args[0];
   RootedObject obj(cx);
   if (JSVAL_IS_PRIMITIVE(arg) || !CType::IsCType(obj = &arg.toObject())) {
     JS_ReportError(cx, "first argument must be a CType");
-    return JS_FALSE;
+    return false;
   }
 
   JSObject* result = CreateInternal(cx, obj);
   if (!result)
-    return JS_FALSE;
+    return false;
 
   args.rval().setObject(*result);
-  return JS_TRUE;
+  return true;
 }
 
 JSObject*
 PointerType::CreateInternal(JSContext* cx, HandleObject baseType)
 {
   // check if we have a cached PointerType on our base CType.
   jsval slot = JS_GetReservedSlot(baseType, SLOT_PTR);
   if (!slot.isUndefined())
@@ -4010,38 +4010,38 @@ PointerType::TargetTypeGetter(JSContext*
     return JS_FALSE;
   }
 
   vp.set(JS_GetReservedSlot(obj, SLOT_TARGET_T));
   JS_ASSERT(vp.isObject());
   return JS_TRUE;
 }
 
-JSBool
+bool
 PointerType::IsNull(JSContext* cx, unsigned argc, jsval* vp)
 {
   CallArgs args = CallArgsFromVp(argc, vp);
   JSObject* obj = JS_THIS_OBJECT(cx, vp);
   if (!obj)
-    return JS_FALSE;
+    return false;
   if (!CData::IsCData(obj)) {
     JS_ReportError(cx, "not a CData");
-    return JS_FALSE;
+    return false;
   }
 
   // Get pointer type and base type.
   JSObject* typeObj = CData::GetCType(obj);
   if (CType::GetTypeCode(typeObj) != TYPE_pointer) {
     JS_ReportError(cx, "not a PointerType");
-    return JS_FALSE;
+    return false;
   }
 
   void* data = *static_cast<void**>(CData::GetData(obj));
   args.rval().setBoolean(data == NULL);
-  return JS_TRUE;
+  return true;
 }
 
 JSBool
 PointerType::OffsetBy(JSContext* cx, const CallArgs& args, int offset)
 {
   JSObject* obj = JS_THIS_OBJECT(cx, args.base());
   if (!obj)
     return JS_FALSE;
@@ -4070,24 +4070,24 @@ PointerType::OffsetBy(JSContext* cx, con
   JSObject* result = CData::Create(cx, typeObj, NullPtr(), &address, true);
   if (!result)
     return JS_FALSE;
 
   args.rval().setObject(*result);
   return JS_TRUE;
 }
 
-JSBool
+bool
 PointerType::Increment(JSContext* cx, unsigned argc, jsval* vp)
 {
   CallArgs args = CallArgsFromVp(argc, vp);
   return OffsetBy(cx, args, 1);
 }
 
-JSBool
+bool
 PointerType::Decrement(JSContext* cx, unsigned argc, jsval* vp)
 {
   CallArgs args = CallArgsFromVp(argc, vp);
   return OffsetBy(cx, args, -1);
 }
 
 JSBool
 PointerType::ContentsGetter(JSContext* cx,
@@ -4160,46 +4160,46 @@ PointerType::ContentsSetter(JSContext* c
 
   return ImplicitConvert(cx, vp, baseType, data, false, NULL);
 }
 
 /*******************************************************************************
 ** ArrayType implementation
 *******************************************************************************/
 
-JSBool
+bool
 ArrayType::Create(JSContext* cx, unsigned argc, jsval* vp)
 {
   CallArgs args = CallArgsFromVp(argc, vp);
   // Construct and return a new ArrayType object.
   if (args.length() < 1 || args.length() > 2) {
     JS_ReportError(cx, "ArrayType takes one or two arguments");
-    return JS_FALSE;
+    return false;
   }
 
   if (JSVAL_IS_PRIMITIVE(args[0]) ||
       !CType::IsCType(&args[0].toObject())) {
     JS_ReportError(cx, "first argument must be a CType");
-    return JS_FALSE;
+    return false;
   }
 
   // Convert the length argument to a size_t.
   size_t length = 0;
   if (args.length() == 2 && !jsvalToSize(cx, args[1], false, &length)) {
     JS_ReportError(cx, "second argument must be a nonnegative integer");
-    return JS_FALSE;
+    return false;
   }
 
   RootedObject baseType(cx, &args[0].toObject());
   JSObject* result = CreateInternal(cx, baseType, length, args.length() == 2);
   if (!result)
-    return JS_FALSE;
+    return false;
 
   args.rval().setObject(*result);
-  return JS_TRUE;
+  return true;
 }
 
 JSObject*
 ArrayType::CreateInternal(JSContext* cx,
                           HandleObject baseType,
                           size_t length,
                           bool lengthDefined)
 {
@@ -4548,65 +4548,65 @@ ArrayType::Setter(JSContext* cx, HandleO
   }
 
   JSObject* baseType = GetBaseType(typeObj);
   size_t elementSize = CType::GetSize(baseType);
   char* data = static_cast<char*>(CData::GetData(obj)) + elementSize * index;
   return ImplicitConvert(cx, vp, baseType, data, false, NULL);
 }
 
-JSBool
+bool
 ArrayType::AddressOfElement(JSContext* cx, unsigned argc, jsval* vp)
 {
   CallArgs args = CallArgsFromVp(argc, vp);
   RootedObject obj(cx, JS_THIS_OBJECT(cx, vp));
   if (!obj)
-    return JS_FALSE;
+    return false;
   if (!CData::IsCData(obj)) {
     JS_ReportError(cx, "not a CData");
-    return JS_FALSE;
+    return false;
   }
 
   RootedObject typeObj(cx, CData::GetCType(obj));
   if (CType::GetTypeCode(typeObj) != TYPE_array) {
     JS_ReportError(cx, "not an ArrayType");
-    return JS_FALSE;
+    return false;
   }
 
   if (args.length() != 1) {
     JS_ReportError(cx, "addressOfElement takes one argument");
-    return JS_FALSE;
+    return false;
   }
 
   RootedObject baseType(cx, GetBaseType(typeObj));
   RootedObject pointerType(cx, PointerType::CreateInternal(cx, baseType));
   if (!pointerType)
-    return JS_FALSE;
+    return false;
 
   // Create a PointerType CData object containing null.
   RootedObject result(cx, CData::Create(cx, pointerType, NullPtr(), NULL, true));
   if (!result)
-    return JS_FALSE;
+    return false;
 
   args.rval().setObject(*result);
 
   // Convert the index to a size_t and bounds-check it.
   size_t index;
   size_t length = GetLength(typeObj);
   if (!jsvalToSize(cx, args[0], false, &index) ||
       index >= length) {
     JS_ReportError(cx, "invalid index");
-    return JS_FALSE;
+    return false;
   }
 
   // Manually set the pointer inside the object, so we skip the conversion step.
   void** data = static_cast<void**>(CData::GetData(result));
   size_t elementSize = CType::GetSize(baseType);
   *data = static_cast<char*>(CData::GetData(obj)) + elementSize * index;
-  return JS_TRUE;
+  return true;
 }
 
 /*******************************************************************************
 ** StructType implementation
 *******************************************************************************/
 
 // For a struct field descriptor 'val' of the form { name : type }, extract
 // 'name' and 'type'.
@@ -4687,58 +4687,58 @@ AddFieldToArray(JSContext* cx,
          name->chars(), name->length(),
          OBJECT_TO_JSVAL(typeObj), NULL, NULL,
          JSPROP_ENUMERATE | JSPROP_READONLY | JSPROP_PERMANENT))
     return false;
 
   return JS_FreezeObject(cx, fieldObj);
 }
 
-JSBool
+bool
 StructType::Create(JSContext* cx, unsigned argc, jsval* vp)
 {
   CallArgs args = CallArgsFromVp(argc, vp);
 
   // Construct and return a new StructType object.
   if (args.length() < 1 || args.length() > 2) {
     JS_ReportError(cx, "StructType takes one or two arguments");
-    return JS_FALSE;
+    return false;
   }
 
   jsval name = args[0];
   if (!name.isString()) {
     JS_ReportError(cx, "first argument must be a string");
-    return JS_FALSE;
+    return false;
   }
 
   // Get ctypes.StructType.prototype from the ctypes.StructType constructor.
   RootedObject typeProto(cx, CType::GetProtoFromCtor(&args.callee(), SLOT_STRUCTPROTO));
 
   // Create a simple StructType with no defined fields. The result will be
   // non-instantiable as CData, will have no 'prototype' property, and will
   // have undefined size and alignment and no ffi_type.
   RootedObject result(cx, CType::Create(cx, typeProto, NullPtr(), TYPE_struct,
                                         JSVAL_TO_STRING(name), JSVAL_VOID, JSVAL_VOID, NULL));
   if (!result)
-    return JS_FALSE;
+    return false;
 
   if (args.length() == 2) {
     RootedObject arr(cx, JSVAL_IS_PRIMITIVE(args[1]) ? NULL : &args[1].toObject());
     if (!arr || !JS_IsArrayObject(cx, arr)) {
       JS_ReportError(cx, "second argument must be an array");
-      return JS_FALSE;
+      return false;
     }
 
     // Define the struct fields.
     if (!DefineInternal(cx, result, arr))
-      return JS_FALSE;
+      return false;
   }
 
   args.rval().setObject(*result);
-  return JS_TRUE;
+  return true;
 }
 
 static void
 PostBarrierCallback(JSTracer *trc, void *k, void *d)
 {
     JSString *prior = static_cast<JSString*>(k);
     FieldInfoHash *table = static_cast<FieldInfoHash*>(d);
     JSString *key = prior;
@@ -4946,48 +4946,48 @@ StructType::BuildFFIType(JSContext* cx, 
   ffiType->size = structSize;
   ffiType->alignment = structAlign;
 #endif
 
   elements.forget();
   return ffiType.forget();
 }
 
-JSBool
+bool
 StructType::Define(JSContext* cx, unsigned argc, jsval* vp)
 {
   CallArgs args = CallArgsFromVp(argc, vp);
   RootedObject obj(cx, JS_THIS_OBJECT(cx, vp));
   if (!obj)
-    return JS_FALSE;
+    return false;
   if (!CType::IsCType(obj) ||
       CType::GetTypeCode(obj) != TYPE_struct) {
     JS_ReportError(cx, "not a StructType");
-    return JS_FALSE;
+    return false;
   }
 
   if (CType::IsSizeDefined(obj)) {
     JS_ReportError(cx, "StructType has already been defined");
-    return JS_FALSE;
+    return false;
   }
 
   if (args.length() != 1) {
     JS_ReportError(cx, "define takes one argument");
-    return JS_FALSE;
+    return false;
   }
 
   jsval arg = args[0];
   if (JSVAL_IS_PRIMITIVE(arg)) {
     JS_ReportError(cx, "argument must be an array");
-    return JS_FALSE;
+    return false;
   }
   RootedObject arr(cx, JSVAL_TO_OBJECT(arg));
   if (!JS_IsArrayObject(cx, arr)) {
     JS_ReportError(cx, "argument must be an array");
-    return JS_FALSE;
+    return false;
   }
 
   return DefineInternal(cx, obj, arr);
 }
 
 JSBool
 StructType::ConstructData(JSContext* cx,
                           HandleObject obj,
@@ -5198,63 +5198,63 @@ StructType::FieldSetter(JSContext* cx, H
   const FieldInfo* field = LookupField(cx, typeObj, JSID_TO_FLAT_STRING(idval));
   if (!field)
     return JS_FALSE;
 
   char* data = static_cast<char*>(CData::GetData(obj)) + field->mOffset;
   return ImplicitConvert(cx, vp, field->mType, data, false, NULL);
 }
 
-JSBool
+bool
 StructType::AddressOfField(JSContext* cx, unsigned argc, jsval* vp)
 {
   CallArgs args = CallArgsFromVp(argc, vp);
   RootedObject obj(cx, JS_THIS_OBJECT(cx, vp));
   if (!obj)
-    return JS_FALSE;
+    return false;
   if (!CData::IsCData(obj)) {
     JS_ReportError(cx, "not a CData");
-    return JS_FALSE;
+    return false;
   }
 
   JSObject* typeObj = CData::GetCType(obj);
   if (CType::GetTypeCode(typeObj) != TYPE_struct) {
     JS_ReportError(cx, "not a StructType");
-    return JS_FALSE;
+    return false;
   }
 
   if (args.length() != 1) {
     JS_ReportError(cx, "addressOfField takes one argument");
-    return JS_FALSE;
+    return false;
   }
 
   JSFlatString *str = JS_FlattenString(cx, args[0].toString());
   if (!str)
-    return JS_FALSE;
+    return false;
 
   const FieldInfo* field = LookupField(cx, typeObj, str);
   if (!field)
-    return JS_FALSE;
+    return false;
 
   RootedObject baseType(cx, field->mType);
   RootedObject pointerType(cx, PointerType::CreateInternal(cx, baseType));
   if (!pointerType)
-    return JS_FALSE;
+    return false;
 
   // Create a PointerType CData object containing null.
   JSObject* result = CData::Create(cx, pointerType, NullPtr(), NULL, true);
   if (!result)
-    return JS_FALSE;
+    return false;
 
   args.rval().setObject(*result);
 
   // Manually set the pointer inside the object, so we skip the conversion step.
   void** data = static_cast<void**>(CData::GetData(result));
   *data = static_cast<char*>(CData::GetData(obj)) + field->mOffset;
-  return JS_TRUE;
+  return true;
 }
 
 /*******************************************************************************
 ** FunctionType implementation
 *******************************************************************************/
 
 // Helper class for handling allocation of function arguments.
 struct AutoValue
@@ -5552,61 +5552,61 @@ NewFunctionInfo(JSContext* cx,
     return fninfo.forget();
 
   if (!PrepareCIF(cx, fninfo.get()))
     return NULL;
 
   return fninfo.forget();
 }
 
-JSBool
+bool
 FunctionType::Create(JSContext* cx, unsigned argc, jsval* vp)
 {
   // Construct and return a new FunctionType object.
   CallArgs args = CallArgsFromVp(argc, vp);
   if (args.length() < 2 || args.length() > 3) {
     JS_ReportError(cx, "FunctionType takes two or three arguments");
-    return JS_FALSE;
+    return false;
   }
 
   AutoValueVector argTypes(cx);
   RootedObject arrayObj(cx, NULL);
 
   if (args.length() == 3) {
     // Prepare an array of jsvals for the arguments.
     if (!JSVAL_IS_PRIMITIVE(args[2]))
       arrayObj = &args[2].toObject();
     if (!arrayObj || !JS_IsArrayObject(cx, arrayObj)) {
       JS_ReportError(cx, "third argument must be an array");
-      return JS_FALSE;
+      return false;
     }
 
     uint32_t len;
     ASSERT_OK(JS_GetArrayLength(cx, arrayObj, &len));
 
     if (!argTypes.resize(len)) {
       JS_ReportOutOfMemory(cx);
-      return JS_FALSE;
+      return false;
     }
   }
 
   // Pull out the argument types from the array, if any.
   JS_ASSERT_IF(argTypes.length(), arrayObj);
   for (uint32_t i = 0; i < argTypes.length(); ++i) {
     if (!JS_GetElement(cx, arrayObj, i, argTypes.handleAt(i)))
-      return JS_FALSE;
+      return false;
   }
 
   JSObject* result = CreateInternal(cx, args[0], args[1],
       argTypes.begin(), argTypes.length());
   if (!result)
-    return JS_FALSE;
+    return false;
 
   args.rval().setObject(*result);
-  return JS_TRUE;
+  return true;
 }
 
 JSObject*
 FunctionType::CreateInternal(JSContext* cx,
                              jsval abi,
                              jsval rtype,
                              jsval* argtypes,
                              unsigned arglen)
@@ -5707,17 +5707,17 @@ ConvertArgument(JSContext* cx,
       return false;
     }
     strings->back().mData = *static_cast<char**>(value->mData);
   }
 
   return true;
 }
 
-JSBool
+bool
 FunctionType::Call(JSContext* cx,
                    unsigned argc,
                    jsval* vp)
 {
   CallArgs args = CallArgsFromVp(argc, vp);
   // get the callee object...
   RootedObject obj(cx, &args.callee());
   if (!CData::IsCData(obj)) {
@@ -6424,167 +6424,167 @@ CData::ValueSetter(JSContext* cx, Handle
   if (!IsCData(obj)) {
     JS_ReportError(cx, "not a CData");
     return JS_FALSE;
   }
 
   return ImplicitConvert(cx, vp, GetCType(obj), GetData(obj), false, NULL);
 }
 
-JSBool
+bool
 CData::Address(JSContext* cx, unsigned argc, jsval* vp)
 {
   CallArgs args = CallArgsFromVp(argc, vp);
   if (args.length() != 0) {
     JS_ReportError(cx, "address takes zero arguments");
-    return JS_FALSE;
+    return false;
   }
 
   RootedObject obj(cx, JS_THIS_OBJECT(cx, vp));
   if (!obj)
-    return JS_FALSE;
+    return false;
   if (!IsCData(obj)) {
     JS_ReportError(cx, "not a CData");
-    return JS_FALSE;
+    return false;
   }
 
   RootedObject typeObj(cx, CData::GetCType(obj));
   RootedObject pointerType(cx, PointerType::CreateInternal(cx, typeObj));
   if (!pointerType)
-    return JS_FALSE;
+    return false;
 
   // Create a PointerType CData object containing null.
   JSObject* result = CData::Create(cx, pointerType, NullPtr(), NULL, true);
   if (!result)
-    return JS_FALSE;
+    return false;
 
   args.rval().setObject(*result);
 
   // Manually set the pointer inside the object, so we skip the conversion step.
   void** data = static_cast<void**>(GetData(result));
   *data = GetData(obj);
-  return JS_TRUE;
-}
-
-JSBool
+  return true;
+}
+
+bool
 CData::Cast(JSContext* cx, unsigned argc, jsval* vp)
 {
   CallArgs args = CallArgsFromVp(argc, vp);
   if (args.length() != 2) {
     JS_ReportError(cx, "cast takes two arguments");
-    return JS_FALSE;
+    return false;
   }
 
   if (JSVAL_IS_PRIMITIVE(args[0]) ||
       !CData::IsCData(&args[0].toObject())) {
     JS_ReportError(cx, "first argument must be a CData");
-    return JS_FALSE;
+    return false;
   }
   RootedObject sourceData(cx, &args[0].toObject());
   JSObject* sourceType = CData::GetCType(sourceData);
 
   if (JSVAL_IS_PRIMITIVE(args[1]) ||
       !CType::IsCType(&args[1].toObject())) {
     JS_ReportError(cx, "second argument must be a CType");
-    return JS_FALSE;
+    return false;
   }
 
   RootedObject targetType(cx, &args[1].toObject());
   size_t targetSize;
   if (!CType::GetSafeSize(targetType, &targetSize) ||
       targetSize > CType::GetSize(sourceType)) {
     JS_ReportError(cx,
       "target CType has undefined or larger size than source CType");
-    return JS_FALSE;
+    return false;
   }
 
   // Construct a new CData object with a type of 'targetType' and a referent
   // of 'sourceData'.
   void* data = CData::GetData(sourceData);
   JSObject* result = CData::Create(cx, targetType, sourceData, data, false);
   if (!result)
-    return JS_FALSE;
+    return false;
 
   args.rval().setObject(*result);
-  return JS_TRUE;
-}
-
-JSBool
+  return true;
+}
+
+bool
 CData::GetRuntime(JSContext* cx, unsigned argc, jsval* vp)
 {
   CallArgs args = CallArgsFromVp(argc, vp);
   if (args.length() != 1) {
     JS_ReportError(cx, "getRuntime takes one argument");
-    return JS_FALSE;
+    return false;
   }
 
   if (JSVAL_IS_PRIMITIVE(args[0]) ||
       !CType::IsCType(&args[0].toObject())) {
     JS_ReportError(cx, "first argument must be a CType");
-    return JS_FALSE;
+    return false;
   }
 
   RootedObject targetType(cx, &args[0].toObject());
   size_t targetSize;
   if (!CType::GetSafeSize(targetType, &targetSize) ||
       targetSize != sizeof(void*)) {
     JS_ReportError(cx, "target CType has non-pointer size");
-    return JS_FALSE;
+    return false;
   }
 
   void* data = static_cast<void*>(cx->runtime());
   JSObject* result = CData::Create(cx, targetType, NullPtr(), &data, true);
   if (!result)
-    return JS_FALSE;
+    return false;
 
   args.rval().setObject(*result);
-  return JS_TRUE;
+  return true;
 }
 
 typedef JS::TwoByteCharsZ (*InflateUTF8Method)(JSContext *, const JS::UTF8Chars, size_t *);
 
-static JSBool
+static bool
 ReadStringCommon(JSContext* cx, InflateUTF8Method inflateUTF8, unsigned argc, jsval *vp)
 {
   CallArgs args = CallArgsFromVp(argc, vp);
   if (args.length() != 0) {
     JS_ReportError(cx, "readString takes zero arguments");
-    return JS_FALSE;
+    return false;
   }
 
   JSObject* obj = CDataFinalizer::GetCData(cx, JS_THIS_OBJECT(cx, vp));
   if (!obj || !CData::IsCData(obj)) {
     JS_ReportError(cx, "not a CData");
-    return JS_FALSE;
+    return false;
   }
 
   // Make sure we are a pointer to, or an array of, an 8-bit or 16-bit
   // character or integer type.
   JSObject* baseType;
   JSObject* typeObj = CData::GetCType(obj);
   TypeCode typeCode = CType::GetTypeCode(typeObj);
   void* data;
   size_t maxLength = -1;
   switch (typeCode) {
   case TYPE_pointer:
     baseType = PointerType::GetBaseType(typeObj);
     data = *static_cast<void**>(CData::GetData(obj));
     if (data == NULL) {
       JS_ReportError(cx, "cannot read contents of null pointer");
-      return JS_FALSE;
+      return false;
     }
     break;
   case TYPE_array:
     baseType = ArrayType::GetBaseType(typeObj);
     data = CData::GetData(obj);
     maxLength = ArrayType::GetLength(typeObj);
     break;
   default:
     JS_ReportError(cx, "not a PointerType or ArrayType");
-    return JS_FALSE;
+    return false;
   }
 
   // Convert the string buffer, taking care to determine the correct string
   // length in the case of arrays (which may contain embedded nulls).
   JSString* result;
   switch (CType::GetTypeCode(baseType)) {
   case TYPE_int8_t:
   case TYPE_uint8_t:
@@ -6592,17 +6592,17 @@ ReadStringCommon(JSContext* cx, InflateU
   case TYPE_signed_char:
   case TYPE_unsigned_char: {
     char* bytes = static_cast<char*>(data);
     size_t length = strnlen(bytes, maxLength);
 
     // Determine the length.
     jschar *dst = inflateUTF8(cx, JS::UTF8Chars(bytes, length), &length).get();
     if (!dst)
-      return JS_FALSE;
+      return false;
 
     result = JS_NewUCString(cx, dst, length);
     break;
   }
   case TYPE_int16_t:
   case TYPE_uint16_t:
   case TYPE_short:
   case TYPE_unsigned_short:
@@ -6610,33 +6610,33 @@ ReadStringCommon(JSContext* cx, InflateU
     jschar* chars = static_cast<jschar*>(data);
     size_t length = strnlen(chars, maxLength);
     result = JS_NewUCStringCopyN(cx, chars, length);
     break;
   }
   default:
     JS_ReportError(cx,
       "base type is not an 8-bit or 16-bit integer or character type");
-    return JS_FALSE;
+    return false;
   }
 
   if (!result)
-    return JS_FALSE;
+    return false;
 
   args.rval().setString(result);
-  return JS_TRUE;
-}
-
-JSBool
+  return true;
+}
+
+bool
 CData::ReadString(JSContext* cx, unsigned argc, jsval* vp)
 {
   return ReadStringCommon(cx, JS::UTF8CharsToNewTwoByteCharsZ, argc, vp);
 }
 
-JSBool
+bool
 CData::ReadStringReplaceMalformed(JSContext* cx, unsigned argc, jsval* vp)
 {
   return ReadStringCommon(cx, JS::LossyUTF8CharsToNewTwoByteCharsZ, argc, vp);
 }
 
 JSString *
 CData::GetSourceString(JSContext *cx, HandleObject typeObj, void *data)
 {
@@ -6652,48 +6652,48 @@ CData::GetSourceString(JSContext *cx, Ha
   if (!BuildDataSource(cx, typeObj, data, false, source))
     return NULL;
 
   AppendString(source, ")");
 
   return NewUCString(cx, source);
 }
 
-JSBool
+bool
 CData::ToSource(JSContext* cx, unsigned argc, jsval* vp)
 {
   CallArgs args = CallArgsFromVp(argc, vp);
   if (args.length() != 0) {
     JS_ReportError(cx, "toSource takes zero arguments");
-    return JS_FALSE;
+    return false;
   }
 
   JSObject* obj = JS_THIS_OBJECT(cx, vp);
   if (!obj)
-    return JS_FALSE;
+    return false;
   if (!CData::IsCData(obj) && !CData::IsCDataProto(obj)) {
     JS_ReportError(cx, "not a CData");
-    return JS_FALSE;
+    return false;
   }
 
   JSString* result;
   if (CData::IsCData(obj)) {
     RootedObject typeObj(cx, CData::GetCType(obj));
     void* data = CData::GetData(obj);
 
     result = CData::GetSourceString(cx, typeObj, data);
   } else {
     result = JS_NewStringCopyZ(cx, "[CData proto object]");
   }
 
   if (!result)
-    return JS_FALSE;
+    return false;
 
   args.rval().setString(result);
-  return JS_TRUE;
+  return true;
 }
 
 JSBool
 CData::ErrnoGetter(JSContext* cx, HandleObject obj, HandleId, MutableHandleValue vp)
 {
   if (!IsCTypesGlobal(obj)) {
     JS_ReportError(cx, "this is not not global object ctypes");
     return JS_FALSE;
@@ -6712,106 +6712,106 @@ CData::LastErrorGetter(JSContext* cx, Ha
     return JS_FALSE;
   }
 
   vp.set(JS_GetReservedSlot(obj, SLOT_LASTERROR));
   return JS_TRUE;
 }
 #endif // defined(XP_WIN)
 
-JSBool
+bool
 CDataFinalizer::Methods::ToSource(JSContext *cx, unsigned argc, jsval *vp)
 {
   CallArgs args = CallArgsFromVp(argc, vp);
   RootedObject objThis(cx, JS_THIS_OBJECT(cx, vp));
   if (!objThis)
-    return JS_FALSE;
+    return false;
   if (!CDataFinalizer::IsCDataFinalizer(objThis)) {
     JS_ReportError(cx, "not a CDataFinalizer");
-    return JS_FALSE;
+    return false;
   }
 
   CDataFinalizer::Private *p = (CDataFinalizer::Private *)
     JS_GetPrivate(objThis);
 
   JSString *strMessage;
   if (!p) {
     strMessage = JS_NewStringCopyZ(cx, "ctypes.CDataFinalizer()");
   } else {
     RootedObject objType(cx, CDataFinalizer::GetCType(cx, objThis));
     if (!objType) {
       JS_ReportError(cx, "CDataFinalizer has no type");
-      return JS_FALSE;
+      return false;
     }
 
     AutoString source;
     AppendString(source, "ctypes.CDataFinalizer(");
     JSString *srcValue = CData::GetSourceString(cx, objType, p->cargs);
     if (!srcValue) {
-      return JS_FALSE;
+      return false;
     }
     AppendString(source, srcValue);
     AppendString(source, ", ");
     jsval valCodePtrType = JS_GetReservedSlot(objThis,
                                               SLOT_DATAFINALIZER_CODETYPE);
     if (JSVAL_IS_PRIMITIVE(valCodePtrType)) {
-      return JS_FALSE;
+      return false;
     }
 
     RootedObject typeObj(cx, JSVAL_TO_OBJECT(valCodePtrType));
     JSString *srcDispose = CData::GetSourceString(cx, typeObj, &(p->code));
     if (!srcDispose) {
-      return JS_FALSE;
+      return false;
     }
 
     AppendString(source, srcDispose);
     AppendString(source, ")");
     strMessage = NewUCString(cx, source);
   }
 
   if (!strMessage) {
     // This is a memory issue, no error message
-    return JS_FALSE;
+    return false;
   }
 
   args.rval().setString(strMessage);
-  return JS_TRUE;
-}
-
-JSBool
+  return true;
+}
+
+bool
 CDataFinalizer::Methods::ToString(JSContext *cx, unsigned argc, jsval *vp)
 {
   CallArgs args = CallArgsFromVp(argc, vp);
   JSObject* objThis = JS_THIS_OBJECT(cx, vp);
   if (!objThis)
-    return JS_FALSE;
+    return false;
   if (!CDataFinalizer::IsCDataFinalizer(objThis)) {
     JS_ReportError(cx, "not a CDataFinalizer");
-    return JS_FALSE;
+    return false;
   }
 
   JSString *strMessage;
   RootedValue value(cx);
   if (!JS_GetPrivate(objThis)) {
     // Pre-check whether CDataFinalizer::GetValue can fail
     // to avoid reporting an error when not appropriate.
     strMessage = JS_NewStringCopyZ(cx, "[CDataFinalizer - empty]");
     if (!strMessage) {
-      return JS_FALSE;
+      return false;
     }
   } else if (!CDataFinalizer::GetValue(cx, objThis, value.address())) {
     MOZ_ASSUME_UNREACHABLE("Could not convert an empty CDataFinalizer");
   } else {
     strMessage = JS_ValueToString(cx, value);
     if (!strMessage) {
-      return JS_FALSE;
+      return false;
     }
   }
   args.rval().setString(strMessage);
-  return JS_TRUE;
+  return true;
 }
 
 bool
 CDataFinalizer::IsCDataFinalizer(JSObject *obj)
 {
   return JS_GetClass(obj) == &sCDataFinalizerClass;
 }
 
@@ -6877,37 +6877,37 @@ CDataFinalizer::GetValue(JSContext *cx, 
  *          value,    finalizer
  *
  * This function attaches strong references to the following values:
  * - the CType of |value|
  *
  * Note: This function takes advantage of the fact that non-variadic
  * CData functions are initialized during creation.
  */
-JSBool
+bool
 CDataFinalizer::Construct(JSContext* cx, unsigned argc, jsval *vp)
 {
   CallArgs args = CallArgsFromVp(argc, vp);
   RootedObject objSelf(cx, &args.callee());
   RootedObject objProto(cx);
   if (!GetObjectProperty(cx, objSelf, "prototype", &objProto)) {
     JS_ReportError(cx, "CDataFinalizer.prototype does not exist");
-    return JS_FALSE;
+    return false;
   }
 
   // Get arguments
   if (args.length() == 0) { // Special case: the empty (already finalized) object
     JSObject *objResult = JS_NewObject(cx, &sCDataFinalizerClass, objProto, NULL);
     args.rval().setObject(*objResult);
-    return JS_TRUE;
+    return true;
   }
 
   if (args.length() != 2) {
     JS_ReportError(cx, "CDataFinalizer takes 2 arguments");
-    return JS_FALSE;
+    return false;
   }
 
   JS::Value valCodePtr = args[1];
   if (!valCodePtr.isObject()) {
     return TypeError(cx, "_a CData object_ of a function pointer type",
                      valCodePtr);
   }
   JSObject *objCodePtr = &valCodePtr.toObject();
@@ -6973,32 +6973,32 @@ CDataFinalizer::Construct(JSContext* cx,
   if (!ImplicitConvert(cx, valData, objArgType, cargs.get(),
                        false, &freePointer)) {
     return TypeError(cx, "(an object that can be converted to the following type)",
                      OBJECT_TO_JSVAL(objArgType));
   }
   if (freePointer) {
     // Note: We could handle that case, if necessary.
     JS_ReportError(cx, "Internal Error during CDataFinalizer. Object cannot be represented");
-    return JS_FALSE;
+    return false;
   }
 
   // 4. Prepare buffer for holding return value
 
   ScopedJSFreePtr<void> rvalue;
   if (CType::GetTypeCode(returnType) != TYPE_void_t) {
     rvalue = malloc(Align(CType::GetSize(returnType),
                           sizeof(ffi_arg)));
   } //Otherwise, simply do not allocate
 
   // 5. Create |objResult|
 
   JSObject *objResult = JS_NewObject(cx, &sCDataFinalizerClass, objProto, NULL);
   if (!objResult) {
-    return JS_FALSE;
+    return false;
   }
 
   // If our argument is a CData, it holds a type.
   // This is the type that we should capture, not that
   // of the function, which may be less precise.
   JSObject *objBestArgType = objArgType;
   if (!JSVAL_IS_PRIMITIVE(valData)) {
     JSObject *objData = &valData.toObject();
@@ -7030,34 +7030,34 @@ CDataFinalizer::Construct(JSContext* cx,
                    "Invalid ABI specification in CDataFinalizer");
     return false;
   }
 
   ffi_type* rtype = CType::GetFFIType(cx, funInfoFinalizer->mReturnType);
   if (!rtype) {
     JS_ReportError(cx, "Internal Error: "
                    "Could not access ffi type of CDataFinalizer");
-    return JS_FALSE;
+    return false;
   }
 
   // 7. Store C information as private
   ScopedJSFreePtr<CDataFinalizer::Private>
     p((CDataFinalizer::Private*)malloc(sizeof(CDataFinalizer::Private)));
 
   memmove(&p->CIF, &funInfoFinalizer->mCIF, sizeof(ffi_cif));
 
   p->cargs = cargs.forget();
   p->rvalue = rvalue.forget();
   p->cargs_size = sizeArg;
   p->code = code;
 
 
   JS_SetPrivate(objResult, p.forget());
   args.rval().setObject(*objResult);
-  return JS_TRUE;
+  return true;
 }
 
 
 /*
  * Actually call the finalizer. Does not perform any cleanup on the object.
  *
  * Preconditions: |this| must be a |CDataFinalizer|, |p| must be non-null.
  * The function fails if |this| has gone through |Forget|/|Dispose|
@@ -7101,93 +7101,93 @@ CDataFinalizer::CallFinalizer(CDataFinal
  *
  * Preconditions: |this| must be a |CDataFinalizer|.
  * The function fails if |this| has gone through |Forget|/|Dispose|
  * or |Finalize|.
  *
  * Does not call the finalizer. Cleans up the Private memory and releases all
  * strong references.
  */
-JSBool
+bool
 CDataFinalizer::Methods::Forget(JSContext* cx, unsigned argc, jsval *vp)
 {
   CallArgs args = CallArgsFromVp(argc, vp);
   if (args.length() != 0) {
     JS_ReportError(cx, "CDataFinalizer.prototype.forget takes no arguments");
-    return JS_FALSE;
+    return false;
   }
 
   JS::Rooted<JSObject*> obj(cx, args.thisv().toObjectOrNull());
   if (!obj)
-    return JS_FALSE;
+    return false;
   if (!CDataFinalizer::IsCDataFinalizer(obj)) {
     return TypeError(cx, "a CDataFinalizer", OBJECT_TO_JSVAL(obj));
   }
 
   CDataFinalizer::Private *p = (CDataFinalizer::Private *)
     JS_GetPrivate(obj);
 
   if (!p) {
     JS_ReportError(cx, "forget called on an empty CDataFinalizer");
-    return JS_FALSE;
+    return false;
   }
 
   RootedValue valJSData(cx);
   RootedObject ctype(cx, GetCType(cx, obj));
   if (!ConvertToJS(cx, ctype, NullPtr(), p->cargs, false, true, valJSData.address())) {
     JS_ReportError(cx, "CDataFinalizer value cannot be represented");
-    return JS_FALSE;
+    return false;
   }
 
   CDataFinalizer::Cleanup(p, obj);
 
   args.rval().set(valJSData);
-  return JS_TRUE;
+  return true;
 }
 
 /*
  * Clean up the value.
  *
  * Preconditions: |this| must be a |CDataFinalizer|.
  * The function fails if |this| has gone through |Forget|/|Dispose|
  * or |Finalize|.
  *
  * Calls the finalizer, cleans up the Private memory and releases all
  * strong references.
  */
-JSBool
+bool
 CDataFinalizer::Methods::Dispose(JSContext* cx, unsigned argc, jsval *vp)
 {
   CallArgs args = CallArgsFromVp(argc, vp);
   if (args.length() != 0) {
     JS_ReportError(cx, "CDataFinalizer.prototype.dispose takes no arguments");
-    return JS_FALSE;
+    return false;
   }
 
   RootedObject obj(cx, JS_THIS_OBJECT(cx, vp));
   if (!obj)
-    return JS_FALSE;
+    return false;
   if (!CDataFinalizer::IsCDataFinalizer(obj)) {
     return TypeError(cx, "a CDataFinalizer", OBJECT_TO_JSVAL(obj));
   }
 
   CDataFinalizer::Private *p = (CDataFinalizer::Private *)
     JS_GetPrivate(obj);
 
   if (!p) {
     JS_ReportError(cx, "dispose called on an empty CDataFinalizer.");
-    return JS_FALSE;
+    return false;
   }
 
   jsval valType = JS_GetReservedSlot(obj, SLOT_DATAFINALIZER_VALTYPE);
   JS_ASSERT(!JSVAL_IS_PRIMITIVE(valType));
 
   JSObject *objCTypes = CType::GetGlobalCTypes(cx, &valType.toObject());
   if (!objCTypes)
-    return JS_FALSE;
+    return false;
 
   jsval valCodePtrType = JS_GetReservedSlot(obj, SLOT_DATAFINALIZER_CODETYPE);
   JS_ASSERT(!JSVAL_IS_PRIMITIVE(valCodePtrType));
   JSObject *objCodePtrType = &valCodePtrType.toObject();
 
   JSObject *objCodeType = PointerType::GetBaseType(objCodePtrType);
   JS_ASSERT(objCodeType);
   JS_ASSERT(CType::GetTypeCode(objCodeType) == TYPE_function);
@@ -7320,227 +7320,227 @@ Int64Base::Finalize(JSFreeOp *fop, JSObj
 uint64_t
 Int64Base::GetInt(JSObject* obj) {
   JS_ASSERT(Int64::IsInt64(obj) || UInt64::IsUInt64(obj));
 
   jsval slot = JS_GetReservedSlot(obj, SLOT_INT64);
   return *static_cast<uint64_t*>(JSVAL_TO_PRIVATE(slot));
 }
 
-JSBool
+bool
 Int64Base::ToString(JSContext* cx,
                     JSObject* obj,
                     const CallArgs& args,
                     bool isUnsigned)
 {
   if (args.length() > 1) {
     JS_ReportError(cx, "toString takes zero or one argument");
-    return JS_FALSE;
+    return false;
   }
 
   int radix = 10;
   if (args.length() == 1) {
     jsval arg = args[0];
     if (arg.isInt32())
       radix = arg.toInt32();
     if (!arg.isInt32() || radix < 2 || radix > 36) {
       JS_ReportError(cx, "radix argument must be an integer between 2 and 36");
-      return JS_FALSE;
+      return false;
     }
   }
 
   AutoString intString;
   if (isUnsigned) {
     IntegerToString(GetInt(obj), radix, intString);
   } else {
     IntegerToString(static_cast<int64_t>(GetInt(obj)), radix, intString);
   }
 
   JSString *result = NewUCString(cx, intString);
   if (!result)
-    return JS_FALSE;
+    return false;
 
   args.rval().setString(result);
-  return JS_TRUE;
-}
-
-JSBool
+  return true;
+}
+
+bool
 Int64Base::ToSource(JSContext* cx,
                     JSObject* obj,
                     const CallArgs& args,
                     bool isUnsigned)
 {
   if (args.length() != 0) {
     JS_ReportError(cx, "toSource takes zero arguments");
-    return JS_FALSE;
+    return false;
   }
 
   // Return a decimal string suitable for constructing the number.
   AutoString source;
   if (isUnsigned) {
     AppendString(source, "ctypes.UInt64(\"");
     IntegerToString(GetInt(obj), 10, source);
   } else {
     AppendString(source, "ctypes.Int64(\"");
     IntegerToString(static_cast<int64_t>(GetInt(obj)), 10, source);
   }
   AppendString(source, "\")");
 
   JSString *result = NewUCString(cx, source);
   if (!result)
-    return JS_FALSE;
+    return false;
 
   args.rval().setString(result);
-  return JS_TRUE;
-}
-
-JSBool
+  return true;
+}
+
+bool
 Int64::Construct(JSContext* cx,
                  unsigned argc,
                  jsval* vp)
 {
   CallArgs args = CallArgsFromVp(argc, vp);
 
   // Construct and return a new Int64 object.
   if (args.length() != 1) {
     JS_ReportError(cx, "Int64 takes one argument");
-    return JS_FALSE;
+    return false;
   }
 
   int64_t i = 0;
   if (!jsvalToBigInteger(cx, args[0], true, &i))
     return TypeError(cx, "int64", args[0]);
 
   // Get ctypes.Int64.prototype from the 'prototype' property of the ctor.
   RootedValue slot(cx);
   RootedObject callee(cx, &args.callee());
   ASSERT_OK(JS_GetProperty(cx, callee, "prototype", &slot));
   RootedObject proto(cx, JSVAL_TO_OBJECT(slot));
   JS_ASSERT(JS_GetClass(proto) == &sInt64ProtoClass);
 
   JSObject* result = Int64Base::Construct(cx, proto, i, false);
   if (!result)
-    return JS_FALSE;
+    return false;
 
   args.rval().setObject(*result);
-  return JS_TRUE;
+  return true;
 }
 
 bool
 Int64::IsInt64(JSObject* obj)
 {
   return JS_GetClass(obj) == &sInt64Class;
 }
 
-JSBool
+bool
 Int64::ToString(JSContext* cx, unsigned argc, jsval* vp)
 {
   CallArgs args = CallArgsFromVp(argc, vp);
   JSObject* obj = JS_THIS_OBJECT(cx, vp);
   if (!obj)
-    return JS_FALSE;
+    return false;
   if (!Int64::IsInt64(obj)) {
     JS_ReportError(cx, "not an Int64");
-    return JS_FALSE;
+    return false;
   }
 
   return Int64Base::ToString(cx, obj, args, false);
 }
 
-JSBool
+bool
 Int64::ToSource(JSContext* cx, unsigned argc, jsval* vp)
 {
   CallArgs args = CallArgsFromVp(argc, vp);
   JSObject* obj = JS_THIS_OBJECT(cx, vp);
   if (!obj)
-    return JS_FALSE;
+    return false;
   if (!Int64::IsInt64(obj)) {
     JS_ReportError(cx, "not an Int64");
-    return JS_FALSE;
+    return false;
   }
 
   return Int64Base::ToSource(cx, obj, args, false);
 }
 
-JSBool
+bool
 Int64::Compare(JSContext* cx, unsigned argc, jsval* vp)
 {
   CallArgs args = CallArgsFromVp(argc, vp);
   if (args.length() != 2 ||
       JSVAL_IS_PRIMITIVE(args[0]) ||
       JSVAL_IS_PRIMITIVE(args[1]) ||
       !Int64::IsInt64(&args[0].toObject()) ||
       !Int64::IsInt64(&args[1].toObject())) {
     JS_ReportError(cx, "compare takes two Int64 arguments");
-    return JS_FALSE;
+    return false;
   }
 
   JSObject* obj1 = &args[0].toObject();
   JSObject* obj2 = &args[1].toObject();
 
   int64_t i1 = Int64Base::GetInt(obj1);
   int64_t i2 = Int64Base::GetInt(obj2);
 
   if (i1 == i2)
     args.rval().setInt32(0);
   else if (i1 < i2)
     args.rval().setInt32(-1);
   else
     args.rval().setInt32(1);
 
-  return JS_TRUE;
+  return true;
 }
 
 #define LO_MASK ((uint64_t(1) << 32) - 1)
 #define INT64_LO(i) ((i) & LO_MASK)
 #define INT64_HI(i) ((i) >> 32)
 
-JSBool
+bool
 Int64::Lo(JSContext* cx, unsigned argc, jsval* vp)
 {
   CallArgs args = CallArgsFromVp(argc, vp);
   if (args.length() != 1 || JSVAL_IS_PRIMITIVE(args[0]) ||
       !Int64::IsInt64(&args[0].toObject())) {
     JS_ReportError(cx, "lo takes one Int64 argument");
-    return JS_FALSE;
+    return false;
   }
 
   JSObject* obj = &args[0].toObject();
   int64_t u = Int64Base::GetInt(obj);
   double d = uint32_t(INT64_LO(u));
 
   args.rval().setNumber(d);
-  return JS_TRUE;
-}
-
-JSBool
+  return true;
+}
+
+bool
 Int64::Hi(JSContext* cx, unsigned argc, jsval* vp)
 {
   CallArgs args = CallArgsFromVp(argc, vp);
   if (args.length() != 1 || JSVAL_IS_PRIMITIVE(args[0]) ||
       !Int64::IsInt64(&args[0].toObject())) {
     JS_ReportError(cx, "hi takes one Int64 argument");
-    return JS_FALSE;
+    return false;
   }
 
   JSObject* obj = &args[0].toObject();
   int64_t u = Int64Base::GetInt(obj);
   double d = int32_t(INT64_HI(u));
 
   args.rval().setDouble(d);
-  return JS_TRUE;
-}
-
-JSBool
+  return true;
+}
+
+bool
 Int64::Join(JSContext* cx, unsigned argc, jsval* vp)
 {
   CallArgs args = CallArgsFromVp(argc, vp);
   if (args.length() != 2) {
     JS_ReportError(cx, "join takes two arguments");
-    return JS_FALSE;
+    return false;
   }
 
   int32_t hi;
   uint32_t lo;
   if (!jsvalToInteger(cx, args[0], &hi))
     return TypeError(cx, "int32", args[0]);
   if (!jsvalToInteger(cx, args[1], &lo))
     return TypeError(cx, "uint32", args[1]);
@@ -7551,162 +7551,162 @@ Int64::Join(JSContext* cx, unsigned argc
   JSObject* callee = &args.callee();
 
   jsval slot = js::GetFunctionNativeReserved(callee, SLOT_FN_INT64PROTO);
   RootedObject proto(cx, &slot.toObject());
   JS_ASSERT(JS_GetClass(proto) == &sInt64ProtoClass);
 
   JSObject* result = Int64Base::Construct(cx, proto, i, false);
   if (!result)
-    return JS_FALSE;
+    return false;
 
   args.rval().setObject(*result);
-  return JS_TRUE;
-}
-
-JSBool
+  return true;
+}
+
+bool
 UInt64::Construct(JSContext* cx,
                   unsigned argc,
                   jsval* vp)
 {
   CallArgs args = CallArgsFromVp(argc, vp);
 
   // Construct and return a new UInt64 object.
   if (args.length() != 1) {
     JS_ReportError(cx, "UInt64 takes one argument");
-    return JS_FALSE;
+    return false;
   }
 
   uint64_t u = 0;
   if (!jsvalToBigInteger(cx, args[0], true, &u))
     return TypeError(cx, "uint64", args[0]);
 
   // Get ctypes.UInt64.prototype from the 'prototype' property of the ctor.
   RootedValue slot(cx);
   RootedObject callee(cx, &args.callee());
   ASSERT_OK(JS_GetProperty(cx, callee, "prototype", &slot));
   RootedObject proto(cx, &slot.toObject());
   JS_ASSERT(JS_GetClass(proto) == &sUInt64ProtoClass);
 
   JSObject* result = Int64Base::Construct(cx, proto, u, true);
   if (!result)
-    return JS_FALSE;
+    return false;
 
   args.rval().setObject(*result);
-  return JS_TRUE;
+  return true;
 }
 
 bool
 UInt64::IsUInt64(JSObject* obj)
 {
   return JS_GetClass(obj) == &sUInt64Class;
 }
 
-JSBool
+bool
 UInt64::ToString(JSContext* cx, unsigned argc, jsval* vp)
 {
   CallArgs args = CallArgsFromVp(argc, vp);
   JSObject* obj = JS_THIS_OBJECT(cx, vp);
   if (!obj)
-    return JS_FALSE;
+    return false;
   if (!UInt64::IsUInt64(obj)) {
     JS_ReportError(cx, "not a UInt64");
-    return JS_FALSE;
+    return false;
   }
 
   return Int64Base::ToString(cx, obj, args, true);
 }
 
-JSBool
+bool
 UInt64::ToSource(JSContext* cx, unsigned argc, jsval* vp)
 {
   CallArgs args = CallArgsFromVp(argc, vp);
   JSObject* obj = JS_THIS_OBJECT(cx, vp);
   if (!obj)
-    return JS_FALSE;
+    return false;
   if (!UInt64::IsUInt64(obj)) {
     JS_ReportError(cx, "not a UInt64");
-    return JS_FALSE;
+    return false;
   }
 
   return Int64Base::ToSource(cx, obj, args, true);
 }
 
-JSBool
+bool
 UInt64::Compare(JSContext* cx, unsigned argc, jsval* vp)
 {
   CallArgs args = CallArgsFromVp(argc, vp);
   if (args.length() != 2 ||
       JSVAL_IS_PRIMITIVE(args[0]) ||
       JSVAL_IS_PRIMITIVE(args[1]) ||
       !UInt64::IsUInt64(&args[0].toObject()) ||
       !UInt64::IsUInt64(&args[1].toObject())) {
     JS_ReportError(cx, "compare takes two UInt64 arguments");
-    return JS_FALSE;
+    return false;
   }
 
   JSObject* obj1 = &args[0].toObject();
   JSObject* obj2 = &args[1].toObject();
 
   uint64_t u1 = Int64Base::GetInt(obj1);
   uint64_t u2 = Int64Base::GetInt(obj2);
 
   if (u1 == u2)
     args.rval().setInt32(0);
   else if (u1 < u2)
     args.rval().setInt32(-1);
   else
     args.rval().setInt32(1);
 
-  return JS_TRUE;
-}
-
-JSBool
+  return true;
+}
+
+bool
 UInt64::Lo(JSContext* cx, unsigned argc, jsval* vp)
 {
   CallArgs args = CallArgsFromVp(argc, vp);
   if (args.length() != 1 || JSVAL_IS_PRIMITIVE(args[0]) ||
       !UInt64::IsUInt64(&args[0].toObject())) {
     JS_ReportError(cx, "lo takes one UInt64 argument");
-    return JS_FALSE;
+    return false;
   }
 
   JSObject* obj = &args[0].toObject();
   uint64_t u = Int64Base::GetInt(obj);
   double d = uint32_t(INT64_LO(u));
 
   args.rval().setDouble(d);
-  return JS_TRUE;
-}
-
-JSBool
+  return true;
+}
+
+bool
 UInt64::Hi(JSContext* cx, unsigned argc, jsval* vp)
 {
   CallArgs args = CallArgsFromVp(argc, vp);
   if (args.length() != 1 || JSVAL_IS_PRIMITIVE(args[0]) ||
       !UInt64::IsUInt64(&args[0].toObject())) {
     JS_ReportError(cx, "hi takes one UInt64 argument");
-    return JS_FALSE;
+    return false;
   }
 
   JSObject* obj = &args[0].toObject();
   uint64_t u = Int64Base::GetInt(obj);
   double d = uint32_t(INT64_HI(u));
 
   args.rval().setDouble(d);
-  return JS_TRUE;
-}
-
-JSBool
+  return true;
+}
+
+bool
 UInt64::Join(JSContext* cx, unsigned argc, jsval* vp)
 {
   CallArgs args = CallArgsFromVp(argc, vp);
   if (args.length() != 2) {
     JS_ReportError(cx, "join takes two arguments");
-    return JS_FALSE;
+    return false;
   }
 
   uint32_t hi;
   uint32_t lo;
   if (!jsvalToInteger(cx, args[0], &hi))
     return TypeError(cx, "uint32_t", args[0]);
   if (!jsvalToInteger(cx, args[1], &lo))
     return TypeError(cx, "uint32_t", args[1]);
@@ -7717,16 +7717,16 @@ UInt64::Join(JSContext* cx, unsigned arg
   JSObject* callee = &args.callee();
 
   jsval slot = js::GetFunctionNativeReserved(callee, SLOT_FN_INT64PROTO);
   RootedObject proto(cx, &slot.toObject());
   JS_ASSERT(JS_GetClass(proto) == &sUInt64ProtoClass);
 
   JSObject* result = Int64Base::Construct(cx, proto, u, true);
   if (!result)
-    return JS_FALSE;
+    return false;
 
   args.rval().setObject(*result);
-  return JS_TRUE;
-}
-
-}
-}
+  return true;
+}
+
+}
+}
--- a/js/src/ctypes/CTypes.h
+++ b/js/src/ctypes/CTypes.h
@@ -473,19 +473,19 @@ namespace CData {
     void* data, bool ownResult);
 
   JSObject* GetCType(JSObject* dataObj);
   void* GetData(JSObject* dataObj);
   bool IsCData(JSObject* obj);
   bool IsCDataProto(JSObject* obj);
 
   // Attached by JSAPI as the function 'ctypes.cast'
-  JSBool Cast(JSContext* cx, unsigned argc, jsval* vp);
+  bool Cast(JSContext* cx, unsigned argc, jsval* vp);
   // Attached by JSAPI as the function 'ctypes.getRuntime'
-  JSBool GetRuntime(JSContext* cx, unsigned argc, jsval* vp);
+  bool GetRuntime(JSContext* cx, unsigned argc, jsval* vp);
 }
 
 namespace Int64 {
   bool IsInt64(JSObject* obj);
 }
 
 namespace UInt64 {
   bool IsUInt64(JSObject* obj);
--- a/js/src/ctypes/Library.cpp
+++ b/js/src/ctypes/Library.cpp
@@ -18,18 +18,18 @@ namespace ctypes {
 /*******************************************************************************
 ** JSAPI function prototypes
 *******************************************************************************/
 
 namespace Library
 {
   static void Finalize(JSFreeOp *fop, JSObject* obj);
 
-  static JSBool Close(JSContext* cx, unsigned argc, jsval* vp);
-  static JSBool Declare(JSContext* cx, unsigned argc, jsval* vp);
+  static bool Close(JSContext* cx, unsigned argc, jsval* vp);
+  static bool Declare(JSContext* cx, unsigned argc, jsval* vp);
 }
 
 /*******************************************************************************
 ** JSObject implementation
 *******************************************************************************/
 
 typedef Rooted<JSFlatString*>    RootedFlatString;
 
@@ -44,46 +44,46 @@ static JSClass sLibraryClass = {
   (JSPROP_ENUMERATE | JSPROP_READONLY | JSPROP_PERMANENT)
 
 static const JSFunctionSpec sLibraryFunctions[] = {
   JS_FN("close",   Library::Close,   0, CTYPESFN_FLAGS),
   JS_FN("declare", Library::Declare, 0, CTYPESFN_FLAGS),
   JS_FS_END
 };
 
-JSBool
+bool
 Library::Name(JSContext* cx, unsigned argc, jsval *vp)
 {
   if (argc != 1) {
     JS_ReportError(cx, "libraryName takes one argument");
-    return JS_FALSE;
+    return false;
   }
 
   jsval arg = JS_ARGV(cx, vp)[0];
   JSString* str = NULL;
   if (JSVAL_IS_STRING(arg)) {
     str = JSVAL_TO_STRING(arg);
   }
   else {
     JS_ReportError(cx, "name argument must be a string");
-      return JS_FALSE;
+      return false;
   }
 
   AutoString resultString;
   AppendString(resultString, DLL_PREFIX);
   AppendString(resultString, str);
   AppendString(resultString, DLL_SUFFIX);
 
   JSString *result = JS_NewUCStringCopyN(cx, resultString.begin(),
                                          resultString.length());
   if (!result)
-    return JS_FALSE;
+    return false;
 
   JS_SET_RVAL(cx, vp, STRING_TO_JSVAL(result));
-  return JS_TRUE;
+  return true;
 }
 
 JSObject*
 Library::Create(JSContext* cx, jsval path_, JSCTypesCallbacks* callbacks)
 {
   RootedValue path(cx, path_);
   RootedObject libraryObj(cx, JS_NewObject(cx, &sLibraryClass, NULL, NULL));
   if (!libraryObj)
@@ -191,124 +191,124 @@ UnloadLibrary(JSObject* obj)
 }
 
 void
 Library::Finalize(JSFreeOp *fop, JSObject* obj)
 {
   UnloadLibrary(obj);
 }
 
-JSBool
+bool
 Library::Open(JSContext* cx, unsigned argc, jsval *vp)
 {
   JSObject* ctypesObj = JS_THIS_OBJECT(cx, vp);
   if (!ctypesObj)
-    return JS_FALSE;
+    return false;
   if (!IsCTypesGlobal(ctypesObj)) {
     JS_ReportError(cx, "not a ctypes object");
-    return JS_FALSE;
+    return false;
   }
 
   if (argc != 1 || JSVAL_IS_VOID(JS_ARGV(cx, vp)[0])) {
     JS_ReportError(cx, "open requires a single argument");
-    return JS_FALSE;
+    return false;
   }
 
   JSObject* library = Create(cx, JS_ARGV(cx, vp)[0], GetCallbacks(ctypesObj));
   if (!library)
-    return JS_FALSE;
+    return false;
 
   JS_SET_RVAL(cx, vp, OBJECT_TO_JSVAL(library));
-  return JS_TRUE;
+  return true;
 }
 
-JSBool
+bool
 Library::Close(JSContext* cx, unsigned argc, jsval* vp)
 {
   JSObject* obj = JS_THIS_OBJECT(cx, vp);
   if (!obj)
-    return JS_FALSE;
+    return false;
   if (!IsLibrary(obj)) {
     JS_ReportError(cx, "not a library");
-    return JS_FALSE;
+    return false;
   }
 
   if (argc != 0) {
     JS_ReportError(cx, "close doesn't take any arguments");
-    return JS_FALSE;
+    return false;
   }
 
   // delete our internal objects
   UnloadLibrary(obj);
   JS_SetReservedSlot(obj, SLOT_LIBRARY, PRIVATE_TO_JSVAL(NULL));
 
   JS_SET_RVAL(cx, vp, JSVAL_VOID);
-  return JS_TRUE;
+  return true;
 }
 
-JSBool
+bool
 Library::Declare(JSContext* cx, unsigned argc, jsval* vp)
 {
   RootedObject obj(cx, JS_THIS_OBJECT(cx, vp));
   if (!obj)
-    return JS_FALSE;
+    return false;
   if (!IsLibrary(obj)) {
     JS_ReportError(cx, "not a library");
-    return JS_FALSE;
+    return false;
   }
 
   PRLibrary* library = GetLibrary(obj);
   if (!library) {
     JS_ReportError(cx, "library not open");
-    return JS_FALSE;
+    return false;
   }
 
   // We allow two API variants:
   // 1) library.declare(name, abi, returnType, argType1, ...)
   //    declares a function with the given properties, and resolves the symbol
   //    address in the library.
   // 2) library.declare(name, type)
   //    declares a symbol of 'type', and resolves it. The object that comes
   //    back will be of type 'type', and will point into the symbol data.
   //    This data will be both readable and writable via the usual CData
   //    accessors. If 'type' is a PointerType to a FunctionType, the result will
   //    be a function pointer, as with 1). 
   if (argc < 2) {
     JS_ReportError(cx, "declare requires at least two arguments");
-    return JS_FALSE;
+    return false;
   }
 
   jsval* argv = JS_ARGV(cx, vp);
   if (!JSVAL_IS_STRING(argv[0])) {
     JS_ReportError(cx, "first argument must be a string");
-    return JS_FALSE;
+    return false;
   }
 
   RootedObject fnObj(cx, NULL);
   RootedObject typeObj(cx);
   bool isFunction = argc > 2;
   if (isFunction) {
     // Case 1).
     // Create a FunctionType representing the function.
     fnObj = FunctionType::CreateInternal(cx,
               argv[1], argv[2], &argv[3], argc - 3);
     if (!fnObj)
-      return JS_FALSE;
+      return false;
 
     // Make a function pointer type.
     typeObj = PointerType::CreateInternal(cx, fnObj);
     if (!typeObj)
-      return JS_FALSE;
+      return false;
   } else {
     // Case 2).
     if (JSVAL_IS_PRIMITIVE(argv[1]) ||
         !CType::IsCType(JSVAL_TO_OBJECT(argv[1])) ||
         !CType::IsSizeDefined(JSVAL_TO_OBJECT(argv[1]))) {
       JS_ReportError(cx, "second argument must be a type of defined size");
-      return JS_FALSE;
+      return false;
     }
 
     typeObj = JSVAL_TO_OBJECT(argv[1]);
     if (CType::GetTypeCode(typeObj) == TYPE_pointer) {
       fnObj = PointerType::GetBaseType(typeObj);
       isFunction = fnObj && CType::GetTypeCode(fnObj) == TYPE_function;
     }
   }
@@ -321,45 +321,45 @@ Library::Declare(JSContext* cx, unsigned
     // Build the symbol, with mangling if necessary.
     FunctionType::BuildSymbolName(nameStr, fnObj, symbol);
     AppendString(symbol, "\0");
 
     // Look up the function symbol.
     fnptr = PR_FindFunctionSymbol(library, symbol.begin());
     if (!fnptr) {
       JS_ReportError(cx, "couldn't find function symbol in library");
-      return JS_FALSE;
+      return false;
     }
     data = &fnptr;
 
   } else {
     // 'typeObj' is another data type. Look up the data symbol.
     AppendString(symbol, nameStr);
     AppendString(symbol, "\0");
 
     data = PR_FindSymbol(library, symbol.begin());
     if (!data) {
       JS_ReportError(cx, "couldn't find symbol in library");
-      return JS_FALSE;
+      return false;
     }
   }
 
   RootedObject result(cx, CData::Create(cx, typeObj, obj, data, isFunction));
   if (!result)
-    return JS_FALSE;
+    return false;
 
   JS_SET_RVAL(cx, vp, OBJECT_TO_JSVAL(result));
 
   // Seal the CData object, to prevent modification of the function pointer.
   // This permanently associates this object with the library, and avoids
   // having to do things like reset SLOT_REFERENT when someone tries to
   // change the pointer value.
   // XXX This will need to change when bug 541212 is fixed -- CData::ValueSetter
   // could be called on a sealed object.
   if (isFunction && !JS_FreezeObject(cx, result))
-    return JS_FALSE;
+    return false;
 
-  return JS_TRUE;
+  return true;
 }
 
 }
 }
 
--- a/js/src/ctypes/Library.h
+++ b/js/src/ctypes/Library.h
@@ -15,22 +15,22 @@ namespace ctypes {
 
 enum LibrarySlot {
   SLOT_LIBRARY = 0,
   LIBRARY_SLOTS
 };
 
 namespace Library
 {
-  JSBool Name(JSContext* cx, unsigned argc, jsval *vp);
+  bool Name(JSContext* cx, unsigned argc, jsval *vp);
 
   JSObject* Create(JSContext* cx, jsval path, JSCTypesCallbacks* callbacks);
 
   bool IsLibrary(JSObject* obj);
   PRLibrary* GetLibrary(JSObject* obj);
 
-  JSBool Open(JSContext* cx, unsigned argc, jsval* vp);
+  bool Open(JSContext* cx, unsigned argc, jsval* vp);
 }
 
 }
 }
 
 #endif /* ctypes_Library_h */
--- a/js/src/ion/AsmJS.cpp
+++ b/js/src/ion/AsmJS.cpp
@@ -6320,17 +6320,17 @@ js::CompileAsmJS(JSContext *cx, AsmJSPar
 
     JS_ASSERT(funbox->function()->isInterpreted());
     funbox->object = moduleFun;
 
     *validated = true;
     return Warn(cx, JSMSG_USE_ASM_TYPE_OK, compilationTimeReport);
 }
 
-JSBool
+bool
 js::IsAsmJSCompilationAvailable(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
 
     bool available = JSC::MacroAssembler::supportsFloatingPoint() &&
                      !cx->compartment()->debugMode() &&
                      cx->hasOption(JSOPTION_ASMJS);
 
--- a/js/src/ion/AsmJS.h
+++ b/js/src/ion/AsmJS.h
@@ -80,22 +80,22 @@ static const size_t AsmJSAllocationGranu
 // (made using a uint32 index) are guaranteed to raise a SIGSEGV.
 static const size_t AsmJSBufferProtectedSize = 4 * 1024ULL * 1024ULL * 1024ULL;
 #endif
 
 #ifdef JS_ION
 
 // Return whether asm.js optimization is inhibitted by the platform or
 // dynamically disabled:
-extern JSBool
+extern bool
 IsAsmJSCompilationAvailable(JSContext *cx, unsigned argc, JS::Value *vp);
 
 #else // JS_ION
 
-inline JSBool
+inline bool
 IsAsmJSCompilationAvailable(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     args.rval().set(BooleanValue(false));
     return true;
 }
 
 #endif // JS_ION
--- a/js/src/ion/AsmJSLink.cpp
+++ b/js/src/ion/AsmJSLink.cpp
@@ -296,17 +296,17 @@ AsmJSActivation::~AsmJSActivation()
     cx_->runtime()->mainThread.asmJSActivationStack_ = prev_;
 }
 
 static const unsigned ASM_MODULE_SLOT = 0;
 static const unsigned ASM_EXPORT_INDEX_SLOT = 1;
 
 // The JSNative for the functions nested in an asm.js module. Calling this
 // native will trampoline into generated code.
-static JSBool
+static bool
 CallAsmJS(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs callArgs = CallArgsFromVp(argc, vp);
     RootedFunction callee(cx, &callArgs.callee().as<JSFunction>());
 
     // An asm.js function stores, in its extended slots:
     //  - a pointer to the module from which it was returned
     //  - its index in the ordered list of exported functions
@@ -556,17 +556,17 @@ SendBlocksToPerf(JSContext *cx, AsmJSMod
 #endif
 
 // Implements the semantics of an asm.js module function that has been successfully validated.
 // A successfully validated asm.js module does not have bytecode emitted, but rather a list of
 // dynamic constraints that must be satisfied by the arguments passed by the caller. If these
 // constraints are satisfied, then LinkAsmJS can return CallAsmJS native functions that trampoline
 // into compiled code. If any of the constraints fails, LinkAsmJS reparses the entire asm.js module
 // from source so that it can be run as plain bytecode.
-static JSBool
+static bool
 LinkAsmJS(JSContext *cx, unsigned argc, JS::Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     RootedFunction fun(cx, &args.callee().as<JSFunction>());
     RootedObject moduleObj(cx,  &fun->getExtendedSlot(MODULE_FUN_SLOT).toObject());
     AsmJSModule &module = AsmJSModuleObjectToModule(moduleObj);
 
     // If linking fails, recompile the function (including emitting bytecode)
@@ -651,25 +651,25 @@ IsMaybeWrappedNativeFunction(const Value
 
     JSObject *obj = CheckedUnwrap(&v.toObject());
     if (!obj)
         return false;
 
     return obj->is<JSFunction>() && obj->as<JSFunction>().maybeNative() == native;
 }
 
-JSBool
+bool
 js::IsAsmJSModule(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     bool rval = args.hasDefined(0) && IsMaybeWrappedNativeFunction(args[0], LinkAsmJS);
     args.rval().set(BooleanValue(rval));
     return true;
 }
 
-JSBool
+bool
 js::IsAsmJSFunction(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     bool rval = args.hasDefined(0) && IsMaybeWrappedNativeFunction(args[0], CallAsmJS);
     args.rval().set(BooleanValue(rval));
     return true;
 }
--- a/js/src/ion/AsmJSLink.h
+++ b/js/src/ion/AsmJSLink.h
@@ -19,41 +19,41 @@ extern JSFunction *
 NewAsmJSModuleFunction(JSContext *cx, JSFunction *originalFun, HandleObject moduleObj);
 
 // Return whether this is the js::Native returned by NewAsmJSModuleFunction.
 extern bool
 IsAsmJSModuleNative(JSNative native);
 
 // Return whether the given value is a function containing "use asm" that has
 // been validated according to the asm.js spec.
-extern JSBool
+extern bool
 IsAsmJSModule(JSContext *cx, unsigned argc, JS::Value *vp);
 
 // Return whether the given value is a nested function in an asm.js module that
 // has been both compile- and link-time validated.
-extern JSBool
+extern bool
 IsAsmJSFunction(JSContext *cx, unsigned argc, JS::Value *vp);
 
 #else // JS_ION
 
 inline bool
 IsAsmJSModuleNative(JSNative native)
 {
     return false;
 }
 
-inline JSBool
+inline bool
 IsAsmJSFunction(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     args.rval().set(BooleanValue(false));
     return true;
 }
 
-inline JSBool
+inline bool
 IsAsmJSModule(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     args.rval().set(BooleanValue(false));
     return true;
 }
 
 #endif // JS_ION
--- a/js/src/ion/BaselineIC.cpp
+++ b/js/src/ion/BaselineIC.cpp
@@ -7593,17 +7593,17 @@ ICCall_Native::Compiler::generateStubCod
     masm.loadJSContext(scratch);
     masm.passABIArg(scratch);
     masm.passABIArg(argcReg);
     masm.passABIArg(vpReg);
     masm.callWithABI(Address(callee, JSFunction::offsetOfNativeOrScript()));
 
     // Test for failure.
     Label success, exception;
-    masm.branchTest32(Assembler::Zero, ReturnReg, ReturnReg, &exception);
+    masm.branchIfFalseBool(ReturnReg, &exception);
 
     // Load the return value into R0.
     masm.loadValue(Address(StackPointer, IonNativeExitFrameLayout::offsetOfResult()), R0);
 
     leaveStubFrame(masm);
 
     // Enter type monitor IC to type-check result.
     EmitEnterTypeMonitorIC(masm);
--- a/js/src/ion/CodeGenerator.cpp
+++ b/js/src/ion/CodeGenerator.cpp
@@ -1493,17 +1493,17 @@ CodeGenerator::visitCallNative(LCallNati
     masm.passABIArg(argVpReg);
 
     Label success, failure;
     switch (executionMode) {
       case SequentialExecution:
         masm.callWithABI(JS_FUNC_TO_DATA_PTR(void *, target->native()));
 
         // Test for failure.
-        masm.branchTest32(Assembler::Zero, ReturnReg, ReturnReg, &failure);
+        masm.branchIfFalseBool(ReturnReg, &failure);
         break;
 
       case ParallelExecution:
         masm.callWithABI(JS_FUNC_TO_DATA_PTR(void *, target->parallelNative()));
 
         // ParallelResult has more nuanced failure, but for now we fail on
         // anything that's != TP_SUCCESS.
         masm.branch32(Assembler::NotEqual, ReturnReg, Imm32(TP_SUCCESS), &failure);
--- a/js/src/ion/IonCaches.cpp
+++ b/js/src/ion/IonCaches.cpp
@@ -918,17 +918,17 @@ GenerateCallGetter(JSContext *cx, IonScr
         // Construct and execute call.
         masm.setupUnalignedABICall(3, scratchReg);
         masm.passABIArg(argJSContextReg);
         masm.passABIArg(argUintNReg);
         masm.passABIArg(argVpReg);
         masm.callWithABI(JS_FUNC_TO_DATA_PTR(void *, target->native()));
 
         // Test for failure.
-        masm.branchTest32(Assembler::Zero, ReturnReg, ReturnReg, &exception);
+        masm.branchIfFalseBool(ReturnReg, &exception);
 
         // Load the outparam vp[0] into output register(s).
         masm.loadValue(
             Address(StackPointer, IonOOLNativeGetterExitFrameLayout::offsetOfResult()),
             JSReturnOperand);
     } else {
         Register argObjReg       = argUintNReg;
         Register argIdReg        = regSet.takeGeneral();
@@ -961,17 +961,17 @@ GenerateCallGetter(JSContext *cx, IonScr
         masm.setupUnalignedABICall(4, scratchReg);
         masm.passABIArg(argJSContextReg);
         masm.passABIArg(argObjReg);
         masm.passABIArg(argIdReg);
         masm.passABIArg(argVpReg);
         masm.callWithABI(JS_FUNC_TO_DATA_PTR(void *, target));
 
         // Test for failure.
-        masm.branchTest32(Assembler::Zero, ReturnReg, ReturnReg, &exception);
+        masm.branchIfFalseBool(ReturnReg, &exception);
 
         // Load the outparam vp[0] into output register(s).
         masm.loadValue(
             Address(StackPointer, IonOOLPropertyOpExitFrameLayout::offsetOfResult()),
             JSReturnOperand);
     }
 
     // If generating getter call stubs, then return type MUST have been generalized
@@ -1167,17 +1167,17 @@ GetPropertyIC::attachDOMProxyShadowed(JS
     masm.passABIArg(argProxyReg);
     masm.passABIArg(argProxyReg);
     masm.passABIArg(argIdReg);
     masm.passABIArg(argVpReg);
     masm.callWithABI(JS_FUNC_TO_DATA_PTR(void *, Proxy::get));
 
     // Test for failure.
     Label exception;
-    masm.branchTest32(Assembler::Zero, ReturnReg, ReturnReg, &exception);
+    masm.branchIfFalseBool(ReturnReg, &exception);
 
     // Load the outparam vp[0] into output register(s).
     masm.loadValue(
         Address(StackPointer, IonOOLProxyGetExitFrameLayout::offsetOfResult()),
         JSReturnOperand);
 
     Label success;
     masm.jump(&success);
@@ -1913,17 +1913,17 @@ SetPropertyIC::attachSetterCall(JSContex
     masm.passABIArg(argJSContextReg);
     masm.passABIArg(argObjReg);
     masm.passABIArg(argIdReg);
     masm.passABIArg(argStrictReg);
     masm.passABIArg(argVpReg);
     masm.callWithABI(JS_FUNC_TO_DATA_PTR(void *, target));
 
     // Test for failure.
-    masm.branchTest32(Assembler::Zero, ReturnReg, ReturnReg, &exception);
+    masm.branchIfFalseBool(ReturnReg, &exception);
 
     masm.jump(&success);
 
     // Handle exception case.
     masm.bind(&exception);
     masm.handleException();
 
     // Handle success case.
--- a/js/src/jsapi-tests/testCallNonGenericMethodOnProxy.cpp
+++ b/js/src/jsapi-tests/testCallNonGenericMethodOnProxy.cpp
@@ -29,17 +29,17 @@ IsCustomClass(const Value &v)
 static bool
 CustomMethodImpl(JSContext *cx, CallArgs args)
 {
   JS_ASSERT(IsCustomClass(args.thisv()));
   args.rval().set(JS_GetReservedSlot(&args.thisv().toObject(), CUSTOM_SLOT));
   return true;
 }
 
-static JSBool
+static bool
 CustomMethod(JSContext *cx, unsigned argc, Value *vp)
 {
   CallArgs args = CallArgsFromVp(argc, vp);
   return CallNonGenericMethod(cx, IsCustomClass, CustomMethodImpl, args);
 }
 
 BEGIN_TEST(test_CallNonGenericMethodOnProxy)
 {
--- a/js/src/jsapi-tests/testChromeBuffer.cpp
+++ b/js/src/jsapi-tests/testChromeBuffer.cpp
@@ -18,23 +18,23 @@ JSClass global_class = {
     JS_EnumerateStub,
     JS_ResolveStub,
     JS_ConvertStub
 };
 
 JSObject *trusted_glob = NULL;
 JSObject *trusted_fun = NULL;
 
-JSBool
+bool
 CallTrusted(JSContext *cx, unsigned argc, jsval *vp)
 {
     if (!JS_SaveFrameChain(cx))
-        return JS_FALSE;
+        return false;
 
-    JSBool ok = JS_FALSE;
+    bool ok = false;
     {
         JSAutoCompartment ac(cx, trusted_glob);
         ok = JS_CallFunctionValue(cx, NULL, JS::ObjectValue(*trusted_fun),
                                   0, NULL, vp);
     }
     JS_RestoreFrameChain(cx);
     return ok;
 }
--- a/js/src/jsapi-tests/testClassGetter.cpp
+++ b/js/src/jsapi-tests/testClassGetter.cpp
@@ -13,45 +13,45 @@ int called_test_fn;
 int called_test_prop_get;
 
 static JSBool test_prop_get( JSContext *cx, JS::HandleObject obj, JS::HandleId id, JS::MutableHandleValue vp )
 {
     called_test_prop_get++;
     return JS_TRUE;
 }
 
-static JSBool
+static bool
 PTest(JSContext* cx, unsigned argc, jsval *vp);
 
 static JSClass ptestClass = {
     "PTest",
     JSCLASS_HAS_PRIVATE,
 
     JS_PropertyStub,       // add
     JS_DeletePropertyStub, // delete
     test_prop_get,         // get
     JS_StrictPropertyStub, // set
     JS_EnumerateStub,
     JS_ResolveStub,
     JS_ConvertStub
 };
 
-static JSBool
+static bool
 PTest(JSContext* cx, unsigned argc, jsval *vp)
 {
     JSObject *obj = JS_NewObjectForConstructor(cx, &ptestClass, vp);
     if (!obj)
-        return JS_FALSE;
+        return false;
     JS_SET_RVAL(cx, vp, OBJECT_TO_JSVAL(obj));
-    return JS_TRUE;
+    return true;
 }
-static JSBool test_fn(JSContext *cx, unsigned argc, jsval *vp)
+static bool test_fn(JSContext *cx, unsigned argc, jsval *vp)
 {
     called_test_fn++;
-    return JS_TRUE;
+    return true;
 }
 
 static const JSFunctionSpec ptestFunctions[] = {
     JS_FS( "test_fn", test_fn, 0, 0 ),
     JS_FS_END
 };
 
 BEGIN_TEST(testClassGetter_isCalled)
--- a/js/src/jsapi-tests/testContexts.cpp
+++ b/js/src/jsapi-tests/testContexts.cpp
@@ -8,23 +8,23 @@
 
 BEGIN_TEST(testContexts_IsRunning)
     {
         CHECK(JS_DefineFunction(cx, global, "chk", chk, 0, 0));
         EXEC("for (var i = 0; i < 9; i++) chk();");
         return true;
     }
 
-    static JSBool chk(JSContext *cx, unsigned argc, jsval *vp)
+    static bool chk(JSContext *cx, unsigned argc, jsval *vp)
     {
         JSRuntime *rt = JS_GetRuntime(cx);
         JSContext *acx = JS_NewContext(rt, 8192);
         if (!acx) {
             JS_ReportOutOfMemory(cx);
-            return JS_FALSE;
+            return false;
         }
 
         // acx should not be running
         bool ok = !JS_IsRunning(acx);
         if (!ok)
             JS_ReportError(cx, "Assertion failed: brand new context claims to be running");
         JS_DestroyContext(acx);
         return ok;
--- a/js/src/jsapi-tests/testCustomIterator.cpp
+++ b/js/src/jsapi-tests/testCustomIterator.cpp
@@ -3,17 +3,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "jsclass.h"
 
 #include "jsapi-tests/tests.h"
 
 int count = 0;
 
-static JSBool
+static bool
 IterNext(JSContext *cx, unsigned argc, jsval *vp)
 {
     if (count++ == 100)
         return JS_ThrowStopIteration(cx);
     JS_SET_RVAL(cx, vp, INT_TO_JSVAL(count));
     return true;
 }
 
@@ -47,17 +47,17 @@ js::Class HasCustomIterClass = {
     {
         NULL,       /* outerObject */
         NULL,       /* innerObject */
         IterHook,
         false        /* isWrappedNative */
     }
 };
 
-JSBool
+bool
 IterClassConstructor(JSContext *cx, unsigned argc, jsval *vp)
 {
     JSObject *obj = JS_NewObjectForConstructor(cx, Jsvalify(&HasCustomIterClass), vp);
     if (!obj)
         return false;
     JS_SET_RVAL(cx, vp, OBJECT_TO_JSVAL(obj));
     return true;
 }
--- a/js/src/jsapi-tests/testDebugger.cpp
+++ b/js/src/jsapi-tests/testDebugger.cpp
@@ -246,17 +246,17 @@ BEGIN_TEST(testDebugger_singleStepThrow)
         EXEC("var e;\n"
              "setStepMode();\n"
              "function f() { throw 0; }\n"
              "try { f(); }\n"
              "catch (x) { e = x; }\n");
         return true;
     }
 
-    static JSBool
+    static bool
     setStepMode(JSContext *cx, unsigned argc, jsval *vp)
     {
         JSScript *script;
         JS_DescribeScriptedCaller(cx, &script, NULL);
         JS_ASSERT(script);
 
         if (!JS_SetSingleStepMode(cx, script, true))
             return false;
--- a/js/src/jsapi-tests/testDefineGetterSetterNonEnumerable.cpp
+++ b/js/src/jsapi-tests/testDefineGetterSetterNonEnumerable.cpp
@@ -2,20 +2,20 @@
  * vim: set ts=8 sts=4 et sw=4 tw=99:
  */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "jsapi-tests/tests.h"
 
-static JSBool
+static bool
 native(JSContext *cx, unsigned argc, jsval *vp)
 {
-    return JS_TRUE;
+    return true;
 }
 
 static const char PROPERTY_NAME[] = "foo";
 
 BEGIN_TEST(testDefineGetterSetterNonEnumerable)
 {
     JS::RootedValue vobj(cx);
     JS::RootedObject obj(cx, JS_NewObject(cx, NULL, NULL, NULL));
--- a/js/src/jsapi-tests/testEnclosingFunction.cpp
+++ b/js/src/jsapi-tests/testEnclosingFunction.cpp
@@ -11,17 +11,17 @@
 #include "jsfriendapi.h"
 
 #include "jsapi-tests/tests.h"
 
 using namespace js;
 
 JSScript *found = NULL;
 
-JSBool
+bool
 CheckEnclosing(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
 
     found = js::GetOutermostEnclosingFunctionOfScriptedCaller(cx);
 
     args.rval().set(UndefinedValue());
     return true;
--- a/js/src/jsapi-tests/testNewObject.cpp
+++ b/js/src/jsapi-tests/testNewObject.cpp
@@ -7,17 +7,17 @@
 
 #include "jsfriendapi.h"
 
 #include "jsapi-tests/tests.h"
 
 const size_t N = 1000;
 static jsval argv[N];
 
-static JSBool
+static bool
 constructHook(JSContext *cx, unsigned argc, jsval *vp)
 {
     // Check that arguments were passed properly from JS_New.
     JS::RootedObject callee(cx, JSVAL_TO_OBJECT(JS_CALLEE(cx, vp)));
 
     JS::RootedObject obj(cx, JS_NewObjectForConstructor(cx, js::Jsvalify(&JSObject::class_), vp));
     if (!obj) {
         JS_ReportError(cx, "test failed, could not construct object");
--- a/js/src/jsapi-tests/testObjectEmulatingUndefined.cpp
+++ b/js/src/jsapi-tests/testObjectEmulatingUndefined.cpp
@@ -11,17 +11,17 @@ static JSClass ObjectEmulatingUndefinedC
     JS_DeletePropertyStub,
     JS_PropertyStub,
     JS_StrictPropertyStub,
     JS_EnumerateStub,
     JS_ResolveStub,
     JS_ConvertStub
 };
 
-static JSBool
+static bool
 ObjectEmulatingUndefinedConstructor(JSContext *cx, unsigned argc, jsval *vp)
 {
     JSObject *obj = JS_NewObjectForConstructor(cx, &ObjectEmulatingUndefinedClass, vp);
     if (!obj)
         return false;
     JS_SET_RVAL(cx, vp, OBJECT_TO_JSVAL(obj));
     return true;
 }
--- a/js/src/jsapi-tests/testOps.cpp
+++ b/js/src/jsapi-tests/testOps.cpp
@@ -21,17 +21,17 @@ my_convert(JSContext* context, JS::Handl
 
 static JSClass myClass = {
     "MyClass",
     0,
     JS_PropertyStub, JS_DeletePropertyStub, JS_PropertyStub, JS_StrictPropertyStub,
     JS_EnumerateStub, JS_ResolveStub, my_convert
 };
 
-static JSBool
+static bool
 createMyObject(JSContext* context, unsigned argc, jsval *vp)
 {
     JS_BeginRequest(context);
 
     //JS_GC(context); //<- if we make GC here, all is ok
 
     JSObject* myObject = JS_NewObject(context, &myClass, NULL, NULL);
     *vp = OBJECT_TO_JSVAL(myObject);
--- a/js/src/jsapi-tests/testParseJSON.cpp
+++ b/js/src/jsapi-tests/testParseJSON.cpp
@@ -216,17 +216,17 @@ reportJSONEror(JSContext *cx, const char
     if (report->errorNumber == JSMSG_JSON_BAD_PARSE)
         p->expectedErrorCount++;
     else
         p->unexpectedErrorCount++;
 }
 
 END_TEST(testParseJSON_error)
 
-static JSBool
+static bool
 Censor(JSContext *cx, unsigned argc, jsval *vp)
 {
     JS_ASSERT(argc == 2);
 #ifdef DEBUG
     jsval *argv = JS_ARGV(cx, vp);
     JS_ASSERT(JSVAL_IS_STRING(argv[0]));
 #endif
     JS_SET_RVAL(cx, vp, JSVAL_NULL);
--- a/js/src/jsapi-tests/testProfileStrings.cpp
+++ b/js/src/jsapi-tests/testProfileStrings.cpp
@@ -25,53 +25,53 @@ reset(JSContext *cx)
     js::EnableRuntimeProfilingStack(cx->runtime(), true);
 }
 
 static JSClass ptestClass = {
     "Prof", 0, JS_PropertyStub, JS_DeletePropertyStub, JS_PropertyStub,
     JS_StrictPropertyStub, JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub
 };
 
-static JSBool
+static bool
 test_fn(JSContext *cx, unsigned argc, jsval *vp)
 {
     max_stack = psize;
-    return JS_TRUE;
+    return true;
 }
 
-static JSBool
+static bool
 test_fn2(JSContext *cx, unsigned argc, jsval *vp)
 {
     jsval r;
     JS::RootedObject global(cx, JS::CurrentGlobalOrNull(cx));
     return JS_CallFunctionName(cx, global, "d", 0, NULL, &r);
 }
 
-static JSBool
+static bool
 enable(JSContext *cx, unsigned argc, jsval *vp)
 {
     js::EnableRuntimeProfilingStack(cx->runtime(), true);
-    return JS_TRUE;
+    return true;
 }
 
-static JSBool
+static bool
 disable(JSContext *cx, unsigned argc, jsval *vp)
 {
     js::EnableRuntimeProfilingStack(cx->runtime(), false);
-    return JS_TRUE;
+    return true;
 }
 
-static JSBool
+static bool
 Prof(JSContext* cx, unsigned argc, jsval *vp)
 {
     JSObject *obj = JS_NewObjectForConstructor(cx, &ptestClass, vp);
     if (!obj)
-        return JS_FALSE;
+        return false;
     JS_SET_RVAL(cx, vp, OBJECT_TO_JSVAL(obj));
-    return JS_TRUE;
+    return true;
 }
 
 static const JSFunctionSpec ptestFunctions[] = {
     JS_FS("test_fn", test_fn, 0, 0),
     JS_FS("test_fn2", test_fn2, 0, 0),
     JS_FS("enable", enable, 0, 0),
     JS_FS("disable", disable, 0, 0),
     JS_FS_END
--- a/js/src/jsapi.cpp
+++ b/js/src/jsapi.cpp
@@ -4229,17 +4229,17 @@ JS_NextProperty(JSContext *cx, JSObject 
         } else {
             *idp = ida->vector[--i];
             iterobj->setSlot(JSSLOT_ITER_INDEX, Int32Value(i));
         }
     }
     return true;
 }
 
-JS_PUBLIC_API(JSBool)
+JS_PUBLIC_API(bool)
 JS_ArrayIterator(JSContext *cx, unsigned argc, jsval *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     Rooted<Value> target(cx, args.thisv());
     AssertHeapIsIdle(cx);
     assertSameCompartment(cx, target);
     CHECK_REQUEST(cx);
 
@@ -4501,17 +4501,17 @@ JS_IsConstructor(JSFunction *fun)
 JS_PUBLIC_API(JSObject*)
 JS_BindCallable(JSContext *cx, JSObject *targetArg, JSObject *newThis)
 {
     RootedObject target(cx, targetArg);
     RootedValue thisArg(cx, ObjectValue(*newThis));
     return js_fun_bind(cx, target, thisArg, NULL, 0);
 }
 
-JSBool
+static bool
 js_generic_native_method_dispatcher(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
 
     const JSFunctionSpec *fs = (JSFunctionSpec *)
         vp->toObject().as<JSFunction>().getExtendedSlot(0).toPrivate();
     JS_ASSERT((fs->flags & JSFUN_GENERIC_NATIVE) != 0);
 
--- a/js/src/jsapi.h
+++ b/js/src/jsapi.h
@@ -3787,17 +3787,17 @@ extern JS_PUBLIC_API(JSBool)
 JS_NextProperty(JSContext *cx, JSObject *iterobj, jsid *idp);
 
 /*
  * A JSNative that creates and returns a new iterator that iterates over the
  * elements of |this|, up to |this.length|, in index order. This can be used to
  * make any array-like object iterable. Just give the object an obj.iterator()
  * method using this JSNative as the implementation.
  */
-extern JS_PUBLIC_API(JSBool)
+extern JS_PUBLIC_API(bool)
 JS_ArrayIterator(JSContext *cx, unsigned argc, jsval *vp);
 
 extern JS_PUBLIC_API(JSBool)
 JS_CheckAccess(JSContext *cx, JSObject *obj, jsid id, JSAccessMode mode,
                jsval *vp, unsigned *attrsp);
 
 extern JS_PUBLIC_API(jsval)
 JS_GetReservedSlot(JSObject *obj, uint32_t index);
--- a/js/src/jsarray.cpp
+++ b/js/src/jsarray.cpp
@@ -867,17 +867,17 @@ array_toSource_impl(JSContext *cx, CallA
     JSString *str = sb.finishString();
     if (!str)
         return false;
 
     args.rval().setString(str);
     return true;
 }
 
-JSBool
+static bool
 array_toSource(JSContext *cx, unsigned argc, Value *vp)
 {
     JS_CHECK_RECURSION(cx, return false);
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod<IsArray, array_toSource_impl>(cx, args);
 }
 #endif
 
@@ -999,17 +999,17 @@ array_join_sub(JSContext *cx, CallArgs &
     JSString *str = sb.finishString();
     if (!str)
         return false;
     args.rval().setString(str);
     return true;
 }
 
 /* ES5 15.4.4.2. NB: The algorithm here differs from the one in ES3. */
-static JSBool
+static bool
 array_toString(JSContext *cx, unsigned argc, Value *vp)
 {
     JS_CHECK_RECURSION(cx, return false);
 
     CallArgs args = CallArgsFromVp(argc, vp);
     RootedObject obj(cx, ToObject(cx, args.thisv()));
     if (!obj)
         return false;
@@ -1036,28 +1036,28 @@ array_toString(JSContext *cx, unsigned a
     /* Do the call. */
     if (!Invoke(cx, args2))
         return false;
     args.rval().set(args2.rval());
     return true;
 }
 
 /* ES5 15.4.4.3 */
-static JSBool
+static bool
 array_toLocaleString(JSContext *cx, unsigned argc, Value *vp)
 {
     JS_CHECK_RECURSION(cx, return false);
 
     CallArgs args = CallArgsFromVp(argc, vp);
 
     return array_join_sub(cx, args, true);
 }
 
 /* ES5 15.4.4.5 */
-static JSBool
+static bool
 array_join(JSContext *cx, unsigned argc, Value *vp)
 {
     JS_CHECK_RECURSION(cx, return false);
 
     CallArgs args = CallArgsFromVp(argc, vp);
     return array_join_sub(cx, args, false);
 }
 
@@ -1164,17 +1164,17 @@ InitArrayElements(JSContext *cx, HandleO
             return false;
         }
         index += 1;
     } while (vector != end);
 
     return true;
 }
 
-static JSBool
+static bool
 array_reverse(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     RootedObject obj(cx, ToObject(cx, args.thisv()));
     if (!obj)
         return false;
 
     uint32_t len;
@@ -1699,17 +1699,17 @@ SortNumerically(JSContext *cx, AutoValue
 
     /* Sort Values in vec numerically. */
     return MergeSortByKey(numElements.begin(), len, numElements.begin() + len,
                           SortComparatorNumerics[comp], vec);
 }
 
 } /* namespace anonymous */
 
-JSBool
+bool
 js::array_sort(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
 
     RootedValue fvalRoot(cx);
     Value &fval = fvalRoot.get();
 
     if (args.hasDefined(0)) {
@@ -1895,17 +1895,17 @@ NewbornArrayPushImpl(JSContext *cx, Hand
 
 JSBool
 js_NewbornArrayPush(JSContext *cx, HandleObject obj, const Value &vp)
 {
     return NewbornArrayPushImpl(cx, obj, vp);
 }
 
 /* ES5 15.4.4.7 */
-JSBool
+bool
 js::array_push(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
 
     /* Step 1. */
     RootedObject obj(cx, ToObject(cx, args.thisv()));
     if (!obj)
         return false;
@@ -1943,17 +1943,17 @@ js::array_push(JSContext *cx, unsigned a
 
     /* Steps 6-7. */
     double newlength = length + double(args.length());
     args.rval().setNumber(newlength);
     return SetLengthProperty(cx, obj, newlength);
 }
 
 /* ES6 20130308 draft 15.4.4.6. */
-JSBool
+bool
 js::array_pop(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
 
     /* Step 1. */
     RootedObject obj(cx, ToObject(cx, args.thisv()));
     if (!obj)
         return false;
@@ -2002,17 +2002,17 @@ js::ArrayShiftMoveElements(JSObject *obj
      * decremented and the result fetched, so just shift the array elements
      * themselves.
      */
     uint32_t initlen = obj->getDenseInitializedLength();
     obj->moveDenseElementsUnbarriered(0, 1, initlen);
 }
 
 /* ES5 15.4.4.9 */
-JSBool
+bool
 js::array_shift(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
 
     /* Step 1. */
     RootedObject obj(cx, ToObject(cx, args.thisv()));
     if (!obj)
         return false;
@@ -2078,17 +2078,17 @@ js::array_shift(JSContext *cx, unsigned 
     /* Step 8. */
     if (!DeletePropertyOrThrow(cx, obj, newlen))
         return false;
 
     /* Step 9. */
     return SetLengthProperty(cx, obj, newlen);
 }
 
-static JSBool
+static bool
 array_unshift(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     RootedObject obj(cx, ToObject(cx, args.thisv()));
     if (!obj)
         return false;
 
     uint32_t length;
@@ -2210,17 +2210,17 @@ CanOptimizeForDenseStorage(HandleObject 
      * other indexed properties on the object.  (Note that non-writable length
      * is subsumed by the initializedLength comparison.)
      */
     return !ObjectMayHaveExtraIndexedProperties(arr) &&
            startingIndex + count <= arr->getDenseInitializedLength();
 }
 
 /* ES5 15.4.4.12. */
-static JSBool
+static bool
 array_splice(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
 
     /* Step 1. */
     RootedObject obj(cx, ToObject(cx, args.thisv()));
     if (!obj)
         return false;
@@ -2455,17 +2455,17 @@ js::array_concat_dense(JSContext *cx, Ha
     result->setLengthInt32(len);
     return true;
 }
 #endif /* JS_ION */
 
 /*
  * Python-esque sequence operations.
  */
-JSBool
+bool
 js::array_concat(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
 
     /* Treat our |this| object as the first argument; see ECMA 15.4.4.4. */
     Value *p = args.array() - 1;
 
     /* Create a new Array object and root it using *vp. */
@@ -2528,17 +2528,17 @@ js::array_concat(JSContext *cx, unsigned
         if (!SetArrayElement(cx, narr, length, v))
             return false;
         length++;
     }
 
     return SetLengthProperty(cx, narr, length);
 }
 
-static JSBool
+static bool
 array_slice(JSContext *cx, unsigned argc, Value *vp)
 {
     uint32_t length, begin, end, slot;
     JSBool hole;
 
     CallArgs args = CallArgsFromVp(argc, vp);
 
     RootedObject obj(cx, ToObject(cx, args.thisv()));
@@ -2608,17 +2608,17 @@ array_slice(JSContext *cx, unsigned argc
             return false;
     }
 
     args.rval().setObject(*narr);
     return true;
 }
 
 /* ES5 15.4.4.20. */
-static JSBool
+static bool
 array_filter(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
 
     /* Step 1. */
     RootedObject obj(cx, ToObject(cx, args.thisv()));
     if (!obj)
         return false;
@@ -2692,17 +2692,17 @@ array_filter(JSContext *cx, unsigned arg
         k++;
     }
 
     /* Step 10. */
     args.rval().setObject(*arr);
     return true;
 }
 
-static JSBool
+static bool
 array_isArray(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     bool isArray = args.length() > 0 && IsObjectWithClass(args[0], ESClass_Array, cx);
     args.rval().setBoolean(isArray);
     return true;
 }
 
@@ -2728,17 +2728,17 @@ ArrayFromCallArgs(JSContext *cx, RootedT
         : NewDenseCopiedArray(cx, args.length(), args.array());
     if (!obj)
         return false;
     obj->setType(type);
     args.rval().setObject(*obj);
     return true;
 }
 
-static JSBool
+static bool
 array_of(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
 
     if (IsArrayConstructor(args.thisv()) || !IsConstructor(args.thisv())) {
         // IsArrayConstructor(this) will usually be true in practice. This is
         // the most common path.
         RootedTypeObject type(cx, GetTypeCallerInitObject(cx, JSProto_Array));
@@ -2842,17 +2842,17 @@ static const JSFunctionSpec array_static
     /* Parallelizable and pure static methods. */
          {"buildPar",           {NULL, NULL},       3,0, "ArrayStaticBuildPar"},
 #endif
 
     JS_FS_END
 };
 
 /* ES5 15.4.2 */
-JSBool
+bool
 js_Array(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     RootedTypeObject type(cx, GetTypeCallerInitObject(cx, JSProto_Array));
     if (!type)
         return false;
 
     if (args.length() != 1 || !args[0].isNumber())
@@ -3116,17 +3116,17 @@ js::NewDenseCopiedArray(JSContext *cx, u
 
     if (values)
         arr->initDenseElements(0, values, length);
 
     return arr;
 }
 
 #ifdef DEBUG
-JSBool
+bool
 js_ArrayInfo(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     JSObject *obj;
 
     for (unsigned i = 0; i < args.length(); i++) {
         RootedValue arg(cx, args[i]);
 
--- a/js/src/jsarray.h
+++ b/js/src/jsarray.h
@@ -102,52 +102,52 @@ ObjectMayHaveExtraIndexedProperties(JSOb
  * This function assumes 'length' is effectively the result of calling
  * js_GetLengthProperty on aobj. vp must point to rooted memory.
  */
 extern bool
 GetElements(JSContext *cx, HandleObject aobj, uint32_t length, js::Value *vp);
 
 /* Natives exposed for optimization by the interpreter and JITs. */
 
-extern JSBool
+extern bool
 array_sort(JSContext *cx, unsigned argc, js::Value *vp);
 
-extern JSBool
+extern bool
 array_push(JSContext *cx, unsigned argc, js::Value *vp);
 
-extern JSBool
+extern bool
 array_pop(JSContext *cx, unsigned argc, js::Value *vp);
 
-extern JSBool
+extern bool
 array_concat(JSContext *cx, unsigned argc, js::Value *vp);
 
 extern bool
 array_concat_dense(JSContext *cx, Handle<ArrayObject*> arr1, Handle<ArrayObject*> arr2,
                    Handle<ArrayObject*> result);
 
 extern void
 ArrayShiftMoveElements(JSObject *obj);
 
-extern JSBool
+extern bool
 array_shift(JSContext *cx, unsigned argc, js::Value *vp);
 
 } /* namespace js */
 
 #ifdef DEBUG
-extern JSBool
+extern bool
 js_ArrayInfo(JSContext *cx, unsigned argc, js::Value *vp);
 #endif
 
 /*
  * Append the given (non-hole) value to the end of an array.  The array must be
  * a newborn array -- that is, one which has not been exposed to script for
  * arbitrary manipulation.  (This method optimizes on the assumption that
  * extending the array to accommodate the element will never make the array
  * sparse, which requires that the array be completely filled.)
  */
 extern JSBool
 js_NewbornArrayPush(JSContext *cx, js::HandleObject obj, const js::Value &v);
 
 /* Array constructor native. Exposed only so the JIT can know its address. */
-JSBool
+bool
 js_Array(JSContext *cx, unsigned argc, js::Value *vp);
 
 #endif /* jsarray_h */
--- a/js/src/jsbool.cpp
+++ b/js/src/jsbool.cpp
@@ -58,17 +58,17 @@ bool_toSource_impl(JSContext *cx, CallAr
 
     JSString *str = sb.finishString();
     if (!str)
         return false;
     args.rval().setString(str);
     return true;
 }
 
-JSBool
+bool
 bool_toSource(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod<IsBoolean, bool_toSource_impl>(cx, args);
 }
 #endif
 
 JS_ALWAYS_INLINE bool
@@ -77,17 +77,17 @@ bool_toString_impl(JSContext *cx, CallAr
     const Value &thisv = args.thisv();
     JS_ASSERT(IsBoolean(thisv));
 
     bool b = thisv.isBoolean() ? thisv.toBoolean() : thisv.toObject().as<BooleanObject>().unbox();
     args.rval().setString(js_BooleanToString(cx, b));
     return true;
 }
 
-JSBool
+bool
 bool_toString(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod<IsBoolean, bool_toString_impl>(cx, args);
 }
 
 JS_ALWAYS_INLINE bool
 bool_valueOf_impl(JSContext *cx, CallArgs args)
@@ -95,32 +95,32 @@ bool_valueOf_impl(JSContext *cx, CallArg
     const Value &thisv = args.thisv();
     JS_ASSERT(IsBoolean(thisv));
 
     bool b = thisv.isBoolean() ? thisv.toBoolean() : thisv.toObject().as<BooleanObject>().unbox();
     args.rval().setBoolean(b);
     return true;
 }
 
-JSBool
+bool
 bool_valueOf(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod<IsBoolean, bool_valueOf_impl>(cx, args);
 }
 
 static const JSFunctionSpec boolean_methods[] = {
 #if JS_HAS_TOSOURCE
     JS_FN(js_toSource_str,  bool_toSource,  0, 0),
 #endif
     JS_FN(js_toString_str,  bool_toString,  0, 0),
     JS_FS_END
 };
 
-static JSBool
+static bool
 Boolean(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
 
     bool b = args.length() != 0 ? JS::ToBoolean(args[0]) : false;
 
     if (args.isConstructing()) {
         JSObject *obj = BooleanObject::create(cx, b);
--- a/js/src/jscntxt.h
+++ b/js/src/jscntxt.h
@@ -974,29 +974,29 @@ class ContextAllocPolicy
     void *malloc_(size_t bytes) { return cx_->malloc_(bytes); }
     void *calloc_(size_t bytes) { return cx_->calloc_(bytes); }
     void *realloc_(void *p, size_t oldBytes, size_t bytes) { return cx_->realloc_(p, oldBytes, bytes); }
     void free_(void *p) { js_free(p); }
     void reportAllocOverflow() const { js_ReportAllocationOverflow(cx_); }
 };
 
 /* Exposed intrinsics so that Ion may inline them. */
-JSBool intrinsic_ToObject(JSContext *cx, unsigned argc, Value *vp);
-JSBool intrinsic_IsCallable(JSContext *cx, unsigned argc, Value *vp);
-JSBool intrinsic_ThrowError(JSContext *cx, unsigned argc, Value *vp);
-JSBool intrinsic_NewDenseArray(JSContext *cx, unsigned argc, Value *vp);
+bool intrinsic_ToObject(JSContext *cx, unsigned argc, Value *vp);
+bool intrinsic_IsCallable(JSContext *cx, unsigned argc, Value *vp);
+bool intrinsic_ThrowError(JSContext *cx, unsigned argc, Value *vp);
+bool intrinsic_NewDenseArray(JSContext *cx, unsigned argc, Value *vp);
 
-JSBool intrinsic_UnsafePutElements(JSContext *cx, unsigned argc, Value *vp);
-JSBool intrinsic_UnsafeSetReservedSlot(JSContext *cx, unsigned argc, Value *vp);
-JSBool intrinsic_UnsafeGetReservedSlot(JSContext *cx, unsigned argc, Value *vp);
-JSBool intrinsic_NewObjectWithClassPrototype(JSContext *cx, unsigned argc, Value *vp);
-JSBool intrinsic_HaveSameClass(JSContext *cx, unsigned argc, Value *vp);
+bool intrinsic_UnsafePutElements(JSContext *cx, unsigned argc, Value *vp);
+bool intrinsic_UnsafeSetReservedSlot(JSContext *cx, unsigned argc, Value *vp);
+bool intrinsic_UnsafeGetReservedSlot(JSContext *cx, unsigned argc, Value *vp);
+bool intrinsic_NewObjectWithClassPrototype(JSContext *cx, unsigned argc, Value *vp);
+bool intrinsic_HaveSameClass(JSContext *cx, unsigned argc, Value *vp);
 
-JSBool intrinsic_ShouldForceSequential(JSContext *cx, unsigned argc, Value *vp);
-JSBool intrinsic_NewParallelArray(JSContext *cx, unsigned argc, Value *vp);
+bool intrinsic_ShouldForceSequential(JSContext *cx, unsigned argc, Value *vp);
+bool intrinsic_NewParallelArray(JSContext *cx, unsigned argc, Value *vp);
 
 } /* namespace js */
 
 #ifdef _MSC_VER
 #pragma warning(pop)
 #pragma warning(pop)
 #endif
 
--- a/js/src/jscntxtinlines.h
+++ b/js/src/jscntxtinlines.h
@@ -571,17 +571,17 @@ JSContext::currentScript(jsbytecode **pp
     if (ppc) {
         *ppc = act->asInterpreter()->regs().pc;
         JS_ASSERT(*ppc >= script->code && *ppc < script->code + script->length);
     }
     return script;
 }
 
 template <JSThreadSafeNative threadSafeNative>
-inline JSBool
+inline bool
 JSNativeThreadSafeWrapper(JSContext *cx, unsigned argc, JS::Value *vp)
 {
     return threadSafeNative(cx, argc, vp);
 }
 
 template <JSThreadSafeNative threadSafeNative>
 inline js::ParallelResult
 JSParallelNativeThreadSafeWrapper(js::ForkJoinSlice *slice, unsigned argc, JS::Value *vp)
--- a/js/src/jsdate.cpp
+++ b/js/src/jsdate.cpp
@@ -639,29 +639,29 @@ date_msecFromArgs(JSContext *cx, CallArg
                                   array[3], array[4], array[5], array[6]);
     *rval = msec_time;
     return JS_TRUE;
 }
 
 /*
  * See ECMA 15.9.4.[3-10];
  */
-static JSBool
+static bool
 date_UTC(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
 
     double msec_time;
     if (!date_msecFromArgs(cx, args, &msec_time))
-        return JS_FALSE;
+        return false;
 
     msec_time = TimeClip(msec_time);
 
     args.rval().setNumber(msec_time);
-    return JS_TRUE;
+    return true;
 }
 
 /*
  * Read and convert decimal digits from s[*i] into *result
  * while *i < limit.
  *
  * Succeed if any digits are converted. Advance *i only
  * as digits are consumed.
@@ -1192,17 +1192,17 @@ date_parseString(JSLinearString *str, do
     return JS_TRUE;
 
 syntax:
     /* syntax error */
     *result = 0;
     return JS_FALSE;
 }
 
-static JSBool
+static bool
 date_parse(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     if (args.length() == 0) {
         vp->setDouble(js_NaN);
         return true;
     }
 
@@ -1226,21 +1226,21 @@ date_parse(JSContext *cx, unsigned argc,
 }
 
 static inline double
 NowAsMillis()
 {
     return (double) (PRMJ_Now() / PRMJ_USEC_PER_MSEC);
 }
 
-static JSBool
+static bool
 date_now(JSContext *cx, unsigned argc, Value *vp)
 {
     vp->setDouble(NowAsMillis());
-    return JS_TRUE;
+    return true;
 }
 
 void
 DateObject::setUTCTime(double t, Value *vp)
 {
     for (size_t ind = COMPONENTS_START_SLOT; ind < RESERVED_SLOTS; ind++)
         setReservedSlot(ind, UndefinedValue());
 
@@ -1397,17 +1397,17 @@ IsDate(const Value &v)
  */
 /* static */ JS_ALWAYS_INLINE bool
 DateObject::getTime_impl(JSContext *cx, CallArgs args)
 {
     args.rval().set(args.thisv().toObject().as<DateObject>().UTCTime());
     return true;
 }
 
-static JSBool
+static bool
 date_getTime(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod<IsDate, DateObject::getTime_impl>(cx, args);
 }
 
 /* static */ JS_ALWAYS_INLINE bool
 DateObject::getYear_impl(JSContext *cx, CallArgs args)
@@ -1422,34 +1422,34 @@ DateObject::getYear_impl(JSContext *cx, 
         args.rval().setInt32(year);
     } else {
         args.rval().set(yearVal);
     }
 
     return true;
 }
 
-static JSBool
+static bool
 date_getYear(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod<IsDate, DateObject::getYear_impl>(cx, args);
 }
 
 /* static */ JS_ALWAYS_INLINE bool
 DateObject::getFullYear_impl(JSContext *cx, CallArgs args)
 {
     DateObject *dateObj = &args.thisv().toObject().as<DateObject>();
     dateObj->fillLocalTimeSlots(&cx->runtime()->dateTimeInfo);
 
     args.rval().set(dateObj->getReservedSlot(LOCAL_YEAR_SLOT));
     return true;
 }
 
-static JSBool
+static bool
 date_getFullYear(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod<IsDate, DateObject::getFullYear_impl>(cx, args);
 }
 
 /* static */ JS_ALWAYS_INLINE bool
 DateObject::getUTCFullYear_impl(JSContext *cx, CallArgs args)
@@ -1457,66 +1457,66 @@ DateObject::getUTCFullYear_impl(JSContex
     double result = args.thisv().toObject().as<DateObject>().UTCTime().toNumber();
     if (IsFinite(result))
         result = YearFromTime(result);
 
     args.rval().setNumber(result);
     return true;
 }
 
-static JSBool
+static bool
 date_getUTCFullYear(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod<IsDate, DateObject::getUTCFullYear_impl>(cx, args);
 }
 
 /* static */ JS_ALWAYS_INLINE bool
 DateObject::getMonth_impl(JSContext *cx, CallArgs args)
 {
     DateObject *dateObj = &args.thisv().toObject().as<DateObject>();
     dateObj->fillLocalTimeSlots(&cx->runtime()->dateTimeInfo);
 
     args.rval().set(dateObj->getReservedSlot(LOCAL_MONTH_SLOT));
     return true;
 }
 
-static JSBool
+static bool
 date_getMonth(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod<IsDate, DateObject::getMonth_impl>(cx, args);
 }
 
 /* static */ JS_ALWAYS_INLINE bool
 DateObject::getUTCMonth_impl(JSContext *cx, CallArgs args)
 {
     double d = args.thisv().toObject().as<DateObject>().UTCTime().toNumber();
     args.rval().setNumber(MonthFromTime(d));
     return true;
 }
 
-static JSBool
+static bool
 date_getUTCMonth(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod<IsDate, DateObject::getUTCMonth_impl>(cx, args);
 }
 
 /* static */ JS_ALWAYS_INLINE bool
 DateObject::getDate_impl(JSContext *cx, CallArgs args)
 {
     DateObject *dateObj = &args.thisv().toObject().as<DateObject>();
     dateObj->fillLocalTimeSlots(&cx->runtime()->dateTimeInfo);
 
     args.rval().set(dateObj->getReservedSlot(LOCAL_DATE_SLOT));
     return true;
 }
 
-static JSBool
+static bool
 date_getDate(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod<IsDate, DateObject::getDate_impl>(cx, args);
 }
 
 /* static */ JS_ALWAYS_INLINE bool
 DateObject::getUTCDate_impl(JSContext *cx, CallArgs args)
@@ -1524,34 +1524,34 @@ DateObject::getUTCDate_impl(JSContext *c
     double result = args.thisv().toObject().as<DateObject>().UTCTime().toNumber();
     if (IsFinite(result))
         result = DateFromTime(result);
 
     args.rval().setNumber(result);
     return true;
 }
 
-static JSBool
+static bool
 date_getUTCDate(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod<IsDate, DateObject::getUTCDate_impl>(cx, args);
 }
 
 /* static */ JS_ALWAYS_INLINE bool
 DateObject::getDay_impl(JSContext *cx, CallArgs args)
 {
     DateObject *dateObj = &args.thisv().toObject().as<DateObject>();
     dateObj->fillLocalTimeSlots(&cx->runtime()->dateTimeInfo);
 
     args.rval().set(dateObj->getReservedSlot(LOCAL_DAY_SLOT));
     return true;
 }
 
-static JSBool
+static bool
 date_getDay(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod<IsDate, DateObject::getDay_impl>(cx, args);
 }
 
 /* static */ JS_ALWAYS_INLINE bool
 DateObject::getUTCDay_impl(JSContext *cx, CallArgs args)
@@ -1559,69 +1559,69 @@ DateObject::getUTCDay_impl(JSContext *cx
     double result = args.thisv().toObject().as<DateObject>().UTCTime().toNumber();
     if (IsFinite(result))
         result = WeekDay(result);
 
     args.rval().setNumber(result);
     return true;
 }
 
-static JSBool
+static bool
 date_getUTCDay(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod<IsDate, DateObject::getUTCDay_impl>(cx, args);
 }
 
 /* static */ JS_ALWAYS_INLINE bool
 DateObject::getHours_impl(JSContext *cx, CallArgs args)
 {
     DateObject *dateObj = &args.thisv().toObject().as<DateObject>();
     dateObj->fillLocalTimeSlots(&cx->runtime()->dateTimeInfo);
 
     args.rval().set(dateObj->getReservedSlot(LOCAL_HOURS_SLOT));
     return true;
 }
 
-static JSBool
+static bool
 date_getHours(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod<IsDate, DateObject::getHours_impl>(cx, args);
 }
 
 /* static */ JS_ALWAYS_INLINE bool
 DateObject::getUTCHours_impl(JSContext *cx, CallArgs args)
 {
     double result = args.thisv().toObject().as<DateObject>().UTCTime().toNumber();
     if (IsFinite(result))
         result = HourFromTime(result);
 
     args.rval().setNumber(result);
-    return JS_TRUE;
+    return true;
 }
 
-static JSBool
+static bool
 date_getUTCHours(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod<IsDate, DateObject::getUTCHours_impl>(cx, args);
 }
 
 /* static */ JS_ALWAYS_INLINE bool
 DateObject::getMinutes_impl(JSContext *cx, CallArgs args)
 {
     DateObject *dateObj = &args.thisv().toObject().as<DateObject>();
     dateObj->fillLocalTimeSlots(&cx->runtime()->dateTimeInfo);
 
     args.rval().set(dateObj->getReservedSlot(LOCAL_MINUTES_SLOT));
     return true;
 }
 
-static JSBool
+static bool
 date_getMinutes(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod<IsDate, DateObject::getMinutes_impl>(cx, args);
 }
 
 /* static */ JS_ALWAYS_INLINE bool
 DateObject::getUTCMinutes_impl(JSContext *cx, CallArgs args)
@@ -1629,17 +1629,17 @@ DateObject::getUTCMinutes_impl(JSContext
     double result = args.thisv().toObject().as<DateObject>().UTCTime().toNumber();
     if (IsFinite(result))
         result = MinFromTime(result);
 
     args.rval().setNumber(result);
     return true;
 }
 
-static JSBool
+static bool
 date_getUTCMinutes(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod<IsDate, DateObject::getUTCMinutes_impl>(cx, args);
 }
 
 /* Date.getSeconds is mapped to getUTCSeconds */
 
@@ -1648,17 +1648,17 @@ DateObject::getUTCSeconds_impl(JSContext
 {
     DateObject *dateObj = &args.thisv().toObject().as<DateObject>();
     dateObj->fillLocalTimeSlots(&cx->runtime()->dateTimeInfo);
 
     args.rval().set(dateObj->getReservedSlot(LOCAL_SECONDS_SLOT));
     return true;
 }
 
-static JSBool
+static bool
 date_getUTCSeconds(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod<IsDate, DateObject::getUTCSeconds_impl>(cx, args);
 }
 
 /* Date.getMilliseconds is mapped to getUTCMilliseconds */
 
@@ -1668,17 +1668,17 @@ DateObject::getUTCMilliseconds_impl(JSCo
     double result = args.thisv().toObject().as<DateObject>().UTCTime().toNumber();
     if (IsFinite(result))
         result = msFromTime(result);
 
     args.rval().setNumber(result);
     return true;
 }
 
-static JSBool
+static bool
 date_getUTCMilliseconds(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod<IsDate, DateObject::getUTCMilliseconds_impl>(cx, args);
 }
 
 /* static */ JS_ALWAYS_INLINE bool
 DateObject::getTimezoneOffset_impl(JSContext *cx, CallArgs args)
@@ -1692,17 +1692,17 @@ DateObject::getTimezoneOffset_impl(JSCon
      * appropriate for this time. This value would be a constant except for
      * daylight savings time.
      */
     double result = (utctime - localtime) / msPerMinute;
     args.rval().setNumber(result);
     return true;
 }
 
-static JSBool
+static bool
 date_getTimezoneOffset(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod<IsDate, DateObject::getTimezoneOffset_impl>(cx, args);
 }
 
 JS_ALWAYS_INLINE bool
 date_setTime_impl(JSContext *cx, CallArgs args)
@@ -1716,17 +1716,17 @@ date_setTime_impl(JSContext *cx, CallArg
     double result;
     if (!ToNumber(cx, args[0], &result))
         return false;
 
     dateObj->setUTCTime(TimeClip(result), args.rval().address());
     return true;
 }
 
-static JSBool
+static bool
 date_setTime(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod<IsDate, date_setTime_impl>(cx, args);
 }
 
 static bool
 GetMsecsOrDefault(JSContext *cx, const CallArgs &args, unsigned i, double t, double *millis)
@@ -1776,17 +1776,17 @@ date_setMilliseconds_impl(JSContext *cx,
     /* Step 3. */
     double u = TimeClip(UTC(MakeDate(Day(t), time), &cx->runtime()->dateTimeInfo));
 
     /* Steps 4-5. */
     dateObj->setUTCTime(u, args.rval().address());
     return true;
 }
 
-static JSBool
+static bool
 date_setMilliseconds(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod<IsDate, date_setMilliseconds_impl>(cx, args);
 }
 
 /* ES5 15.9.5.29. */
 JS_ALWAYS_INLINE bool
@@ -1806,17 +1806,17 @@ date_setUTCMilliseconds_impl(JSContext *
     /* Step 3. */
     double v = TimeClip(MakeDate(Day(t), time));
 
     /* Steps 4-5. */
     dateObj->setUTCTime(v, args.rval().address());
     return true;
 }
 
-static JSBool
+static bool
 date_setUTCMilliseconds(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod<IsDate, date_setUTCMilliseconds_impl>(cx, args);
 }
 
 /* ES5 15.9.5.30. */
 JS_ALWAYS_INLINE bool
@@ -1844,17 +1844,17 @@ date_setSeconds_impl(JSContext *cx, Call
     double u = TimeClip(UTC(date, &cx->runtime()->dateTimeInfo));
 
     /* Steps 6-7. */
     dateObj->setUTCTime(u, args.rval().address());
     return true;
 }
 
 /* ES5 15.9.5.31. */
-static JSBool
+static bool
 date_setSeconds(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod<IsDate, date_setSeconds_impl>(cx, args);
 }
 
 JS_ALWAYS_INLINE bool
 date_setUTCSeconds_impl(JSContext *cx, CallArgs args)
@@ -1881,17 +1881,17 @@ date_setUTCSeconds_impl(JSContext *cx, C
     double v = TimeClip(date);
 
     /* Steps 6-7. */
     dateObj->setUTCTime(v, args.rval().address());
     return true;
 }
 
 /* ES5 15.9.5.32. */
-static JSBool
+static bool
 date_setUTCSeconds(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod<IsDate, date_setUTCSeconds_impl>(cx, args);
 }
 
 JS_ALWAYS_INLINE bool
 date_setMinutes_impl(JSContext *cx, CallArgs args)
@@ -1923,17 +1923,17 @@ date_setMinutes_impl(JSContext *cx, Call
     double u = TimeClip(UTC(date, &cx->runtime()->dateTimeInfo));
 
     /* Steps 7-8. */
     dateObj->setUTCTime(u, args.rval().address());
     return true;
 }
 
 /* ES5 15.9.5.33. */
-static JSBool
+static bool
 date_setMinutes(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod<IsDate, date_setMinutes_impl>(cx, args);
 }
 
 JS_ALWAYS_INLINE bool
 date_setUTCMinutes_impl(JSContext *cx, CallArgs args)
@@ -1965,17 +1965,17 @@ date_setUTCMinutes_impl(JSContext *cx, C
     double v = TimeClip(date);
 
     /* Steps 7-8. */
     dateObj->setUTCTime(v, args.rval().address());
     return true;
 }
 
 /* ES5 15.9.5.34. */
-static JSBool
+static bool
 date_setUTCMinutes(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod<IsDate, date_setUTCMinutes_impl>(cx, args);
 }
 
 JS_ALWAYS_INLINE bool
 date_setHours_impl(JSContext *cx, CallArgs args)
@@ -2012,17 +2012,17 @@ date_setHours_impl(JSContext *cx, CallAr
     double u = TimeClip(UTC(date, &cx->runtime()->dateTimeInfo));
 
     /* Steps 7-8. */
     dateObj->setUTCTime(u, args.rval().address());
     return true;
 }
 
 /* ES5 15.9.5.35. */
-static JSBool
+static bool
 date_setHours(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod<IsDate, date_setHours_impl>(cx, args);
 }
 
 JS_ALWAYS_INLINE bool
 date_setUTCHours_impl(JSContext *cx, CallArgs args)
@@ -2059,17 +2059,17 @@ date_setUTCHours_impl(JSContext *cx, Cal
     double v = TimeClip(newDate);
 
     /* Steps 8-9. */
     dateObj->setUTCTime(v, args.rval().address());
     return true;
 }
 
 /* ES5 15.9.5.36. */
-static JSBool
+static bool
 date_setUTCHours(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod<IsDate, date_setUTCHours_impl>(cx, args);
 }
 
 JS_ALWAYS_INLINE bool
 date_setDate_impl(JSContext *cx, CallArgs args)
@@ -2091,17 +2091,17 @@ date_setDate_impl(JSContext *cx, CallArg
     double u = TimeClip(UTC(newDate, &cx->runtime()->dateTimeInfo));
 
     /* Steps 5-6. */
     dateObj->setUTCTime(u, args.rval().address());
     return true;
 }
 
 /* ES5 15.9.5.37. */
-static JSBool
+static bool
 date_setDate(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod<IsDate, date_setDate_impl>(cx, args);
 }
 
 JS_ALWAYS_INLINE bool
 date_setUTCDate_impl(JSContext *cx, CallArgs args)
@@ -2122,17 +2122,17 @@ date_setUTCDate_impl(JSContext *cx, Call
     /* Step 4. */
     double v = TimeClip(newDate);
 
     /* Steps 5-6. */
     dateObj->setUTCTime(v, args.rval().address());
     return true;
 }
 
-static JSBool
+static bool
 date_setUTCDate(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod<IsDate, date_setUTCDate_impl>(cx, args);
 }
 
 static bool
 GetDateOrDefault(JSContext *cx, const CallArgs &args, unsigned i, double t, double *date)
@@ -2179,17 +2179,17 @@ date_setMonth_impl(JSContext *cx, CallAr
     /* Step 5. */
     double u = TimeClip(UTC(newDate, &cx->runtime()->dateTimeInfo));
 
     /* Steps 6-7. */
     dateObj->setUTCTime(u, args.rval().address());
     return true;
 }
 
-static JSBool
+static bool
 date_setMonth(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod<IsDate, date_setMonth_impl>(cx, args);
 }
 
 /* ES5 15.9.5.39. */
 JS_ALWAYS_INLINE bool
@@ -2216,17 +2216,17 @@ date_setUTCMonth_impl(JSContext *cx, Cal
     /* Step 5. */
     double v = TimeClip(newDate);
 
     /* Steps 6-7. */
     dateObj->setUTCTime(v, args.rval().address());
     return true;
 }
 
-static JSBool
+static bool
 date_setUTCMonth(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod<IsDate, date_setUTCMonth_impl>(cx, args);
 }
 
 static double
 ThisLocalTimeOrZero(Handle<DateObject*> dateObj, DateTimeInfo *dtInfo)
@@ -2274,17 +2274,17 @@ date_setFullYear_impl(JSContext *cx, Cal
     /* Step 6. */
     double u = TimeClip(UTC(newDate, &cx->runtime()->dateTimeInfo));
 
     /* Steps 7-8. */
     dateObj->setUTCTime(u, args.rval().address());
     return true;
 }
 
-static JSBool
+static bool
 date_setFullYear(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod<IsDate, date_setFullYear_impl>(cx, args);
 }
 
 /* ES5 15.9.5.41. */
 JS_ALWAYS_INLINE bool
@@ -2316,17 +2316,17 @@ date_setUTCFullYear_impl(JSContext *cx, 
     /* Step 6. */
     double v = TimeClip(newDate);
 
     /* Steps 7-8. */
     dateObj->setUTCTime(v, args.rval().address());
     return true;
 }
 
-static JSBool
+static bool
 date_setUTCFullYear(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod<IsDate, date_setUTCFullYear_impl>(cx, args);
 }
 
 /* ES5 Annex B.2.5. */
 JS_ALWAYS_INLINE bool
@@ -2359,17 +2359,17 @@ date_setYear_impl(JSContext *cx, CallArg
     /* Step 6. */
     double u = UTC(MakeDate(day, TimeWithinDay(t)), &cx->runtime()->dateTimeInfo);
 
     /* Steps 7-8. */
     dateObj->setUTCTime(TimeClip(u), args.rval().address());
     return true;
 }
 
-static JSBool
+static bool
 date_setYear(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod<IsDate, date_setYear_impl>(cx, args);
 }
 
 /* constants for toString, toUTCString */
 static const char js_NaN_date_str[] = "Invalid Date";
@@ -2428,17 +2428,17 @@ date_toGMTString_impl(JSContext *cx, Cal
     JSString *str = JS_NewStringCopyZ(cx, buf);
     if (!str)
         return false;
     args.rval().setString(str);
     return true;
 }
 
 /* ES5 15.9.5.43. */
-static JSBool
+static bool
 date_toGMTString(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod<IsDate, date_toGMTString_impl>(cx, args);
 }
 
 JS_ALWAYS_INLINE bool
 date_toISOString_impl(JSContext *cx, CallArgs args)
@@ -2455,25 +2455,25 @@ date_toISOString_impl(JSContext *cx, Cal
     JSString *str = JS_NewStringCopyZ(cx, buf);
     if (!str)
         return false;
     args.rval().setString(str);
     return true;
 
 }
 
-static JSBool
+static bool
 date_toISOString(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod<IsDate, date_toISOString_impl>(cx, args);
 }
 
 /* ES5 15.9.5.44. */
-static JSBool
+static bool
 date_toJSON(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
 
     /* Step 1. */
     RootedObject obj(cx, ToObject(cx, args.thisv()));
     if (!obj)
         return false;
@@ -2722,17 +2722,17 @@ ToLocaleStringHelper(JSContext *cx, Hand
 /* ES5 15.9.5.5. */
 JS_ALWAYS_INLINE bool
 date_toLocaleString_impl(JSContext *cx, CallArgs args)
 {
     Rooted<DateObject*> dateObj(cx, &args.thisv().toObject().as<DateObject>());
     return ToLocaleStringHelper(cx, dateObj, args.rval());
 }
 
-static JSBool
+static bool
 date_toLocaleString(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod<IsDate, date_toLocaleString_impl>(cx, args);
 }
 
 /* ES5 15.9.5.6. */
 JS_ALWAYS_INLINE bool
@@ -2749,32 +2749,32 @@ date_toLocaleDateString_impl(JSContext *
                                    "%x"
 #endif
                                    ;
 
     Rooted<DateObject*> dateObj(cx, &args.thisv().toObject().as<DateObject>());
     return ToLocaleFormatHelper(cx, dateObj, format, args.rval());
 }
 
-static JSBool
+static bool
 date_toLocaleDateString(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod<IsDate, date_toLocaleDateString_impl>(cx, args);
 }
 
 /* ES5 15.9.5.7. */
 JS_ALWAYS_INLINE bool
 date_toLocaleTimeString_impl(JSContext *cx, CallArgs args)
 {
     Rooted<DateObject*> dateObj(cx, &args.thisv().toObject().as<DateObject>());
     return ToLocaleFormatHelper(cx, dateObj, "%X", args.rval());
 }
 
-static JSBool
+static bool
 date_toLocaleTimeString(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod<IsDate, date_toLocaleTimeString_impl>(cx, args);
 }
 #endif
 
 JS_ALWAYS_INLINE bool
@@ -2802,47 +2802,47 @@ date_toLocaleFormat_impl(JSContext *cx, 
 
     JSAutoByteString fmtbytes(cx, fmt);
     if (!fmtbytes)
         return false;
 
     return ToLocaleFormatHelper(cx, dateObj, fmtbytes.ptr(), args.rval());
 }
 
-static JSBool
+static bool
 date_toLocaleFormat(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod<IsDate, date_toLocaleFormat_impl>(cx, args);
 }
 
 /* ES5 15.9.5.4. */
 JS_ALWAYS_INLINE bool
 date_toTimeString_impl(JSContext *cx, CallArgs args)
 {
     return date_format(cx, args.thisv().toObject().as<DateObject>().UTCTime().toNumber(),
                        FORMATSPEC_TIME, args.rval());
 }
 
-static JSBool
+static bool
 date_toTimeString(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod<IsDate, date_toTimeString_impl>(cx, args);
 }
 
 /* ES5 15.9.5.3. */
 JS_ALWAYS_INLINE bool
 date_toDateString_impl(JSContext *cx, CallArgs args)
 {
     return date_format(cx, args.thisv().toObject().as<DateObject>().UTCTime().toNumber(),
                        FORMATSPEC_DATE, args.rval());
 }
 
-static JSBool
+static bool
 date_toDateString(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod<IsDate, date_toDateString_impl>(cx, args);
 }
 
 #if JS_HAS_TOSOURCE
 JS_ALWAYS_INLINE bool
@@ -2858,47 +2858,47 @@ date_toSource_impl(JSContext *cx, CallAr
 
     JSString *str = sb.finishString();
     if (!str)
         return false;
     args.rval().setString(str);
     return true;
 }
 
-static JSBool
+static bool
 date_toSource(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod<IsDate, date_toSource_impl>(cx, args);
 }
 #endif
 
 JS_ALWAYS_INLINE bool
 date_toString_impl(JSContext *cx, CallArgs args)
 {
     return date_format(cx, args.thisv().toObject().as<DateObject>().UTCTime().toNumber(),
                        FORMATSPEC_FULL, args.rval());
 }
 
-static JSBool
+static bool
 date_toString(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod<IsDate, date_toString_impl>(cx, args);
 }
 
 JS_ALWAYS_INLINE bool
 date_valueOf_impl(JSContext *cx, CallArgs args)
 {
     Rooted<DateObject*> dateObj(cx, &args.thisv().toObject().as<DateObject>());
     args.rval().set(dateObj->UTCTime());
     return true;
 }
 
-static JSBool
+static bool
 date_valueOf(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod<IsDate, date_valueOf_impl>(cx, args);
 }
 
 static const JSFunctionSpec date_static_methods[] = {
     JS_FN("UTC",                 date_UTC,                MAXARGS,0),
@@ -2961,17 +2961,17 @@ static const JSFunctionSpec date_methods
 #if JS_HAS_TOSOURCE
     JS_FN(js_toSource_str,       date_toSource,           0,0),
 #endif
     JS_FN(js_toString_str,       date_toString,           0,0),
     JS_FN(js_valueOf_str,        date_valueOf,            0,0),
     JS_FS_END
 };
 
-JSBool
+bool
 js_Date(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
 
     /* Date called as function. */
     if (!args.isConstructing())
         return date_format(cx, NowAsMillis(), FORMATSPEC_FULL, args.rval());
 
--- a/js/src/jsdate.h
+++ b/js/src/jsdate.h
@@ -60,12 +60,12 @@ js_DateGetHours(JSContext *cx, JSObject 
 
 extern JS_FRIEND_API(int)
 js_DateGetMinutes(JSContext *cx, JSObject *obj);
 
 extern JS_FRIEND_API(int)
 js_DateGetSeconds(JSObject *obj);
 
 /* Date constructor native. Exposed only so the JIT can know its address. */
-JSBool
+bool
 js_Date(JSContext *cx, unsigned argc, js::Value *vp);
 
 #endif /* jsdate_h */
--- a/js/src/jsexn.cpp
+++ b/js/src/jsexn.cpp
@@ -37,17 +37,17 @@ using namespace js;
 using namespace js::gc;
 using namespace js::types;
 
 using mozilla::ArrayLength;
 using mozilla::PodArrayZero;
 using mozilla::PodZero;
 
 /* Forward declarations for ErrorObject::class_'s initializer. */
-static JSBool
+static bool
 Exception(JSContext *cx, unsigned argc, Value *vp);
 
 static void
 exn_trace(JSTracer *trc, JSObject *obj);
 
 static void
 exn_finalize(FreeOp *fop, JSObject *obj);
 
@@ -519,17 +519,17 @@ StackTraceToString(JSContext *cx, JSExnP
 /* XXXbe Consolidate the ugly truth that we don't treat filename as UTF-8
          with these two functions. */
 static JSString *
 FilenameToString(JSContext *cx, const char *filename)
 {
     return JS_NewStringCopyZ(cx, filename);
 }
 
-static JSBool
+static bool
 Exception(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
 
     /*
      * ECMA ed. 3, 15.11.1 requires Error, etc., to construct even when
      * called as functions, without operator new.  But as we do not give
      * each constructor a distinct JSClass, whose .name member is used by
@@ -597,17 +597,17 @@ Exception(JSContext *cx, unsigned argc, 
     if (!InitExnPrivate(cx, obj, message, filename, lineno, column, NULL, exnType))
         return false;
 
     args.rval().setObject(*obj);
     return true;
 }
 
 /* ES5 15.11.4.4 (NB: with subsequent errata). */
-static JSBool
+static bool
 exn_toString(JSContext *cx, unsigned argc, Value *vp)
 {
     JS_CHECK_RECURSION(cx, return false);
     CallArgs args = CallArgsFromVp(argc, vp);
 
     /* Step 2. */
     if (!args.thisv().isObject()) {
         JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL, JSMSG_BAD_PROTOTYPE, "Error");
@@ -676,17 +676,17 @@ exn_toString(JSContext *cx, unsigned arg
     args.rval().setString(str);
     return true;
 }
 
 #if JS_HAS_TOSOURCE
 /*
  * Return a string that may eval to something similar to the original object.
  */
-static JSBool
+static bool
 exn_toSource(JSContext *cx, unsigned argc, Value *vp)
 {
     JS_CHECK_RECURSION(cx, return false);
     CallArgs args = CallArgsFromVp(argc, vp);
 
     RootedObject obj(cx, ToObject(cx, args.thisv()));
     if (!obj)
         return false;
--- a/js/src/jsfriendapi.h
+++ b/js/src/jsfriendapi.h
@@ -231,18 +231,18 @@ typedef bool
  /*
   * Dump the complete object graph of heap-allocated things.
   * fp is the file for the dump output.
   */
 extern JS_FRIEND_API(void)
 DumpHeapComplete(JSRuntime *rt, FILE *fp);
 
 #ifdef OLD_GETTER_SETTER_METHODS
-JS_FRIEND_API(JSBool) obj_defineGetter(JSContext *cx, unsigned argc, js::Value *vp);
-JS_FRIEND_API(JSBool) obj_defineSetter(JSContext *cx, unsigned argc, js::Value *vp);
+JS_FRIEND_API(bool) obj_defineGetter(JSContext *cx, unsigned argc, js::Value *vp);
+JS_FRIEND_API(bool) obj_defineSetter(JSContext *cx, unsigned argc, js::Value *vp);
 #endif
 
 extern JS_FRIEND_API(bool)
 IsSystemCompartment(JSCompartment *comp);
 
 extern JS_FRIEND_API(bool)
 IsSystemZone(JS::Zone *zone);
 
--- a/js/src/jsfun.cpp
+++ b/js/src/jsfun.cpp
@@ -754,17 +754,17 @@ fun_toStringHelper(JSContext *cx, Handle
                              "object");
         return NULL;
     }
 
     RootedFunction fun(cx, &obj->as<JSFunction>());
     return FunctionToString(cx, fun, false, indent != JS_DONT_PRETTY_PRINT);
 }
 
-static JSBool
+static bool
 fun_toString(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     JS_ASSERT(IsFunctionObject(args.calleev()));
 
     uint32_t indent = 0;
 
     if (args.length() != 0 && !ToUint32(cx, args[0], &indent))
@@ -778,17 +778,17 @@ fun_toString(JSContext *cx, unsigned arg
     if (!str)
         return false;
 
     args.rval().setString(str);
     return true;
 }
 
 #if JS_HAS_TOSOURCE
-static JSBool
+static bool
 fun_toSource(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     JS_ASSERT(IsFunctionObject(args.calleev()));
 
     RootedObject obj(cx, ToObject(cx, args.thisv()));
     if (!obj)
         return false;
@@ -797,17 +797,17 @@ fun_toSource(JSContext *cx, unsigned arg
     if (!str)
         return false;
 
     args.rval().setString(str);
     return true;
 }
 #endif
 
-JSBool
+bool
 js_fun_call(JSContext *cx, unsigned argc, Value *vp)
 {
     RootedValue fval(cx, vp[1]);
 
     if (!js_IsCallable(fval)) {
         ReportIncompatibleMethod(cx, CallReceiverFromVp(vp), &JSFunction::class_);
         return false;
     }
@@ -853,17 +853,17 @@ PushBaselineFunApplyArguments(JSContext 
 
     /* Steps 7-8. */
     frame.forEachCanonicalActualArg(CopyTo(args.array()), 0, -1);
     return true;
 }
 #endif
 
 /* ES5 15.3.4.3 */
-JSBool
+bool
 js_fun_apply(JSContext *cx, unsigned argc, Value *vp)
 {
     /* Step 1. */
     RootedValue fval(cx, vp[1]);
     if (!js_IsCallable(fval)) {
         ReportIncompatibleMethod(cx, CallReceiverFromVp(vp), &JSFunction::class_);
         return false;
     }
@@ -1161,17 +1161,17 @@ JSFunction::createScriptForLazilyInterpr
     RootedAtom funAtom(cx, Atomize(cx, fs->selfHostedName, strlen(fs->selfHostedName)));
     if (!funAtom)
         return false;
     Rooted<PropertyName *> funName(cx, funAtom->asPropertyName());
     return cx->runtime()->cloneSelfHostedFunctionScript(cx, funName, fun);
 }
 
 /* ES5 15.3.4.5.1 and 15.3.4.5.2. */
-JSBool
+bool
 js::CallOrConstructBoundFunction(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     RootedFunction fun(cx, &args.callee().as<JSFunction>());
     JS_ASSERT(fun->isBoundFunction());
 
     bool constructing = args.isConstructing();
     if (constructing && fun->isArrow()) {
@@ -1214,17 +1214,17 @@ js::CallOrConstructBoundFunction(JSConte
 
     if (constructing ? !InvokeConstructor(cx, invokeArgs) : !Invoke(cx, invokeArgs))
         return false;
 
     *vp = invokeArgs.rval();
     return true;
 }
 
-static JSBool
+static bool
 fun_isGenerator(JSContext *cx, unsigned argc, Value *vp)
 {
     JSFunction *fun;
     if (!IsFunctionObject(vp[1], &fun)) {
         JS_SET_RVAL(cx, vp, BooleanValue(false));
         return true;
     }
 
@@ -1235,17 +1235,17 @@ fun_isGenerator(JSContext *cx, unsigned 
         result = script->isGenerator;
     }
 
     JS_SET_RVAL(cx, vp, BooleanValue(result));
     return true;
 }
 
 /* ES5 15.3.4.5. */
-static JSBool
+static bool
 fun_bind(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
 
     /* Step 1. */
     Value thisv = args.thisv();
 
     /* Step 2. */
@@ -1327,17 +1327,17 @@ const JSFunctionSpec js::function_method
     JS_FN(js_toString_str,   fun_toString,   0,0),
     JS_FN(js_apply_str,      js_fun_apply,   2,0),
     JS_FN(js_call_str,       js_fun_call,    1,0),
     JS_FN("bind",            fun_bind,       1,0),
     JS_FN("isGenerator",     fun_isGenerator,0,0),
     JS_FS_END
 };
 
-JSBool
+bool
 js::Function(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     RootedString arg(cx);   // used multiple times below
 
     /* Block this call if security callbacks forbid it. */
     Rooted<GlobalObject*> global(cx, &args.callee().global());
     if (!GlobalObject::isRuntimeCodeGenEnabled(cx, global)) {
--- a/js/src/jsfun.h
+++ b/js/src/jsfun.h
@@ -391,17 +391,17 @@ JSAPIToJSFunctionFlags(unsigned flags)
 {
     return (flags & JSFUN_CONSTRUCTOR)
            ? JSFunction::NATIVE_CTOR
            : JSFunction::NATIVE_FUN;
 }
 
 namespace js {
 
-extern JSBool
+extern bool
 Function(JSContext *cx, unsigned argc, Value *vp);
 
 extern JSFunction *
 NewFunction(ExclusiveContext *cx, HandleObject funobj, JSNative native, unsigned nargs,
             JSFunction::Flags flags, HandleObject parent, HandleAtom atom,
             gc::AllocKind allocKind = JSFunction::FinalizeKind,
             NewObjectKind newKind = GenericObject);
 
@@ -485,27 +485,27 @@ ReportIncompatibleMethod(JSContext *cx, 
 
 /*
  * Report an error that call.thisv is not an acceptable this for the callee
  * function.
  */
 extern void
 ReportIncompatible(JSContext *cx, CallReceiver call);
 
-JSBool
+bool
 CallOrConstructBoundFunction(JSContext *, unsigned, js::Value *);
 
 extern const JSFunctionSpec function_methods[];
 
 } /* namespace js */
 
-extern JSBool
+extern bool
 js_fun_apply(JSContext *cx, unsigned argc, js::Value *vp);
 
-extern JSBool
+extern bool
 js_fun_call(JSContext *cx, unsigned argc, js::Value *vp);
 
 extern JSObject*
 js_fun_bind(JSContext *cx, js::HandleObject target, js::HandleValue thisArg,
             js::Value *boundArgs, unsigned argslen);
 
 #ifdef DEBUG
 namespace JS {
--- a/js/src/jsiter.cpp
+++ b/js/src/jsiter.cpp
@@ -737,17 +737,17 @@ js_ThrowStopIteration(JSContext *cx)
     RootedValue v(cx);
     if (js_FindClassObject(cx, JSProto_StopIteration, &v))
         cx->setPendingException(v);
     return false;
 }
 
 /*** Iterator objects ****************************************************************************/
 
-JSBool
+bool
 js::IteratorConstructor(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     if (args.length() == 0) {
         js_ReportMissingArg(cx, args.calleev(), 0);
         return false;
     }
 
@@ -781,25 +781,25 @@ iterator_next_impl(JSContext *cx, CallAr
     if (!args.rval().toBoolean()) {
         js_ThrowStopIteration(cx);
         return false;
     }
 
     return js_IteratorNext(cx, thisObj, args.rval());
 }
 
-static JSBool
+static bool
 iterator_iterator(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     args.rval().set(args.thisv());
     return true;
 }
 
-JSBool
+bool
 iterator_next(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod<IsIterator, iterator_next_impl>(cx, args);
 }
 
 static const JSFunctionSpec iterator_methods[] = {
     JS_FN("iterator",  iterator_iterator,   0, 0),
@@ -876,17 +876,17 @@ ElementIteratorObject::create(JSContext 
 }
 
 static bool
 IsElementIterator(const Value &v)
 {
     return v.isObject() && v.toObject().is<ElementIteratorObject>();
 }
 
-JSBool
+bool
 ElementIteratorObject::next(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod(cx, IsElementIterator, next_impl, args);
 }
 
 bool
 ElementIteratorObject::next_impl(JSContext *cx, CallArgs args)
@@ -1663,17 +1663,17 @@ generator_send_impl(JSContext *cx, CallA
     // generator objects.
     if (!SendToGenerator(cx, JSGENOP_SEND, thisObj, gen, args.get(0)))
         return false;
 
     args.rval().set(gen->fp->returnValue());
     return true;
 }
 
-JSBool
+bool
 generator_send(JSContext *cx, unsigned argc, Value *vp)
 {
     // FIXME: send() is only a method on legacy generator objects.
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod<IsGenerator, generator_send_impl>(cx, args);
 }
 
 JS_ALWAYS_INLINE bool
@@ -1691,17 +1691,17 @@ generator_next_impl(JSContext *cx, CallA
 
     if (!SendToGenerator(cx, JSGENOP_NEXT, thisObj, gen, JS::UndefinedHandleValue))
         return false;
 
     args.rval().set(gen->fp->returnValue());
     return true;
 }
 
-JSBool
+bool
 generator_next(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod<IsGenerator, generator_next_impl>(cx, args);
 }
 
 JS_ALWAYS_INLINE bool
 generator_throw_impl(JSContext *cx, CallArgs args)
@@ -1719,17 +1719,17 @@ generator_throw_impl(JSContext *cx, Call
 
     if (!SendToGenerator(cx, JSGENOP_THROW, thisObj, gen, args.get(0)))
         return false;
 
     args.rval().set(gen->fp->returnValue());
     return true;
 }
 
-JSBool
+bool
 generator_throw(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod<IsGenerator, generator_throw_impl>(cx, args);
 }
 
 JS_ALWAYS_INLINE bool
 generator_close_impl(JSContext *cx, CallArgs args)
@@ -1754,17 +1754,17 @@ generator_close_impl(JSContext *cx, Call
 
     if (!SendToGenerator(cx, JSGENOP_CLOSE, thisObj, gen, JS::UndefinedHandleValue))
         return false;
 
     args.rval().set(gen->fp->returnValue());
     return true;
 }
 
-JSBool
+bool
 generator_close(JSContext *cx, unsigned argc, Value *vp)
 {
     // FIXME: close() is only a method on legacy generator objects.
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod<IsGenerator, generator_close_impl>(cx, args);
 }
 
 #define JSPROP_ROPERM   (JSPROP_READONLY | JSPROP_PERMANENT)
--- a/js/src/jsiter.h
+++ b/js/src/jsiter.h
@@ -151,17 +151,17 @@ class ElementIteratorObject : public JSO
     static const JSFunctionSpec methods[];
 
     enum {
         TargetSlot,
         IndexSlot,
         NumSlots
     };
 
-    static JSBool next(JSContext *cx, unsigned argc, Value *vp);
+    static bool next(JSContext *cx, unsigned argc, Value *vp);
     static bool next_impl(JSContext *cx, JS::CallArgs args);
 };
 
 bool
 VectorToIdArray(JSContext *cx, AutoIdVector &props, JSIdArray **idap);
 
 bool
 GetIterator(JSContext *cx, HandleObject obj, unsigned flags, MutableHandleValue vp);
@@ -198,17 +198,17 @@ bool
 CloseIterator(JSContext *cx, HandleObject iterObj);
 
 bool
 UnwindIteratorForException(JSContext *cx, js::HandleObject obj);
 
 void
 UnwindIteratorForUncatchableException(JSContext *cx, JSObject *obj);
 
-JSBool
+bool
 IteratorConstructor(JSContext *cx, unsigned argc, Value *vp);
 
 }
 
 extern bool
 js_SuppressDeletedProperty(JSContext *cx, js::HandleObject obj, jsid id);
 
 extern bool
--- a/js/src/jsmath.cpp
+++ b/js/src/jsmath.cpp
@@ -108,17 +108,17 @@ Class js::MathClass = {
     JS_DeletePropertyStub,   /* delProperty */
     JS_PropertyStub,         /* getProperty */
     JS_StrictPropertyStub,   /* setProperty */
     JS_EnumerateStub,
     JS_ResolveStub,
     JS_ConvertStub
 };
 
-JSBool
+bool
 js_math_abs(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
 
     if (args.length() == 0) {
         args.rval().setDouble(js_NaN);
         return true;
     }
@@ -137,17 +137,17 @@ js::math_acos_impl(MathCache *cache, dou
 {
 #if defined(SOLARIS) && defined(__GNUC__)
     if (x < -1 || 1 < x)
         return js_NaN;
 #endif
     return cache->lookup(acos, x);
 }
 
-JSBool
+bool
 js::math_acos(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
 
     if (args.length() == 0) {
         args.rval().setDouble(js_NaN);
         return true;
     }
@@ -170,17 +170,17 @@ js::math_asin_impl(MathCache *cache, dou
 {
 #if defined(SOLARIS) && defined(__GNUC__)
     if (x < -1 || 1 < x)
         return js_NaN;
 #endif
     return cache->lookup(asin, x);
 }
 
-JSBool
+bool
 js::math_asin(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
 
     if (args.length() == 0) {
         args.rval().setDouble(js_NaN);
         return true;
     }
@@ -199,17 +199,17 @@ js::math_asin(JSContext *cx, unsigned ar
 }
 
 double
 js::math_atan_impl(MathCache *cache, double x)
 {
     return cache->lookup(atan, x);
 }
 
-JSBool
+bool
 js::math_atan(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
 
     if (args.length() == 0) {
         args.rval().setDouble(js_NaN);
         return true;
     }
@@ -252,17 +252,17 @@ js::ecmaAtan2(double y, double x)
             return js_copysign(M_PI, y);
         if (x == 0)
             return y;
     }
 #endif
     return atan2(y, x);
 }
 
-JSBool
+bool
 js::math_atan2(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
 
     if (args.length() <= 1) {
         args.rval().setDouble(js_NaN);
         return true;
     }
@@ -281,17 +281,17 @@ js_math_ceil_impl(double x)
 {
 #ifdef __APPLE__
     if (x < 0 && x > -1.0)
         return js_copysign(0, -1);
 #endif
     return ceil(x);
 }
 
-JSBool
+bool
 js_math_ceil(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
 
     if (args.length() == 0) {
         args.rval().setDouble(js_NaN);
         return true;
     }
@@ -306,17 +306,17 @@ js_math_ceil(JSContext *cx, unsigned arg
 }
 
 double
 js::math_cos_impl(MathCache *cache, double x)
 {
     return cache->lookup(cos, x);
 }
 
-JSBool
+bool
 js::math_cos(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
 
     if (args.length() == 0) {
         args.rval().setDouble(js_NaN);
         return true;
     }
@@ -343,17 +343,17 @@ js::math_exp_impl(MathCache *cache, doub
             return js_PositiveInfinity;
         if (x == js_NegativeInfinity)
             return 0.0;
     }
 #endif
     return cache->lookup(exp, x);
 }
 
-JSBool
+bool
 js::math_exp(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
 
     if (args.length() == 0) {
         args.rval().setDouble(js_NaN);
         return true;
     }
@@ -372,17 +372,17 @@ js::math_exp(JSContext *cx, unsigned arg
 }
 
 double
 js_math_floor_impl(double x)
 {
     return floor(x);
 }
 
-JSBool
+bool
 js_math_floor(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
 
     if (args.length() == 0) {
         args.rval().setDouble(js_NaN);
         return true;
     }
@@ -391,17 +391,17 @@ js_math_floor(JSContext *cx, unsigned ar
     if (!ToNumber(cx, args[0], &x))
         return false;
 
     double z = js_math_floor_impl(x);
     args.rval().setNumber(z);
     return true;
 }
 
-JSBool
+bool
 js::math_imul(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
 
     uint32_t a = 0, b = 0;
     if (args.hasDefined(0) && !ToUint32(cx, args[0], &a))
         return false;
     if (args.hasDefined(1) && !ToUint32(cx, args[1], &b))
@@ -419,17 +419,17 @@ js::math_log_impl(MathCache *cache, doub
 {
 #if defined(SOLARIS) && defined(__GNUC__)
     if (x < 0)
         return js_NaN;
 #endif
     return cache->lookup(log, x);
 }
 
-JSBool
+bool
 js::math_log(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
 
     if (args.length() == 0) {
         args.rval().setDouble(js_NaN);
         return true;
     }
@@ -442,17 +442,17 @@ js::math_log(JSContext *cx, unsigned arg
     if (!mathCache)
         return false;
 
     double z = math_log_impl(mathCache, x);
     args.rval().setNumber(z);
     return true;
 }
 
-JSBool
+bool
 js_math_max(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
 
     double maxval = NegativeInfinity();
     for (unsigned i = 0; i < args.length(); i++) {
         double x;
         if (!ToNumber(cx, args[i], &x))
@@ -460,17 +460,17 @@ js_math_max(JSContext *cx, unsigned argc
         // Math.max(num, NaN) => NaN, Math.max(-0, +0) => +0
         if (x > maxval || IsNaN(x) || (x == maxval && IsNegative(maxval)))
             maxval = x;
     }
     args.rval().setNumber(maxval);
     return true;
 }
 
-JSBool
+bool
 js_math_min(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
 
     double minval = PositiveInfinity();
     for (unsigned i = 0; i < args.length(); i++) {
         double x;
         if (!ToNumber(cx, args[i], &x))
@@ -546,17 +546,17 @@ js::ecmaPow(double x, double y)
 #if defined(_MSC_VER)
 # pragma optimize("", on)
 #endif
 
 // Disable PGO for Math.pow() and related functions (see bug 791214).
 #if defined(_MSC_VER)
 # pragma optimize("g", off)
 #endif
-JSBool
+bool
 js_math_pow(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
 
     if (args.length() <= 1) {
         args.rval().setDouble(js_NaN);
         return true;
     }
@@ -674,26 +674,26 @@ random_nextDouble(JSContext *cx)
 
 double
 math_random_no_outparam(JSContext *cx)
 {
     /* Calculate random without memory traffic, for use in the JITs. */
     return random_nextDouble(cx);
 }
 
-JSBool
+bool
 js_math_random(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     double z = random_nextDouble(cx);
     args.rval().setDouble(z);
     return true;
 }
 
-JSBool /* ES5 15.8.2.15. */
+bool /* ES5 15.8.2.15. */
 js_math_round(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
 
     if (args.length() == 0) {
         args.rval().setDouble(js_NaN);
         return true;
     }
@@ -719,17 +719,17 @@ js_math_round(JSContext *cx, unsigned ar
 }
 
 double
 js::math_sin_impl(MathCache *cache, double x)
 {
     return cache->lookup(sin, x);
 }
 
-JSBool
+bool
 js::math_sin(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
 
     if (args.length() == 0) {
         args.rval().setDouble(js_NaN);
         return true;
     }
@@ -742,17 +742,17 @@ js::math_sin(JSContext *cx, unsigned arg
     if (!mathCache)
         return false;
 
     double z = math_sin_impl(mathCache, x);
     args.rval().setDouble(z);
     return true;
 }
 
-JSBool
+bool
 js_math_sqrt(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
 
     if (args.length() == 0) {
         args.rval().setDouble(js_NaN);
         return true;
     }
@@ -771,17 +771,17 @@ js_math_sqrt(JSContext *cx, unsigned arg
 }
 
 double
 js::math_tan_impl(MathCache *cache, double x)
 {
     return cache->lookup(tan, x);
 }
 
-JSBool
+bool
 js::math_tan(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
 
     if (args.length() == 0) {
         args.rval().setDouble(js_NaN);
         return true;
     }
@@ -827,17 +827,17 @@ JSBool math_function(JSContext *cx, unsi
 
 
 double
 js::math_log10_impl(MathCache *cache, double x)
 {
     return cache->lookup(log10, x);
 }
 
-JSBool
+bool
 js::math_log10(JSContext *cx, unsigned argc, Value *vp)
 {
     return math_function<math_log10_impl>(cx, argc, vp);
 }
 
 #if !HAVE_LOG2
 double log2(double x)
 {
@@ -846,17 +846,17 @@ double log2(double x)
 #endif
 
 double
 js::math_log2_impl(MathCache *cache, double x)
 {
     return cache->lookup(log2, x);
 }
 
-JSBool
+bool
 js::math_log2(JSContext *cx, unsigned argc, Value *vp)
 {
     return math_function<math_log2_impl>(cx, argc, vp);
 }
 
 #if !HAVE_LOG1P
 double log1p(double x)
 {
@@ -881,17 +881,17 @@ js::math_log1p_impl(MathCache *cache, do
     // Ensure that log1p(-0) is -0.
     if (x == 0)
         return x;
 #endif
 
     return cache->lookup(log1p, x);
 }
 
-JSBool
+bool
 js::math_log1p(JSContext *cx, unsigned argc, Value *vp)
 {
     return math_function<math_log1p_impl>(cx, argc, vp);
 }
 
 #if !HAVE_EXPM1
 double expm1(double x)
 {
@@ -914,17 +914,17 @@ double expm1(double x)
 #endif
 
 double
 js::math_expm1_impl(MathCache *cache, double x)
 {
     return cache->lookup(expm1, x);
 }
 
-JSBool
+bool
 js::math_expm1(JSContext *cx, unsigned argc, Value *vp)
 {
     return math_function<math_expm1_impl>(cx, argc, vp);
 }
 
 #if !HAVE_SQRT1PM1
 /* This algorithm computes sqrt(1+x)-1 for small x */
 double sqrt1pm1(double x)
@@ -938,41 +938,41 @@ double sqrt1pm1(double x)
 
 
 double
 js::math_cosh_impl(MathCache *cache, double x)
 {
     return cache->lookup(cosh, x);
 }
 
-JSBool
+bool
 js::math_cosh(JSContext *cx, unsigned argc, Value *vp)
 {
     return math_function<math_cosh_impl>(cx, argc, vp);
 }
 
 double
 js::math_sinh_impl(MathCache *cache, double x)
 {
     return cache->lookup(sinh, x);
 }
 
-JSBool
+bool
 js::math_sinh(JSContext *cx, unsigned argc, Value *vp)
 {
     return math_function<math_sinh_impl>(cx, argc, vp);
 }
 
 double
 js::math_tanh_impl(MathCache *cache, double x)
 {
     return cache->lookup(tanh, x);
 }
 
-JSBool
+bool
 js::math_tanh(JSContext *cx, unsigned argc, Value *vp)
 {
     return math_function<math_tanh_impl>(cx, argc, vp);
 }
 
 #if !HAVE_ACOSH
 double acosh(double x)
 {
@@ -1005,17 +1005,17 @@ double acosh(double x)
 #endif
 
 double
 js::math_acosh_impl(MathCache *cache, double x)
 {
     return cache->lookup(acosh, x);
 }
 
-JSBool
+bool
 js::math_acosh(JSContext *cx, unsigned argc, Value *vp)
 {
     return math_function<math_acosh_impl>(cx, argc, vp);
 }
 
 #if !HAVE_ASINH
 double asinh(double x)
 {
@@ -1050,17 +1050,17 @@ double asinh(double x)
 #endif
 
 double
 js::math_asinh_impl(MathCache *cache, double x)
 {
     return cache->lookup(asinh, x);
 }
 
-JSBool
+bool
 js::math_asinh(JSContext *cx, unsigned argc, Value *vp)
 {
     return math_function<math_asinh_impl>(cx, argc, vp);
 }
 
 #if !HAVE_ATANH
 double atanh(double x)
 {
@@ -1090,17 +1090,17 @@ double atanh(double x)
 #endif
 
 double
 js::math_atanh_impl(MathCache *cache, double x)
 {
     return cache->lookup(atanh, x);
 }
 
-JSBool
+bool
 js::math_atanh(JSContext *cx, unsigned argc, Value *vp)
 {
     return math_function<math_atanh_impl>(cx, argc, vp);
 }
 
 #if !HAVE_HYPOT
 double hypot(double x, double y)
 {
@@ -1131,17 +1131,17 @@ js::math_hypot_impl(double x, double y)
 #ifdef XP_WIN
     // On Windows, hypot(NaN, Infinity) is NaN. ES6 requires Infinity.
     if (mozilla::IsInfinite(x) || mozilla::IsInfinite(y))
         return js_PositiveInfinity;
 #endif
     return hypot(x, y);
 }
 
-JSBool
+bool
 js::math_hypot(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     if (args.length() < 2) {
         args.rval().setNumber(js_NaN);
         return true;
     }
 
@@ -1175,17 +1175,17 @@ double trunc(double x)
 #endif
 
 double
 js::math_trunc_impl(MathCache *cache, double x)
 {
     return cache->lookup(trunc, x);
 }
 
-JSBool
+bool
 js::math_trunc(JSContext *cx, unsigned argc, Value *vp)
 {
     return math_function<math_trunc_impl>(cx, argc, vp);
 }
 
 double sign(double x)
 {
     if (mozilla::IsNaN(x))
@@ -1195,17 +1195,17 @@ double sign(double x)
 }
 
 double
 js::math_sign_impl(MathCache *cache, double x)
 {
     return cache->lookup(sign, x);
 }
 
-JSBool
+bool
 js::math_sign(JSContext *cx, unsigned argc, Value *vp)
 {
     return math_function<math_sign_impl>(cx, argc, vp);
 }
 
 #if !HAVE_CBRT
 double cbrt(double x)
 {
@@ -1220,24 +1220,24 @@ double cbrt(double x)
 #endif
 
 double
 js::math_cbrt_impl(MathCache *cache, double x)
 {
     return cache->lookup(cbrt, x);
 }
 
-JSBool
+bool
 js::math_cbrt(JSContext *cx, unsigned argc, Value *vp)
 {
     return math_function<math_cbrt_impl>(cx, argc, vp);
 }
 
 #if JS_HAS_TOSOURCE
-static JSBool
+static bool
 math_toSource(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     args.rval().setString(cx->names().Math);
     return true;
 }
 #endif
 
--- a/js/src/jsmath.h
+++ b/js/src/jsmath.h
@@ -56,166 +56,166 @@ class MathCache
  */
 
 extern JSObject *
 js_InitMathClass(JSContext *cx, js::HandleObject obj);
 
 extern double
 math_random_no_outparam(JSContext *cx);
 
-extern JSBool
+extern bool
 js_math_random(JSContext *cx, unsigned argc, js::Value *vp);
 
-extern JSBool
+extern bool
 js_math_abs(JSContext *cx, unsigned argc, js::Value *vp);
 
-extern JSBool
+extern bool
 js_math_ceil(JSContext *cx, unsigned argc, js::Value *vp);
 
-extern JSBool
+extern bool
 js_math_floor(JSContext *cx, unsigned argc, js::Value *vp);
 
-extern JSBool
+extern bool
 js_math_max(JSContext *cx, unsigned argc, js::Value *vp);
 
-extern JSBool
+extern bool
 js_math_min(JSContext *cx, unsigned argc, js::Value *vp);
 
-extern JSBool
+extern bool
 js_math_round(JSContext *cx, unsigned argc, js::Value *vp);
 
-extern JSBool
+extern bool
 js_math_sqrt(JSContext *cx, unsigned argc, js::Value *vp);
 
-extern JSBool
+extern bool
 js_math_pow(JSContext *cx, unsigned argc, js::Value *vp);
 
 extern double
 js_math_ceil_impl(double x);
 
 extern double
 js_math_floor_impl(double x);
 
 namespace js {
 
-extern JSBool
+extern bool
 math_imul(JSContext *cx, unsigned argc, js::Value *vp);
 
-extern JSBool
+extern bool
 math_log(JSContext *cx, unsigned argc, js::Value *vp);
 
 extern double
 math_log_impl(MathCache *cache, double x);
 
-extern JSBool
+extern bool
 math_sin(JSContext *cx, unsigned argc, js::Value *vp);
 
 extern double
 math_sin_impl(MathCache *cache, double x);
 
-extern JSBool
+extern bool
 math_cos(JSContext *cx, unsigned argc, js::Value *vp);
 
 extern double
 math_cos_impl(MathCache *cache, double x);
 
-extern JSBool
+extern bool
 math_exp(JSContext *cx, unsigned argc, js::Value *vp);
 
 extern double
 math_exp_impl(MathCache *cache, double x);
 
-extern JSBool
+extern bool
 math_tan(JSContext *cx, unsigned argc, js::Value *vp);
 
 extern double
 math_tan_impl(MathCache *cache, double x);
 
-extern JSBool
+extern bool
 math_log10(JSContext *cx, unsigned argc, js::Value *vp);
 
-extern JSBool
+extern bool
 math_log2(JSContext *cx, unsigned argc, js::Value *vp);
 
-extern JSBool
+extern bool
 math_log1p(JSContext *cx, unsigned argc, js::Value *vp);
 
-extern JSBool
+extern bool
 math_expm1(JSContext *cx, unsigned argc, js::Value *vp);
 
-extern JSBool
+extern bool
 math_cosh(JSContext *cx, unsigned argc, js::Value *vp);
 
-extern JSBool
+extern bool
 math_sinh(JSContext *cx, unsigned argc, js::Value *vp);
 
-extern JSBool
+extern bool
 math_tanh(JSContext *cx, unsigned argc, js::Value *vp);
 
-extern JSBool
+extern bool
 math_acosh(JSContext *cx, unsigned argc, js::Value *vp);
 
-extern JSBool
+extern bool
 math_asinh(JSContext *cx, unsigned argc, js::Value *vp);
 
-extern JSBool
+extern bool
 math_atanh(JSContext *cx, unsigned argc, js::Value *vp);
 
-extern JSBool
+extern bool
 math_hypot(JSContext *cx, unsigned argc, Value *vp);
 
-extern JSBool
+extern bool
 math_trunc(JSContext *cx, unsigned argc, Value *vp);
 
-extern JSBool
+extern bool
 math_sign(JSContext *cx, unsigned argc, Value *vp);
 
-extern JSBool
+extern bool
 math_cbrt(JSContext *cx, unsigned argc, Value *vp);
 
-extern JSBool
+extern bool
 math_asin(JSContext *cx, unsigned argc, Value *vp);
 
-extern JSBool
+extern bool
 math_acos(JSContext *cx, unsigned argc, Value *vp);
 
-extern JSBool
+extern bool
 math_atan(JSContext *cx, unsigned argc, Value *vp);
 
-extern JSBool
+extern bool
 math_atan2(JSContext *cx, unsigned argc, Value *vp);
 
 extern double
 ecmaAtan2(double x, double y);
 
 extern double
 math_atan_impl(MathCache *cache, double x);
 
-extern JSBool
+extern bool
 math_atan(JSContext *cx, unsigned argc, js::Value *vp);
 
 extern double
 math_asin_impl(MathCache *cache, double x);
 
-extern JSBool
+extern bool
 math_asin(JSContext *cx, unsigned argc, js::Value *vp);
 
 extern double
 math_acos_impl(MathCache *cache, double x);
 
-extern JSBool
+extern bool
 math_acos(JSContext *cx, unsigned argc, js::Value *vp);
 
 extern double
 powi(double x, int y);
 
 extern double
 ecmaPow(double x, double y);
 
-extern JSBool
+extern bool
 math_imul(JSContext *cx, unsigned argc, Value *vp);
 
 extern double 
 math_log10_impl(MathCache *cache, double x);
 
 extern double 
 math_log2_impl(MathCache *cache, double x);
 
--- a/js/src/jsnum.cpp
+++ b/js/src/jsnum.cpp
@@ -251,17 +251,17 @@ js::GetDecimalInteger(ExclusiveContext *
     // If we haven't reached the limit of integer precision, we're done.
     if (d < DOUBLE_INTEGRAL_PRECISION_LIMIT)
         return true;
 
     // Otherwise compute the correct integer from the prefix of valid digits.
     return ComputeAccurateDecimalInteger(cx, start, s, dp);
 }
 
-static JSBool
+static bool
 num_isNaN(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
 
     if (args.length() == 0) {
         args.rval().setBoolean(true);
         return true;
     }
@@ -269,17 +269,17 @@ num_isNaN(JSContext *cx, unsigned argc, 
     double x;
     if (!ToNumber(cx, args[0], &x))
         return false;
 
     args.rval().setBoolean(mozilla::IsNaN(x));
     return true;
 }
 
-static JSBool
+static bool
 num_isFinite(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
 
     if (args.length() == 0) {
         args.rval().setBoolean(false);
         return true;
     }
@@ -287,17 +287,17 @@ num_isFinite(JSContext *cx, unsigned arg
     double x;
     if (!ToNumber(cx, args[0], &x))
         return false;
 
     args.rval().setBoolean(mozilla::IsFinite(x));
     return true;
 }
 
-static JSBool
+static bool
 num_parseFloat(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
 
     if (args.length() == 0) {
         args.rval().setDouble(js_NaN);
         return JS_TRUE;
     }
@@ -316,17 +316,17 @@ num_parseFloat(JSContext *cx, unsigned a
         args.rval().setDouble(js_NaN);
         return JS_TRUE;
     }
     args.rval().setDouble(d);
     return JS_TRUE;
 }
 
 /* ES5 15.1.2.2. */
-JSBool
+bool
 js::num_parseInt(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
 
     /* Fast paths and exceptional cases. */
     if (args.length() == 0) {
         args.rval().setDouble(js_NaN);
         return true;
@@ -449,17 +449,17 @@ Class NumberObject::class_ = {
     JS_DeletePropertyStub,   /* delProperty */
     JS_PropertyStub,         /* getProperty */
     JS_StrictPropertyStub,   /* setProperty */
     JS_EnumerateStub,
     JS_ResolveStub,
     JS_ConvertStub
 };
 
-static JSBool
+static bool
 Number(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
 
     /* Sample JS_CALLEE before clobbering. */
     bool isConstructing = args.isConstructing();
 
     if (args.length() > 0) {
@@ -510,17 +510,17 @@ num_toSource_impl(JSContext *cx, CallArg
 
     JSString *str = sb.finishString();
     if (!str)
         return false;
     args.rval().setString(str);
     return true;
 }
 
-static JSBool
+static bool
 num_toSource(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod<IsNumber, num_toSource_impl>(cx, args);
 }
 #endif
 
 ToCStringBuf::ToCStringBuf() :dbuf(NULL)
@@ -643,17 +643,17 @@ num_toString_impl(JSContext *cx, CallArg
     if (!str) {
         JS_ReportOutOfMemory(cx);
         return false;
     }
     args.rval().setString(str);
     return true;
 }
 
-JSBool
+bool
 js_num_toString(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod<IsNumber, num_toString_impl>(cx, args);
 }
 
 #if !ENABLE_INTL_API
 JS_ALWAYS_INLINE bool
@@ -777,33 +777,33 @@ num_toLocaleString_impl(JSContext *cx, C
     js_free(buf);
     if (!str)
         return false;
 
     args.rval().setString(str);
     return true;
 }
 
-JSBool
+bool
 num_toLocaleString(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod<IsNumber, num_toLocaleString_impl>(cx, args);
 }
 #endif
 
 JS_ALWAYS_INLINE bool
 num_valueOf_impl(JSContext *cx, CallArgs args)
 {
     JS_ASSERT(IsNumber(args.thisv()));
     args.rval().setNumber(Extract(args.thisv()));
     return true;
 }
 
-JSBool
+bool
 js_num_valueOf(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod<IsNumber, num_valueOf_impl>(cx, args);
 }
 
 const unsigned MAX_PRECISION = 100;
 
@@ -856,17 +856,17 @@ num_toFixed_impl(JSContext *cx, CallArgs
     } else {
         if (!ComputePrecisionInRange(cx, -20, MAX_PRECISION, args[0], &precision))
             return false;
     }
 
     return DToStrResult(cx, Extract(args.thisv()), DTOSTR_FIXED, precision, args);
 }
 
-JSBool
+bool
 num_toFixed(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod<IsNumber, num_toFixed_impl>(cx, args);
 }
 
 JS_ALWAYS_INLINE bool
 num_toExponential_impl(JSContext *cx, CallArgs args)
@@ -882,17 +882,17 @@ num_toExponential_impl(JSContext *cx, Ca
         mode = DTOSTR_EXPONENTIAL;
         if (!ComputePrecisionInRange(cx, 0, MAX_PRECISION, args[0], &precision))
             return false;
     }
 
     return DToStrResult(cx, Extract(args.thisv()), mode, precision + 1, args);
 }
 
-JSBool
+bool
 num_toExponential(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod<IsNumber, num_toExponential_impl>(cx, args);
 }
 
 JS_ALWAYS_INLINE bool
 num_toPrecision_impl(JSContext *cx, CallArgs args)
@@ -920,17 +920,17 @@ num_toPrecision_impl(JSContext *cx, Call
         mode = DTOSTR_PRECISION;
         if (!ComputePrecisionInRange(cx, 1, MAX_PRECISION, args[0], &precision))
             return false;
     }
 
     return DToStrResult(cx, d, mode, precision, args);
 }
 
-JSBool
+bool
 num_toPrecision(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return CallNonGenericMethod<IsNumber, num_toPrecision_impl>(cx, args);
 }
 
 static const JSFunctionSpec number_methods[] = {
 #if JS_HAS_TOSOURCE
@@ -946,60 +946,60 @@ static const JSFunctionSpec number_metho
     JS_FN("toFixed",             num_toFixed,           1, 0),
     JS_FN("toExponential",       num_toExponential,     1, 0),
     JS_FN("toPrecision",         num_toPrecision,       1, 0),
     JS_FS_END
 };
 
 
 // ES6 draft ES6 15.7.3.10
-static JSBool
+static bool
 Number_isNaN(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     if (args.length() < 1 || !args[0].isDouble()) {
         args.rval().setBoolean(false);
         return true;
     }
     args.rval().setBoolean(mozilla::IsNaN(args[0].toDouble()));
     return true;
 }
 
 // ES6 draft ES6 15.7.3.11
-static JSBool
+static bool
 Number_isFinite(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     if (args.length() < 1 || !args[0].isNumber()) {
         args.rval().setBoolean(false);
         return true;
     }
     args.rval().setBoolean(args[0].isInt32() ||
                            mozilla::IsFinite(args[0].toDouble()));
     return true;
 }
 
 // ES6 draft ES6 15.7.3.12
-static JSBool
+static bool
 Number_isInteger(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     if (args.length() < 1 || !args[0].isNumber()) {
         args.rval().setBoolean(false);
         return true;
     }
     Value val = args[0];
     args.rval().setBoolean(val.isInt32() ||
                            (mozilla::IsFinite(val.toDouble()) &&
                             ToInteger(val.toDouble()) == val.toDouble()));
     return true;
 }
 
 // ES6 drafult ES6 15.7.3.13
-static JSBool
+static bool
 Number_toInteger(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     if (args.length() < 1) {
         args.rval().setInt32(0);
         return true;
     }
     double asint;
--- a/js/src/jsnum.h
+++ b/js/src/jsnum.h
@@ -156,17 +156,17 @@ ToNumber(JSContext *cx, JS::MutableHandl
     extern bool ToNumberSlow(JSContext *cx, Value v, double *dp);
     if (!ToNumberSlow(cx, vp, &d))
         return false;
 
     vp.setNumber(d);
     return true;
 }
 
-JSBool
+bool
 num_parseInt(JSContext *cx, unsigned argc, Value *vp);
 
 }  /* namespace js */
 
 /*
  * Similar to strtod except that it replaces overflows with infinities of the
  * correct sign, and underflows with zeros of the correct sign.  Guaranteed to
  * return the closest double number to the given input in dp.
@@ -175,20 +175,20 @@ num_parseInt(JSContext *cx, unsigned arg
  * the appropriate sign.  The case of the "Infinity" string must match exactly.
  * If the string does not contain a number, set *ep to s and return 0.0 in dp.
  * Return false if out of memory.
  */
 extern JSBool
 js_strtod(js::ThreadSafeContext *cx, const jschar *s, const jschar *send,
           const jschar **ep, double *dp);
 
-extern JSBool
+extern bool
 js_num_toString(JSContext *cx, unsigned argc, js::Value *vp);
 
-extern JSBool
+extern bool
 js_num_valueOf(JSContext *cx, unsigned argc, js::Value *vp);
 
 namespace js {
 
 static JS_ALWAYS_INLINE bool