Backed out changeset ef0eeaec74a8 (bug 949183) on the theory that it somehow broke every single b2g test on a CLOSED TREE
authorWes Kocher <wkocher@mozilla.com>
Mon, 16 Dec 2013 18:27:43 -0800
changeset 160750 1c6081f57d57ab677daed49eebc069ebada6e93c
parent 160749 db5ef6c37d74aac5a2aee121553d8a8b2cb33269
child 160751 b1e5ade62913bf350c0869a938b98ae93c44aaca
child 160752 c9e9f2940aefaa27bd71b812612f450e89ddd025
push idunknown
push userunknown
push dateunknown
bugs949183
milestone29.0a1
backs outef0eeaec74a8a13bf6eb8f6265b3c7124e6d3577
Backed out changeset ef0eeaec74a8 (bug 949183) on the theory that it somehow broke every single b2g test on a CLOSED TREE
dom/base/nsDOMClassInfo.cpp
dom/bindings/BindingUtils.cpp
dom/bindings/BindingUtils.h
dom/bindings/Codegen.py
dom/bindings/DOMJSProxyHandler.cpp
dom/plugins/base/nsNPAPIPlugin.h
dom/workers/RuntimeService.cpp
js/public/Class.h
js/public/Id.h
js/src/builtin/Object.cpp
js/src/gc/Barrier.h
js/src/gdb/mozilla/jsid.py
js/src/gdb/tests/test-jsid.cpp
js/src/gdb/tests/test-jsid.py
js/src/jit/BaselineIC.cpp
js/src/jit/IonAnalysis.cpp
js/src/jit/IonBuilder.cpp
js/src/jit/MCallOptimize.cpp
js/src/jit/MIR.cpp
js/src/jsapi.cpp
js/src/jsarray.cpp
js/src/jscompartment.cpp
js/src/jsinfer.cpp
js/src/jsinfer.h
js/src/jsinferinlines.h
js/src/jsobjinlines.h
js/src/jsproxy.cpp
js/src/jsproxy.h
js/src/vm/Debugger.cpp
js/src/vm/Id.cpp
js/src/vm/Shape.cpp
js/src/vm/Shape.h
js/src/vm/String.h
js/src/vm/StructuredClone.cpp
js/xpconnect/src/XPCCallContext.cpp
js/xpconnect/src/XPCJSRuntime.cpp
js/xpconnect/src/XPCQuickStubs.cpp
js/xpconnect/src/dictionary_helper_gen.py
js/xpconnect/src/xpcprivate.h
js/xpconnect/wrappers/AccessCheck.cpp
js/xpconnect/wrappers/ChromeObjectWrapper.cpp
js/xpconnect/wrappers/FilteringWrapper.cpp
js/xpconnect/wrappers/XrayWrapper.cpp
xpcom/base/CycleCollectedJSRuntime.cpp
--- a/dom/base/nsDOMClassInfo.cpp
+++ b/dom/base/nsDOMClassInfo.cpp
@@ -568,25 +568,25 @@ static const nsConstructorFuncMapData kC
 };
 #undef NS_DEFINE_CONSTRUCTOR_FUNC_DATA
 
 nsIXPConnect *nsDOMClassInfo::sXPConnect = nullptr;
 nsIScriptSecurityManager *nsDOMClassInfo::sSecMan = nullptr;
 bool nsDOMClassInfo::sIsInitialized = false;
 
 
-jsid nsDOMClassInfo::sLocation_id        = jsid::voidId();
-jsid nsDOMClassInfo::sConstructor_id     = jsid::voidId();
-jsid nsDOMClassInfo::sLength_id          = jsid::voidId();
-jsid nsDOMClassInfo::sItem_id            = jsid::voidId();
-jsid nsDOMClassInfo::sNamedItem_id       = jsid::voidId();
-jsid nsDOMClassInfo::sEnumerate_id       = jsid::voidId();
-jsid nsDOMClassInfo::sTop_id             = jsid::voidId();
-jsid nsDOMClassInfo::sDocument_id        = jsid::voidId();
-jsid nsDOMClassInfo::sWrappedJSObject_id = jsid::voidId();
+jsid nsDOMClassInfo::sLocation_id        = JSID_VOID;
+jsid nsDOMClassInfo::sConstructor_id     = JSID_VOID;
+jsid nsDOMClassInfo::sLength_id          = JSID_VOID;
+jsid nsDOMClassInfo::sItem_id            = JSID_VOID;
+jsid nsDOMClassInfo::sNamedItem_id       = JSID_VOID;
+jsid nsDOMClassInfo::sEnumerate_id       = JSID_VOID;
+jsid nsDOMClassInfo::sTop_id             = JSID_VOID;
+jsid nsDOMClassInfo::sDocument_id        = JSID_VOID;
+jsid nsDOMClassInfo::sWrappedJSObject_id = JSID_VOID;
 
 static const JSClass *sObjectClass = nullptr;
 
 /**
  * Set our JSClass pointer for the Object class
  */
 static void
 FindObjectClass(JSContext* cx, JSObject* aGlobalObject)
@@ -1940,24 +1940,24 @@ nsDOMClassInfo::ShutDown()
   if (sClassInfoData[0].u.mConstructorFptr) {
     uint32_t i;
 
     for (i = 0; i < eDOMClassInfoIDCount; i++) {
       NS_IF_RELEASE(sClassInfoData[i].mCachedClassInfo);
     }
   }
 
-  sLocation_id        = jsid::voidId();
-  sConstructor_id     = jsid::voidId();
-  sLength_id          = jsid::voidId();
-  sItem_id            = jsid::voidId();
-  sEnumerate_id       = jsid::voidId();
-  sTop_id             = jsid::voidId();
-  sDocument_id        = jsid::voidId();
-  sWrappedJSObject_id = jsid::voidId();
+  sLocation_id        = JSID_VOID;
+  sConstructor_id     = JSID_VOID;
+  sLength_id          = JSID_VOID;
+  sItem_id            = JSID_VOID;
+  sEnumerate_id       = JSID_VOID;
+  sTop_id             = JSID_VOID;
+  sDocument_id        = JSID_VOID;
+  sWrappedJSObject_id = JSID_VOID;
 
   NS_IF_RELEASE(sXPConnect);
   NS_IF_RELEASE(sSecMan);
   sIsInitialized = false;
 }
 
 // Window helper
 
--- a/dom/bindings/BindingUtils.cpp
+++ b/dom/bindings/BindingUtils.cpp
@@ -936,17 +936,17 @@ XrayResolveAttribute(JSContext* cx, JS::
                      const Prefable<const JSPropertySpec>* attributes, jsid* attributeIds,
                      const JSPropertySpec* attributeSpecs, JS::MutableHandle<JSPropertyDescriptor> desc)
 {
   for (; attributes->specs; ++attributes) {
     if (attributes->isEnabled(cx, obj)) {
       // Set i to be the index into our full list of ids/specs that we're
       // looking at now.
       size_t i = attributes->specs - attributeSpecs;
-      for ( ; attributeIds[i] != jsid::voidId(); ++i) {
+      for ( ; attributeIds[i] != JSID_VOID; ++i) {
         if (id == attributeIds[i]) {
           const JSPropertySpec& attrSpec = attributeSpecs[i];
           // Because of centralization, we need to make sure we fault in the
           // JitInfos as well. At present, until the JSAPI changes, the easiest
           // way to do this is wrap them up as functions ourselves.
           desc.setAttributes(attrSpec.flags & ~JSPROP_NATIVE_ACCESSORS);
           // They all have getters, so we can just make it.
           JS::Rooted<JSObject*> global(cx, JS_GetGlobalForObject(cx, wrapper));
@@ -1015,17 +1015,17 @@ XrayResolveProperty(JSContext* cx, JS::H
   }
   if (methods) {
     const Prefable<const JSFunctionSpec>* method;
     for (method = methods; method->specs; ++method) {
       if (method->isEnabled(cx, obj)) {
         // Set i to be the index into our full list of ids/specs that we're
         // looking at now.
         size_t i = method->specs - methodsSpecs;
-        for ( ; methodIds[i] != jsid::voidId(); ++i) {
+        for ( ; methodIds[i] != JSID_VOID; ++i) {
           if (id == methodIds[i]) {
             const JSFunctionSpec& methodSpec = methodsSpecs[i];
             JSFunction *fun;
             if (methodSpec.selfHostedName) {
               fun = JS::GetSelfHostedFunction(cx, methodSpec.selfHostedName, id, methodSpec.nargs);
               if (!fun) {
                 return false;
               }
@@ -1079,17 +1079,17 @@ XrayResolveProperty(JSContext* cx, JS::H
 
   if (nativeProperties->constants) {
     const Prefable<const ConstantSpec>* constant;
     for (constant = nativeProperties->constants; constant->specs; ++constant) {
       if (constant->isEnabled(cx, obj)) {
         // Set i to be the index into our full list of ids/specs that we're
         // looking at now.
         size_t i = constant->specs - nativeProperties->constantSpecs;
-        for ( ; nativeProperties->constantIds[i] != jsid::voidId(); ++i) {
+        for ( ; nativeProperties->constantIds[i] != JSID_VOID; ++i) {
           if (id == nativeProperties->constantIds[i]) {
             desc.setAttributes(JSPROP_ENUMERATE | JSPROP_READONLY | JSPROP_PERMANENT);
             desc.object().set(wrapper);
             desc.value().set(nativeProperties->constantSpecs[i].value);
             return true;
           }
         }
       }
@@ -1221,17 +1221,17 @@ XrayEnumerateAttributes(JSContext* cx, J
                         jsid* attributeIds, const JSPropertySpec* attributeSpecs,
                         unsigned flags, JS::AutoIdVector& props)
 {
   for (; attributes->specs; ++attributes) {
     if (attributes->isEnabled(cx, obj)) {
       // Set i to be the index into our full list of ids/specs that we're
       // looking at now.
       size_t i = attributes->specs - attributeSpecs;
-      for ( ; attributeIds[i] != jsid::voidId(); ++i) {
+      for ( ; attributeIds[i] != JSID_VOID; ++i) {
         if (((flags & JSITER_HIDDEN) ||
              (attributeSpecs[i].flags & JSPROP_ENUMERATE)) &&
             !props.append(attributeIds[i])) {
           return false;
         }
       }
     }
   }
@@ -1259,17 +1259,17 @@ XrayEnumerateProperties(JSContext* cx, J
   }
   if (methods) {
     const Prefable<const JSFunctionSpec>* method;
     for (method = methods; method->specs; ++method) {
       if (method->isEnabled(cx, obj)) {
         // Set i to be the index into our full list of ids/specs that we're
         // looking at now.
         size_t i = method->specs - methodsSpecs;
-        for ( ; methodIds[i] != jsid::voidId(); ++i) {
+        for ( ; methodIds[i] != JSID_VOID; ++i) {
           if (((flags & JSITER_HIDDEN) ||
                (methodsSpecs[i].flags & JSPROP_ENUMERATE)) &&
               !props.append(methodIds[i])) {
             return false;
           }
         }
       }
     }
@@ -1305,17 +1305,17 @@ XrayEnumerateProperties(JSContext* cx, J
 
   if (nativeProperties->constants) {
     const Prefable<const ConstantSpec>* constant;
     for (constant = nativeProperties->constants; constant->specs; ++constant) {
       if (constant->isEnabled(cx, obj)) {
         // Set i to be the index into our full list of ids/specs that we're
         // looking at now.
         size_t i = constant->specs - nativeProperties->constantSpecs;
-        for ( ; nativeProperties->constantIds[i] != jsid::voidId(); ++i) {
+        for ( ; nativeProperties->constantIds[i] != JSID_VOID; ++i) {
           if (!props.append(nativeProperties->constantIds[i])) {
             return false;
           }
         }
       }
     }
   }
 
--- a/dom/bindings/BindingUtils.h
+++ b/dom/bindings/BindingUtils.h
@@ -1403,19 +1403,19 @@ InitIds(JSContext* cx, const Prefable<Sp
     // because this is only done once per application runtime.
     Spec* spec = prefableSpecs->specs;
     do {
       if (!InternJSString(cx, *ids, spec->name)) {
         return false;
       }
     } while (++ids, (++spec)->name);
 
-    // We ran out of ids for that pref.  Put a jsid::voidId() in on the id
+    // We ran out of ids for that pref.  Put a JSID_VOID in on the id
     // corresponding to the list terminator for the pref.
-    *ids = jsid::voidId();
+    *ids = JSID_VOID;
     ++ids;
   } while ((++prefableSpecs)->specs);
 
   return true;
 }
 
 bool
 QueryInterface(JSContext* cx, unsigned argc, JS::Value* vp);
--- a/dom/bindings/Codegen.py
+++ b/dom/bindings/Codegen.py
@@ -1421,17 +1421,17 @@ class PropertyDefiner:
         arrays = (("static %s %s_specs[] = {\n" +
                    ',\n'.join(specs) + "\n" +
                    "};\n\n" +
                    "// Can't be const because the pref-enabled boolean needs to be writable\n"
                    "static Prefable<%s> %s[] = {\n" +
                    ',\n'.join(prefableSpecs) + "\n" +
                    "};\n\n") % (specType, name, specType, name))
         if doIdArrays:
-            arrays += ("static jsid %s_ids[%i] = { jsid::voidId() };\n\n" %
+            arrays += ("static jsid %s_ids[%i] = { JSID_VOID };\n\n" %
                        (name, len(specs)))
         return arrays
 
 
 # The length of a method is the minimum of the lengths of the
 # argument lists of all its overloads.
 def overloadLength(arguments):
     i = len(arguments)
@@ -1827,24 +1827,24 @@ class CGCreateInterfaceObjectsMethod(CGA
                     idsToInit.append(props.variableName(False))
         if len(idsToInit) > 0:
             initIds = CGList(
                 [CGGeneric("!InitIds(aCx, %s, %s_ids)" % (varname, varname)) for
                  varname in idsToInit], ' ||\n')
             if len(idsToInit) > 1:
                 initIds = CGWrapper(initIds, pre="(", post=")", reindent=True)
             initIds = CGList(
-                [CGGeneric("%s_ids[0] == jsid::voidId() &&" % idsToInit[0]),
+                [CGGeneric("%s_ids[0] == JSID_VOID &&" % idsToInit[0]),
                  CGGeneric("NS_IsMainThread() &&"),
                  initIds],
                 "\n")
             initIds = CGWrapper(initIds, pre="if (", post=") {", reindent=True)
             initIds = CGList(
                 [initIds,
-                 CGGeneric(("  %s_ids[0] = jsid::voidId();\n"
+                 CGGeneric(("  %s_ids[0] = JSID_VOID;\n"
                             "  return;") % idsToInit[0]),
                  CGGeneric("}")],
                 "\n")
         else:
             initIds = None
 
         prefCacheData = []
         for var in self.properties.arrayNames():
@@ -11292,17 +11292,17 @@ class GlobalGenRoots():
         for dict in dictionaries:
             dictMembers = dict.members
             if len(dictMembers) == 0:
                 continue
 
             classMembers = [ClassMember(m.identifier.name + "_id",
                                         "jsid",
                                         visibility="public",
-                                        body="jsid::voidId()") for m in dictMembers]
+                                        body="JSID_VOID") for m in dictMembers]
 
             structName = dict.identifier.name + "Atoms"
             structs.append((structName,
                             CGWrapper(CGClass(structName,
                 bases=None,
                 isStruct=True,
                 members=classMembers), post='\n')))
 
--- a/dom/bindings/DOMJSProxyHandler.cpp
+++ b/dom/bindings/DOMJSProxyHandler.cpp
@@ -16,17 +16,17 @@
 
 #include "jsapi.h"
 
 using namespace JS;
 
 namespace mozilla {
 namespace dom {
 
-jsid s_length_id = jsid::voidId();
+jsid s_length_id = JSID_VOID;
 
 bool
 DefineStaticJSVals(JSContext* cx)
 {
   return InternJSString(cx, s_length_id, "length");
 }
 
 
--- a/dom/plugins/base/nsNPAPIPlugin.h
+++ b/dom/plugins/base/nsNPAPIPlugin.h
@@ -136,17 +136,17 @@ JSContext* GetJSContext(NPP npp);
 
 inline bool
 NPStringIdentifierIsPermanent(NPP npp, NPIdentifier id)
 {
   AutoSafeJSContext cx;
   return JS_StringHasBeenInterned(cx, NPIdentifierToString(id));
 }
 
-#define NPIdentifier_VOID (JSIdToNPIdentifier(jsid::voidId()))
+#define NPIdentifier_VOID (JSIdToNPIdentifier(JSID_VOID))
 
 NPObject* NP_CALLBACK
 _getwindowobject(NPP npp);
 
 NPObject* NP_CALLBACK
 _getpluginelement(NPP npp);
 
 NPIdentifier NP_CALLBACK
--- a/dom/workers/RuntimeService.cpp
+++ b/dom/workers/RuntimeService.cpp
@@ -168,17 +168,17 @@ enum {
   ID_Event,
   ID_MessageEvent,
   ID_ErrorEvent,
 
   ID_COUNT
 };
 
 // These are jsids for the main runtime. Only touched on the main thread.
-jsid gStringIDs[ID_COUNT] = { jsid::voidId() };
+jsid gStringIDs[ID_COUNT] = { JSID_VOID };
 
 const char* gStringChars[] = {
   "Worker",
   "ChromeWorker",
   "Event",
   "MessageEvent",
   "ErrorEvent"
 
@@ -1075,17 +1075,17 @@ ResolveWorkerClasses(JSContext* aCx, JS:
   MOZ_ASSERT(nsContentUtils::IsCallerChrome());
 
   // Make sure our strings are interned.
   if (JSID_IS_VOID(gStringIDs[0])) {
     for (uint32_t i = 0; i < ID_COUNT; i++) {
       JSString* str = JS_InternString(aCx, gStringChars[i]);
       if (!str) {
         while (i) {
-          gStringIDs[--i] = jsid::voidId();
+          gStringIDs[--i] = JSID_VOID;
         }
         return false;
       }
       gStringIDs[i] = INTERNED_STRING_TO_JSID(aCx, str);
     }
   }
 
   bool shouldResolve = false;
--- a/js/public/Class.h
+++ b/js/public/Class.h
@@ -43,17 +43,17 @@ static JS_ALWAYS_INLINE jsid
 SPECIALID_TO_JSID(const SpecialId &sid);
 
 /*
  * We partition the ways to refer to a property into three: by an index
  * (uint32_t); by a string whose characters do not represent an index
  * (PropertyName, see vm/String.h); and by various special values.
  *
  * Special values are encoded using SpecialId, which is layout-compatible but
- * non-interconvertible with jsid.  A SpecialId is used for jsid::voidId(), which
+ * non-interconvertible with jsid.  A SpecialId is used for JSID_VOID, which
  * does not occur in JS scripts but may be used to indicate the absence of a
  * valid identifier.  In the future, a SpecialId may also be an object used by
  * Harmony-proposed private names.
  */
 class SpecialId
 {
     uintptr_t bits_;
 
--- a/js/public/Id.h
+++ b/js/public/Id.h
@@ -5,64 +5,48 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef js_Id_h
 #define js_Id_h
 
 // A jsid is an identifier for a property or method of an object which is
 // either a 31-bit signed integer, interned string or object.
 //
-// Also, there is an additional jsid value, jsid::voidId(), which does not occur in
+// Also, there is an additional jsid value, JSID_VOID, which does not occur in
 // JS scripts but may be used to indicate the absence of a valid jsid.  A void
 // jsid is not a valid id and only arises as an exceptional API return value,
-// such as in JS_NextProperty. Embeddings must not pass jsid::voidId() into JSAPI
-// entry points expecting a jsid and do not need to handle jsid::voidId() in hooks
+// such as in JS_NextProperty. Embeddings must not pass JSID_VOID into JSAPI
+// entry points expecting a jsid and do not need to handle JSID_VOID in hooks
 // receiving a jsid except when explicitly noted in the API contract.
 //
 // A jsid is not implicitly convertible to or from a jsval; JS_ValueToId or
 // JS_IdToValue must be used instead.
 
-#include "mozilla/Attributes.h"
 #include "mozilla/NullPtr.h"
  
 #include "jstypes.h"
 
 #include "js/RootingAPI.h"
 #include "js/TypeDecls.h"
 #include "js/Utility.h"
 
+struct jsid
+{
+    size_t asBits;
+    bool operator==(jsid rhs) const { return asBits == rhs.asBits; }
+    bool operator!=(jsid rhs) const { return asBits != rhs.asBits; }
+};
+#define JSID_BITS(id) (id.asBits)
+
 #define JSID_TYPE_STRING                 0x0
 #define JSID_TYPE_INT                    0x1
 #define JSID_TYPE_VOID                   0x2
 #define JSID_TYPE_OBJECT                 0x4
 #define JSID_TYPE_MASK                   0x7
 
-struct jsid
-{
-    size_t asBits;
-
-    jsid() {}
-
-#if !defined(_MSC_VER) && !defined(__sparc)
-    // jsid must be POD so that MSVC and SPARC will pass it and return it by
-    // value.  (See also bug 689101 and bug 737344, for this problem with
-    // respect to JS::Value, which also has a comment like this next to it.)
-  private:
-#endif
-    MOZ_CONSTEXPR jsid(size_t bits) : asBits(bits) {}
-
-  public:
-    static MOZ_CONSTEXPR jsid voidId() { return jsid(JSID_TYPE_VOID); }
-    static MOZ_CONSTEXPR jsid emptyId() { return jsid(JSID_TYPE_OBJECT); }
-
-    bool operator==(jsid rhs) const { return asBits == rhs.asBits; }
-    bool operator!=(jsid rhs) const { return asBits != rhs.asBits; }
-};
-#define JSID_BITS(id) (id.asBits)
-
 // Avoid using canonical 'id' for jsid parameters since this is a magic word in
 // Objective-C++ which, apparently, wants to be able to #include jsapi.h.
 #define id iden
 
 static JS_ALWAYS_INLINE bool
 JSID_IS_STRING(jsid id)
 {
     return (JSID_BITS(id) & JSID_TYPE_MASK) == 0;
@@ -159,16 +143,19 @@ JSID_IS_VOID(const jsid id)
 static JS_ALWAYS_INLINE bool
 JSID_IS_EMPTY(const jsid id)
 {
     return ((size_t)JSID_BITS(id) == JSID_TYPE_OBJECT);
 }
 
 #undef id
 
+extern JS_PUBLIC_DATA(const jsid) JSID_VOID;
+extern JS_PUBLIC_DATA(const jsid) JSID_EMPTY;
+
 extern JS_PUBLIC_DATA(const JS::Handle<jsid>) JSID_VOIDHANDLE;
 extern JS_PUBLIC_DATA(const JS::Handle<jsid>) JSID_EMPTYHANDLE;
 
 namespace js {
 
 inline bool
 IsPoisonedId(jsid iden)
 {
@@ -176,17 +163,17 @@ IsPoisonedId(jsid iden)
         return JS::IsPoisonedPtr(JSID_TO_STRING(iden));
     if (JSID_IS_OBJECT(iden))
         return JS::IsPoisonedPtr(JSID_TO_OBJECT(iden));
     return false;
 }
 
 template <> struct GCMethods<jsid>
 {
-    static jsid initial() { return jsid::voidId(); }
+    static jsid initial() { return JSID_VOID; }
     static ThingRootKind kind() { return THING_ROOT_ID; }
     static bool poisoned(jsid id) { return IsPoisonedId(id); }
     static bool needsPostBarrier(jsid id) { return false; }
 #ifdef JSGC_GENERATIONAL
     static void postBarrier(jsid *idp) {}
     static void relocate(jsid *idp) {}
 #endif
 };
--- a/js/src/builtin/Object.cpp
+++ b/js/src/builtin/Object.cpp
@@ -600,17 +600,17 @@ obj_unwatch(JSContext *cx, unsigned argc
         return false;
 #endif
 
     RootedId id(cx);
     if (args.length() != 0) {
         if (!ValueToId<CanGC>(cx, args[0], &id))
             return false;
     } else {
-        id = jsid::voidId();
+        id = JSID_VOID;
     }
 
     if (!JSObject::unwatch(cx, obj, id))
         return false;
 
     args.rval().setUndefined();
     return true;
 }
--- a/js/src/gc/Barrier.h
+++ b/js/src/gc/Barrier.h
@@ -990,31 +990,31 @@ class BarrieredId
 #endif
     }
 };
 
 class EncapsulatedId : public BarrieredId
 {
   public:
     explicit EncapsulatedId(jsid id) : BarrieredId(id) {}
-    explicit EncapsulatedId() : BarrieredId(jsid::voidId()) {}
+    explicit EncapsulatedId() : BarrieredId(JSID_VOID) {}
 
     EncapsulatedId &operator=(const EncapsulatedId &v) {
         if (v.value != value)
             pre();
         JS_ASSERT(!IsPoisonedId(v.value));
         value = v.value;
         return *this;
     }
 };
 
 class RelocatableId : public BarrieredId
 {
   public:
-    explicit RelocatableId() : BarrieredId(jsid::voidId()) {}
+    explicit RelocatableId() : BarrieredId(JSID_VOID) {}
     explicit inline RelocatableId(jsid id) : BarrieredId(id) {}
     ~RelocatableId() { pre(); }
 
     bool operator==(jsid id) const { return value == id; }
     bool operator!=(jsid id) const { return value != id; }
 
     jsid get() const { return value; }
     operator jsid() const { return value; }
@@ -1041,17 +1041,17 @@ class RelocatableId : public BarrieredId
 /*
  * A pre- and post-barriered heap jsid, for use inside the JS engine.
  *
  * Not to be confused with JS::Heap<jsid>.
  */
 class HeapId : public BarrieredId
 {
   public:
-    explicit HeapId() : BarrieredId(jsid::voidId()) {}
+    explicit HeapId() : BarrieredId(JSID_VOID) {}
 
     explicit HeapId(jsid id)
       : BarrieredId(id)
     {
         JS_ASSERT(!IsPoisonedId(id));
         post();
     }
 
--- a/js/src/gdb/mozilla/jsid.py
+++ b/js/src/gdb/mozilla/jsid.py
@@ -41,17 +41,17 @@ class jsid(object):
     def to_string(self):
         bits = self.as_bits()
         tag = bits & jsid.TYPE_MASK
         if tag == jsid.TYPE_STRING:
             body = bits.cast(self.cache.JSString_ptr_t)
         elif tag & jsid.TYPE_INT:
             body = bits >> 1
         elif tag == jsid.TYPE_VOID:
-            return "jsid::voidId()"
+            return "JSID_VOID"
         elif tag == jsid.TYPE_OBJECT:
             body = ((bits & ~jsid.TYPE_MASK)
                     .cast(self.cache.JSObject_ptr_t))
         else:
             body = "<unrecognized>"
         return '$jsid(%s)' % (body,)
 
 # Hard-code the referent type pretty-printer for jsid roots and handles.
--- a/js/src/gdb/tests/test-jsid.cpp
+++ b/js/src/gdb/tests/test-jsid.cpp
@@ -1,17 +1,17 @@
 #include "gdb-tests.h"
 #include "jsapi.h"
 
 FRAGMENT(jsid, simple) {
   JS::Rooted<JSString *> string(cx, JS_NewStringCopyZ(cx, "moon"));
   JS::Rooted<JSString *> interned(cx, JS_InternJSString(cx, string));
   JS::Rooted<jsid> string_id(cx, INTERNED_STRING_TO_JSID(cx, interned));
   jsid int_id = INT_TO_JSID(1729);
-  jsid void_id = jsid::voidId();
+  jsid void_id = JSID_VOID;
   JS::Rooted<jsid> object_id(cx, OBJECT_TO_JSID(JS::CurrentGlobalOrNull(cx)));
 
   breakpoint();
 
   (void) string;
   (void) interned;
   (void) string_id;
   (void) int_id;
--- a/js/src/gdb/tests/test-jsid.py
+++ b/js/src/gdb/tests/test-jsid.py
@@ -1,15 +1,15 @@
 # Tests for jsid pretty-printing
 
 assert_subprinter_registered('SpiderMonkey', 'jsid')
 
 run_fragment('jsid.simple')
 
 assert_pretty('string_id', '$jsid("moon")')
 assert_pretty('int_id', '$jsid(1729)')
-assert_pretty('void_id', 'jsid::voidId()')
+assert_pretty('void_id', 'JSID_VOID')
 assert_pretty('object_id', '$jsid((JSObject *)  [object global] delegate)')
 
 run_fragment('jsid.handles')
 
 assert_pretty('jsid_handle',         '$jsid("shovel")')
 assert_pretty('mutable_jsid_handle', '$jsid("shovel")')
--- a/js/src/jit/BaselineIC.cpp
+++ b/js/src/jit/BaselineIC.cpp
@@ -1464,17 +1464,17 @@ DoTypeUpdateFallback(JSContext *cx, Base
     RootedScript script(cx, frame->script());
     RootedObject obj(cx, &objval.toObject());
     RootedId id(cx);
 
     switch(stub->kind()) {
       case ICStub::SetElem_Dense:
       case ICStub::SetElem_DenseAdd: {
         JS_ASSERT(obj->isNative());
-        id = jsid::voidId();
+        id = JSID_VOID;
         types::AddTypePropertyId(cx, obj, id, value);
         break;
       }
       case ICStub::SetProp_Native:
       case ICStub::SetProp_NativeAdd: {
         JS_ASSERT(obj->isNative());
         jsbytecode *pc = stub->getChainFallback()->icEntry()->pc(script);
         if (*pc == JSOP_SETALIASEDVAR)
--- a/js/src/jit/IonAnalysis.cpp
+++ b/js/src/jit/IonAnalysis.cpp
@@ -2008,17 +2008,17 @@ AnalyzePoppedThis(JSContext *cx, types::
     if (ins->isCallSetProperty()) {
         MCallSetProperty *setprop = ins->toCallSetProperty();
 
         if (setprop->object() != thisValue)
             return true;
 
         // Don't use GetAtomId here, we need to watch for SETPROP on
         // integer properties and bail out. We can't mark the aggregate
-        // jsid::voidId() type property as being in a definite slot.
+        // JSID_VOID type property as being in a definite slot.
         if (setprop->name() == cx->names().prototype ||
             setprop->name() == cx->names().proto ||
             setprop->name() == cx->names().constructor)
         {
             return true;
         }
 
         // Ignore assignments to properties that were already written to.
--- a/js/src/jit/IonBuilder.cpp
+++ b/js/src/jit/IonBuilder.cpp
@@ -5517,17 +5517,17 @@ IonBuilder::jsop_initelem_array()
     // intializer, and that arrays are marked as non-packed when writing holes
     // to them during initialization.
     bool needStub = false;
     types::TypeObjectKey *initializer = obj->resultTypeSet()->getObject(0);
     if (value->isConstant() && value->toConstant()->value().isMagic(JS_ELEMENTS_HOLE)) {
         if (!initializer->hasFlags(constraints(), types::OBJECT_FLAG_NON_PACKED))
             needStub = true;
     } else if (!initializer->unknownProperties()) {
-        types::HeapTypeSetKey elemTypes = initializer->property(jsid::voidId());
+        types::HeapTypeSetKey elemTypes = initializer->property(JSID_VOID);
         if (!TypeSetIncludes(elemTypes.maybeTypes(), value->type(), value->resultTypeSet())) {
             elemTypes.freeze(constraints());
             needStub = true;
         }
     }
 
     if (NeedsPostBarrier(info(), value))
         current->add(MPostWriteBarrier::New(alloc(), obj, value));
@@ -7622,17 +7622,17 @@ IonBuilder::jsop_setelem_dense(types::Te
         if (safety == SetElem_Normal)
             current->push(value);
 
         if (!resumeAfter(ins))
             return false;
     }
 
     // Determine whether a write barrier is required.
-    if (obj->resultTypeSet()->propertyNeedsBarrier(constraints(), jsid::voidId()))
+    if (obj->resultTypeSet()->propertyNeedsBarrier(constraints(), JSID_VOID))
         store->setNeedsBarrier();
 
     if (elementType != MIRType_None && packed)
         store->setElementType(elementType);
 
     return true;
 }
 
--- a/js/src/jit/MCallOptimize.cpp
+++ b/js/src/jit/MCallOptimize.cpp
@@ -208,17 +208,17 @@ IonBuilder::inlineArray(CallInfo &callIn
 
     // Multiple arguments imply array initialization, not just construction.
     if (callInfo.argc() >= 2) {
         initLength = callInfo.argc();
         allocating = MNewArray::NewArray_Allocating;
 
         types::TypeObjectKey *type = types::TypeObjectKey::get(templateObject);
         if (!type->unknownProperties()) {
-            types::HeapTypeSetKey elemTypes = type->property(jsid::voidId());
+            types::HeapTypeSetKey elemTypes = type->property(JSID_VOID);
 
             for (uint32_t i = 0; i < initLength; i++) {
                 MDefinition *value = callInfo.getArg(i);
                 if (!TypeSetIncludes(elemTypes.maybeTypes(), value->type(), value->resultTypeSet())) {
                     elemTypes.freeze(constraints());
                     return InliningStatus_NotInlined;
                 }
             }
@@ -463,31 +463,31 @@ IonBuilder::inlineArrayConcat(CallInfo &
         argTypes->hasObjectFlags(constraints(), types::OBJECT_FLAG_NON_PACKED))
     {
         return InliningStatus_NotInlined;
     }
 
     // Constraints modeling this concat have not been generated by inference,
     // so check that type information already reflects possible side effects of
     // this call.
-    types::HeapTypeSetKey thisElemTypes = thisType->property(jsid::voidId());
+    types::HeapTypeSetKey thisElemTypes = thisType->property(JSID_VOID);
 
     types::TemporaryTypeSet *resTypes = getInlineReturnTypeSet();
     if (!resTypes->hasType(types::Type::ObjectType(thisType)))
         return InliningStatus_NotInlined;
 
     for (unsigned i = 0; i < argTypes->getObjectCount(); i++) {
         types::TypeObjectKey *argType = argTypes->getObject(i);
         if (!argType)
             continue;
 
         if (argType->unknownProperties())
             return InliningStatus_NotInlined;
 
-        types::HeapTypeSetKey elemTypes = argType->property(jsid::voidId());
+        types::HeapTypeSetKey elemTypes = argType->property(JSID_VOID);
         if (!elemTypes.knownSubset(constraints(), thisElemTypes))
             return InliningStatus_NotInlined;
     }
 
     // Inline the call.
     JSObject *templateObj = inspector->getTemplateObjectForNative(pc, js::array_concat);
     if (!templateObj || templateObj->type() != baseThisType)
         return InliningStatus_NotInlined;
@@ -953,17 +953,17 @@ IonBuilder::inlineStringSplit(CallInfo &
     if (!templateObject)
         return InliningStatus_NotInlined;
     JS_ASSERT(templateObject->is<ArrayObject>());
 
     types::TypeObjectKey *retType = types::TypeObjectKey::get(templateObject);
     if (retType->unknownProperties())
         return InliningStatus_NotInlined;
 
-    types::HeapTypeSetKey key = retType->property(jsid::voidId());
+    types::HeapTypeSetKey key = retType->property(JSID_VOID);
     if (!key.maybeTypes())
         return InliningStatus_NotInlined;
 
     if (!key.maybeTypes()->hasType(types::Type::StringType())) {
         key.freeze(constraints());
         return InliningStatus_NotInlined;
     }
 
@@ -1173,17 +1173,17 @@ IonBuilder::inlineUnsafePutElements(Call
 bool
 IonBuilder::inlineUnsafeSetDenseArrayElement(CallInfo &callInfo, uint32_t base)
 {
     // Note: we do not check the conditions that are asserted as true
     // in intrinsic_UnsafePutElements():
     // - arr is a dense array
     // - idx < initialized length
     // Furthermore, note that inlineUnsafePutElements ensures the type of the
-    // value is reflected in the jsid::voidId() property of the array.
+    // value is reflected in the JSID_VOID property of the array.
 
     MDefinition *obj = callInfo.getArg(base + 0);
     MDefinition *id = callInfo.getArg(base + 1);
     MDefinition *elem = callInfo.getArg(base + 2);
 
     types::TemporaryTypeSet::DoubleConversion conversion =
         obj->resultTypeSet()->convertDoubleElements(constraints());
     if (!jsop_setelem_dense(conversion, SetElem_Unsafe, obj, id, elem))
--- a/js/src/jit/MIR.cpp
+++ b/js/src/jit/MIR.cpp
@@ -2865,17 +2865,17 @@ jit::DenseNativeElementType(types::Compi
     for (unsigned i = 0; i < count; i++) {
         types::TypeObjectKey *object = types->getObject(i);
         if (!object)
             continue;
 
         if (object->unknownProperties())
             return MIRType_None;
 
-        types::HeapTypeSetKey elementTypes = object->property(jsid::voidId());
+        types::HeapTypeSetKey elementTypes = object->property(JSID_VOID);
 
         MIRType type = MIRTypeFromValueType(elementTypes.knownTypeTag(constraints));
         if (type == MIRType_None)
             return MIRType_None;
 
         if (elementType == MIRType_None)
             elementType = type;
         else if (elementType != type)
@@ -2894,17 +2894,17 @@ PropertyReadNeedsTypeBarrier(types::Comp
     // been observed at this access site, the read could produce a new type and
     // a barrier is needed. Note that this only covers reads from properties
     // which are accounted for by type information, i.e. native data properties
     // and elements.
 
     if (object->unknownProperties() || observed->empty())
         return true;
 
-    jsid id = name ? NameToId(name) : jsid::voidId();
+    jsid id = name ? NameToId(name) : JSID_VOID;
     types::HeapTypeSetKey property = object->property(id);
     if (property.maybeTypes() && !TypeSetIncludes(observed, MIRType_Value, property.maybeTypes()))
         return true;
 
     // Type information for global objects is not required to reflect the
     // initial 'undefined' value for properties, in particular global
     // variables declared with 'var'. Until the property is assigned a value
     // other than undefined, a barrier is required.
@@ -3068,17 +3068,17 @@ jit::AddObjectsForPropertyRead(MDefiniti
     for (size_t i = 0; i < types->getObjectCount(); i++) {
         types::TypeObjectKey *object = types->getObject(i);
         if (!object)
             continue;
 
         if (object->unknownProperties())
             return observed->addType(types::Type::AnyObjectType(), alloc);
 
-        jsid id = name ? NameToId(name) : jsid::voidId();
+        jsid id = name ? NameToId(name) : JSID_VOID;
         types::HeapTypeSetKey property = object->property(id);
         types::HeapTypeSet *types = property.maybeTypes();
         if (!types)
             continue;
 
         if (types->unknownObject())
             return observed->addType(types::Type::AnyObjectType(), alloc);
 
@@ -3109,17 +3109,17 @@ TryAddTypeBarrierForWrite(TempAllocator 
     for (size_t i = 0; i < objTypes->getObjectCount(); i++) {
         types::TypeObjectKey *object = objTypes->getObject(i);
         if (!object)
             continue;
 
         if (object->unknownProperties())
             return false;
 
-        jsid id = name ? NameToId(name) : jsid::voidId();
+        jsid id = name ? NameToId(name) : JSID_VOID;
         types::HeapTypeSetKey property = object->property(id);
         if (!property.maybeTypes())
             return false;
 
         if (TypeSetIncludes(property.maybeTypes(), (*pvalue)->type(), (*pvalue)->resultTypeSet()))
             return false;
 
         // This freeze is not required for correctness, but ensures that we
@@ -3219,17 +3219,17 @@ jit::PropertyWriteNeedsTypeBarrier(TempA
         if (!object || object->unknownProperties())
             continue;
 
         // TI doesn't track TypedArray objects and should never insert a type
         // barrier for them.
         if (IsTypedArrayClass(object->clasp()))
             continue;
 
-        jsid id = name ? NameToId(name) : jsid::voidId();
+        jsid id = name ? NameToId(name) : JSID_VOID;
         types::HeapTypeSetKey property = object->property(id);
         if (!TypeSetIncludes(property.maybeTypes(), (*pvalue)->type(), (*pvalue)->resultTypeSet())) {
             // Either pobj or pvalue needs to be modified to filter out the
             // types which the value could have but are not in the property,
             // or a VM call is required. A VM call is always required if pobj
             // and pvalue cannot be modified.
             if (!canModify)
                 return true;
@@ -3251,17 +3251,17 @@ jit::PropertyWriteNeedsTypeBarrier(TempA
     types::TypeObjectKey *excluded = nullptr;
     for (size_t i = 0; i < types->getObjectCount(); i++) {
         types::TypeObjectKey *object = types->getObject(i);
         if (!object || object->unknownProperties())
             continue;
         if (IsTypedArrayClass(object->clasp()))
             continue;
 
-        jsid id = name ? NameToId(name) : jsid::voidId();
+        jsid id = name ? NameToId(name) : JSID_VOID;
         types::HeapTypeSetKey property = object->property(id);
         if (TypeSetIncludes(property.maybeTypes(), (*pvalue)->type(), (*pvalue)->resultTypeSet()))
             continue;
 
         if ((property.maybeTypes() && !property.maybeTypes()->empty()) || excluded)
             return true;
         excluded = object;
     }
--- a/js/src/jsapi.cpp
+++ b/js/src/jsapi.cpp
@@ -3748,28 +3748,28 @@ JS_NextProperty(JSContext *cx, JSObject 
         JS_ASSERT(iterobj->getParent()->isNative());
         Shape *shape = static_cast<Shape *>(iterobj->getPrivate());
 
         while (shape->previous() && !shape->enumerable())
             shape = shape->previous();
 
         if (!shape->previous()) {
             JS_ASSERT(shape->isEmptyShape());
-            *idp = jsid::voidId();
+            *idp = JSID_VOID;
         } else {
             iterobj->setPrivateGCThing(const_cast<Shape *>(shape->previous().get()));
             *idp = shape->propid();
         }
     } else {
         /* Non-native case: use the ida enumerated when iterobj was created. */
         JSIdArray *ida = (JSIdArray *) iterobj->getPrivate();
         JS_ASSERT(i <= ida->length);
         STATIC_ASSUME(i <= ida->length);
         if (i == 0) {
-            *idp = jsid::voidId();
+            *idp = JSID_VOID;
         } else {
             *idp = ida->vector[--i];
             iterobj->setSlot(JSSLOT_ITER_INDEX, Int32Value(i));
         }
     }
     return true;
 }
 
--- a/js/src/jsarray.cpp
+++ b/js/src/jsarray.cpp
@@ -1195,17 +1195,17 @@ array_join(JSContext *cx, unsigned argc,
 }
 
 static inline bool
 InitArrayTypes(JSContext *cx, TypeObject *type, const Value *vector, unsigned count)
 {
     if (cx->typeInferenceEnabled() && !type->unknownProperties()) {
         AutoEnterAnalysis enter(cx);
 
-        HeapTypeSet *types = type->getProperty(cx, jsid::voidId());
+        HeapTypeSet *types = type->getProperty(cx, JSID_VOID);
         if (!types)
             return false;
 
         for (unsigned i = 0; i < count; i++) {
             if (vector[i].isMagic(JS_ELEMENTS_HOLE))
                 continue;
             Type valtype = GetValueType(vector[i]);
             types->addType(cx, valtype);
--- a/js/src/jscompartment.cpp
+++ b/js/src/jscompartment.cpp
@@ -368,17 +368,17 @@ JSCompartment::wrap(JSContext *cx, Mutab
     JS_ASSERT(Wrapper::wrappedObject(obj) == &key.get().toObject());
 
     return putWrapper(key, ObjectValue(*obj));
 }
 
 bool
 JSCompartment::wrapId(JSContext *cx, jsid *idp)
 {
-    MOZ_ASSERT(*idp != jsid::voidId(), "jsid::voidId() is an out-of-band sentinel value");
+    MOZ_ASSERT(*idp != JSID_VOID, "JSID_VOID is an out-of-band sentinel value");
     if (JSID_IS_INT(*idp))
         return true;
     RootedValue value(cx, IdToValue(*idp));
     if (!wrap(cx, &value))
         return false;
     RootedId id(cx);
     if (!ValueToId<CanGC>(cx, value, &id))
         return false;
--- a/js/src/jsinfer.cpp
+++ b/js/src/jsinfer.cpp
@@ -1248,17 +1248,17 @@ TypeObjectKey::hasFlags(CompilerConstrai
 {
     JS_ASSERT(flags);
 
     if (TypeObject *type = maybeType()) {
         if (type->hasAnyFlags(flags))
             return true;
     }
 
-    HeapTypeSetKey objectProperty = property(jsid::emptyId());
+    HeapTypeSetKey objectProperty = property(JSID_EMPTY);
     LifoAlloc *alloc = constraints->alloc();
 
     typedef CompilerConstraintInstance<ConstraintDataFreezeObjectFlags> T;
     constraints->add(alloc->new_<T>(alloc, objectProperty, ConstraintDataFreezeObjectFlags(flags)));
     return false;
 }
 
 bool
@@ -1292,17 +1292,17 @@ TypeObject::initialHeap(CompilerConstrai
     // changes.
 
     if (shouldPreTenure())
         return gc::TenuredHeap;
 
     if (!canPreTenure())
         return gc::DefaultHeap;
 
-    HeapTypeSetKey objectProperty = TypeObjectKey::get(this)->property(jsid::emptyId());
+    HeapTypeSetKey objectProperty = TypeObjectKey::get(this)->property(JSID_EMPTY);
     LifoAlloc *alloc = constraints->alloc();
 
     typedef CompilerConstraintInstance<ConstraintDataFreezeObjectFlags> T;
     constraints->add(alloc->new_<T>(alloc, objectProperty, ConstraintDataFreezeObjectFlags(OBJECT_FLAG_PRE_TENURE)));
 
     return gc::DefaultHeap;
 }
 
@@ -1399,55 +1399,55 @@ class ConstraintDataFreezeObjectForTyped
     }
 };
 
 } /* anonymous namespace */
 
 void
 TypeObjectKey::watchStateChangeForInlinedCall(CompilerConstraintList *constraints)
 {
-    HeapTypeSetKey objectProperty = property(jsid::emptyId());
+    HeapTypeSetKey objectProperty = property(JSID_EMPTY);
     LifoAlloc *alloc = constraints->alloc();
 
     typedef CompilerConstraintInstance<ConstraintDataFreezeObjectForInlinedCall> T;
     constraints->add(alloc->new_<T>(alloc, objectProperty, ConstraintDataFreezeObjectForInlinedCall()));
 }
 
 void
 TypeObjectKey::watchStateChangeForNewScriptTemplate(CompilerConstraintList *constraints)
 {
     JSObject *templateObject = asTypeObject()->newScript()->templateObject;
-    HeapTypeSetKey objectProperty = property(jsid::emptyId());
+    HeapTypeSetKey objectProperty = property(JSID_EMPTY);
     LifoAlloc *alloc = constraints->alloc();
 
     typedef CompilerConstraintInstance<ConstraintDataFreezeObjectForNewScriptTemplate> T;
     constraints->add(alloc->new_<T>(alloc, objectProperty,
                                     ConstraintDataFreezeObjectForNewScriptTemplate(templateObject)));
 }
 
 void
 TypeObjectKey::watchStateChangeForTypedArrayBuffer(CompilerConstraintList *constraints)
 {
     void *viewData = asSingleObject()->as<TypedArrayObject>().viewData();
-    HeapTypeSetKey objectProperty = property(jsid::emptyId());
+    HeapTypeSetKey objectProperty = property(JSID_EMPTY);
     LifoAlloc *alloc = constraints->alloc();
 
     typedef CompilerConstraintInstance<ConstraintDataFreezeObjectForTypedArrayBuffer> T;
     constraints->add(alloc->new_<T>(alloc, objectProperty,
                                     ConstraintDataFreezeObjectForTypedArrayBuffer(viewData)));
 }
 
 static void
 ObjectStateChange(ExclusiveContext *cxArg, TypeObject *object, bool markingUnknown)
 {
     if (object->unknownProperties())
         return;
 
     /* All constraints listening to state changes are on the empty id. */
-    HeapTypeSet *types = object->maybeGetProperty(jsid::emptyId());
+    HeapTypeSet *types = object->maybeGetProperty(JSID_EMPTY);
 
     /* Mark as unknown after getting the types, to avoid assertion. */
     if (markingUnknown) {
         AutoLockForCompilation lock(cxArg);
         object->addFlags(OBJECT_FLAG_DYNAMIC_MASK | OBJECT_FLAG_UNKNOWN_PROPERTIES);
     }
 
     if (types) {
@@ -1549,17 +1549,17 @@ TemporaryTypeSet::convertDoubleElements(
         if (!type)
             continue;
 
         if (type->unknownProperties()) {
             alwaysConvert = false;
             continue;
         }
 
-        HeapTypeSetKey property = type->property(jsid::voidId());
+        HeapTypeSetKey property = type->property(JSID_VOID);
         property.freeze(constraints);
 
         // We can't convert to double elements for objects which do not have
         // double in their element types (as the conversion may render the type
         // information incorrect), nor for non-array objects (as their elements
         // may point to emptyObjectElements, which cannot be converted).
         if (!property.maybeTypes() ||
             !property.maybeTypes()->hasType(Type::DoubleType()) ||
@@ -2028,17 +2028,17 @@ static inline bool
 PrototypeHasIndexedProperty(CompilerConstraintList *constraints, JSObject *obj)
 {
     do {
         TypeObjectKey *type = TypeObjectKey::get(obj);
         if (ClassCanHaveExtraProperties(type->clasp()))
             return true;
         if (type->unknownProperties())
             return true;
-        HeapTypeSetKey index = type->property(jsid::voidId());
+        HeapTypeSetKey index = type->property(JSID_VOID);
         if (index.configured(constraints) || index.isOwnProperty(constraints))
             return true;
         if (!obj->hasTenuredProto())
             return true;
         obj = obj->getProto();
     } while (obj);
 
     return false;
@@ -2359,17 +2359,17 @@ TypeCompartment::setTypeToHomogenousArra
         TypeObject *objType = newTypeObject(cx, &ArrayObject::class_, objProto);
         if (!objType) {
             cx->compartment()->types.setPendingNukeTypes(cx);
             return;
         }
         obj->setType(objType);
 
         if (!objType->unknownProperties())
-            objType->addPropertyType(cx, jsid::voidId(), elementType);
+            objType->addPropertyType(cx, JSID_VOID, elementType);
 
         key.proto = objProto;
         if (!p.add(*arrayTypeTable, key, objType)) {
             cx->compartment()->types.setPendingNukeTypes(cx);
             return;
         }
     }
 }
@@ -2709,17 +2709,17 @@ UpdatePropertyType(ExclusiveContext *cx,
     } else if (shape->hasDefaultGetter() && shape->hasSlot()) {
         if (!indexed && types->canSetDefinite(shape->slot()))
             types->setDefinite(shape->slot());
 
         const Value &value = obj->nativeGetSlot(shape->slot());
 
         /*
          * Don't add initial undefined types for properties of global objects
-         * that are not collated into the jsid::voidId() property (see propertySet
+         * that are not collated into the JSID_VOID property (see propertySet
          * comment).
          */
         if (indexed || !value.isUndefined() || !CanHaveEmptyPropertyTypesForOwnProperty(obj)) {
             Type type = GetValueType(value);
             if (!types->TypeSet::addType(type, &cx->typeLifoAlloc()))
                 cx->compartment()->types.setPendingNukeTypes(cx);
         }
     }
@@ -2865,17 +2865,17 @@ void
 TypeObject::addPropertyType(ExclusiveContext *cx, jsid id, const Value &value)
 {
     InlineAddTypeProperty(cx, this, id, GetValueType(value));
 }
 
 void
 TypeObject::addPropertyType(ExclusiveContext *cx, const char *name, Type type)
 {
-    jsid id = jsid::voidId();
+    jsid id = JSID_VOID;
     if (name) {
         JSAtom *atom = Atomize(cx, name, strlen(name));
         if (!atom) {
             AutoEnterAnalysis enter(cx);
             cx->compartment()->types.setPendingNukeTypes(cx);
             return;
         }
         id = AtomToId(atom);
@@ -2912,17 +2912,17 @@ TypeObject::isPropertyConfigured(jsid id
 
 void
 TypeObject::markStateChange(ExclusiveContext *cxArg)
 {
     if (unknownProperties())
         return;
 
     AutoEnterAnalysis enter(cxArg);
-    HeapTypeSet *types = maybeGetProperty(jsid::emptyId());
+    HeapTypeSet *types = maybeGetProperty(JSID_EMPTY);
     if (types) {
         if (JSContext *cx = cxArg->maybeJSContext()) {
             TypeConstraint *constraint = types->constraintList;
             while (constraint) {
                 constraint->newObjectState(cx, this);
                 constraint = constraint->next;
             }
         } else {
--- a/js/src/jsinfer.h
+++ b/js/src/jsinfer.h
@@ -325,17 +325,17 @@ public:
 
     /*
      * For constraints attached to an object property's type set, mark the
      * property as having been configured.
      */
     virtual void newPropertyState(JSContext *cx, TypeSet *source) {}
 
     /*
-     * For constraints attached to the jsid::emptyId() type set on an object,
+     * For constraints attached to the JSID_EMPTY type set on an object,
      * indicate a change in one of the object's dynamic property flags or other
      * state.
      */
     virtual void newObjectState(JSContext *cx, TypeObject *object) {}
 
     /*
      * If the data this constraint refers to is still live, copy it into the
      * zone's new allocator. Type constraints only hold weak references.
@@ -726,17 +726,17 @@ AddClearDefiniteFunctionUsesInScript(JSC
                                      JSScript *script, JSScript *calleeScript);
 
 /* Is this a reasonable PC to be doing inlining on? */
 inline bool isInlinableCall(jsbytecode *pc);
 
 /* Type information about a property. */
 struct Property
 {
-    /* Identifier for this property, jsid::voidId() for the aggregate integer index property. */
+    /* Identifier for this property, JSID_VOID for the aggregate integer index property. */
     HeapId id;
 
     /* Possible types for this property, including types inherited from prototypes. */
     HeapTypeSet types;
 
     Property(jsid id)
       : id(id)
     {}
@@ -1000,18 +1000,18 @@ struct TypeObject : gc::BarrieredCell<Ty
      * and the method has no effect.
      */
     bool addTypedObjectAddendum(JSContext *cx,
                                 TypeTypedObject::Kind kind ,
                                 TypeRepresentation *repr);
 
   private:
     /*
-     * Properties of this object. This may contain jsid::voidId(), representing the
-     * types of all integer indexes of the object, and/or jsid::emptyId(), holding
+     * Properties of this object. This may contain JSID_VOID, representing the
+     * types of all integer indexes of the object, and/or JSID_EMPTY, holding
      * constraints listening to changes to the object's state.
      *
      * The type sets in the properties of a type object describe the possible
      * values that can be read out of that property in actual JS objects.
      * Properties only account for native properties (those with a slot and no
      * specialized getter hook) and the elements of dense arrays. For accesses
      * on such properties, the correspondence is as follows:
      *
@@ -1376,17 +1376,17 @@ class HeapTypeSetKey
     TypeObjectKey *object_;
     jsid id_;
 
     // If instantiated, the underlying heap type set.
     HeapTypeSet *maybeTypes_;
 
   public:
     HeapTypeSetKey()
-      : object_(nullptr), id_(jsid::emptyId()), maybeTypes_(nullptr)
+      : object_(nullptr), id_(JSID_EMPTY), maybeTypes_(nullptr)
     {}
 
     TypeObjectKey *object() const { return object_; }
     jsid id() const { return id_; }
     HeapTypeSet *maybeTypes() const { return maybeTypes_; }
 
     bool instantiate(JSContext *cx);
 
--- a/js/src/jsinferinlines.h
+++ b/js/src/jsinferinlines.h
@@ -165,36 +165,36 @@ IdToTypeId(jsid id)
 {
     JS_ASSERT(!JSID_IS_EMPTY(id));
 
     /*
      * All integers must map to the aggregate property for index types, including
      * negative integers.
      */
     if (JSID_IS_INT(id))
-        return jsid::voidId();
+        return JSID_VOID;
 
     /*
      * Check for numeric strings, as in js_StringIsIndex, but allow negative
      * and overflowing integers.
      */
     if (JSID_IS_STRING(id)) {
         JSFlatString *str = JSID_TO_FLAT_STRING(id);
         JS::TwoByteChars cp = str->range();
         if (cp.length() > 0 && (JS7_ISDEC(cp[0]) || cp[0] == '-')) {
             for (size_t i = 1; i < cp.length(); ++i) {
                 if (!JS7_ISDEC(cp[i]))
                     return id;
             }
-            return jsid::voidId();
+            return JSID_VOID;
         }
         return id;
     }
 
-    return jsid::voidId();
+    return JSID_VOID;
 }
 
 const char * TypeIdStringImpl(jsid id);
 
 /* Convert an id for printing during debug. */
 static inline const char *
 TypeIdString(jsid id)
 {
--- a/js/src/jsobjinlines.h
+++ b/js/src/jsobjinlines.h
@@ -148,40 +148,40 @@ JSObject::setShouldConvertDoubleElements
 {
     JS_ASSERT(is<js::ArrayObject>() && !hasEmptyElements());
     getElementsHeader()->setShouldConvertDoubleElements();
 }
 
 inline bool
 JSObject::setDenseElementIfHasType(uint32_t index, const js::Value &val)
 {
-    if (!js::types::HasTypePropertyId(this, jsid::voidId(), val))
+    if (!js::types::HasTypePropertyId(this, JSID_VOID, val))
         return false;
     setDenseElementMaybeConvertDouble(index, val);
     return true;
 }
 
 inline void
 JSObject::setDenseElementWithType(js::ExclusiveContext *cx, uint32_t index,
                                   const js::Value &val)
 {
     // Avoid a slow AddTypePropertyId call if the type is the same as the type
     // of the previous element.
     js::types::Type thisType = js::types::GetValueType(val);
     if (index == 0 || js::types::GetValueType(elements[index - 1]) != thisType)
-        js::types::AddTypePropertyId(cx, this, jsid::voidId(), thisType);
+        js::types::AddTypePropertyId(cx, this, JSID_VOID, thisType);
     setDenseElementMaybeConvertDouble(index, val);
 }
 
 inline void
 JSObject::initDenseElementWithType(js::ExclusiveContext *cx, uint32_t index,
                                    const js::Value &val)
 {
     JS_ASSERT(!shouldConvertDoubleElements());
-    js::types::AddTypePropertyId(cx, this, jsid::voidId(), val);
+    js::types::AddTypePropertyId(cx, this, JSID_VOID, val);
     initDenseElement(index, val);
 }
 
 inline void
 JSObject::setDenseElementHole(js::ExclusiveContext *cx, uint32_t index)
 {
     js::types::MarkTypeObjectFlags(cx, this, js::types::OBJECT_FLAG_NON_PACKED);
     setDenseElement(index, js::MagicValue(JS_ELEMENTS_HOLE));
--- a/js/src/jsproxy.cpp
+++ b/js/src/jsproxy.cpp
@@ -221,17 +221,17 @@ BaseProxyHandler::set(JSContext *cx, Han
     desc.setGetter(nullptr);
     desc.setSetter(nullptr); // Pick up the class getter/setter.
     return defineProperty(cx, receiver, id, &desc);
 }
 
 bool
 BaseProxyHandler::keys(JSContext *cx, HandleObject proxy, AutoIdVector &props)
 {
-    assertEnteredPolicy(cx, proxy, jsid::voidId());
+    assertEnteredPolicy(cx, proxy, JSID_VOID);
     JS_ASSERT(props.length() == 0);
 
     if (!getOwnPropertyNames(cx, proxy, props))
         return false;
 
     /* Select only the enumerable properties through in-place iteration. */
     Rooted<PropertyDescriptor> desc(cx);
     RootedId id(cx);
@@ -250,17 +250,17 @@ BaseProxyHandler::keys(JSContext *cx, Ha
     props.resize(i);
 
     return true;
 }
 
 bool
 BaseProxyHandler::iterate(JSContext *cx, HandleObject proxy, unsigned flags, MutableHandleValue vp)
 {
-    assertEnteredPolicy(cx, proxy, jsid::voidId());
+    assertEnteredPolicy(cx, proxy, JSID_VOID);
 
     AutoIdVector props(cx);
     if ((flags & JSITER_OWNONLY)
         ? !keys(cx, proxy, props)
         : !enumerate(cx, proxy, props)) {
         return false;
     }
 
@@ -313,17 +313,17 @@ BaseProxyHandler::nativeCall(JSContext *
 {
     ReportIncompatible(cx, args);
     return false;
 }
 
 bool
 BaseProxyHandler::hasInstance(JSContext *cx, HandleObject proxy, MutableHandleValue v, bool *bp)
 {
-    assertEnteredPolicy(cx, proxy, jsid::voidId());
+    assertEnteredPolicy(cx, proxy, JSID_VOID);
     RootedValue val(cx, ObjectValue(*proxy.get()));
     js_ReportValueError(cx, JSMSG_BAD_INSTANCEOF_RHS,
                         JSDVG_SEARCH_STACK, val, NullPtr());
     return false;
 }
 
 bool
 BaseProxyHandler::objectClassIs(HandleObject proxy, ESClassValue classValue, JSContext *cx)
@@ -371,17 +371,17 @@ BaseProxyHandler::unwatch(JSContext *cx,
 {
     return true;
 }
 
 bool
 BaseProxyHandler::slice(JSContext *cx, HandleObject proxy, uint32_t begin, uint32_t end,
                         HandleObject result)
 {
-    assertEnteredPolicy(cx, proxy, jsid::voidId());
+    assertEnteredPolicy(cx, proxy, JSID_VOID);
 
     RootedId id(cx);
     RootedValue value(cx);
     for (uint32_t index = begin; index < end; index++) {
         if (!IndexToId(cx, index, id.address()))
             return false;
 
         bool present;
@@ -446,51 +446,51 @@ DirectProxyHandler::defineProperty(JSCon
     return CheckDefineProperty(cx, target, id, v, desc.getter(), desc.setter(), desc.attributes()) &&
            JS_DefinePropertyById(cx, target, id, v, desc.getter(), desc.setter(), desc.attributes());
 }
 
 bool
 DirectProxyHandler::getOwnPropertyNames(JSContext *cx, HandleObject proxy,
                                         AutoIdVector &props)
 {
-    assertEnteredPolicy(cx, proxy, jsid::voidId());
+    assertEnteredPolicy(cx, proxy, JSID_VOID);
     RootedObject target(cx, proxy->as<ProxyObject>().target());
     return GetPropertyNames(cx, target, JSITER_OWNONLY | JSITER_HIDDEN, &props);
 }
 
 bool
 DirectProxyHandler::delete_(JSContext *cx, HandleObject proxy, HandleId id, bool *bp)
 {
     assertEnteredPolicy(cx, proxy, id);
     RootedObject target(cx, proxy->as<ProxyObject>().target());
     return JS_DeletePropertyById2(cx, target, id, bp);
 }
 
 bool
 DirectProxyHandler::enumerate(JSContext *cx, HandleObject proxy,
                               AutoIdVector &props)
 {
-    assertEnteredPolicy(cx, proxy, jsid::voidId());
+    assertEnteredPolicy(cx, proxy, JSID_VOID);
     JS_ASSERT(!hasPrototype()); // Should never be called if there's a prototype.
     RootedObject target(cx, proxy->as<ProxyObject>().target());
     return GetPropertyNames(cx, target, 0, &props);
 }
 
 bool
 DirectProxyHandler::call(JSContext *cx, HandleObject proxy, const CallArgs &args)
 {
-    assertEnteredPolicy(cx, proxy, jsid::voidId());
+    assertEnteredPolicy(cx, proxy, JSID_VOID);
     RootedValue target(cx, proxy->as<ProxyObject>().private_());
     return Invoke(cx, args.thisv(), target, args.length(), args.array(), args.rval());
 }
 
 bool
 DirectProxyHandler::construct(JSContext *cx, HandleObject proxy, const CallArgs &args)
 {
-    assertEnteredPolicy(cx, proxy, jsid::voidId());
+    assertEnteredPolicy(cx, proxy, JSID_VOID);
     RootedValue target(cx, proxy->as<ProxyObject>().private_());
     return InvokeConstructor(cx, target, args.length(), args.array(), args.rval().address());
 }
 
 bool
 DirectProxyHandler::nativeCall(JSContext *cx, IsAcceptableThis test, NativeImpl impl,
                                CallArgs args)
 {
@@ -502,17 +502,17 @@ DirectProxyHandler::nativeCall(JSContext
 
     return CallNativeImpl(cx, impl, args);
 }
 
 bool
 DirectProxyHandler::hasInstance(JSContext *cx, HandleObject proxy, MutableHandleValue v,
                                 bool *bp)
 {
-    assertEnteredPolicy(cx, proxy, jsid::voidId());
+    assertEnteredPolicy(cx, proxy, JSID_VOID);
     bool b;
     RootedObject target(cx, proxy->as<ProxyObject>().target());
     if (!JS_HasInstance(cx, target, v, &b))
         return false;
     *bp = !!b;
     return true;
 }
 
@@ -536,26 +536,26 @@ DirectProxyHandler::objectClassIs(Handle
 {
     RootedObject target(cx, proxy->as<ProxyObject>().target());
     return ObjectClassIs(target, classValue, cx);
 }
 
 const char *
 DirectProxyHandler::className(JSContext *cx, HandleObject proxy)
 {
-    assertEnteredPolicy(cx, proxy, jsid::voidId());
+    assertEnteredPolicy(cx, proxy, JSID_VOID);
     RootedObject target(cx, proxy->as<ProxyObject>().target());
     return JSObject::className(cx, target);
 }
 
 JSString *
 DirectProxyHandler::fun_toString(JSContext *cx, HandleObject proxy,
                                  unsigned indent)
 {
-    assertEnteredPolicy(cx, proxy, jsid::voidId());
+    assertEnteredPolicy(cx, proxy, JSID_VOID);
     RootedObject target(cx, proxy->as<ProxyObject>().target());
     return fun_toStringHelper(cx, target, indent);
 }
 
 bool
 DirectProxyHandler::regexp_toShared(JSContext *cx, HandleObject proxy,
                                     RegExpGuard *g)
 {
@@ -615,26 +615,26 @@ DirectProxyHandler::set(JSContext *cx, H
     assertEnteredPolicy(cx, proxy, id);
     RootedObject target(cx, proxy->as<ProxyObject>().target());
     return JSObject::setGeneric(cx, target, receiver, id, vp, strict);
 }
 
 bool
 DirectProxyHandler::keys(JSContext *cx, HandleObject proxy, AutoIdVector &props)
 {
-    assertEnteredPolicy(cx, proxy, jsid::voidId());
+    assertEnteredPolicy(cx, proxy, JSID_VOID);
     RootedObject target(cx, proxy->as<ProxyObject>().target());
     return GetPropertyNames(cx, target, JSITER_OWNONLY, &props);
 }
 
 bool
 DirectProxyHandler::iterate(JSContext *cx, HandleObject proxy, unsigned flags,
                             MutableHandleValue vp)
 {
-    assertEnteredPolicy(cx, proxy, jsid::voidId());
+    assertEnteredPolicy(cx, proxy, JSID_VOID);
     JS_ASSERT(!hasPrototype()); // Should never be called if there's a prototype.
     RootedObject target(cx, proxy->as<ProxyObject>().target());
     return GetIterator(cx, target, flags, vp);
 }
 
 bool
 DirectProxyHandler::isExtensible(JSContext *cx, HandleObject proxy, bool *extensible)
 {
@@ -1041,28 +1041,28 @@ ScriptedIndirectProxyHandler::iterate(JS
         return BaseProxyHandler::iterate(cx, proxy, flags, vp);
     return Trap(cx, handler, value, 0, nullptr, vp) &&
            ReturnedValueMustNotBePrimitive(cx, proxy, cx->names().iterate, vp);
 }
 
 bool
 ScriptedIndirectProxyHandler::call(JSContext *cx, HandleObject proxy, const CallArgs &args)
 {
-    assertEnteredPolicy(cx, proxy, jsid::voidId());
+    assertEnteredPolicy(cx, proxy, JSID_VOID);
     RootedObject ccHolder(cx, &proxy->as<ProxyObject>().extra(0).toObject());
     JS_ASSERT(ccHolder->getClass() == &CallConstructHolder);
     RootedValue call(cx, ccHolder->getReservedSlot(0));
     JS_ASSERT(call.isObject() && call.toObject().isCallable());
     return Invoke(cx, args.thisv(), call, args.length(), args.array(), args.rval());
 }
 
 bool
 ScriptedIndirectProxyHandler::construct(JSContext *cx, HandleObject proxy, const CallArgs &args)
 {
-    assertEnteredPolicy(cx, proxy, jsid::voidId());
+    assertEnteredPolicy(cx, proxy, JSID_VOID);
     RootedObject ccHolder(cx, &proxy->as<ProxyObject>().extra(0).toObject());
     JS_ASSERT(ccHolder->getClass() == &CallConstructHolder);
     RootedValue construct(cx, ccHolder->getReservedSlot(1));
     JS_ASSERT(construct.isObject() && construct.toObject().isCallable());
     return InvokeConstructor(cx, construct, args.length(), args.array(),
                              args.rval().address());
 }
 
@@ -1071,17 +1071,17 @@ ScriptedIndirectProxyHandler::nativeCall
                                          CallArgs args)
 {
     return BaseProxyHandler::nativeCall(cx, test, impl, args);
 }
 
 JSString *
 ScriptedIndirectProxyHandler::fun_toString(JSContext *cx, HandleObject proxy, unsigned indent)
 {
-    assertEnteredPolicy(cx, proxy, jsid::voidId());
+    assertEnteredPolicy(cx, proxy, JSID_VOID);
     if (!proxy->isCallable()) {
         JS_ReportErrorNumber(cx, js_GetErrorMessage, nullptr,
                              JSMSG_INCOMPATIBLE_PROTO,
                              js_Function_str, js_toString_str,
                              "object");
         return nullptr;
     }
     RootedObject obj(cx, &proxy->as<ProxyObject>().extra(0).toObject().getReservedSlot(0).toObject());
--- a/js/src/jsproxy.h
+++ b/js/src/jsproxy.h
@@ -125,17 +125,17 @@ class JS_FRIEND_API(BaseProxyHandler)
          */
         return true;
     }
 
     /* Policy enforcement traps.
      *
      * enter() allows the policy to specify whether the caller may perform |act|
      * on the proxy's |id| property. In the case when |act| is CALL, |id| is
-     * generally jsid::voidId().
+     * generally JSID_VOID.
      *
      * The |act| parameter to enter() specifies the action being performed.
      * If |bp| is false, the trap suggests that the caller throw (though it
      * may still decide to squelch the error).
      */
     enum Action {
         GET,
         SET,
--- a/js/src/vm/Debugger.cpp
+++ b/js/src/vm/Debugger.cpp
@@ -4991,17 +4991,17 @@ DebuggerObject_defineProperties(JSContex
     {
         AutoIdVector rewrappedIds(cx);
         AutoPropDescArrayRooter rewrappedDescs(cx);
 
         Maybe<AutoCompartment> ac;
         ac.construct(cx, obj);
         RootedId id(cx);
         for (size_t i = 0; i < n; i++) {
-            if (!rewrappedIds.append(jsid::voidId()) || !rewrappedDescs.append())
+            if (!rewrappedIds.append(JSID_VOID) || !rewrappedDescs.append())
                 return false;
             id = ids[i];
             if (!unwrappedDescs[i].wrapInto(cx, obj, id, &rewrappedIds[i], &rewrappedDescs[i]))
                 return false;
         }
 
         ErrorCopier ec(ac, dbg->toJSObject());
         for (size_t i = 0; i < n; i++) {
--- a/js/src/vm/Id.cpp
+++ b/js/src/vm/Id.cpp
@@ -2,14 +2,16 @@
  * 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 "js/Id.h"
 #include "js/RootingAPI.h"
 
-static MOZ_CONSTEXPR_VAR jsid voidIdValue = jsid::voidId();
-static MOZ_CONSTEXPR_VAR jsid emptyIdValue = jsid::emptyId();
+const jsid JSID_VOID  = { size_t(JSID_TYPE_VOID) };
+const jsid JSID_EMPTY = { size_t(JSID_TYPE_OBJECT) };
 
+static const jsid voidIdValue = JSID_VOID;
+static const jsid emptyIdValue = JSID_EMPTY;
 const JS::HandleId JSID_VOIDHANDLE = JS::HandleId::fromMarkedLocation(&voidIdValue);
 const JS::HandleId JSID_EMPTYHANDLE = JS::HandleId::fromMarkedLocation(&emptyIdValue);
 
--- a/js/src/vm/Shape.cpp
+++ b/js/src/vm/Shape.cpp
@@ -683,17 +683,17 @@ js::NewReshapedObject(JSContext *cx, Han
 
     if (shape->isEmptyShape())
         return res;
 
     /* Get all the ids in the object, in order. */
     js::AutoIdVector ids(cx);
     {
         for (unsigned i = 0; i <= shape->slot(); i++) {
-            if (!ids.append(jsid::voidId()))
+            if (!ids.append(JSID_VOID))
                 return nullptr;
         }
         Shape *nshape = shape;
         while (!nshape->isEmptyShape()) {
             ids[nshape->slot()] = nshape->propid();
             nshape = nshape->previous();
         }
     }
--- a/js/src/vm/Shape.h
+++ b/js/src/vm/Shape.h
@@ -1589,17 +1589,17 @@ Shape::Shape(const StackShape &other, ui
     parent(nullptr)
 {
     kids.setNull();
 }
 
 inline
 Shape::Shape(UnownedBaseShape *base, uint32_t nfixed)
   : base_(base),
-    propid_(jsid::emptyId()),
+    propid_(JSID_EMPTY),
     slotInfo(SHAPE_INVALID_SLOT | (nfixed << FIXED_SLOTS_SHIFT)),
     attrs(JSPROP_SHARED),
     flags(0),
     shortid_(0),
     parent(nullptr)
 {
     JS_ASSERT(base);
     kids.setNull();
--- a/js/src/vm/String.h
+++ b/js/src/vm/String.h
@@ -952,17 +952,17 @@ class StaticStrings
  *
  * To more concretely illustrate the utility of PropertyName, consider that it
  * is used to partition, in a type-safe manner, the ways to refer to a
  * property, as follows:
  *
  *   - uint32_t indexes,
  *   - PropertyName strings which don't encode uint32_t indexes, and
  *   - jsspecial special properties (non-ES5 properties like object-valued
- *     jsids, EmptyId(), VoidId(), and maybe in the future Harmony-proposed
+ *     jsids, JSID_EMPTY, JSID_VOID, and maybe in the future Harmony-proposed
  *     private names).
  */
 class PropertyName : public JSAtom
 {};
 
 JS_STATIC_ASSERT(sizeof(PropertyName) == sizeof(JSString));
 
 static JS_ALWAYS_INLINE jsid
--- a/js/src/vm/StructuredClone.cpp
+++ b/js/src/vm/StructuredClone.cpp
@@ -1451,17 +1451,17 @@ JSStructuredCloneReader::readId(jsid *id
             return false;
         JSAtom *atom = AtomizeString(context(), str);
         if (!atom)
             return false;
         *idp = NON_INTEGER_ATOM_TO_JSID(atom);
         return true;
     }
     if (tag == SCTAG_NULL) {
-        *idp = jsid::voidId();
+        *idp = JSID_VOID;
         return true;
     }
     JS_ReportErrorNumber(context(), js_GetErrorMessage, nullptr,
                          JSMSG_SC_BAD_SERIALIZED_DATA, "id");
     return false;
 }
 
 bool
--- a/js/xpconnect/src/XPCCallContext.cpp
+++ b/js/xpconnect/src/XPCCallContext.cpp
@@ -15,17 +15,17 @@ using namespace xpc;
 using namespace JS;
 
 #define IS_TEAROFF_CLASS(clazz) ((clazz) == &XPC_WN_Tearoff_JSClass)
 
 XPCCallContext::XPCCallContext(XPCContext::LangType callerLanguage,
                                JSContext* cx       /* = GetDefaultJSContext() */,
                                HandleObject obj    /* = nullptr               */,
                                HandleObject funobj /* = nullptr               */,
-                               HandleId name       /* = jsid::voidId()        */,
+                               HandleId name       /* = JSID_VOID             */,
                                unsigned argc       /* = NO_ARGS               */,
                                jsval *argv         /* = nullptr               */,
                                jsval *rval         /* = nullptr               */)
     :   mPusher(cx),
         mState(INIT_FAILED),
         mXPC(nsXPConnect::XPConnect()),
         mXPCContext(nullptr),
         mJSContext(cx),
--- a/js/xpconnect/src/XPCJSRuntime.cpp
+++ b/js/xpconnect/src/XPCJSRuntime.cpp
@@ -2903,17 +2903,17 @@ class XPCJSSourceHook: public js::Source
     }
 };
 
 XPCJSRuntime::XPCJSRuntime(nsXPConnect* aXPConnect)
    : CycleCollectedJSRuntime(32L * 1024L * 1024L, JS_USE_HELPER_THREADS),
    mJSContextStack(new XPCJSContextStack()),
    mCallContext(nullptr),
    mAutoRoots(nullptr),
-   mResolveName(jsid::voidId()),
+   mResolveName(JSID_VOID),
    mResolvingWrapper(nullptr),
    mWrappedJSMap(JSObject2WrappedJSMap::newMap(XPC_JS_MAP_SIZE)),
    mWrappedJSClassMap(IID2WrappedJSClassMap::newMap(XPC_JS_CLASS_MAP_SIZE)),
    mIID2NativeInterfaceMap(IID2NativeInterfaceMap::newMap(XPC_NATIVE_INTERFACE_MAP_SIZE)),
    mClassInfo2NativeSetMap(ClassInfo2NativeSetMap::newMap(XPC_NATIVE_SET_MAP_SIZE)),
    mNativeSetMap(NativeSetMap::newMap(XPC_NATIVE_SET_MAP_SIZE)),
    mThisTranslatorMap(IID2ThisTranslatorMap::newMap(XPC_THIS_TRANSLATOR_MAP_SIZE)),
    mNativeScriptableSharedMap(XPCNativeScriptableSharedMap::newMap(XPC_NATIVE_JSCLASS_MAP_SIZE)),
@@ -2928,17 +2928,17 @@ XPCJSRuntime::XPCJSRuntime(nsXPConnect* 
    mObjectHolderRoots(nullptr),
    mWatchdogManager(new WatchdogManager(MOZ_THIS_IN_INITIALIZER_LIST())),
    mJunkScope(nullptr),
    mAsyncSnowWhiteFreer(new AsyncFreeSnowWhite())
 {
     DOM_InitInterfaces();
 
     // these jsids filled in later when we have a JSContext to work with.
-    mStrIDs[0] = jsid::voidId();
+    mStrIDs[0] = JSID_VOID;
 
     MOZ_ASSERT(Runtime());
     JSRuntime* runtime = Runtime();
 
     auto rtPrivate = new PerThreadAtomCache();
     memset(rtPrivate, 0, sizeof(PerThreadAtomCache));
     JS_SetRuntimePrivate(runtime, rtPrivate);
 
@@ -3129,17 +3129,17 @@ XPCJSRuntime::OnJSContextNew(JSContext *
     JSAutoRequest ar(cx);
 
     // if it is our first context then we need to generate our string ids
     if (JSID_IS_VOID(mStrIDs[0])) {
         RootedString str(cx);
         for (unsigned i = 0; i < IDX_TOTAL_COUNT; i++) {
             str = JS_InternString(cx, mStrings[i]);
             if (!str) {
-                mStrIDs[0] = jsid::voidId();
+                mStrIDs[0] = JSID_VOID;
                 return false;
             }
             mStrIDs[i] = INTERNED_STRING_TO_JSID(cx, str);
             mStrJSVals[i] = STRING_TO_JSVAL(str);
         }
 
         if (!mozilla::dom::DefineStaticJSVals(cx) ||
             !InternStaticDictionaryJSVals(cx)) {
--- a/js/xpconnect/src/XPCQuickStubs.cpp
+++ b/js/xpconnect/src/XPCQuickStubs.cpp
@@ -204,17 +204,17 @@ GetMemberInfo(JSObject *obj, jsid member
 
 static void
 GetMethodInfo(JSContext *cx, jsval *vp, const char **ifaceNamep, jsid *memberIdp)
 {
     RootedObject funobj(cx, JSVAL_TO_OBJECT(JS_CALLEE(cx, vp)));
     MOZ_ASSERT(JS_ObjectIsFunction(cx, funobj),
                "JSNative callee should be Function object");
     RootedString str(cx, JS_GetFunctionId(JS_GetObjectFunction(funobj)));
-    RootedId methodId(cx, str ? INTERNED_STRING_TO_JSID(cx, str) : jsid::voidId());
+    RootedId methodId(cx, str ? INTERNED_STRING_TO_JSID(cx, str) : JSID_VOID);
     GetMemberInfo(JSVAL_TO_OBJECT(vp[1]), methodId, ifaceNamep);
     *memberIdp = methodId;
 }
 
 static bool
 ThrowCallFailed(JSContext *cx, nsresult rv,
                 const char *ifaceName, HandleId memberId, const char *memberName)
 {
@@ -348,17 +348,17 @@ xpc_qsThrowBadArgWithCcx(XPCCallContext 
 {
     XPCThrower::ThrowBadParam(rv, paramnum, ccx);
 }
 
 void
 xpc_qsThrowBadArgWithDetails(JSContext *cx, nsresult rv, unsigned paramnum,
                              const char *ifaceName, const char *memberName)
 {
-    ThrowBadArg(cx, rv, ifaceName, jsid::voidId(), memberName, paramnum);
+    ThrowBadArg(cx, rv, ifaceName, JSID_VOID, memberName, paramnum);
 }
 
 void
 xpc_qsThrowBadSetterValue(JSContext *cx, nsresult rv,
                           JSObject *obj, jsid propIdArg)
 {
     RootedId propId(cx, propIdArg);
     const char *ifaceName;
--- a/js/xpconnect/src/dictionary_helper_gen.py
+++ b/js/xpconnect/src/dictionary_helper_gen.py
@@ -191,17 +191,17 @@ def print_cpp_file(fd, conf):
     
     for c in includes:
       if not c in conf.exclude_automatic_type_include:
             fd.write("#include \"%s.h\"\n" % c)
 
     fd.write("\nusing namespace mozilla::idl;\n\n")
 
     for a in attrnames:
-        fd.write("static jsid %s = jsid::voidId();\n"% get_jsid(a))
+        fd.write("static jsid %s = JSID_VOID;\n"% get_jsid(a))
 
     fd.write("\n"
              "static bool\n"
              "InternStaticJSVal(JSContext* aCx, jsid &id, const char* aString)\n"
              "{\n"
              "  if (JSString* str = JS_InternString(aCx, aString)) {\n"
              "    id = INTERNED_STRING_TO_JSID(aCx, str);\n"
              "    return true;\n"
--- a/js/xpconnect/src/xpcprivate.h
+++ b/js/xpconnect/src/xpcprivate.h
@@ -3443,30 +3443,30 @@ protected:
     bool ParseGlobalProperties();
 };
 
 class MOZ_STACK_CLASS CreateObjectInOptions : public OptionsBase {
 public:
     CreateObjectInOptions(JSContext *cx = xpc_GetSafeJSContext(),
                           JSObject* options = nullptr)
         : OptionsBase(cx, options)
-        , defineAs(cx, jsid::voidId())
+        , defineAs(cx, JSID_VOID)
     { }
 
     virtual bool Parse() { return ParseId("defineAs", &defineAs); };
 
     JS::RootedId defineAs;
 };
 
 class MOZ_STACK_CLASS ExportOptions : public OptionsBase {
 public:
     ExportOptions(JSContext *cx = xpc_GetSafeJSContext(),
                   JSObject* options = nullptr)
         : OptionsBase(cx, options)
-        , defineAs(cx, jsid::voidId())
+        , defineAs(cx, JSID_VOID)
     { }
 
     virtual bool Parse() { return ParseId("defineAs", &defineAs); };
 
     JS::RootedId defineAs;
 };
 
 JSObject *
--- a/js/xpconnect/wrappers/AccessCheck.cpp
+++ b/js/xpconnect/wrappers/AccessCheck.cpp
@@ -212,22 +212,22 @@ AccessCheck::isCrossOriginAccessPermitte
 
     if (act == Wrapper::CALL)
         return false;
 
     RootedId id(cx, idArg);
     RootedObject wrapper(cx, wrapperArg);
     RootedObject obj(cx, Wrapper::wrappedObject(wrapper));
 
-    // Enumerate-like operations pass jsid::voidId() to |enter|, since there isn't
+    // Enumerate-like operations pass JSID_VOID to |enter|, since there isn't
     // another sane value to pass. For XOWs, we generally want to deny such
     // operations but fail silently (see CrossOriginAccessiblePropertiesOnly::
     // deny). We could just fall through here and rely on the fact that none
-    // of the whitelisted properties below will match jsid::voidId(), but EIBTI.
-    if (id == jsid::voidId())
+    // of the whitelisted properties below will match JSID_VOID, but EIBTI.
+    if (id == JSID_VOID)
         return false;
 
     const char *name;
     const js::Class *clasp = js::GetObjectClass(obj);
     MOZ_ASSERT(Jsvalify(clasp) != &XrayUtils::HolderClass, "shouldn't have a holder here");
     if (clasp->ext.innerObject)
         name = "Window";
     else
@@ -310,17 +310,17 @@ ExposedPropertiesOnly::check(JSContext *
         return true; // Allow
     }
 
     // If no __exposedProps__ existed, deny access.
     if (!found) {
         return false;
     }
 
-    if (id == jsid::voidId())
+    if (id == JSID_VOID)
         return true;
 
     RootedValue exposedProps(cx);
     if (!JS_LookupPropertyById(cx, wrappedObject, exposedPropsId, &exposedProps))
         return false;
 
     if (exposedProps.isNullOrUndefined())
         return false;
--- a/js/xpconnect/wrappers/ChromeObjectWrapper.cpp
+++ b/js/xpconnect/wrappers/ChromeObjectWrapper.cpp
@@ -173,17 +173,17 @@ bool
 ChromeObjectWrapper::enter(JSContext *cx, HandleObject wrapper,
                            HandleId id, js::Wrapper::Action act, bool *bp)
 {
     if (AllowedByBase(cx, wrapper, id, act))
         return true;
     // COWs fail silently for GETs, and that also happens to be the only case
     // where we might want to redirect the lookup to the home prototype chain.
     *bp = (act == Wrapper::GET);
-    if (!*bp || id == jsid::voidId())
+    if (!*bp || id == JSID_VOID)
         return false;
 
     // Note that PropIsFromStandardPrototype needs to invoke getPropertyDescriptor
     // before we've fully entered the policy. Waive our policy.
     js::AutoWaivePolicy policy(cx, wrapper, id);
     return PropIsFromStandardPrototype(cx, wrapper, id);
 }
 
--- a/js/xpconnect/wrappers/FilteringWrapper.cpp
+++ b/js/xpconnect/wrappers/FilteringWrapper.cpp
@@ -82,47 +82,47 @@ FilteringWrapper<Base, Policy>::getOwnPr
     return FilterSetter<Policy>(cx, wrapper, id, desc);
 }
 
 template <typename Base, typename Policy>
 bool
 FilteringWrapper<Base, Policy>::getOwnPropertyNames(JSContext *cx, HandleObject wrapper,
                                                     AutoIdVector &props)
 {
-    assertEnteredPolicy(cx, wrapper, jsid::voidId());
+    assertEnteredPolicy(cx, wrapper, JSID_VOID);
     return Base::getOwnPropertyNames(cx, wrapper, props) &&
            Filter<Policy>(cx, wrapper, props);
 }
 
 template <typename Base, typename Policy>
 bool
 FilteringWrapper<Base, Policy>::enumerate(JSContext *cx, HandleObject wrapper,
                                           AutoIdVector &props)
 {
-    assertEnteredPolicy(cx, wrapper, jsid::voidId());
+    assertEnteredPolicy(cx, wrapper, JSID_VOID);
     return Base::enumerate(cx, wrapper, props) &&
            Filter<Policy>(cx, wrapper, props);
 }
 
 template <typename Base, typename Policy>
 bool
 FilteringWrapper<Base, Policy>::keys(JSContext *cx, HandleObject wrapper,
                                      AutoIdVector &props)
 {
-    assertEnteredPolicy(cx, wrapper, jsid::voidId());
+    assertEnteredPolicy(cx, wrapper, JSID_VOID);
     return Base::keys(cx, wrapper, props) &&
            Filter<Policy>(cx, wrapper, props);
 }
 
 template <typename Base, typename Policy>
 bool
 FilteringWrapper<Base, Policy>::iterate(JSContext *cx, HandleObject wrapper,
                                         unsigned flags, MutableHandleValue vp)
 {
-    assertEnteredPolicy(cx, wrapper, jsid::voidId());
+    assertEnteredPolicy(cx, wrapper, JSID_VOID);
     // We refuse to trigger the iterator hook across chrome wrappers because
     // we don't know how to censor custom iterator objects. Instead we trigger
     // the default proxy iterate trap, which will ask enumerate() for the list
     // of (censored) ids.
     return js::BaseProxyHandler::iterate(cx, wrapper, flags, vp);
 }
 
 template <typename Base, typename Policy>
--- a/js/xpconnect/wrappers/XrayWrapper.cpp
+++ b/js/xpconnect/wrappers/XrayWrapper.cpp
@@ -1643,17 +1643,17 @@ XrayWrapper<Base, Traits>::definePropert
                                  wrappedDesc.get().attrs);
 }
 
 template <typename Base, typename Traits>
 bool
 XrayWrapper<Base, Traits>::getOwnPropertyNames(JSContext *cx, HandleObject wrapper,
                                                AutoIdVector &props)
 {
-    assertEnteredPolicy(cx, wrapper, jsid::voidId());
+    assertEnteredPolicy(cx, wrapper, JSID_VOID);
     return enumerate(cx, wrapper, JSITER_OWNONLY | JSITER_HIDDEN, props);
 }
 
 template <typename Base, typename Traits>
 bool
 XrayWrapper<Base, Traits>::delete_(JSContext *cx, HandleObject wrapper,
                                    HandleId id, bool *bp)
 {
@@ -1670,17 +1670,17 @@ XrayWrapper<Base, Traits>::delete_(JSCon
     return true;
 }
 
 template <typename Base, typename Traits>
 bool
 XrayWrapper<Base, Traits>::enumerate(JSContext *cx, HandleObject wrapper, unsigned flags,
                                      AutoIdVector &props)
 {
-    assertEnteredPolicy(cx, wrapper, jsid::voidId());
+    assertEnteredPolicy(cx, wrapper, JSID_VOID);
     if (!AccessCheck::wrapperSubsumes(wrapper)) {
         JS_ReportError(cx, "Not allowed to enumerate cross origin objects");
         return false;
     }
 
     // Enumerate expando properties first. Note that the expando object lives
     // in the target compartment.
     RootedObject target(cx, Traits::singleton.getTargetObject(wrapper));
@@ -1763,25 +1763,25 @@ XrayWrapper<Base, Traits>::iterate(JSCon
     // Skip our Base if it isn't already ProxyHandler.
     return js::BaseProxyHandler::iterate(cx, wrapper, flags, vp);
 }
 
 template <typename Base, typename Traits>
 bool
 XrayWrapper<Base, Traits>::call(JSContext *cx, HandleObject wrapper, const JS::CallArgs &args)
 {
-    assertEnteredPolicy(cx, wrapper, jsid::voidId());
+    assertEnteredPolicy(cx, wrapper, JSID_VOID);
     return Traits::call(cx, wrapper, args, Base::singleton);
 }
 
 template <typename Base, typename Traits>
 bool
 XrayWrapper<Base, Traits>::construct(JSContext *cx, HandleObject wrapper, const JS::CallArgs &args)
 {
-    assertEnteredPolicy(cx, wrapper, jsid::voidId());
+    assertEnteredPolicy(cx, wrapper, JSID_VOID);
     return Traits::construct(cx, wrapper, args, Base::singleton);
 }
 
 template <typename Base, typename Traits>
 bool
 XrayWrapper<Base, Traits>::defaultValue(JSContext *cx, HandleObject wrapper,
                                         JSType hint, MutableHandleValue vp)
 {
--- a/xpcom/base/CycleCollectedJSRuntime.cpp
+++ b/xpcom/base/CycleCollectedJSRuntime.cpp
@@ -780,17 +780,17 @@ struct ClearJSHolder : TraceCallbacks
 {
   virtual void Trace(JS::Heap<JS::Value>* aPtr, const char*, void*) const MOZ_OVERRIDE
   {
     *aPtr = JSVAL_VOID;
   }
 
   virtual void Trace(JS::Heap<jsid>* aPtr, const char*, void*) const MOZ_OVERRIDE
   {
-    *aPtr = jsid::voidId();
+    *aPtr = JSID_VOID;
   }
 
   virtual void Trace(JS::Heap<JSObject*>* aPtr, const char*, void*) const MOZ_OVERRIDE
   {
     *aPtr = nullptr;
   }
 
   virtual void Trace(JS::Heap<JSString*>* aPtr, const char*, void*) const MOZ_OVERRIDE