Merge mozilla-inbound to mozilla-central. a=merge
authorAndreea Pavel <apavel@mozilla.com>
Sat, 17 Nov 2018 13:27:24 +0200
changeset 503347 e4deec61fc8c
parent 503328 efc1da42132b (current diff)
parent 503346 600d7689bd53 (diff)
child 503348 d4991991fb98
child 503351 7e6b465b73dc
child 503354 7211db666d59
push id10290
push userffxbld-merge
push dateMon, 03 Dec 2018 16:23:23 +0000
treeherdermozilla-beta@700bed2445e6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmerge
milestone65.0a1
first release with
nightly linux32
e4deec61fc8c / 65.0a1 / 20181117112950 / files
nightly linux64
e4deec61fc8c / 65.0a1 / 20181117112950 / files
nightly mac
e4deec61fc8c / 65.0a1 / 20181117112950 / files
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
Merge mozilla-inbound to mozilla-central. a=merge
gfx/layers/wr/WebRenderBridgeParent.cpp
js/xpconnect/idl/xpcjsid.idl
js/xpconnect/tests/unit/test_classesByID_instanceof.js
xpcom/tests/unit/test_bug656331.js
--- a/browser/components/extensions/parent/ext-browserAction.js
+++ b/browser/components/extensions/parent/ext-browserAction.js
@@ -78,17 +78,17 @@ this.browserAction = class extends Exten
 
     this.browserStyle = options.browser_style;
 
     browserActionMap.set(extension, this);
 
     this.defaults.icon = await StartupCache.get(
       extension, ["browserAction", "default_icon"],
       () => IconDetails.normalize({
-        path: options.default_icon,
+        path: options.default_icon || extension.manifest.icons,
         iconType: "browserAction",
         themeIcons: options.theme_icons,
       }, extension));
 
     this.iconData.set(
       this.defaults.icon,
       await StartupCache.get(
         extension, ["browserAction", "default_icon_data"],
--- a/browser/components/extensions/test/browser/browser_ext_browserAction_simple.js
+++ b/browser/components/extensions/test/browser/browser_ext_browserAction_simple.js
@@ -4,31 +4,33 @@
 
 add_task(async function() {
   let extension = ExtensionTestUtils.loadExtension({
     manifest: {
       "browser_action": {
         "default_popup": "popup.html",
         "unrecognized_property": "with-a-random-value",
       },
+      icons: {32: "icon.png"},
     },
 
     files: {
       "popup.html": `
       <!DOCTYPE html>
       <html><body>
       <script src="popup.js"></script>
       </body></html>
       `,
 
       "popup.js": function() {
         window.onload = () => {
           browser.runtime.sendMessage("from-popup");
         };
       },
+      "icon.png": imageBuffer,
     },
 
     background: function() {
       browser.runtime.onMessage.addListener(msg => {
         browser.test.assertEq(msg, "from-popup", "correct message received");
         browser.test.sendMessage("popup");
       });
     },
@@ -42,16 +44,20 @@ add_task(async function() {
   });
 
   await extension.startup();
 
   // Do this a few times to make sure the pop-up is reloaded each time.
   for (let i = 0; i < 3; i++) {
     clickBrowserAction(extension);
 
+    let widget = getBrowserActionWidget(extension).forWindow(window);
+    let image = getComputedStyle(widget.node).listStyleImage;
+
+    ok(image.includes("/icon.png"), "The extension's icon is used");
     await extension.awaitMessage("popup");
 
     closeBrowserAction(extension);
   }
 
   await extension.unload();
 
   SimpleTest.endMonitorConsole();
--- a/browser/modules/Sanitizer.jsm
+++ b/browser/modules/Sanitizer.jsm
@@ -288,17 +288,17 @@ var Sanitizer = {
         if (this.shouldSanitizeNewTabContainer) {
           addPendingSanitization("newtab-container", [], {});
         }
       }
     }
   },
 
   QueryInterface: ChromeUtils.generateQI([
-    Ci.nsiObserver,
+    Ci.nsIObserver,
     Ci.nsISupportsWeakReference,
   ]),
 
   // This method is meant to be used by tests.
   async runSanitizeOnShutdown() {
     return sanitizeOnShutdown({ isShutdown: true });
   },
 
--- a/dom/base/ChromeUtils.h
+++ b/dom/base/ChromeUtils.h
@@ -121,17 +121,17 @@ public:
   // Implemented in js/xpconnect/loader/ChromeScriptLoader.cpp
   static already_AddRefed<Promise>
   CompileScript(GlobalObject& aGlobal,
                 const nsAString& aUrl,
                 const dom::CompileScriptOptionsDictionary& aOptions,
                 ErrorResult& aRv);
 
   static MozQueryInterface*
-  GenerateQI(const GlobalObject& global, const Sequence<OwningStringOrIID>& interfaces,
+  GenerateQI(const GlobalObject& global, const Sequence<JS::Value>& interfaces,
              ErrorResult& aRv);
 
   static void WaiveXrays(GlobalObject& aGlobal,
                          JS::HandleValue aVal,
                          JS::MutableHandleValue aRetval,
                          ErrorResult& aRv);
 
   static void UnwaiveXrays(GlobalObject& aGlobal,
--- a/dom/base/CustomElementRegistry.cpp
+++ b/dom/base/CustomElementRegistry.cpp
@@ -1248,47 +1248,61 @@ CustomElementRegistry::Upgrade(Element* 
 }
 
 already_AddRefed<nsISupports>
 CustomElementRegistry::CallGetCustomInterface(Element* aElement,
                                               const nsIID& aIID)
 {
   MOZ_ASSERT(aElement);
 
-  if (nsContentUtils::IsChromeDoc(aElement->OwnerDoc())) {
-    CustomElementDefinition* definition = aElement->GetCustomElementDefinition();
-    if (definition && definition->mCallbacks &&
-        definition->mCallbacks->mGetCustomInterfaceCallback.WasPassed() &&
-        definition->mLocalName == aElement->NodeInfo()->NameAtom()) {
-
-      LifecycleGetCustomInterfaceCallback* func =
-        definition->mCallbacks->mGetCustomInterfaceCallback.Value();
-      JS::Rooted<JSObject*> customInterface(RootingCx());
+  if (!nsContentUtils::IsChromeDoc(aElement->OwnerDoc())) {
+    return nullptr;
+  }
 
-      nsCOMPtr<nsIJSID> iid = nsJSID::NewID(aIID);
-      func->Call(aElement, iid, &customInterface);
-      JS::Rooted<JSObject*> funcGlobal(RootingCx(), func->CallbackGlobalOrNull());
-      if (customInterface && funcGlobal) {
-        AutoJSAPI jsapi;
-        if (jsapi.Init(funcGlobal)) {
-          nsIXPConnect *xpConnect = nsContentUtils::XPConnect();
-          JSContext* cx = jsapi.cx();
+  // Try to get our GetCustomInterfaceCallback callback.
+  CustomElementDefinition* definition = aElement->GetCustomElementDefinition();
+  if (!definition || !definition->mCallbacks ||
+      !definition->mCallbacks->mGetCustomInterfaceCallback.WasPassed() ||
+      (definition->mLocalName != aElement->NodeInfo()->NameAtom())) {
+    return nullptr;
+  }
+  LifecycleGetCustomInterfaceCallback* func =
+    definition->mCallbacks->mGetCustomInterfaceCallback.Value();
 
-          nsCOMPtr<nsISupports> wrapper;
-          nsresult rv = xpConnect->WrapJSAggregatedToNative(aElement, cx, customInterface,
-                                                            aIID, getter_AddRefs(wrapper));
-          if (NS_SUCCEEDED(rv)) {
-            return wrapper.forget();
-          }
-        }
-      }
-    }
+  // Initialize a AutoJSAPI to enter the compartment of the callback.
+  AutoJSAPI jsapi;
+  JS::RootedObject funcGlobal(RootingCx(), func->CallbackGlobalOrNull());
+  if (!funcGlobal || !jsapi.Init(funcGlobal)) {
+    return nullptr;
   }
 
-  return nullptr;
+  // Grab our JSContext.
+  JSContext* cx = jsapi.cx();
+
+  // Convert our IID to a JSValue to call our callback.
+  JS::RootedValue jsiid(cx);
+  if (!xpc::ID2JSValue(cx, aIID, &jsiid)) {
+    return nullptr;
+  }
+
+  JS::RootedObject customInterface(cx);
+  func->Call(aElement, jsiid, &customInterface);
+  if (!customInterface) {
+    return nullptr;
+  }
+
+  // Wrap our JSObject into a nsISupports through XPConnect
+  nsCOMPtr<nsISupports> wrapper;
+  nsresult rv = nsContentUtils::XPConnect()->WrapJSAggregatedToNative(
+    aElement, cx, customInterface, aIID, getter_AddRefs(wrapper));
+  if (NS_WARN_IF(NS_FAILED(rv))) {
+    return nullptr;
+  }
+
+  return wrapper.forget();
 }
 
 //-----------------------------------------------------
 // CustomElementReactionsStack
 
 void
 CustomElementReactionsStack::CreateAndPushElementQueue()
 {
--- a/dom/base/MozQueryInterface.cpp
+++ b/dom/base/MozQueryInterface.cpp
@@ -1,23 +1,23 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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 "ChromeUtils.h"
 #include "MozQueryInterface.h"
+#include "nsIException.h"
 
 #include <string.h>
 
 #include "jsapi.h"
 
 #include "xpcpublic.h"
-#include "xpcjsid.h"
 
 namespace mozilla {
 namespace dom {
 
 constexpr size_t IID_SIZE = sizeof(nsIID);
 
 static_assert(IID_SIZE == 16,
               "Size of nsID struct changed. Please ensure this code is still valid.");
@@ -25,67 +25,47 @@ static_assert(IID_SIZE == 16,
 static int
 CompareIIDs(const nsIID& aA, const nsIID &aB)
 {
   return memcmp((void*)&aA.m0, (void*)&aB.m0, IID_SIZE);
 }
 
 /* static */
 MozQueryInterface*
-ChromeUtils::GenerateQI(const GlobalObject& aGlobal, const Sequence<OwningStringOrIID>& aInterfaces, ErrorResult& aRv)
+ChromeUtils::GenerateQI(const GlobalObject& aGlobal,
+                        const Sequence<JS::Value>& aInterfaces,
+                        ErrorResult& aRv)
 {
   JSContext* cx = aGlobal.Context();
-  JS::RootedObject xpcIfaces(cx);
 
   nsTArray<nsIID> ifaces;
 
-  JS::RootedValue val(cx);
-  for (auto& iface : aInterfaces) {
-    if (iface.IsIID()) {
-      ifaces.AppendElement(*iface.GetAsIID()->GetID());
+  JS::RootedValue iface(cx);
+  for (uint32_t idx = 0; idx < aInterfaces.Length(); ++idx) {
+    iface = aInterfaces[idx];
+
+    // Handle ID objects
+    if (Maybe<nsID> id = xpc::JSValue2ID(cx, iface)) {
+      ifaces.AppendElement(*id);
       continue;
     }
 
-    // If we have a string value, we need to look up the interface name. The
-    // simplest and most efficient way to do this is to just grab the "Ci"
-    // object from the global scope.
-    if (!xpcIfaces) {
-      JS::RootedObject global(cx, aGlobal.Get());
-      if (!JS_GetProperty(cx, global, "Ci", &val)) {
-        aRv.NoteJSContextException(cx);
-        return nullptr;
+    // Accept string valued names
+    if (iface.isString()) {
+      JS::UniqueChars name = JS_EncodeStringToLatin1(cx, iface.toString());
+
+      const nsXPTInterfaceInfo* iinfo = nsXPTInterfaceInfo::ByName(name.get());
+      if (iinfo) {
+        ifaces.AppendElement(iinfo->IID());
+        continue;
       }
-      if (!val.isObject()) {
-        aRv.Throw(NS_ERROR_UNEXPECTED);
-        return nullptr;
-      }
-      xpcIfaces = &val.toObject();
     }
 
-    auto& name = iface.GetAsString();
-    if (!JS_GetUCProperty(cx, xpcIfaces, name.get(), name.Length(), &val)) {
-      aRv.NoteJSContextException(cx);
-      return nullptr;
-    }
-
-    if (val.isNullOrUndefined()) {
-      continue;
-    }
-    if (!val.isObject()) {
-      aRv.Throw(NS_ERROR_INVALID_ARG);
-      return nullptr;
-    }
-
-    nsCOMPtr<nsISupports> base = xpc::UnwrapReflectorToISupports(&val.toObject());
-    nsCOMPtr<nsIJSID> iid = do_QueryInterface(base);
-    if (!iid) {
-      aRv.Throw(NS_ERROR_INVALID_ARG);
-      return nullptr;
-    }
-    ifaces.AppendElement(*iid->GetID());
+    // NOTE: We ignore unknown interfaces here because in some cases we try to
+    // pass them in to support multiple platforms.
   }
 
   MOZ_ASSERT(!ifaces.Contains(NS_GET_IID(nsISupports), CompareIIDs));
   ifaces.AppendElement(NS_GET_IID(nsISupports));
 
   ifaces.Sort(CompareIIDs);
 
   return new MozQueryInterface(std::move(ifaces));
@@ -94,24 +74,25 @@ ChromeUtils::GenerateQI(const GlobalObje
 bool
 MozQueryInterface::QueriesTo(const nsIID& aIID) const
 {
   return mInterfaces.ContainsSorted(aIID, CompareIIDs);
 }
 
 void
 MozQueryInterface::LegacyCall(JSContext* cx, JS::Handle<JS::Value> thisv,
-                              nsIJSID* aIID,
+                              JS::Handle<JS::Value> aIID,
                               JS::MutableHandle<JS::Value> aResult,
                               ErrorResult& aRv) const
 {
-  if (!QueriesTo(*aIID->GetID())) {
+  Maybe<nsID> id = xpc::JSValue2ID(cx, aIID);
+  if (id && QueriesTo(*id)) {
+    aResult.set(thisv);
+  } else {
     aRv.Throw(NS_ERROR_NO_INTERFACE);
-  } else {
-    aResult.set(thisv);
   }
 }
 
 bool
 MozQueryInterface::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector)
 {
   return MozQueryInterface_Binding::Wrap(aCx, this, aGivenProto, aReflector);
 }
--- a/dom/base/MozQueryInterface.h
+++ b/dom/base/MozQueryInterface.h
@@ -31,17 +31,20 @@ class MozQueryInterface final : public N
 {
 public:
   explicit MozQueryInterface(nsTArray<nsIID>&& aInterfaces)
     : mInterfaces(std::move(aInterfaces))
   {}
 
   bool QueriesTo(const nsIID& aIID) const;
 
-  void LegacyCall(JSContext* cx, JS::Handle<JS::Value> thisv, nsIJSID* aIID, JS::MutableHandle<JS::Value> aResult, ErrorResult& aRv) const;
+  void LegacyCall(JSContext* cx, JS::Handle<JS::Value> thisv,
+                  JS::Handle<JS::Value> aIID,
+                  JS::MutableHandle<JS::Value> aResult,
+                  ErrorResult& aRv) const;
 
   nsISupports* GetParentObject() const { return nullptr; }
 
   bool WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
 
 private:
   nsTArray<nsIID> mInterfaces;
 };
--- a/dom/base/nsGlobalWindowInner.cpp
+++ b/dom/base/nsGlobalWindowInner.cpp
@@ -5003,17 +5003,17 @@ nsGlobalWindowInner::GetInterface(const 
   nsresult rv = outer->GetInterfaceInternal(aIID, aSink);
   if (rv == NS_ERROR_NO_INTERFACE) {
     return QueryInterface(aIID, aSink);
   }
   return rv;
 }
 
 void
-nsGlobalWindowInner::GetInterface(JSContext* aCx, nsIJSID* aIID,
+nsGlobalWindowInner::GetInterface(JSContext* aCx, JS::Handle<JS::Value> aIID,
                                   JS::MutableHandle<JS::Value> aRetval,
                                   ErrorResult& aError)
 {
   dom::GetInterface(aCx, this, aIID, aRetval, aError);
 }
 
 already_AddRefed<CacheStorage>
 nsGlobalWindowInner::GetCaches(ErrorResult& aRv)
--- a/dom/base/nsGlobalWindowInner.h
+++ b/dom/base/nsGlobalWindowInner.h
@@ -64,17 +64,16 @@ class nsIArray;
 class nsIBaseWindow;
 class nsIContent;
 class nsICSSDeclaration;
 class nsIDocShellTreeOwner;
 class nsIDOMWindowUtils;
 class nsDOMOfflineResourceList;
 class nsIScrollableFrame;
 class nsIControllers;
-class nsIJSID;
 class nsIScriptContext;
 class nsIScriptTimeoutHandler;
 class nsITabChild;
 class nsITimeoutHandler;
 class nsIWebBrowserChrome;
 class mozIDOMWindowProxy;
 
 class nsDOMWindowList;
@@ -973,17 +972,17 @@ public:
                       mozilla::ErrorResult& aError);
   void SetReturnValueOuter(JSContext* aCx, JS::Handle<JS::Value> aReturnValue,
                            nsIPrincipal& aSubjectPrincipal,
                            mozilla::ErrorResult& aError);
   void SetReturnValue(JSContext* aCx, JS::Handle<JS::Value> aReturnValue,
                       nsIPrincipal& aSubjectPrincipal,
                       mozilla::ErrorResult& aError);
 
-  void GetInterface(JSContext* aCx, nsIJSID* aIID,
+  void GetInterface(JSContext* aCx, JS::Handle<JS::Value> aIID,
                     JS::MutableHandle<JS::Value> aRetval,
                     mozilla::ErrorResult& aError);
 
   already_AddRefed<nsWindowRoot> GetWindowRoot(mozilla::ErrorResult& aError);
 
   bool ShouldReportForServiceWorkerScope(const nsAString& aScope);
 
   void PropagateClearSiteDataReload(const nsACString& aOrigin);
--- a/dom/base/nsGlobalWindowOuter.h
+++ b/dom/base/nsGlobalWindowOuter.h
@@ -59,17 +59,16 @@
 class nsIArray;
 class nsIBaseWindow;
 class nsIContent;
 class nsICSSDeclaration;
 class nsIDocShellTreeOwner;
 class nsIDOMWindowUtils;
 class nsIScrollableFrame;
 class nsIControllers;
-class nsIJSID;
 class nsIScriptContext;
 class nsIScriptTimeoutHandler;
 class nsITabChild;
 class nsITimeoutHandler;
 class nsIWebBrowserChrome;
 class mozIDOMWindowProxy;
 
 class nsDocShellLoadState;
--- a/dom/base/nsJSEnvironment.cpp
+++ b/dom/base/nsJSEnvironment.cpp
@@ -2943,17 +2943,17 @@ NS_IMETHODIMP nsJSArgArray::QueryElement
   return NS_ERROR_NO_INTERFACE;
 }
 
 NS_IMETHODIMP nsJSArgArray::IndexOf(uint32_t startIndex, nsISupports *element, uint32_t *_retval)
 {
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
-NS_IMETHODIMP nsJSArgArray::ScriptedEnumerate(nsIJSIID* aElemIID, uint8_t aArgc,
+NS_IMETHODIMP nsJSArgArray::ScriptedEnumerate(const nsIID& aElemIID, uint8_t aArgc,
                                               nsISimpleEnumerator** aResult)
 {
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP nsJSArgArray::EnumerateImpl(const nsID& aEntryIID, nsISimpleEnumerator **_retval)
 {
   return NS_ERROR_NOT_IMPLEMENTED;
--- a/dom/bindings/BindingUtils.cpp
+++ b/dom/bindings/BindingUtils.cpp
@@ -1392,61 +1392,59 @@ QueryInterface(JSContext* cx, unsigned a
   if (!native) {
     return Throw(cx, NS_ERROR_FAILURE);
   }
 
   if (argc < 1) {
     return Throw(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
   }
 
-  if (!args[0].isObject()) {
+  Maybe<nsIID> iid = xpc::JSValue2ID(cx, args[0]);
+  if (!iid) {
     return Throw(cx, NS_ERROR_XPC_BAD_CONVERT_JS);
   }
 
-  nsCOMPtr<nsIJSID> iid;
-  obj = &args[0].toObject();
-  if (NS_FAILED(UnwrapArg<nsIJSID>(cx, obj, getter_AddRefs(iid)))) {
-    return Throw(cx, NS_ERROR_XPC_BAD_CONVERT_JS);
-  }
-  MOZ_ASSERT(iid);
-
-  if (iid->GetID()->Equals(NS_GET_IID(nsIClassInfo))) {
+  if (iid->Equals(NS_GET_IID(nsIClassInfo))) {
     nsresult rv;
     nsCOMPtr<nsIClassInfo> ci = do_QueryInterface(native, &rv);
     if (NS_FAILED(rv)) {
       return Throw(cx, rv);
     }
 
     return WrapObject(cx, ci, &NS_GET_IID(nsIClassInfo), args.rval());
   }
 
   nsCOMPtr<nsISupports> unused;
-  nsresult rv = native->QueryInterface(*iid->GetID(), getter_AddRefs(unused));
+  nsresult rv = native->QueryInterface(*iid, getter_AddRefs(unused));
   if (NS_FAILED(rv)) {
     return Throw(cx, rv);
   }
 
   args.rval().set(args.thisv());
   return true;
 }
 
 void
 GetInterfaceImpl(JSContext* aCx, nsIInterfaceRequestor* aRequestor,
-                 nsWrapperCache* aCache, nsIJSID* aIID,
+                 nsWrapperCache* aCache, JS::Handle<JS::Value> aIID,
                  JS::MutableHandle<JS::Value> aRetval, ErrorResult& aError)
 {
-  const nsID* iid = aIID->GetID();
+  Maybe<nsIID> iid = xpc::JSValue2ID(aCx, aIID);
+  if (!iid) {
+    aError.Throw(NS_ERROR_XPC_BAD_CONVERT_JS);
+    return;
+  }
 
   RefPtr<nsISupports> result;
   aError = aRequestor->GetInterface(*iid, getter_AddRefs(result));
   if (aError.Failed()) {
     return;
   }
 
-  if (!WrapObject(aCx, result, iid, aRetval)) {
+  if (!WrapObject(aCx, result, iid.ptr(), aRetval)) {
     aError.Throw(NS_ERROR_FAILURE);
   }
 }
 
 bool
 ThrowingConstructor(JSContext* cx, unsigned argc, JS::Value* vp)
 {
   return ThrowErrorMessage(cx, MSG_ILLEGAL_CONSTRUCTOR);
--- a/dom/bindings/BindingUtils.h
+++ b/dom/bindings/BindingUtils.h
@@ -38,17 +38,16 @@
 #include "xpcObjectHelper.h"
 #include "xpcpublic.h"
 #include "nsIVariant.h"
 #include "mozilla/dom/FakeString.h"
 
 #include "nsWrapperCacheInlines.h"
 
 class nsGenericHTMLElement;
-class nsIJSID;
 
 namespace mozilla {
 
 enum UseCounter : int16_t;
 
 namespace dom {
 class CustomElementReactionsStack;
 class MessageManagerGlobal;
@@ -1902,22 +1901,22 @@ WantsQueryInterface
   static bool Enabled(JSContext* aCx, JSObject* aGlobal)
   {
     return NS_IsMainThread() && IsChromeOrXBL(aCx, aGlobal);
   }
 };
 
 void
 GetInterfaceImpl(JSContext* aCx, nsIInterfaceRequestor* aRequestor,
-                 nsWrapperCache* aCache, nsIJSID* aIID,
+                 nsWrapperCache* aCache, JS::Handle<JS::Value> aIID,
                  JS::MutableHandle<JS::Value> aRetval, ErrorResult& aError);
 
 template<class T>
 void
-GetInterface(JSContext* aCx, T* aThis, nsIJSID* aIID,
+GetInterface(JSContext* aCx, T* aThis, JS::Handle<JS::Value> aIID,
              JS::MutableHandle<JS::Value> aRetval, ErrorResult& aError)
 {
   GetInterfaceImpl(aCx, aThis, aThis, aIID, aRetval, aError);
 }
 
 bool
 ThrowingConstructor(JSContext* cx, unsigned argc, JS::Value* vp);
 
--- a/dom/bindings/Bindings.conf
+++ b/dom/bindings/Bindings.conf
@@ -454,21 +454,16 @@ DOMInterfaces = {
 'IDBOpenDBRequest': {
     'headerFile': 'IDBRequest.h'
 },
 
 'IDBVersionChangeEvent': {
     'headerFile': 'IDBEvents.h',
 },
 
-'IID': {
-    'nativeType': 'nsIJSID',
-    'headerFile': 'xpcjsid.h',
-},
-
 'ImageCapture': {
     'binaryNames': { 'videoStreamTrack': 'GetVideoStreamTrack' }
 },
 
 'ImageData': {
     'wrapperCache': False,
 },
 
--- a/dom/bindings/Codegen.py
+++ b/dom/bindings/Codegen.py
@@ -2283,20 +2283,19 @@ class MethodDefiner(PropertyDefiner):
         for m in methods:
             if m.identifier.name == 'QueryInterface':
                 # QueryInterface is special, because instead of generating an
                 # impl we just call out directly to our shared one.
                 if m.isStatic():
                     raise TypeError("Legacy QueryInterface member shouldn't be static")
                 signatures = m.signatures()
 
-                def argTypeIsIID(arg):
-                    return arg.type.inner.isExternal() and arg.type.inner.identifier.name == 'IID'
-                if len(signatures) > 1 or len(signatures[0][1]) > 1 or not argTypeIsIID(signatures[0][1][0]):
-                    raise TypeError("There should be only one QueryInterface method with 1 argument of type IID")
+                if (len(signatures) > 1 or len(signatures[0][1]) > 1 or
+                    not signatures[0][1][0].type.isAny()):
+                    raise TypeError("There should be only one QueryInterface method with 1 argument of type any")
 
                 # Make sure to not stick QueryInterface on abstract interfaces.
                 if (not self.descriptor.interface.hasInterfacePrototypeObject() or
                     not self.descriptor.concrete):
                     raise TypeError("QueryInterface is only supported on "
                                     "interfaces that are concrete: " +
                                     self.descriptor.name)
 
--- a/dom/chrome-webidl/ChromeUtils.webidl
+++ b/dom/chrome-webidl/ChromeUtils.webidl
@@ -12,17 +12,17 @@
  * called with an unsupported interface, it throws NS_ERROR_NO_INTERFACE.
  *
  * C++ callers use a fast path, and never call the JSAPI or WebIDL methods of
  * this object.
  */
 [ChromeOnly, Exposed=Window]
 interface MozQueryInterface {
   [Throws]
-  legacycaller any (IID aIID);
+  legacycaller any (any aIID);
 };
 
 /**
  * A collection of static utility methods that are only exposed to system code.
  * This is exposed in all the system globals where we can expose stuff by
  * default, so should only include methods that are **thread-safe**.
  */
 [ChromeOnly, Exposed=(Window,Worker)]
@@ -210,27 +210,24 @@ partial namespace ChromeUtils {
   Promise<PrecompiledScript>
   compileScript(DOMString url, optional CompileScriptOptionsDictionary options);
 
   /**
    * Returns an optimized QueryInterface method which, when called from
    * JavaScript, acts as an ordinary QueryInterface function call, and when
    * called from XPConnect, circumvents JSAPI entirely.
    *
-   * The list of interfaces may include a mix of nsIJSID objects and interface
-   * name strings. Strings for nonexistent interface names are silently
-   * ignored, as long as they don't refer to any non-IID property of the Ci
-   * global. Any non-IID value is implicitly coerced to a string, and treated
-   * as an interface name.
+   * The list of interfaces may include a mix of JS ID objects and interface
+   * name strings.
    *
    * nsISupports is implicitly supported, and must not be included in the
    * interface list.
    */
   [Affects=Nothing, NewObject, Throws]
-  MozQueryInterface generateQI(sequence<(DOMString or IID)> interfaces);
+  MozQueryInterface generateQI(sequence<any> interfaces);
 
   /**
    * Waive Xray on a given value. Identity op for primitives.
    */
   [Throws]
   any waiveXrays(any val);
 
   /**
--- a/dom/webidl/LegacyQueryInterface.webidl
+++ b/dom/webidl/LegacyQueryInterface.webidl
@@ -1,25 +1,24 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* 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/.
  */
 
 interface nsISupports;
-interface IID;
 
 [NoInterfaceObject,
  // Need Exposed here, because this is a mixin onto things like Event
  // that are exposed in workers.
  Exposed=(Window,Worker)]
 interface LegacyQueryInterface {
   // Legacy QueryInterface, only exposed to chrome code on the main thread.
   [Exposed=Window, ChromeOnly]
-  nsISupports QueryInterface(IID iid);
+  nsISupports QueryInterface(any iid);
 };
 
 DOMParser implements LegacyQueryInterface;
 Document implements LegacyQueryInterface;
 DocumentFragment implements LegacyQueryInterface;
 Element implements LegacyQueryInterface;
 Event implements LegacyQueryInterface;
 Selection implements LegacyQueryInterface;
--- a/dom/webidl/WebComponents.webidl
+++ b/dom/webidl/WebComponents.webidl
@@ -5,27 +5,25 @@
  *
  * The origin of this IDL file is
  * http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/custom/index.html
  *
  * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
-interface IID;
-
 callback LifecycleConnectedCallback = void();
 callback LifecycleDisconnectedCallback = void();
 callback LifecycleAdoptedCallback = void(Document? oldDocument,
                                          Document? newDocment);
 callback LifecycleAttributeChangedCallback = void(DOMString attrName,
                                                   DOMString? oldValue,
                                                   DOMString? newValue,
                                                   DOMString? namespaceURI);
-callback LifecycleGetCustomInterfaceCallback = object?(IID iid);
+callback LifecycleGetCustomInterfaceCallback = object?(any iid);
 
 dictionary LifecycleCallbacks {
   LifecycleConnectedCallback connectedCallback;
   LifecycleDisconnectedCallback disconnectedCallback;
   LifecycleAdoptedCallback adoptedCallback;
   LifecycleAttributeChangedCallback attributeChangedCallback;
   [ChromeOnly] LifecycleGetCustomInterfaceCallback getCustomInterfaceCallback;
 };
--- a/dom/webidl/Window.webidl
+++ b/dom/webidl/Window.webidl
@@ -14,17 +14,16 @@
  * https://dvcs.w3.org/hg/webcrypto-api/raw-file/tip/spec/Overview.html
  * http://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html
  * https://w3c.github.io/webappsec-secure-contexts/#monkey-patching-global-object
  * https://w3c.github.io/requestidlecallback/
  * https://drafts.css-houdini.org/css-paint-api-1/#dom-window-paintworklet
  * https://wicg.github.io/visual-viewport/#the-visualviewport-interface
  */
 
-interface IID;
 interface nsIBrowserDOMWindow;
 interface XULControllers;
 interface nsIDOMWindowUtils;
 
 typedef OfflineResourceList ApplicationCache;
 
 // http://www.whatwg.org/specs/web-apps/current-work/
 [PrimaryGlobal, LegacyUnenumerableNamedProperties, NeedResolve]
@@ -335,17 +334,17 @@ partial interface Window {
 
   [
 #ifdef NIGHTLY_BUILD
    ChromeOnly,
 #endif
    NonEnumerable, Replaceable, Throws, NeedsCallerType]
   readonly attribute object? content;
 
-  [Throws, ChromeOnly] any getInterface(IID iid);
+  [Throws, ChromeOnly] any getInterface(any iid);
 
   /**
    * Same as nsIDOMWindow.windowRoot, useful for event listener targeting.
    */
   [ChromeOnly, Throws]
   readonly attribute WindowRoot? windowRoot;
 
   /**
--- a/dom/webidl/XMLHttpRequest.webidl
+++ b/dom/webidl/XMLHttpRequest.webidl
@@ -7,17 +7,16 @@
  * https://xhr.spec.whatwg.org/#interface-xmlhttprequest
  *
  * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
 interface InputStream;
 interface MozChannel;
-interface IID;
 
 enum XMLHttpRequestResponseType {
   "",
   "arraybuffer",
   "blob",
   "document",
   "json",
   "text",
@@ -122,17 +121,17 @@ interface XMLHttpRequest : XMLHttpReques
 
   [ChromeOnly, SetterThrows]
   attribute boolean mozBackgroundRequest;
 
   [ChromeOnly, Exposed=Window]
   readonly attribute MozChannel? channel;
 
   [Throws, ChromeOnly, Exposed=Window]
-  any getInterface(IID iid);
+  any getInterface(any iid);
 
   [ChromeOnly, Exposed=Window]
   void setOriginAttributes(optional OriginAttributesDictionary originAttributes);
 
   [ChromeOnly, Throws]
   void sendInputStream(InputStream body);
 
   // Only works on MainThread.
--- a/dom/xhr/XMLHttpRequest.h
+++ b/dom/xhr/XMLHttpRequest.h
@@ -6,18 +6,16 @@
 
 #ifndef mozilla_dom_XMLHttpRequest_h
 #define mozilla_dom_XMLHttpRequest_h
 
 #include "mozilla/Attributes.h"
 #include "mozilla/dom/XMLHttpRequestEventTarget.h"
 #include "mozilla/dom/XMLHttpRequestBinding.h"
 
-class nsIJSID;
-
 namespace mozilla {
 namespace dom {
 
 class Blob;
 class DOMString;
 class FormData;
 class URLSearchParams;
 class XMLHttpRequestUpload;
@@ -129,17 +127,17 @@ public:
   virtual void
   SetMozBackgroundRequest(bool aMozBackgroundRequest, ErrorResult& aRv) = 0;
 
   virtual nsIChannel*
   GetChannel() const = 0;
 
   // We need a GetInterface callable from JS for chrome JS
   virtual void
-  GetInterface(JSContext* aCx, nsIJSID* aIID,
+  GetInterface(JSContext* aCx, JS::Handle<JS::Value> aIID,
                JS::MutableHandle<JS::Value> aRetval,
                ErrorResult& aRv) = 0;
 
   virtual void
   SetOriginAttributes(const mozilla::dom::OriginAttributesDictionary& aAttrs) = 0;
 
   virtual uint16_t
   ErrorCode() const = 0;
--- a/dom/xhr/XMLHttpRequestMainThread.cpp
+++ b/dom/xhr/XMLHttpRequestMainThread.cpp
@@ -82,17 +82,16 @@
 #include "mozilla/Attributes.h"
 #include "MultipartBlobImpl.h"
 #include "nsIPermissionManager.h"
 #include "nsMimeTypes.h"
 #include "nsIHttpChannelInternal.h"
 #include "nsIClassOfService.h"
 #include "nsCharSeparatedTokenizer.h"
 #include "nsStreamListenerWrapper.h"
-#include "xpcjsid.h"
 #include "nsITimedChannel.h"
 #include "nsWrapperCacheInlines.h"
 #include "nsZipArchive.h"
 #include "mozilla/Preferences.h"
 #include "private/pprio.h"
 #include "XMLHttpRequestUpload.h"
 
 // Undefine the macro of CreateFile to avoid FileCreatorHelper#CreateFile being
@@ -3503,17 +3502,17 @@ XMLHttpRequestMainThread::GetInterface(c
     *aResult = static_cast<nsITimerCallback*>(EnsureXPCOMifier().take());
     return NS_OK;
   }
 
   return QueryInterface(aIID, aResult);
 }
 
 void
-XMLHttpRequestMainThread::GetInterface(JSContext* aCx, nsIJSID* aIID,
+XMLHttpRequestMainThread::GetInterface(JSContext* aCx, JS::Handle<JS::Value> aIID,
                                        JS::MutableHandle<JS::Value> aRetval,
                                        ErrorResult& aRv)
 {
   dom::GetInterface(aCx, this, aIID, aRetval, aRv);
 }
 
 XMLHttpRequestUpload*
 XMLHttpRequestMainThread::GetUpload(ErrorResult& aRv)
--- a/dom/xhr/XMLHttpRequestMainThread.h
+++ b/dom/xhr/XMLHttpRequestMainThread.h
@@ -53,17 +53,16 @@
 #ifdef Status
 /* Xlib headers insist on this for some reason... Nuke it because
    it'll override our member name */
 #undef Status
 #endif
 
 class nsIJARChannel;
 class nsILoadGroup;
-class nsIJSID;
 
 namespace mozilla {
 namespace dom {
 
 class DOMString;
 class XMLHttpRequestUpload;
 struct OriginAttributesDictionary;
 
@@ -437,17 +436,17 @@ public:
   virtual nsIChannel*
   GetChannel() const override
   {
     return mChannel;
   }
 
   // We need a GetInterface callable from JS for chrome JS
   virtual void
-  GetInterface(JSContext* aCx, nsIJSID* aIID,
+  GetInterface(JSContext* aCx, JS::Handle<JS::Value> aIID,
                JS::MutableHandle<JS::Value> aRetval,
                ErrorResult& aRv) override;
 
   // This fires a trusted readystatechange event, which is not cancelable and
   // doesn't bubble.
   nsresult FireReadystatechangeEvent();
   void DispatchProgressEvent(DOMEventTargetHelper* aTarget,
                              const ProgressEventType aType,
--- a/dom/xhr/XMLHttpRequestWorker.h
+++ b/dom/xhr/XMLHttpRequestWorker.h
@@ -210,17 +210,17 @@ public:
 
   virtual nsIDocument*
   GetResponseXML(ErrorResult& aRv) override
   {
     MOZ_CRASH("This method should not be called.");
   }
 
   virtual void
-  GetInterface(JSContext* aCx, nsIJSID* aIID,
+  GetInterface(JSContext* aCx, JS::Handle<JS::Value> aIID,
                JS::MutableHandle<JS::Value> aRetval,
                ErrorResult& aRv) override
   {
     aRv.Throw(NS_ERROR_FAILURE);
   }
 
   virtual void
   SetOriginAttributes(const mozilla::dom::OriginAttributesDictionary& aAttrs) override
--- a/editor/composer/test/test_bug1266815.html
+++ b/editor/composer/test/test_bug1266815.html
@@ -3,16 +3,18 @@
 <head>
   <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
   <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/AddTask.js"></script>
   <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
 </head>
 <body>
 <p id="display"></p>
 <script type="text/javascript">
+// XXX(nika): Why are we using SpecialPowers here? If we're a chrome mochitest
+// can't we avoid using the SpecialPowers wrappers?
 const Cc = SpecialPowers.Cc;
 const Ci = SpecialPowers.Ci;
 const Cu = SpecialPowers.Cu;
 
 const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm", {});
 
 const HELPERAPP_DIALOG_CID =
         SpecialPowers.wrap(SpecialPowers.Components)
@@ -33,17 +35,17 @@ var helperAppDlgPromise = new Promise(fu
 
   HelperAppLauncherDialog.prototype = {
     show(aLauncher, aWindowContext, aReason) {
       ok(true, "Whether showing Dialog");
       resolve();
       registrar.unregisterFactory(MOCK_HELPERAPP_DIALOG_CID,
                                   mockHelperAppService);
     },
-    QueryInterface: ChromeUtils.generateQI([Ci.nsIHelperAppLauncherDialog]),
+    QueryInterface: ChromeUtils.generateQI(["nsIHelperAppLauncherDialog"]),
   };
 
   mockHelperAppService = XPCOMUtils._getFactory(HelperAppLauncherDialog);
   registrar.registerFactory(MOCK_HELPERAPP_DIALOG_CID, "",
                             HELPERAPP_DIALOG_CONTRACT_ID,
                             mockHelperAppService);
 });
 
--- a/gfx/layers/ipc/CompositorBridgeParent.cpp
+++ b/gfx/layers/ipc/CompositorBridgeParent.cpp
@@ -2206,17 +2206,17 @@ CompositorBridgeParent::DidComposite(Tim
 
 void
 CompositorBridgeParent::NotifyPipelineRendered(const wr::PipelineId& aPipelineId,
                                                const wr::Epoch& aEpoch,
                                                TimeStamp& aCompositeStart,
                                                TimeStamp& aCompositeEnd,
                                                wr::RendererStats* aStats)
 {
-  if (!mWrBridge) {
+  if (!mWrBridge || !mAsyncImageManager) {
     return;
   }
 
   RefPtr<UiCompositorControllerParent> uiController =
     UiCompositorControllerParent::GetFromRootLayerTreeId(mRootLayerTreeID);
 
   if (mWrBridge->PipelineId() == aPipelineId) {
     mWrBridge->RemoveEpochDataPriorTo(aEpoch);
@@ -2229,31 +2229,25 @@ CompositorBridgeParent::NotifyPipelineRe
       mWrBridge->ExtractImageCompositeNotifications(&notifications);
       if (!notifications.IsEmpty()) {
         Unused << ImageBridgeParent::NotifyImageComposites(notifications);
       }
     }
     return;
   }
 
-  MonitorAutoLock lock(*sIndirectLayerTreesLock);
-  ForEachIndirectLayerTree([&] (LayerTreeState* lts, const LayersId& aLayersId) -> void {
-    if (lts->mCrossProcessParent &&
-        lts->mWrBridge &&
-        lts->mWrBridge->PipelineId() == aPipelineId) {
-
-      lts->mWrBridge->RemoveEpochDataPriorTo(aEpoch);
-
+  auto wrBridge = mAsyncImageManager->GetWrBridge(aPipelineId);
+  if (wrBridge && wrBridge->GetCompositorBridge()) {
+      MOZ_ASSERT(!wrBridge->IsRootWebRenderBridgeParent());
+      wrBridge->RemoveEpochDataPriorTo(aEpoch);
       if (!mPaused) {
-        CrossProcessCompositorBridgeParent* cpcp = lts->mCrossProcessParent;
-        TransactionId transactionId = lts->mWrBridge->FlushTransactionIdsForEpoch(aEpoch, aCompositeEnd, uiController, aStats);
-        Unused << cpcp->SendDidComposite(aLayersId, transactionId, aCompositeStart, aCompositeEnd);
+        TransactionId transactionId = wrBridge->FlushTransactionIdsForEpoch(aEpoch, aCompositeEnd, uiController, aStats);
+        Unused << wrBridge->GetCompositorBridge()->SendDidComposite(wrBridge->GetLayersId(), transactionId, aCompositeStart, aCompositeEnd);
       }
-    }
-  });
+  }
 }
 
 RefPtr<AsyncImagePipelineManager>
 CompositorBridgeParent::GetAsyncImagePipelineManager() const
 {
   return mAsyncImageManager;
 }
 
--- a/gfx/layers/wr/AsyncImagePipelineManager.cpp
+++ b/gfx/layers/wr/AsyncImagePipelineManager.cpp
@@ -96,50 +96,72 @@ AsyncImagePipelineManager::GetNextExtern
   ++sNextId;
   MOZ_RELEASE_ASSERT(sNextId != UINT32_MAX);
   // gecko allocates external image id as (IdNamespace:32bit + ResourceId:32bit).
   // And AsyncImagePipelineManager uses IdNamespace = 0.
   return wr::ToExternalImageId((uint64_t)sNextId);
 }
 
 void
-AsyncImagePipelineManager::AddPipeline(const wr::PipelineId& aPipelineId)
+AsyncImagePipelineManager::AddPipeline(const wr::PipelineId& aPipelineId, WebRenderBridgeParent* aWrBridge)
 {
   if (mDestroyed) {
     return;
   }
   uint64_t id = wr::AsUint64(aPipelineId);
 
   PipelineTexturesHolder* holder = mPipelineTexturesHolders.Get(wr::AsUint64(aPipelineId));
   if(holder) {
     // This could happen during tab move between different windows.
     // Previously removed holder could be still alive for waiting destroyed.
     MOZ_ASSERT(holder->mDestroyedEpoch.isSome());
     holder->mDestroyedEpoch = Nothing(); // Revive holder
+    holder->mWrBridge = aWrBridge;
     return;
   }
   holder = new PipelineTexturesHolder();
+  holder->mWrBridge = aWrBridge;
   mPipelineTexturesHolders.Put(id, holder);
 }
 
 void
 AsyncImagePipelineManager::RemovePipeline(const wr::PipelineId& aPipelineId, const wr::Epoch& aEpoch)
 {
   if (mDestroyed) {
     return;
   }
 
   PipelineTexturesHolder* holder = mPipelineTexturesHolders.Get(wr::AsUint64(aPipelineId));
   MOZ_ASSERT(holder);
   if (!holder) {
     return;
   }
+  holder->mWrBridge = nullptr;
   holder->mDestroyedEpoch = Some(aEpoch);
 }
 
+WebRenderBridgeParent*
+AsyncImagePipelineManager::GetWrBridge(const wr::PipelineId& aPipelineId)
+{
+  if (mDestroyed) {
+    return nullptr;
+  }
+
+  PipelineTexturesHolder* holder = mPipelineTexturesHolders.Get(wr::AsUint64(aPipelineId));
+  if (!holder) {
+    return nullptr;
+  }
+  if (holder->mWrBridge) {
+    MOZ_ASSERT(holder->mDestroyedEpoch.isNothing());
+    return holder->mWrBridge;
+  }
+
+  return nullptr;
+}
+
 void
 AsyncImagePipelineManager::AddAsyncImagePipeline(const wr::PipelineId& aPipelineId, WebRenderImageHost* aImageHost)
 {
   if (mDestroyed) {
     return;
   }
   MOZ_ASSERT(aImageHost);
   uint64_t id = wr::AsUint64(aPipelineId);
--- a/gfx/layers/wr/AsyncImagePipelineManager.h
+++ b/gfx/layers/wr/AsyncImagePipelineManager.h
@@ -42,18 +42,19 @@ public:
   explicit AsyncImagePipelineManager(already_AddRefed<wr::WebRenderAPI>&& aApi);
 
 protected:
   ~AsyncImagePipelineManager();
 
 public:
   void Destroy();
 
-  void AddPipeline(const wr::PipelineId& aPipelineId);
+  void AddPipeline(const wr::PipelineId& aPipelineId, WebRenderBridgeParent* aWrBridge = nullptr);
   void RemovePipeline(const wr::PipelineId& aPipelineId, const wr::Epoch& aEpoch);
+  WebRenderBridgeParent* GetWrBridge(const wr::PipelineId& aPipelineId);
 
   void HoldExternalImage(const wr::PipelineId& aPipelineId, const wr::Epoch& aEpoch, WebRenderTextureHost* aTexture);
   void HoldExternalImage(const wr::PipelineId& aPipelineId, const wr::Epoch& aEpoch, WebRenderTextureHostWrapper* aWrTextureWrapper);
   void HoldExternalImage(const wr::PipelineId& aPipelineId, const wr::Epoch& aEpoch, const wr::ExternalImageId& aImageId);
 
   // This is called from the Renderer thread to notify this class about the
   // pipelines in the most recently completed render. A copy of the update
   // information is put into mUpdatesQueue.
@@ -159,16 +160,17 @@ private:
   };
 
   struct PipelineTexturesHolder {
     // Holds forwarding WebRenderTextureHosts.
     std::queue<ForwardingTextureHost> mTextureHosts;
     std::queue<ForwardingTextureHostWrapper> mTextureHostWrappers;
     std::queue<UniquePtr<ForwardingExternalImage>> mExternalImages;
     Maybe<wr::Epoch> mDestroyedEpoch;
+    WebRenderBridgeParent* MOZ_NON_OWNING_REF mWrBridge = nullptr;
   };
 
   struct AsyncImagePipeline {
     AsyncImagePipeline();
     void Update(const LayoutDeviceRect& aScBounds,
                 const gfx::Matrix4x4& aScTransform,
                 const gfx::MaybeIntSize& aScaleToSize,
                 const wr::ImageRendering& aFilter,
--- a/gfx/layers/wr/WebRenderBridgeParent.cpp
+++ b/gfx/layers/wr/WebRenderBridgeParent.cpp
@@ -315,17 +315,17 @@ WebRenderBridgeParent::WebRenderBridgePa
   , mIdNamespace(aApi->GetNamespace())
   , mPaused(false)
   , mDestroyed(false)
   , mReceivedDisplayList(false)
   , mIsFirstPaint(true)
 {
   MOZ_ASSERT(mAsyncImageManager);
   MOZ_ASSERT(mAnimStorage);
-  mAsyncImageManager->AddPipeline(mPipelineId);
+  mAsyncImageManager->AddPipeline(mPipelineId, this);
   if (IsRootWebRenderBridgeParent()) {
     MOZ_ASSERT(!mCompositorScheduler);
     mCompositorScheduler = new CompositorVsyncScheduler(this, mWidget);
   }
 }
 
 WebRenderBridgeParent::WebRenderBridgeParent(const wr::PipelineId& aPipelineId)
   : mCompositorBridge(nullptr)
--- a/gfx/layers/wr/WebRenderBridgeParent.h
+++ b/gfx/layers/wr/WebRenderBridgeParent.h
@@ -61,16 +61,17 @@ public:
                         TimeDuration aVsyncRate);
 
   static WebRenderBridgeParent* CreateDestroyed(const wr::PipelineId& aPipelineId);
 
   wr::PipelineId PipelineId() { return mPipelineId; }
   already_AddRefed<wr::WebRenderAPI> GetWebRenderAPI() { return do_AddRef(mApi); }
   AsyncImagePipelineManager* AsyncImageManager() { return mAsyncImageManager; }
   CompositorVsyncScheduler* CompositorScheduler() { return mCompositorScheduler.get(); }
+  CompositorBridgeParentBase* GetCompositorBridge() { return mCompositorBridge; }
 
   mozilla::ipc::IPCResult RecvEnsureConnected(TextureFactoryIdentifier* aTextureFactoryIdentifier,
                                               MaybeIdNamespace* aMaybeIdNamespace) override;
 
   mozilla::ipc::IPCResult RecvNewCompositable(const CompositableHandle& aHandle,
                                               const TextureInfo& aInfo) override;
   mozilla::ipc::IPCResult RecvReleaseCompositable(const CompositableHandle& aHandle) override;
 
@@ -218,16 +219,18 @@ public:
    * display list. This is intended to be called by the widget code when it
    * loses its viewport information (or for whatever reason wants to refresh
    * the viewport information). The message will sent back to the widget code
    * via UiCompositorControllerParent::NotifyFirstPaint() when the corresponding
    * transaction is flushed.
    */
   void ForceIsFirstPaint() { mIsFirstPaint = true; }
 
+  bool IsRootWebRenderBridgeParent() const;
+  LayersId GetLayersId() const;
 private:
   class ScheduleSharedSurfaceRelease;
 
   explicit WebRenderBridgeParent(const wr::PipelineId& aPipelineId);
   virtual ~WebRenderBridgeParent();
 
   void UpdateAPZFocusState(const FocusTarget& aFocus);
   void UpdateAPZScrollData(const wr::Epoch& aEpoch, WebRenderScrollData&& aData);
@@ -258,32 +261,29 @@ private:
                                     wr::TransactionBuilder& aTxnForImageBridge);
   void RemovePipelineIdForCompositable(const wr::PipelineId& aPipelineId,
                                        wr::TransactionBuilder& aTxn);
 
   void DeleteImage(const wr::ImageKey& aKey,
                    wr::TransactionBuilder& aUpdates);
   void ReleaseTextureOfImage(const wr::ImageKey& aKey);
 
-  LayersId GetLayersId() const;
   bool ProcessWebRenderParentCommands(const InfallibleTArray<WebRenderParentCommand>& aCommands,
                                       wr::TransactionBuilder& aTxn);
 
   void ClearResources();
   bool ShouldParentObserveEpoch();
   mozilla::ipc::IPCResult HandleShutdown();
 
   // Returns true if there is any animation (including animations in delay
   // phase).
   bool AdvanceAnimations();
   bool SampleAnimations(nsTArray<wr::WrOpacityProperty>& aOpacityArray,
                         nsTArray<wr::WrTransformProperty>& aTransformArray);
 
-  bool IsRootWebRenderBridgeParent() const;
-
   CompositorBridgeParent* GetRootCompositorBridgeParent() const;
 
   RefPtr<WebRenderBridgeParent> GetRootWebRenderBridgeParent() const;
 
   // Tell APZ what the subsequent sampling's timestamp should be.
   void SetAPZSampleTime();
 
   wr::Epoch GetNextWrEpoch();
--- a/js/ipc/JavaScriptShared.cpp
+++ b/js/ipc/JavaScriptShared.cpp
@@ -231,19 +231,19 @@ JavaScriptShared::toVariant(JSContext* c
       {
         RootedObject obj(cx, from.toObjectOrNull());
         if (!obj) {
             MOZ_ASSERT(from.isNull());
             *to = NullVariant();
             return true;
         }
 
-        if (xpc_JSObjectIsID(cx, obj)) {
+        Maybe<nsID> id = xpc::JSValue2ID(cx, from);
+        if (id) {
             JSIID iid;
-            const nsID* id = xpc_JSObjectToID(cx, obj);
             ConvertID(*id, &iid);
             *to = iid;
             return true;
         }
 
         ObjectVariant objVar;
         if (!toObjectVariant(cx, obj, &objVar)) {
             return false;
@@ -343,24 +343,17 @@ JavaScriptShared::fromVariant(JSContext*
           return true;
         }
 
         case JSVariant::TJSIID:
         {
           nsID iid;
           const JSIID& id = from.get_JSIID();
           ConvertID(id, &iid);
-
-          RootedObject global(cx, JS::CurrentGlobalOrNull(cx));
-          JSObject* obj = xpc_NewIDObject(cx, global, iid);
-          if (!obj) {
-              return false;
-          }
-          to.set(ObjectValue(*obj));
-          return true;
+          return xpc::ID2JSValue(cx, iid, to);
         }
 
         default:
           MOZ_CRASH("NYI");
           return false;
     }
 }
 
--- a/js/ipc/WrapperOwner.cpp
+++ b/js/ipc/WrapperOwner.cpp
@@ -406,34 +406,25 @@ WrapperOwner::toString(JSContext* cx, Ha
     return true;
 }
 
 bool
 WrapperOwner::DOMQI(JSContext* cx, JS::HandleObject proxy, JS::CallArgs& args)
 {
     // Someone's calling us, handle nsISupports specially to avoid unnecessary
     // CPOW traffic.
-    HandleValue id = args[0];
-    if (id.isObject()) {
-        RootedObject idobj(cx, &id.toObject());
-        nsCOMPtr<nsIJSID> jsid;
+    if (Maybe<nsID> id = xpc::JSValue2ID(cx, args[0])) {
+        if (id->Equals(NS_GET_IID(nsISupports))) {
+            args.rval().set(args.thisv());
+            return true;
+        }
 
-        nsresult rv = UnwrapArg<nsIJSID>(cx, idobj, getter_AddRefs(jsid));
-        if (NS_SUCCEEDED(rv)) {
-            MOZ_ASSERT(jsid, "bad wrapJS");
-            const nsID* idptr = jsid->GetID();
-            if (idptr->Equals(NS_GET_IID(nsISupports))) {
-                args.rval().set(args.thisv());
-                return true;
-            }
-
-            // Webidl-implemented DOM objects never have nsIClassInfo.
-            if (idptr->Equals(NS_GET_IID(nsIClassInfo))) {
-                return Throw(cx, NS_ERROR_NO_INTERFACE);
-            }
+        // Webidl-implemented DOM objects never have nsIClassInfo.
+        if (id->Equals(NS_GET_IID(nsIClassInfo))) {
+            return Throw(cx, NS_ERROR_NO_INTERFACE);
         }
     }
 
     // It wasn't nsISupports, call into the other process to do the QI for us
     // (since we don't know what other interfaces our object supports). Note
     // that we have to use JS_GetPropertyDescriptor here to avoid infinite
     // recursion back into CPOWDOMQI via WrapperOwner::get().
     // We could stash the actual QI function on our own function object to avoid
--- a/js/xpconnect/idl/moz.build
+++ b/js/xpconnect/idl/moz.build
@@ -6,13 +6,12 @@
 
 XPIDL_SOURCES += [
     'mozIJSSubScriptLoader.idl',
     'nsIXPConnect.idl',
     'nsIXPCScriptable.idl',
     'xpccomponents.idl',
     'xpcIJSGetFactory.idl',
     'xpcIJSWeakReference.idl',
-    'xpcjsid.idl',
 ]
 
 XPIDL_MODULE = 'xpconnect'
 
--- a/js/xpconnect/idl/xpccomponents.idl
+++ b/js/xpconnect/idl/xpccomponents.idl
@@ -15,58 +15,36 @@ interface nsICommandParams;
 interface nsIComponentManager;
 interface nsICycleCollectorListener;
 interface nsIDocumentEncoder;
 interface nsIEditorSpellCheck;
 interface nsIFile;
 interface nsILoadContext;
 interface nsIPersistentProperties;
 interface nsIURI;
-interface nsIJSCID;
-interface nsIJSIID;
 interface nsIPrincipal;
 interface nsIStackFrame;
 webidl Element;
 
 /**
-* interface of Components.interfacesByID
-* (interesting stuff only reflected into JavaScript)
-*/
-[scriptable, builtinclass, uuid(f235ef76-9919-478b-aa0f-282d994ddf76)]
-interface nsIXPCComponents_InterfacesByID : nsISupports
-{
-};
-
-/**
 * interface of Components.interfaces
 * (interesting stuff only reflected into JavaScript)
 */
 [scriptable, builtinclass, uuid(b8c31bba-79db-4a1d-930d-4cdd68713f9e)]
 interface nsIXPCComponents_Interfaces : nsISupports
 {
 };
 
 /**
 * interface of Components.classes
 * (interesting stuff only reflected into JavaScript)
 */
 [scriptable, builtinclass, uuid(978ff520-d26c-11d2-9842-006008962422)]
 interface nsIXPCComponents_Classes : nsISupports
 {
-  // Make it so that |cid| gets mapped to |idString|.
-  void initialize(in nsIJSCID cid, in string idString);
-};
-
-/**
-* interface of Components.classesByID
-* (interesting stuff only reflected into JavaScript)
-*/
-[scriptable, builtinclass, uuid(336a9590-4d19-11d3-9893-006008962422)]
-interface nsIXPCComponents_ClassesByID : nsISupports
-{
 };
 
 /**
 * interface of Components.results
 * (interesting stuff only reflected into JavaScript)
 */
 [scriptable, builtinclass, uuid(2fc229a0-5860-11d3-9899-006008962422)]
 interface nsIXPCComponents_Results : nsISupports
@@ -96,28 +74,16 @@ interface nsIXPCComponents_Exception : n
 * (interesting stuff only reflected into JavaScript)
 */
 [scriptable, builtinclass, uuid(88655640-e028-11d3-8f5d-0010a4e73d9a)]
 interface nsIXPCComponents_Constructor : nsISupports
 {
 };
 
 /**
-* interface of object returned by Components.Constructor
-* (additional interesting stuff only reflected into JavaScript)
-*/
-[scriptable, builtinclass, uuid(c814ca20-e0dc-11d3-8f5f-0010a4e73d9a)]
-interface nsIXPCConstructor : nsISupports
-{
-    readonly attribute nsIJSCID classID;
-    readonly attribute nsIJSIID interfaceID;
-    readonly attribute string   initializer;
-};
-
-/**
 * interface of object returned by Components.utils.Sandbox.
 */
 [scriptable, builtinclass, uuid(4f8ae0dc-d266-4a32-875b-6a9de71a8ce9)]
 interface nsIXPCComponents_utils_Sandbox : nsISupports
 {
 };
 
 /**
@@ -765,28 +731,26 @@ interface nsIXPCComponents_Utils : nsISu
 * that runs in a scope with an ExpandedPrincipal. The second interface
 * includes members that are only exposed to chrome.
 */
 
 [scriptable, builtinclass, uuid(eeeada2f-86c0-4609-b2bf-4bf2351b1ce6)]
 interface nsIXPCComponentsBase : nsISupports
 {
     readonly attribute nsIXPCComponents_Interfaces      interfaces;
-    readonly attribute nsIXPCComponents_InterfacesByID  interfacesByID;
     readonly attribute nsIXPCComponents_Results         results;
 
     boolean isSuccessCode(in nsresult result);
 
 };
 
 [scriptable, builtinclass, uuid(aa28aaf6-70ce-4b03-9514-afe43c7dfda8)]
 interface nsIXPCComponents : nsIXPCComponentsBase
 {
     readonly attribute nsIXPCComponents_Classes         classes;
-    readonly attribute nsIXPCComponents_ClassesByID     classesByID;
     // Will return null if there is no JS stack right now.
     readonly attribute nsIStackFrame                    stack;
     readonly attribute nsIComponentManager              manager;
     readonly attribute nsIXPCComponents_Utils           utils;
 
     readonly attribute nsIXPCComponents_ID              ID;
     readonly attribute nsIXPCComponents_Exception       Exception;
     readonly attribute nsIXPCComponents_Constructor     Constructor;
deleted file mode 100644
--- a/js/xpconnect/idl/xpcjsid.idl
+++ /dev/null
@@ -1,47 +0,0 @@
-/* -*- Mode: IDL; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* 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 "nsISupports.idl"
-
-[ptr] native const_nsID_ptr(const nsID);
-
-[builtinclass, scriptable, uuid(62883d14-4146-4039-94f5-a5e1e1a51a15)]
-interface nsIJSID : nsISupports
-{
-    readonly attribute string  name;
-    readonly attribute string  number;
-    readonly attribute boolean valid;
-
-    boolean equals(in nsIJSID other);
-    string toString();
-
-    [noscript] void initialize(in string idString);
-
-    // returns a pointer to the internal nsID. this pointer is only valid
-    // while the nsIJSID object remains alive!
-    [notxpcom] const_nsID_ptr getID();
-};
-
-[builtinclass, scriptable, uuid(e76ec564-a080-4705-8609-384c755ec91e)]
-interface nsIJSIID : nsIJSID
-{
-};
-
-[builtinclass, scriptable, uuid(bf5eb086-9eaa-4694-aec3-fe4aac6119bd)]
-interface nsIJSCID : nsIJSID
-{
-    [implicit_jscontext,optional_argc] jsval createInstance([optional] in jsval iid);
-    [implicit_jscontext,optional_argc] jsval getService([optional] in jsval iid);
-};
-
-/* this goes into the C++ header verbatim. */
-%{ C++
-/********************************************************/
-// {F24A14F0-4FA1-11d3-9894-006008962422}
-#define NS_JS_ID_CID  \
-{ 0xf24a14f0, 0x4fa1, 0x11d3, \
-    { 0x98, 0x94, 0x0, 0x60, 0x8, 0x96, 0x24, 0x22 } }
-%}
-
--- a/js/xpconnect/src/XPCComponents.cpp
+++ b/js/xpconnect/src/XPCComponents.cpp
@@ -264,229 +264,24 @@ nsXPCComponents_Interfaces::Resolve(nsIX
 
     // we only allow interfaces by name here
     if (name && name[0] != '{') {
         const nsXPTInterfaceInfo* info = nsXPTInterfaceInfo::ByName(name.get());
         if (!info) {
             return NS_OK;
         }
 
-        nsCOMPtr<nsIJSIID> nsid = nsJSIID::NewID(info);
-
-        if (nsid) {
-            nsIXPConnect* xpc = nsIXPConnect::XPConnect();
-            RootedObject idobj(cx);
-            if (NS_SUCCEEDED(xpc->WrapNative(cx, obj,
-                                             static_cast<nsIJSIID*>(nsid),
-                                             NS_GET_IID(nsIJSIID),
-                                             idobj.address()))) {
-                if (idobj) {
-                    *resolvedp = true;
-                    *_retval = JS_DefinePropertyById(cx, obj, id, idobj,
-                                                     JSPROP_ENUMERATE |
-                                                     JSPROP_READONLY |
-                                                     JSPROP_PERMANENT |
-                                                     JSPROP_RESOLVING);
-                }
-            }
-        }
-    }
-    return NS_OK;
-}
-
-/***************************************************************************/
-/***************************************************************************/
-/***************************************************************************/
-
-class nsXPCComponents_InterfacesByID final :
-            public nsIXPCComponents_InterfacesByID,
-            public nsIXPCScriptable,
-            public nsIClassInfo
-{
-public:
-    // all the interface method declarations...
-    NS_DECL_ISUPPORTS
-    NS_DECL_NSIXPCCOMPONENTS_INTERFACESBYID
-    NS_DECL_NSIXPCSCRIPTABLE
-    NS_DECL_NSICLASSINFO
-
-public:
-    nsXPCComponents_InterfacesByID();
-
-private:
-    virtual ~nsXPCComponents_InterfacesByID();
-};
-
-/***************************************************************************/
-NS_IMETHODIMP
-nsXPCComponents_InterfacesByID::GetInterfaces(uint32_t* aCount, nsIID * **aArray)
-{
-    *aCount = 2;
-    nsIID** array = static_cast<nsIID**>(moz_xmalloc(2 * sizeof(nsIID*)));
-    *aArray = array;
-
-    array[0] = NS_GET_IID(nsIXPCComponents_InterfacesByID).Clone();
-    array[1] = NS_GET_IID(nsIXPCScriptable).Clone();
-    return NS_OK;
-}
-
-NS_IMETHODIMP
-nsXPCComponents_InterfacesByID::GetScriptableHelper(nsIXPCScriptable** retval)
-{
-    *retval = nullptr;
-    return NS_OK;
-}
-
-NS_IMETHODIMP
-nsXPCComponents_InterfacesByID::GetContractID(nsACString& aContractID)
-{
-    aContractID.SetIsVoid(true);
-    return NS_ERROR_NOT_AVAILABLE;
-}
-
-NS_IMETHODIMP
-nsXPCComponents_InterfacesByID::GetClassDescription(
-    nsACString& aClassDescription)
-{
-    aClassDescription.AssignLiteral("XPCComponents_InterfacesByID");
-    return NS_OK;
-}
-
-NS_IMETHODIMP
-nsXPCComponents_InterfacesByID::GetClassID(nsCID * *aClassID)
-{
-    *aClassID = nullptr;
-    return NS_OK;
-}
-
-NS_IMETHODIMP
-nsXPCComponents_InterfacesByID::GetFlags(uint32_t* aFlags)
-{
-    *aFlags = 0;
-    return NS_OK;
-}
-
-NS_IMETHODIMP
-nsXPCComponents_InterfacesByID::GetClassIDNoAlloc(nsCID* aClassIDNoAlloc)
-{
-    return NS_ERROR_NOT_AVAILABLE;
-}
-
-nsXPCComponents_InterfacesByID::nsXPCComponents_InterfacesByID()
-{
-}
-
-nsXPCComponents_InterfacesByID::~nsXPCComponents_InterfacesByID()
-{
-    // empty
-}
-
-NS_IMPL_ISUPPORTS(nsXPCComponents_InterfacesByID,
-                  nsIXPCComponents_InterfacesByID,
-                  nsIXPCScriptable,
-                  nsIClassInfo)
-
-// The nsIXPCScriptable map declaration that will generate stubs for us...
-#define XPC_MAP_CLASSNAME         nsXPCComponents_InterfacesByID
-#define XPC_MAP_QUOTED_CLASSNAME "nsXPCComponents_InterfacesByID"
-#define XPC_MAP_FLAGS (XPC_SCRIPTABLE_WANT_RESOLVE | \
-                       XPC_SCRIPTABLE_WANT_NEWENUMERATE | \
-                       XPC_SCRIPTABLE_ALLOW_PROP_MODS_DURING_RESOLVE)
-#include "xpc_map_end.h" /* This will #undef the above */
-
-NS_IMETHODIMP
-nsXPCComponents_InterfacesByID::NewEnumerate(nsIXPConnectWrappedNative* wrapper,
-                                             JSContext* cx, JSObject* obj,
-                                             JS::AutoIdVector& properties,
-                                             bool enumerableOnly,
-                                             bool* _retval)
-{
-
-    if (!properties.reserve(nsXPTInterfaceInfo::InterfaceCount())) {
-        *_retval = false;
-        return NS_OK;
-    }
-
-    for (uint32_t index = 0; index < nsXPTInterfaceInfo::InterfaceCount(); index++) {
-        const nsXPTInterfaceInfo* interface = nsXPTInterfaceInfo::ByIndex(index);
-        if (!interface) {
-            continue;
-        }
-
-        char idstr[NSID_LENGTH];
-        interface->IID().ToProvidedString(idstr);
-        RootedString jsstr(cx, JS_NewStringCopyZ(cx, idstr));
-        if (!jsstr) {
-            *_retval = false;
-            return NS_OK;
-        }
-
-        RootedId id(cx);
-        if (!JS_StringToId(cx, jsstr, &id)) {
-            *_retval = false;
-            return NS_OK;
-        }
-
-        properties.infallibleAppend(id);
-    }
-
-    return NS_OK;
-}
-
-NS_IMETHODIMP
-nsXPCComponents_InterfacesByID::Resolve(nsIXPConnectWrappedNative* wrapper,
-                                        JSContext* cx, JSObject* objArg,
-                                        jsid idArg, bool* resolvedp,
-                                        bool* _retval)
-{
-    RootedObject obj(cx, objArg);
-    RootedId id(cx, idArg);
-
-    if (!JSID_IS_STRING(id)) {
-        return NS_OK;
-    }
-
-    RootedString str(cx, JSID_TO_STRING(id));
-    if (38 != JS_GetStringLength(str)) {
-        return NS_OK;
-    }
-
-    JS::UniqueChars utf8str = JS_EncodeStringToUTF8(cx, str);
-    if (utf8str) {
-        nsID iid;
-        if (!iid.Parse(utf8str.get())) {
-            return NS_OK;
-        }
-
-        const nsXPTInterfaceInfo* info = nsXPTInterfaceInfo::ByIID(iid);
-        if (!info) {
-            return NS_OK;
-        }
-
-        nsCOMPtr<nsIJSIID> nsid = nsJSIID::NewID(info);
-
-        if (!nsid) {
-            return NS_ERROR_OUT_OF_MEMORY;
-        }
-
-        nsIXPConnect* xpc = nsIXPConnect::XPConnect();
-        RootedObject idobj(cx);
-        if (NS_SUCCEEDED(xpc->WrapNative(cx, obj,
-                                         static_cast<nsIJSIID*>(nsid),
-                                         NS_GET_IID(nsIJSIID),
-                                         idobj.address()))) {
-            if (idobj) {
-                *resolvedp = true;
-                *_retval =
-                    JS_DefinePropertyById(cx, obj, id, idobj,
-                                          JSPROP_ENUMERATE |
-                                          JSPROP_READONLY |
-                                          JSPROP_PERMANENT |
-                                          JSPROP_RESOLVING);
-            }
+        RootedValue iidv(cx);
+        if (xpc::IfaceID2JSValue(cx, *info, &iidv)) {
+            *resolvedp = true;
+            *_retval = JS_DefinePropertyById(cx, obj, id, iidv,
+                                             JSPROP_ENUMERATE |
+                                             JSPROP_READONLY |
+                                             JSPROP_PERMANENT |
+                                             JSPROP_RESOLVING);
         }
     }
     return NS_OK;
 }
 
 /***************************************************************************/
 /***************************************************************************/
 /***************************************************************************/
@@ -643,264 +438,34 @@ nsXPCComponents_Classes::Resolve(nsIXPCo
                                  JSContext* cx, JSObject* objArg,
                                  jsid idArg, bool* resolvedp,
                                  bool* _retval)
 
 {
     RootedId id(cx, idArg);
     RootedObject obj(cx, objArg);
 
-    if (!JSID_IS_STRING(id)) {
-        return NS_OK;
-    }
-
-    JS::UniqueChars name = JS_EncodeStringToLatin1(cx, JSID_TO_STRING(id));
-    if (name &&
-        name[0] != '{') { // we only allow contractids here
-        nsCOMPtr<nsIJSCID> nsid = nsJSCID::NewID(name.get());
-        if (nsid) {
-            nsIXPConnect* xpc = nsIXPConnect::XPConnect();
-            RootedObject idobj(cx);
-            if (NS_SUCCEEDED(xpc->WrapNative(cx, obj,
-                                             static_cast<nsIJSCID*>(nsid),
-                                             NS_GET_IID(nsIJSCID),
-                                             idobj.address()))) {
-                if (idobj) {
-                    *resolvedp = true;
-                    *_retval = JS_DefinePropertyById(cx, obj, id, idobj,
-                                                     JSPROP_ENUMERATE |
-                                                     JSPROP_READONLY |
-                                                     JSPROP_PERMANENT |
-                                                     JSPROP_RESOLVING);
-                }
-            }
-        }
+    RootedValue cidv(cx);
+    if (JSID_IS_STRING(id) &&
+        xpc::ContractID2JSValue(cx, JSID_TO_STRING(id), &cidv)) {
+        *resolvedp = true;
+        *_retval = JS_DefinePropertyById(cx, obj, id, cidv,
+                                         JSPROP_ENUMERATE |
+                                         JSPROP_READONLY |
+                                         JSPROP_PERMANENT |
+                                         JSPROP_RESOLVING);
     }
     return NS_OK;
 }
 
-NS_IMETHODIMP
-nsXPCComponents_Classes::Initialize(nsIJSCID* cid,
-                                    const char* str)
-{
-    return cid->Initialize(str);
-}
-
 
 /***************************************************************************/
 /***************************************************************************/
 /***************************************************************************/
 
-class nsXPCComponents_ClassesByID final :
-  public nsIXPCComponents_ClassesByID,
-  public nsIXPCScriptable,
-  public nsIClassInfo
-{
-public:
-    // all the interface method declarations...
-    NS_DECL_ISUPPORTS
-    NS_DECL_NSIXPCCOMPONENTS_CLASSESBYID
-    NS_DECL_NSIXPCSCRIPTABLE
-    NS_DECL_NSICLASSINFO
-
-public:
-    nsXPCComponents_ClassesByID();
-
-private:
-    virtual ~nsXPCComponents_ClassesByID();
-};
-
-/***************************************************************************/
-NS_IMETHODIMP
-nsXPCComponents_ClassesByID::GetInterfaces(uint32_t* aCount, nsIID * **aArray)
-{
-    *aCount = 2;
-    nsIID** array = static_cast<nsIID**>(moz_xmalloc(2 * sizeof(nsIID*)));
-    *aArray = array;
-
-    array[0] = NS_GET_IID(nsIXPCComponents_ClassesByID).Clone();
-    array[1] = NS_GET_IID(nsIXPCScriptable).Clone();
-    return NS_OK;
-}
-
-NS_IMETHODIMP
-nsXPCComponents_ClassesByID::GetScriptableHelper(nsIXPCScriptable** retval)
-{
-    *retval = nullptr;
-    return NS_OK;
-}
-
-NS_IMETHODIMP
-nsXPCComponents_ClassesByID::GetContractID(nsACString& aContractID)
-{
-    aContractID.SetIsVoid(true);
-    return NS_ERROR_NOT_AVAILABLE;
-}
-
-NS_IMETHODIMP
-nsXPCComponents_ClassesByID::GetClassDescription(nsACString& aClassDescription)
-{
-    aClassDescription.AssignLiteral("XPCComponents_ClassesByID");
-    return NS_OK;
-}
-
-NS_IMETHODIMP
-nsXPCComponents_ClassesByID::GetClassID(nsCID * *aClassID)
-{
-    *aClassID = nullptr;
-    return NS_OK;
-}
-
-NS_IMETHODIMP
-nsXPCComponents_ClassesByID::GetFlags(uint32_t* aFlags)
-{
-    *aFlags = 0;
-    return NS_OK;
-}
-
-NS_IMETHODIMP
-nsXPCComponents_ClassesByID::GetClassIDNoAlloc(nsCID* aClassIDNoAlloc)
-{
-    return NS_ERROR_NOT_AVAILABLE;
-}
-
-nsXPCComponents_ClassesByID::nsXPCComponents_ClassesByID()
-{
-}
-
-nsXPCComponents_ClassesByID::~nsXPCComponents_ClassesByID()
-{
-    // empty
-}
-
-NS_IMPL_ISUPPORTS(nsXPCComponents_ClassesByID,
-                  nsIXPCComponents_ClassesByID,
-                  nsIXPCScriptable,
-                  nsIClassInfo)
-
-// The nsIXPCScriptable map declaration that will generate stubs for us...
-#define XPC_MAP_CLASSNAME         nsXPCComponents_ClassesByID
-#define XPC_MAP_QUOTED_CLASSNAME "nsXPCComponents_ClassesByID"
-#define XPC_MAP_FLAGS (XPC_SCRIPTABLE_WANT_RESOLVE | \
-                       XPC_SCRIPTABLE_WANT_NEWENUMERATE | \
-                       XPC_SCRIPTABLE_ALLOW_PROP_MODS_DURING_RESOLVE)
-#include "xpc_map_end.h" /* This will #undef the above */
-
-NS_IMETHODIMP
-nsXPCComponents_ClassesByID::NewEnumerate(nsIXPConnectWrappedNative* wrapper,
-                                          JSContext* cx, JSObject* obj,
-                                          JS::AutoIdVector& properties,
-                                          bool enumerableOnly,
-                                          bool* _retval)
-{
-
-    nsCOMPtr<nsIComponentRegistrar> compMgr;
-    if (NS_FAILED(NS_GetComponentRegistrar(getter_AddRefs(compMgr))) || !compMgr) {
-        return NS_ERROR_UNEXPECTED;
-    }
-
-    nsISimpleEnumerator* e;
-    if (NS_FAILED(compMgr->EnumerateCIDs(&e)) || !e) {
-        return NS_ERROR_UNEXPECTED;
-    }
-
-    bool hasMore;
-    nsCOMPtr<nsISupports> isup;
-    while(NS_SUCCEEDED(e->HasMoreElements(&hasMore)) && hasMore &&
-          NS_SUCCEEDED(e->GetNext(getter_AddRefs(isup))) && isup) {
-        nsCOMPtr<nsISupportsID> holder(do_QueryInterface(isup));
-        if (!holder) {
-            continue;
-        }
-
-        char* name;
-        if (NS_SUCCEEDED(holder->ToString(&name)) && name) {
-            RootedString idstr(cx, JS_NewStringCopyZ(cx, name));
-            if (!idstr) {
-                *_retval = false;
-                return NS_OK;
-            }
-
-            RootedId id(cx);
-            if (!JS_StringToId(cx, idstr, &id)) {
-                *_retval = false;
-                return NS_OK;
-            }
-
-            if (!properties.append(id)) {
-                *_retval = false;
-                return NS_OK;
-            }
-        }
-    }
-
-    return NS_OK;
-}
-
-static bool
-IsRegisteredCLSID(const char* str)
-{
-    bool registered;
-    nsID id;
-
-    if (!id.Parse(str)) {
-        return false;
-    }
-
-    nsCOMPtr<nsIComponentRegistrar> compMgr;
-    if (NS_FAILED(NS_GetComponentRegistrar(getter_AddRefs(compMgr))) || !compMgr ||
-        NS_FAILED(compMgr->IsCIDRegistered(id, &registered)))
-        return false;
-
-    return registered;
-}
-
-NS_IMETHODIMP
-nsXPCComponents_ClassesByID::Resolve(nsIXPConnectWrappedNative* wrapper,
-                                     JSContext* cx, JSObject* objArg,
-                                     jsid idArg, bool* resolvedp,
-                                     bool* _retval)
-{
-    RootedObject obj(cx, objArg);
-    RootedId id(cx, idArg);
-
-    if (!JSID_IS_STRING(id)) {
-        return NS_OK;
-    }
-
-    RootedString str(cx, JSID_TO_STRING(id));
-    JS::UniqueChars name = JS_EncodeStringToLatin1(cx, str);
-    if (name && name[0] == '{' &&
-        IsRegisteredCLSID(name.get())) // we only allow canonical CLSIDs here
-    {
-        nsCOMPtr<nsIJSCID> nsid = nsJSCID::NewID(name.get());
-        if (nsid) {
-            nsIXPConnect* xpc = nsIXPConnect::XPConnect();
-            RootedObject idobj(cx);
-            if (NS_SUCCEEDED(xpc->WrapNative(cx, obj,
-                                             static_cast<nsIJSCID*>(nsid),
-                                             NS_GET_IID(nsIJSCID),
-                                             idobj.address()))) {
-                if (idobj) {
-                    *resolvedp = true;
-                    *_retval = JS_DefinePropertyById(cx, obj, id, idobj,
-                                                     JSPROP_ENUMERATE |
-                                                     JSPROP_READONLY |
-                                                     JSPROP_PERMANENT |
-                                                     JSPROP_RESOLVING);
-                }
-            }
-        }
-    }
-    return NS_OK;
-}
-
-
-/***************************************************************************/
-
 // Currently the possible results do not change at runtime, so they are only
 // cached once (unlike ContractIDs, CLSIDs, and IIDs)
 
 class nsXPCComponents_Results final :
   public nsIXPCComponents_Results,
   public nsIXPCScriptable,
   public nsIClassInfo
 {
@@ -1185,22 +750,19 @@ nsXPCComponents_ID::CallOrConstruct(nsIX
                                     const CallArgs& args, bool* _retval)
 {
     // make sure we have at least one arg
 
     if (args.length() < 1) {
         return ThrowAndFail(NS_ERROR_XPC_NOT_ENOUGH_ARGS, cx, _retval);
     }
 
-    // Do the security check if necessary
-
-    if (NS_FAILED(nsXPConnect::SecurityManager()->CanCreateInstance(cx, nsJSID::GetCID()))) {
-        // the security manager vetoed. It should have set an exception.
-        *_retval = false;
-        return NS_OK;
+    // Prevent non-chrome code from creating ID objects.
+    if (!nsContentUtils::IsCallerChrome()) {
+        return ThrowAndFail(NS_ERROR_DOM_XPCONNECT_ACCESS_DENIED, cx, _retval);
     }
 
     // convert the first argument into a string and see if it looks like an id
 
     JSString* jsstr = ToString(cx, args[0]);
     if (!jsstr) {
         return ThrowAndFail(NS_ERROR_XPC_BAD_ID_STRING, cx, _retval);
     }
@@ -1212,32 +774,29 @@ nsXPCComponents_ID::CallOrConstruct(nsIX
 
     nsID id;
     if (!id.Parse(bytes.get())) {
         return ThrowAndFail(NS_ERROR_XPC_BAD_ID_STRING, cx, _retval);
     }
 
     // make the new object and return it.
 
-    JSObject* newobj = xpc_NewIDObject(cx, obj, id);
-    if (!newobj) {
+    if (!xpc::ID2JSValue(cx, id, args.rval())) {
         return NS_ERROR_UNEXPECTED;
     }
-
-    args.rval().setObject(*newobj);
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsXPCComponents_ID::HasInstance(nsIXPConnectWrappedNative* wrapper,
                                 JSContext* cx, JSObject* obj,
                                 HandleValue val, bool* bp, bool* _retval)
 {
     if (bp) {
-        *bp = JSValIsInterfaceOfType(cx, val, NS_GET_IID(nsIJSID));
+        *bp = xpc::JSValue2ID(cx, val).isSome();
     }
     return NS_OK;
 }
 
 /***************************************************************************/
 // JavaScript Constructor for Exception objects (Components.Exception)
 
 class nsXPCComponents_Exception final :
@@ -1555,230 +1114,16 @@ nsXPCComponents_Exception::HasInstance(n
     if (bp) {
         *bp = (val.isObject() &&
                IS_INSTANCE_OF(Exception, &val.toObject())) ||
               JSValIsInterfaceOfType(cx, val, NS_GET_IID(nsIException));
     }
     return NS_OK;
 }
 
-/***************************************************************************/
-// This class is for the thing returned by "new Component.Constructor".
-
-// XXXjband we use this CID for security check, but security system can't see
-// it since it has no registed factory. Security really kicks in when we try
-// to build a wrapper around an instance.
-
-// {B4A95150-E25A-11d3-8F61-0010A4E73D9A}
-#define NS_XPCCONSTRUCTOR_CID                                                 \
-{ 0xb4a95150, 0xe25a, 0x11d3,                                                 \
-    { 0x8f, 0x61, 0x0, 0x10, 0xa4, 0xe7, 0x3d, 0x9a } }
-
-class nsXPCConstructor :
-  public nsIXPCConstructor,
-  public nsIXPCScriptable,
-  public nsIClassInfo
-{
-public:
-    NS_DEFINE_STATIC_CID_ACCESSOR(NS_XPCCONSTRUCTOR_CID)
-public:
-    // all the interface method declarations...
-    NS_DECL_ISUPPORTS
-    NS_DECL_NSIXPCCONSTRUCTOR
-    NS_DECL_NSIXPCSCRIPTABLE
-    NS_DECL_NSICLASSINFO
-
-public:
-    nsXPCConstructor() = delete;
-    nsXPCConstructor(nsIJSCID* aClassID,
-                     nsIJSIID* aInterfaceID,
-                     const char* aInitializer);
-
-private:
-    virtual ~nsXPCConstructor();
-    nsresult CallOrConstruct(nsIXPConnectWrappedNative* wrapper,
-                             JSContext* cx, HandleObject obj,
-                             const CallArgs& args, bool* _retval);
-private:
-    RefPtr<nsIJSCID> mClassID;
-    RefPtr<nsIJSIID> mInterfaceID;
-    char*              mInitializer;
-};
-
-/***************************************************************************/
-NS_IMETHODIMP
-nsXPCConstructor::GetInterfaces(uint32_t* aCount, nsIID * **aArray)
-{
-    *aCount = 2;
-    nsIID** array = static_cast<nsIID**>(moz_xmalloc(2 * sizeof(nsIID*)));
-    *aArray = array;
-
-    array[0] = NS_GET_IID(nsIXPCConstructor).Clone();
-    array[1] = NS_GET_IID(nsIXPCScriptable).Clone();
-    return NS_OK;
-}
-
-NS_IMETHODIMP
-nsXPCConstructor::GetScriptableHelper(nsIXPCScriptable** retval)
-{
-    *retval = nullptr;
-    return NS_OK;
-}
-
-NS_IMETHODIMP
-nsXPCConstructor::GetContractID(nsACString& aContractID)
-{
-    aContractID.SetIsVoid(true);
-    return NS_ERROR_NOT_AVAILABLE;
-}
-
-NS_IMETHODIMP
-nsXPCConstructor::GetClassDescription(nsACString& aClassDescription)
-{
-    aClassDescription.AssignLiteral("XPCConstructor");
-    return NS_OK;
-}
-
-NS_IMETHODIMP
-nsXPCConstructor::GetClassID(nsCID * *aClassID)
-{
-    *aClassID = nullptr;
-    return NS_OK;
-}
-
-NS_IMETHODIMP
-nsXPCConstructor::GetFlags(uint32_t* aFlags)
-{
-    *aFlags = 0;
-    return NS_OK;
-}
-
-NS_IMETHODIMP
-nsXPCConstructor::GetClassIDNoAlloc(nsCID* aClassIDNoAlloc)
-{
-    return NS_ERROR_NOT_AVAILABLE;
-}
-
-nsXPCConstructor::nsXPCConstructor(nsIJSCID* aClassID,
-                                   nsIJSIID* aInterfaceID,
-                                   const char* aInitializer)
-    : mClassID(aClassID),
-      mInterfaceID(aInterfaceID)
-{
-    mInitializer = aInitializer ? moz_xstrdup(aInitializer) : nullptr;
-}
-
-nsXPCConstructor::~nsXPCConstructor()
-{
-    if (mInitializer) {
-        free(mInitializer);
-    }
-}
-
-NS_IMETHODIMP
-nsXPCConstructor::GetClassID(nsIJSCID * *aClassID)
-{
-    RefPtr<nsIJSCID> rval = mClassID;
-    rval.forget(aClassID);
-    return NS_OK;
-}
-
-NS_IMETHODIMP
-nsXPCConstructor::GetInterfaceID(nsIJSIID * *aInterfaceID)
-{
-    RefPtr<nsIJSIID> rval = mInterfaceID;
-    rval.forget(aInterfaceID);
-    return NS_OK;
-}
-
-NS_IMETHODIMP
-nsXPCConstructor::GetInitializer(char * *aInitializer)
-{
-    XPC_STRING_GETTER_BODY(aInitializer, mInitializer);
-}
-
-NS_IMPL_ISUPPORTS(nsXPCConstructor,
-                  nsIXPCConstructor,
-                  nsIXPCScriptable,
-                  nsIClassInfo)
-
-// The nsIXPCScriptable map declaration that will generate stubs for us...
-#define XPC_MAP_CLASSNAME         nsXPCConstructor
-#define XPC_MAP_QUOTED_CLASSNAME "nsXPCConstructor"
-#define XPC_MAP_FLAGS (XPC_SCRIPTABLE_WANT_CALL | \
-                       XPC_SCRIPTABLE_WANT_CONSTRUCT)
-#include "xpc_map_end.h" /* This will #undef the above */
-
-
-NS_IMETHODIMP
-nsXPCConstructor::Call(nsIXPConnectWrappedNative* wrapper, JSContext* cx, JSObject* objArg,
-                       const CallArgs& args, bool* _retval)
-{
-    RootedObject obj(cx, objArg);
-    return CallOrConstruct(wrapper, cx, obj, args, _retval);
-
-}
-
-NS_IMETHODIMP
-nsXPCConstructor::Construct(nsIXPConnectWrappedNative* wrapper, JSContext* cx, JSObject* objArg,
-                            const CallArgs& args, bool* _retval)
-{
-    RootedObject obj(cx, objArg);
-    return CallOrConstruct(wrapper, cx, obj, args, _retval);
-}
-
-// static
-nsresult
-nsXPCConstructor::CallOrConstruct(nsIXPConnectWrappedNative* wrapper,JSContext* cx,
-                                  HandleObject obj, const CallArgs& args, bool* _retval)
-{
-    nsIXPConnect* xpc = nsIXPConnect::XPConnect();
-
-    // security check not required because we are going to call through the
-    // code which is reflected into JS which will do that for us later.
-
-    RootedObject cidObj(cx);
-    RootedObject iidObj(cx);
-
-    if (NS_FAILED(xpc->WrapNative(cx, obj, mClassID, NS_GET_IID(nsIJSCID), cidObj.address())) || !cidObj ||
-        NS_FAILED(xpc->WrapNative(cx, obj, mInterfaceID, NS_GET_IID(nsIJSIID), iidObj.address())) || !iidObj) {
-        return ThrowAndFail(NS_ERROR_XPC_CANT_CREATE_WN, cx, _retval);
-    }
-
-    JS::Rooted<JS::Value> arg(cx, ObjectValue(*iidObj));
-    RootedValue rval(cx);
-    if (!JS_CallFunctionName(cx, cidObj, "createInstance", JS::HandleValueArray(arg), &rval) ||
-        rval.isPrimitive()) {
-        // createInstance will have thrown an exception
-        *_retval = false;
-        return NS_OK;
-    }
-
-    args.rval().set(rval);
-
-    // call initializer method if supplied
-    if (mInitializer) {
-        RootedObject newObj(cx, &rval.toObject());
-        // first check existence of function property for better error reporting
-        RootedValue fun(cx);
-        if (!JS_GetProperty(cx, newObj, mInitializer, &fun) ||
-            fun.isPrimitive()) {
-            return ThrowAndFail(NS_ERROR_XPC_BAD_INITIALIZER_NAME, cx, _retval);
-        }
-
-        RootedValue dummy(cx);
-        if (!JS_CallFunctionValue(cx, newObj, fun, args, &dummy)) {
-            // function should have thrown an exception
-            *_retval = false;
-            return NS_OK;
-        }
-    }
-
-    return NS_OK;
-}
 
 /*******************************************************/
 // JavaScript Constructor for nsIXPCConstructor objects (Components.Constructor)
 
 class nsXPCComponents_Constructor final :
   public nsIXPCComponents_Constructor,
   public nsIXPCScriptable,
   public nsIClassInfo
@@ -1790,16 +1135,17 @@ public:
     NS_DECL_NSIXPCSCRIPTABLE
     NS_DECL_NSICLASSINFO
 
 public:
     nsXPCComponents_Constructor();
 
 private:
     virtual ~nsXPCComponents_Constructor();
+    static bool InnerConstructor(JSContext* cx, unsigned argc, JS::Value* vp);
     static nsresult CallOrConstruct(nsIXPConnectWrappedNative* wrapper,
                                     JSContext* cx, HandleObject obj,
                                     const CallArgs& args, bool* _retval);
 };
 
 /***************************************************************************/
 NS_IMETHODIMP
 nsXPCComponents_Constructor::GetInterfaces(uint32_t* aCount, nsIID * **aArray)
@@ -1872,16 +1218,72 @@ NS_IMPL_ISUPPORTS(nsXPCComponents_Constr
 #define XPC_MAP_CLASSNAME         nsXPCComponents_Constructor
 #define XPC_MAP_QUOTED_CLASSNAME "nsXPCComponents_Constructor"
 #define XPC_MAP_FLAGS (XPC_SCRIPTABLE_WANT_CALL | \
                        XPC_SCRIPTABLE_WANT_CONSTRUCT | \
                        XPC_SCRIPTABLE_WANT_HASINSTANCE | \
                        XPC_SCRIPTABLE_ALLOW_PROP_MODS_DURING_RESOLVE)
 #include "xpc_map_end.h" /* This will #undef the above */
 
+// static
+bool
+nsXPCComponents_Constructor::InnerConstructor(JSContext* cx, unsigned argc, JS::Value* vp)
+{
+    CallArgs args = CallArgsFromVp(argc, vp);
+    RootedObject callee(cx, &args.callee());
+
+    // Fetch the property name ids, so we can look them up.
+    XPCJSRuntime* runtime = XPCJSRuntime::Get();
+    HandleId classIDProp = runtime->GetStringID(XPCJSContext::IDX_CLASS_ID);
+    HandleId interfaceIDProp = runtime->GetStringID(XPCJSContext::IDX_INTERFACE_ID);
+    HandleId initializerProp = runtime->GetStringID(XPCJSContext::IDX_INITIALIZER);
+
+    // Get properties ('classID', 'interfaceID', and 'initializer') off the
+    // constructor object.
+    RootedValue classIDv(cx);
+    RootedValue interfaceID(cx);
+    RootedValue initializer(cx);
+    if (!JS_GetPropertyById(cx, callee, classIDProp, &classIDv) ||
+        !JS_GetPropertyById(cx, callee, interfaceIDProp, &interfaceID) ||
+        !JS_GetPropertyById(cx, callee, initializerProp, &initializer)) {
+        return false;
+    }
+    if (!classIDv.isObject() || !interfaceID.isObject()) {
+        XPCThrower::Throw(NS_ERROR_UNEXPECTED, cx);
+        return false;
+    }
+
+    // Call 'createInstance' on the 'classID' object to create the object.
+    RootedValue instancev(cx);
+    RootedObject classID(cx, &classIDv.toObject());
+    if (!JS_CallFunctionName(cx, classID, "createInstance",
+                             HandleValueArray(interfaceID), &instancev)) {
+        return false;
+    }
+    if (!instancev.isObject()) {
+        XPCThrower::Throw(NS_ERROR_FAILURE, cx);
+        return false;
+    }
+
+    // Call the method 'initializer' on the instance, passing in our parameters.
+    if (!initializer.isUndefined()) {
+        RootedValue dummy(cx);
+        RootedValue initfunc(cx);
+        RootedId initid(cx);
+        RootedObject instance(cx, &instancev.toObject());
+        if (!JS_ValueToId(cx, initializer, &initid) ||
+            !JS_GetPropertyById(cx, instance, initid, &initfunc) ||
+            !JS_CallFunctionValue(cx, instance, initfunc, args, &dummy)) {
+            return false;
+        }
+    }
+
+    args.rval().set(instancev);
+    return true;
+}
 
 NS_IMETHODIMP
 nsXPCComponents_Constructor::Call(nsIXPConnectWrappedNative* wrapper, JSContext* cx,
                                   JSObject* objArg, const CallArgs& args, bool* _retval)
 {
     RootedObject obj(cx, objArg);
     return CallOrConstruct(wrapper, cx, obj, args, _retval);
 }
@@ -1901,105 +1303,103 @@ nsXPCComponents_Constructor::CallOrConst
                                              const CallArgs& args, bool* _retval)
 {
     // make sure we have at least one arg
 
     if (args.length() < 1) {
         return ThrowAndFail(NS_ERROR_XPC_NOT_ENOUGH_ARGS, cx, _retval);
     }
 
+    // Fetch the property name ids, so we can look them up.
+    XPCJSRuntime* runtime = XPCJSRuntime::Get();
+    HandleId classIDProp = runtime->GetStringID(XPCJSContext::IDX_CLASS_ID);
+    HandleId interfaceIDProp = runtime->GetStringID(XPCJSContext::IDX_INTERFACE_ID);
+    HandleId initializerProp = runtime->GetStringID(XPCJSContext::IDX_INITIALIZER);
+
     // get the various other object pointers we need
 
     nsIXPConnect* xpc = nsIXPConnect::XPConnect();
     XPCWrappedNativeScope* scope = ObjectScope(obj);
     nsCOMPtr<nsIXPCComponents> comp;
 
     if (!xpc || !scope || !(comp = do_QueryInterface(scope->GetComponents()))) {
         return ThrowAndFail(NS_ERROR_XPC_UNEXPECTED, cx, _retval);
     }
 
-    // Do the security check if necessary
-
-    if (NS_FAILED(nsXPConnect::SecurityManager()->CanCreateInstance(cx, nsXPCConstructor::GetCID()))) {
-        // the security manager vetoed. It should have set an exception.
-        *_retval = false;
-        return NS_OK;
+    // Prevent non-chrome code from creating constructor objects.
+    if (!nsContentUtils::IsCallerChrome()) {
+        return ThrowAndFail(NS_ERROR_DOM_XPCONNECT_ACCESS_DENIED, cx, _retval);
     }
 
-    // initialization params for the Constructor object we will create
-    nsCOMPtr<nsIJSCID> cClassID;
-    nsCOMPtr<nsIJSIID> cInterfaceID;
-    const char*        cInitializer = nullptr;
-    JS::UniqueChars cInitializerBytes;
+    JSFunction* ctorfn = JS_NewFunction(cx, InnerConstructor, 0,
+                                        JSFUN_CONSTRUCTOR,
+                                        "XPCOM_Constructor");
+    if (!ctorfn) {
+        return ThrowAndFail(NS_ERROR_OUT_OF_MEMORY, cx, _retval);
+    }
+
+    JS::RootedObject ctor(cx, JS_GetFunctionObject(ctorfn));
 
     if (args.length() >= 3) {
         // args[2] is an initializer function or property name
         RootedString str(cx, ToString(cx, args[2]));
-        if (!str) {
-            return ThrowAndFail(NS_ERROR_XPC_BAD_CONVERT_JS, cx, _retval);
-        }
-
-        cInitializerBytes = JS_EncodeStringToLatin1(cx, str);
-        cInitializer = cInitializerBytes.get();
-        if (!cInitializer) {
-            return ThrowAndFail(NS_ERROR_XPC_BAD_CONVERT_JS, cx, _retval);
+        if (!JS_DefinePropertyById(cx, ctor, initializerProp, str,
+                                   JSPROP_ENUMERATE | JSPROP_READONLY |
+                                   JSPROP_PERMANENT)) {
+            return ThrowAndFail(NS_ERROR_FAILURE, cx, _retval);
         }
     }
 
+    RootedString ifaceName(cx);
     if (args.length() >= 2) {
-        // args[1] is an iid name string
-        // XXXjband support passing "Components.interfaces.foo"?
-
+        ifaceName = ToString(cx, args[1]);
+    } else {
+        ifaceName = JS_NewStringCopyZ(cx, "nsISupports");
+    }
+
+    if (!ifaceName) {
+        return ThrowAndFail(NS_ERROR_XPC_BAD_CONVERT_JS, cx, _retval);
+    }
+
+    // a new scope to avoid warnings about shadowed names
+    {
         nsCOMPtr<nsIXPCComponents_Interfaces> ifaces;
         RootedObject ifacesObj(cx);
 
         // we do the lookup by asking the Components.interfaces object
         // for the property with this name - i.e. we let its caching of these
         // nsIJSIID objects work for us.
 
         if (NS_FAILED(comp->GetInterfaces(getter_AddRefs(ifaces))) ||
             NS_FAILED(xpc->WrapNative(cx, obj, ifaces,
                                       NS_GET_IID(nsIXPCComponents_Interfaces),
                                       ifacesObj.address())) || !ifacesObj) {
             return ThrowAndFail(NS_ERROR_XPC_UNEXPECTED, cx, _retval);
         }
 
-        RootedString str(cx, ToString(cx, args[1]));
         RootedId id(cx);
-        if (!str || !JS_StringToId(cx, str, &id)) {
+        if (!JS_StringToId(cx, ifaceName, &id)) {
             return ThrowAndFail(NS_ERROR_XPC_BAD_CONVERT_JS, cx, _retval);
         }
 
         RootedValue val(cx);
         if (!JS_GetPropertyById(cx, ifacesObj, id, &val) || val.isPrimitive()) {
             return ThrowAndFail(NS_ERROR_XPC_BAD_IID, cx, _retval);
         }
 
-        nsCOMPtr<nsIXPConnectWrappedNative> wn;
-        if (NS_FAILED(xpc->GetWrappedNativeOfJSObject(cx, &val.toObject(),
-                                                      getter_AddRefs(wn))) || !wn ||
-            !(cInterfaceID = do_QueryInterface(wn->Native()))) {
-            return ThrowAndFail(NS_ERROR_XPC_UNEXPECTED, cx, _retval);
-        }
-    } else {
-        const nsXPTInterfaceInfo* info =
-            nsXPTInterfaceInfo::ByIID(NS_GET_IID(nsISupports));
-
-        if (info) {
-            cInterfaceID = nsJSIID::NewID(info);
-        }
-        if (!cInterfaceID) {
-            return ThrowAndFail(NS_ERROR_XPC_UNEXPECTED, cx, _retval);
+        if (!JS_DefinePropertyById(cx, ctor, interfaceIDProp, val,
+                                   JSPROP_ENUMERATE | JSPROP_READONLY |
+                                   JSPROP_PERMANENT)) {
+            return ThrowAndFail(NS_ERROR_FAILURE, cx, _retval);
         }
     }
 
     // a new scope to avoid warnings about shadowed names
     {
         // argv[0] is a contractid name string
-        // XXXjband support passing "Components.classes.foo"?
 
         // we do the lookup by asking the Components.classes object
         // for the property with this name - i.e. we let its caching of these
         // nsIJSCID objects work for us.
 
         nsCOMPtr<nsIXPCComponents_Classes> classes;
         RootedObject classesObj(cx);
 
@@ -2016,44 +1416,35 @@ nsXPCComponents_Constructor::CallOrConst
             return ThrowAndFail(NS_ERROR_XPC_BAD_CONVERT_JS, cx, _retval);
         }
 
         RootedValue val(cx);
         if (!JS_GetPropertyById(cx, classesObj, id, &val) || val.isPrimitive()) {
             return ThrowAndFail(NS_ERROR_XPC_BAD_CID, cx, _retval);
         }
 
-        nsCOMPtr<nsIXPConnectWrappedNative> wn;
-        if (NS_FAILED(xpc->GetWrappedNativeOfJSObject(cx, val.toObjectOrNull(),
-                                                      getter_AddRefs(wn))) || !wn ||
-            !(cClassID = do_QueryInterface(wn->Native()))) {
-            return ThrowAndFail(NS_ERROR_XPC_UNEXPECTED, cx, _retval);
+        if (!JS_DefinePropertyById(cx, ctor, classIDProp, val,
+                                   JSPROP_ENUMERATE | JSPROP_READONLY |
+                                   JSPROP_PERMANENT)) {
+            return ThrowAndFail(NS_ERROR_FAILURE, cx, _retval);
         }
     }
 
-    nsCOMPtr<nsIXPCConstructor> ctor = new nsXPCConstructor(cClassID, cInterfaceID, cInitializer);
-    RootedObject newObj(cx);
-
-    if (NS_FAILED(xpc->WrapNative(cx, obj, ctor, NS_GET_IID(nsIXPCConstructor), newObj.address())) || !newObj) {
-        return ThrowAndFail(NS_ERROR_XPC_CANT_CREATE_WN, cx, _retval);
-    }
-
-    args.rval().setObject(*newObj);
+    args.rval().setObject(*ctor);
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsXPCComponents_Constructor::HasInstance(nsIXPConnectWrappedNative* wrapper,
                                          JSContext * cx, JSObject * obj,
-                                         HandleValue val, bool* bp,
+                                         HandleValue val, bool* isa,
                                          bool* _retval)
 {
-    if (bp) {
-        *bp = JSValIsInterfaceOfType(cx, val, NS_GET_IID(nsIXPCConstructor));
-    }
+    *isa = val.isObject() &&
+        JS_IsNativeFunction(&val.toObject(), InnerConstructor);
     return NS_OK;
 }
 
 class nsXPCComponents_Utils final :
             public nsIXPCComponents_Utils,
             public nsIXPCScriptable
 {
 public:
@@ -3346,25 +2737,23 @@ nsXPCComponentsBase::~nsXPCComponentsBas
 nsXPCComponents::~nsXPCComponents()
 {
 }
 
 void
 nsXPCComponentsBase::ClearMembers()
 {
     mInterfaces = nullptr;
-    mInterfacesByID = nullptr;
     mResults = nullptr;
 }
 
 void
 nsXPCComponents::ClearMembers()
 {
     mClasses = nullptr;
-    mClassesByID = nullptr;
     mID = nullptr;
     mException = nullptr;
     mConstructor = nullptr;
     mUtils = nullptr;
 
     nsXPCComponentsBase::ClearMembers();
 }
 
@@ -3375,19 +2764,17 @@ NS_IMETHODIMP _class::Get##_n(nsIXPCComp
     if (!m##_n)                                                               \
         m##_n = new nsXPCComponents_##_n();                                   \
     RefPtr<nsXPCComponents_##_n> ret = m##_n;                               \
     ret.forget(a##_n);                                                        \
     return NS_OK;                                                             \
 }
 
 XPC_IMPL_GET_OBJ_METHOD(nsXPCComponentsBase, Interfaces)
-XPC_IMPL_GET_OBJ_METHOD(nsXPCComponentsBase, InterfacesByID)
 XPC_IMPL_GET_OBJ_METHOD(nsXPCComponents, Classes)
-XPC_IMPL_GET_OBJ_METHOD(nsXPCComponents, ClassesByID)
 XPC_IMPL_GET_OBJ_METHOD(nsXPCComponentsBase, Results)
 XPC_IMPL_GET_OBJ_METHOD(nsXPCComponents, ID)
 XPC_IMPL_GET_OBJ_METHOD(nsXPCComponents, Exception)
 XPC_IMPL_GET_OBJ_METHOD(nsXPCComponents, Constructor)
 XPC_IMPL_GET_OBJ_METHOD(nsXPCComponents, Utils)
 
 #undef XPC_IMPL_GET_OBJ_METHOD
 /*******************************************/
--- a/js/xpconnect/src/XPCConvert.cpp
+++ b/js/xpconnect/src/XPCConvert.cpp
@@ -189,24 +189,17 @@ XPCConvert::NativeData2JS(MutableHandleV
     case nsXPTType::T_IID:
     {
         nsID* iid2 = *static_cast<nsID* const*>(s);
         if (!iid2) {
             d.setNull();
             return true;
         }
 
-        RootedObject scope(cx, JS::CurrentGlobalOrNull(cx));
-        JSObject* obj = xpc_NewIDObject(cx, scope, *iid2);
-        if (!obj) {
-            return false;
-        }
-
-        d.setObject(*obj);
-        return true;
+        return xpc::ID2JSValue(cx, *iid2, d);
     }
 
     case nsXPTType::T_ASTRING:
     {
         const nsAString* p = static_cast<const nsAString*>(s);
         if (!p || p->IsVoid()) {
             d.setNull();
             return true;
@@ -578,35 +571,23 @@ XPCConvert::JSData2Native(JSContext* cx,
     }
     case nsXPTType::T_JSVAL :
         *((Value*)d) = s;
         break;
     case nsXPTType::T_VOID:
         XPC_LOG_ERROR(("XPCConvert::JSData2Native : void* params not supported"));
         NS_ERROR("void* params not supported");
         return false;
+
     case nsXPTType::T_IID:
-    {
-        const nsID* pid = nullptr;
-
-        // There's no good reason to pass a null IID.
-        if (s.isNullOrUndefined()) {
-            if (pErr) {
-                *pErr = NS_ERROR_XPC_BAD_CONVERT_JS;
-            }
-            return false;
+        if (Maybe<nsID> id = xpc::JSValue2ID(cx, s)) {
+            *((const nsID**)d) = id.ref().Clone();
+            return true;
         }
-
-        if (!s.isObject() ||
-            !(pid = xpc_JSObjectToID(cx, &s.toObject()))) {
-            return false;
-        }
-        *((const nsID**)d) = pid->Clone();
-        return true;
-    }
+        return false;
 
     case nsXPTType::T_ASTRING:
     {
         nsAString* ws = (nsAString*)d;
         if (s.isUndefined() || s.isNull()) {
             ws->SetIsVoid(true);
             return true;
         }
--- a/js/xpconnect/src/XPCForwards.h
+++ b/js/xpconnect/src/XPCForwards.h
@@ -39,23 +39,20 @@ class IID2NativeInterfaceMap;
 class ClassInfo2NativeSetMap;
 class ClassInfo2WrappedNativeProtoMap;
 class NativeSetMap;
 class XPCWrappedNativeProtoMap;
 class JSObject2JSObjectMap;
 
 class nsXPCComponents;
 class nsXPCComponents_Interfaces;
-class nsXPCComponents_InterfacesByID;
 class nsXPCComponents_Classes;
-class nsXPCComponents_ClassesByID;
 class nsXPCComponents_Results;
 class nsXPCComponents_ID;
 class nsXPCComponents_Exception;
 class nsXPCComponents_Constructor;
 class nsXPCComponents_Utils;
-class nsXPCConstructor;
 
 class AutoMarkingPtr;
 
 class xpcProperty;
 
 #endif /* xpcforwards_h___ */
--- a/js/xpconnect/src/XPCJSID.cpp
+++ b/js/xpconnect/src/XPCJSID.cpp
@@ -2,441 +2,375 @@
 /* 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/. */
 
 /* An xpcom implementation of the JavaScript nsIID and nsCID objects. */
 
 #include "xpcprivate.h"
-#include "xpc_make_class.h"
 #include "mozilla/dom/BindingUtils.h"
 #include "mozilla/Attributes.h"
 #include "mozilla/jsipc/CrossProcessObjectWrappers.h"
-#include "mozilla/StaticPtr.h"
 
 using namespace mozilla::dom;
 using namespace JS;
 
-/***************************************************************************/
-// nsJSID
-
-NS_IMPL_CLASSINFO(nsJSID, nullptr, 0, NS_JS_ID_CID)
-NS_IMPL_ISUPPORTS_CI(nsJSID, nsIJSID)
-
-const char nsJSID::gNoString[] = "";
-
-nsJSID::nsJSID()
-    : mID(GetInvalidIID()),
-      mNumber(const_cast<char*>(gNoString)),
-      mName(const_cast<char*>(gNoString))
-{
-}
+namespace xpc {
 
-nsJSID::~nsJSID()
-{
-    if (mNumber && mNumber != gNoString) {
-        free(mNumber);
-    }
-    if (mName && mName != gNoString) {
-        free(mName);
-    }
-}
-
-void nsJSID::Reset()
-{
-    mID = GetInvalidIID();
-
-    if (mNumber && mNumber != gNoString) {
-        free(mNumber);
-    }
-    if (mName && mName != gNoString) {
-        free(mName);
-    }
-
-    mNumber = mName = nullptr;
-}
+/******************************************************************************
+ * # Generic IDs #
+ *
+ * Generic IDs are the type of JS object created by most code which passes nsID
+ * objects to JavaScript code. They provide no special methods, and only store
+ * the raw nsID value.
+ *
+ * The nsID value is stored in 4 reserved slots, with 32 bits of the 128-bit
+ * value stored in each slot. Getter code extracts this data, and combines them
+ * back into the nsID value.
+ */
+static bool ID_Equals(JSContext* aCx, unsigned aArgc, Value* aVp);
+static bool ID_GetNumber(JSContext* aCx, unsigned aArgc, Value* aVp);
 
-void
-nsJSID::SetName(const char* name)
-{
-    MOZ_ASSERT(!mName || mName == gNoString, "name already set");
-    MOZ_ASSERT(name, "null name");
-    mName = NS_xstrdup(name);
-}
-
-NS_IMETHODIMP
-nsJSID::GetName(char * *aName)
-{
-    if (!aName) {
-        return NS_ERROR_NULL_POINTER;
-    }
-
-    if (!NameIsSet()) {
-        SetNameToNoString();
-    }
-    MOZ_ASSERT(mName, "name not set");
-    *aName = NS_xstrdup(mName);
-    return NS_OK;
-}
+// Generic ID objects contain 4 reserved slots, each containing a uint32_t with
+// 1/4 of the representation of the nsID value. This allows us to avoid an extra
+// allocation for the nsID object, and eliminates the need for a finalizer.
+enum { kID_Slot0, kID_Slot1, kID_Slot2, kID_Slot3, kID_SlotCount };
+static const js::Class sID_Class = {
+    "nsJSID",
+    JSCLASS_HAS_RESERVED_SLOTS(kID_SlotCount),
+    JS_NULL_CLASS_OPS
+};
 
-NS_IMETHODIMP
-nsJSID::GetNumber(char * *aNumber)
-{
-    if (!aNumber) {
-        return NS_ERROR_NULL_POINTER;
-    }
 
-    if (!mNumber) {
-        if (!(mNumber = mID.ToString())) {
-            mNumber = const_cast<char*>(gNoString);
-        }
-    }
-
-    *aNumber = NS_xstrdup(mNumber);
-    return NS_OK;
-}
-
-NS_IMETHODIMP_(const nsID*)
-nsJSID::GetID()
-{
-    return &mID;
-}
+/******************************************************************************
+ * # Interface IDs #
+ *
+ * In addition to the properties exposed by Generic ID objects, IID supports
+ * 'instanceof', exposes constant properties defined on the class, and exposes
+ * the interface name as the 'name' and 'toString()' values.
+ */
+static bool IID_HasInstance(JSContext* aCx, unsigned aArgc, Value* aVp);
+static bool IID_GetName(JSContext* aCx, unsigned aArgc, Value* aVp);
 
-NS_IMETHODIMP
-nsJSID::GetValid(bool* aValid)
-{
-    if (!aValid) {
-        return NS_ERROR_NULL_POINTER;
-    }
-
-    *aValid = IsValid();
-    return NS_OK;
-}
-
-NS_IMETHODIMP
-nsJSID::Equals(nsIJSID* other, bool* _retval)
-{
-    if (!_retval) {
-        return NS_ERROR_NULL_POINTER;
-    }
+// Interface ID objects use a single reserved slot containing a pointer to the
+// nsXPTInterfaceInfo object for the interface in question.
+enum { kIID_InfoSlot, kIID_SlotCount };
+static const js::Class sIID_Class = {
+    "nsJSIID",
+    JSCLASS_HAS_RESERVED_SLOTS(kIID_SlotCount),
+    JS_NULL_CLASS_OPS
+};
 
-    if (!other || mID.Equals(GetInvalidIID())) {
-        *_retval = false;
-        return NS_OK;
-    }
-
-    *_retval = other->GetID()->Equals(mID);
-    return NS_OK;
-}
-
-NS_IMETHODIMP
-nsJSID::Initialize(const char* idString)
-{
-    if (!idString) {
-        return NS_ERROR_NULL_POINTER;
-    }
-
-    if (*idString != '\0' && mID.Equals(GetInvalidIID())) {
-        Reset();
-
-        if (idString[0] == '{') {
-            if (mID.Parse(idString)) {
-                return NS_OK;
-            }
 
-            // error - reset to invalid state
-            mID = GetInvalidIID();
-        }
-    }
-    return NS_ERROR_FAILURE;
-}
+/******************************************************************************
+ * # Contract IDs #
+ *
+ * In addition to the properties exposed by Generic ID objects, Contract IDs
+ * expose 'getService' and 'createInstance' methods, and expose the contractID
+ * string as '.name' and '.toString()'.
+ */
+static bool CID_CreateInstance(JSContext* aCx, unsigned aArgc, Value* aVp);
+static bool CID_GetService(JSContext* aCx, unsigned aArgc, Value* aVp);
+static bool CID_GetName(JSContext* aCx, unsigned aArgc, Value* aVp);
 
-void
-nsJSID::InitWithName(const nsID& id, const char* nameString)
-{
-    MOZ_ASSERT(nameString, "no name");
-    Reset();
-    mID = id;
-    SetName(nameString);
-}
+// ContractID objects use a single reserved slot, containing the ContractID. The
+// nsCID value for this object is looked up when the object is being unwrapped.
+enum { kCID_ContractSlot, kCID_SlotCount };
+static const js::Class sCID_Class = {
+    "nsJSCID",
+    JSCLASS_HAS_RESERVED_SLOTS(kCID_SlotCount),
+    JS_NULL_CLASS_OPS
+};
 
-// try to use the name, if no name, then use the number
-NS_IMETHODIMP
-nsJSID::ToString(char** _retval)
+
+/**
+ * Ensure that the nsID prototype objects have been created for the current
+ * global, and extract the prototype values.
+ */
+static JSObject*
+GetIDPrototype(JSContext* aCx, const js::Class* aClass)
 {
-    if (mName && mName != gNoString) {
-        return GetName(_retval);
-    }
-
-    return GetNumber(_retval);
-}
-
-const nsID&
-nsJSID::GetInvalidIID() const
-{
-    // {BB1F47B0-D137-11d2-9841-006008962422}
-    static const nsID invalid = {0xbb1f47b0, 0xd137, 0x11d2,
-                                  {0x98, 0x41, 0x0, 0x60, 0x8, 0x96, 0x24, 0x22}};
-    return invalid;
-}
-
-//static
-already_AddRefed<nsJSID>
-nsJSID::NewID(const char* str)
-{
-    if (!str) {
-        NS_ERROR("no string");
+    XPCWrappedNativeScope* scope = ObjectScope(CurrentGlobalOrNull(aCx));
+    if (NS_WARN_IF(!scope)) {
         return nullptr;
     }
 
-    RefPtr<nsJSID> idObj = new nsJSID();
-    NS_ENSURE_SUCCESS(idObj->Initialize(str), nullptr);
-    return idObj.forget();
+    // Create prototype objects for the JSID objects if they haven't been
+    // created for this scope yet.
+    if (!scope->mIDProto) {
+        MOZ_ASSERT(!scope->mIIDProto && !scope->mCIDProto);
+
+        RootedObject idProto(aCx, JS_NewPlainObject(aCx));
+        RootedObject iidProto(aCx, JS_NewObjectWithGivenProto(aCx, nullptr, idProto));
+        RootedObject cidProto(aCx, JS_NewObjectWithGivenProto(aCx, nullptr, idProto));
+        RootedId hasInstance(aCx, SYMBOL_TO_JSID(GetWellKnownSymbol(aCx, SymbolCode::hasInstance)));
+
+        const uint32_t kFlags = JSPROP_READONLY | JSPROP_ENUMERATE | JSPROP_PERMANENT;
+        const uint32_t kNoEnum = JSPROP_READONLY | JSPROP_PERMANENT;
+
+        bool ok = idProto && iidProto && cidProto &&
+            // Methods and properties on all ID Objects:
+            JS_DefineFunction(aCx, idProto, "equals", ID_Equals, 1, kFlags) &&
+            JS_DefineProperty(aCx, idProto, "number", ID_GetNumber, nullptr, kFlags) &&
+
+            // Methods for IfaceID objects, which also inherit ID properties:
+            JS_DefineFunctionById(aCx, iidProto, hasInstance, IID_HasInstance, 1, kNoEnum) &&
+            JS_DefineProperty(aCx, iidProto, "name", IID_GetName, nullptr, kFlags) &&
+
+            // Methods for ContractID objects, which also inherit ID properties:
+            JS_DefineFunction(aCx, cidProto, "createInstance", CID_CreateInstance, 1, kFlags) &&
+            JS_DefineFunction(aCx, cidProto, "getService", CID_GetService, 1, kFlags) &&
+            JS_DefineProperty(aCx, cidProto, "name", CID_GetName, nullptr, kFlags) &&
+
+            // ToString returns '.number' on generic IDs, while returning
+            // '.name' on other ID types.
+            JS_DefineFunction(aCx, idProto, "toString", ID_GetNumber, 0, kFlags) &&
+            JS_DefineFunction(aCx, iidProto, "toString", IID_GetName, 0, kFlags) &&
+            JS_DefineFunction(aCx, cidProto, "toString", CID_GetName, 0, kFlags);
+        if (!ok) {
+            return nullptr;
+        }
+
+        scope->mIDProto = idProto;
+        scope->mIIDProto = iidProto;
+        scope->mCIDProto = cidProto;
+    }
+
+    if (aClass == &sID_Class) {
+        return scope->mIDProto;
+    } else if (aClass == &sIID_Class) {
+        return scope->mIIDProto;
+    } else if (aClass == &sCID_Class) {
+        return scope->mCIDProto;
+    }
+
+    MOZ_CRASH("Unrecognized ID Object Class");
 }
 
-//static
-already_AddRefed<nsJSID>
-nsJSID::NewID(const nsID& id)
+// Unwrap the given value to an object with the correct class, or nullptr.
+static JSObject*
+GetIDObject(HandleValue aVal, const Class* aClass)
 {
-    RefPtr<nsJSID> idObj = new nsJSID();
-    idObj->mID = id;
-    idObj->mName = nullptr;
-    idObj->mNumber = nullptr;
-    return idObj.forget();
+    if (aVal.isObject()) {
+        JSObject* obj = js::CheckedUnwrap(&aVal.toObject());
+        if (obj && js::GetObjectClass(obj) == aClass) {
+            return obj;
+        }
+    }
+    return nullptr;
 }
 
 
-/***************************************************************************/
-// Class object support so that we can share prototypes of wrapper
-
-// This class exists just so we can have a shared scriptable helper for
-// the nsJSIID class. The instances implement their own helpers. But we
-// needed to be able to indicate to the shared prototypes this single flag:
-// XPC_SCRIPTABLE_DONT_ENUM_STATIC_PROPS. And having a class to do it is
-// the only means we have. Setting this flag on any given instance scriptable
-// helper is not sufficient to convey the information that we don't want
-// static properties enumerated on the shared proto.
-
-class SharedScriptableHelperForJSIID final : public nsIXPCScriptable
-{
-    ~SharedScriptableHelperForJSIID() {}
-public:
-    NS_DECL_ISUPPORTS
-    NS_DECL_NSIXPCSCRIPTABLE
-    SharedScriptableHelperForJSIID() {}
-};
-
-NS_IMPL_ISUPPORTS(SharedScriptableHelperForJSIID,
-                  nsIXPCScriptable)
-
-// The nsIXPCScriptable map declaration that will generate stubs for us...
-#define XPC_MAP_CLASSNAME SharedScriptableHelperForJSIID
-#define XPC_MAP_QUOTED_CLASSNAME "JSIID"
-#define XPC_MAP_FLAGS XPC_SCRIPTABLE_ALLOW_PROP_MODS_DURING_RESOLVE
-#include "xpc_map_end.h" /* This will #undef the above */
-
-static mozilla::StaticRefPtr<nsIXPCScriptable> gSharedScriptableHelperForJSIID;
-static bool gClassObjectsWereInited = false;
-
-static void EnsureClassObjectsInitialized()
-{
-    if (!gClassObjectsWereInited) {
-        gSharedScriptableHelperForJSIID = new SharedScriptableHelperForJSIID();
-
-        gClassObjectsWereInited = true;
-    }
-}
-
-static nsresult GetSharedScriptableHelperForJSIID(nsIXPCScriptable** helper)
-{
-    EnsureClassObjectsInitialized();
-    nsCOMPtr<nsIXPCScriptable> temp = gSharedScriptableHelperForJSIID.get();
-    temp.forget(helper);
-    return NS_OK;
-}
-
-/******************************************************/
-
-#define NULL_CID                                                              \
-{ 0x00000000, 0x0000, 0x0000,                                                 \
-  { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } }
-
-NS_DECL_CI_INTERFACE_GETTER(nsJSIID)
-NS_IMPL_CLASSINFO(nsJSIID, GetSharedScriptableHelperForJSIID, 0, NULL_CID)
-
-NS_DECL_CI_INTERFACE_GETTER(nsJSCID)
-NS_IMPL_CLASSINFO(nsJSCID, nullptr, 0, NULL_CID)
-
-void xpc_DestroyJSxIDClassObjects()
+/**
+ * Unwrap an nsID object from a JSValue.
+ *
+ * For Generic ID objects, this function will extract the nsID from reserved
+ * slots. For IfaceID objects, it will be extracted from the nsXPTInterfaceInfo,
+ * and for ContractID objects, the ContractID's corresponding CID will be looked
+ * up.
+ */
+Maybe<nsID>
+JSValue2ID(JSContext* aCx, HandleValue aVal)
 {
-    if (gClassObjectsWereInited) {
-        NS_IF_RELEASE(NS_CLASSINFO_NAME(nsJSIID));
-        NS_IF_RELEASE(NS_CLASSINFO_NAME(nsJSCID));
-        gSharedScriptableHelperForJSIID = nullptr;
-
-        gClassObjectsWereInited = false;
-    }
-}
-
-/***************************************************************************/
-
-NS_IMPL_QUERY_INTERFACE_CI(nsJSIID,
-                           nsIJSID,
-                           nsIJSIID,
-                           nsIXPCScriptable)
-
-NS_IMPL_ADDREF(nsJSIID)
-NS_IMPL_RELEASE(nsJSIID)
-NS_IMPL_CI_INTERFACE_GETTER(nsJSIID, nsIJSID, nsIJSIID)
-
-// The nsIXPCScriptable map declaration that will generate stubs for us...
-#define XPC_MAP_CLASSNAME         nsJSIID
-#define XPC_MAP_QUOTED_CLASSNAME "nsJSIID"
-#define XPC_MAP_FLAGS (XPC_SCRIPTABLE_WANT_RESOLVE | \
-                       XPC_SCRIPTABLE_WANT_ENUMERATE | \
-                       XPC_SCRIPTABLE_WANT_HASINSTANCE | \
-                       XPC_SCRIPTABLE_ALLOW_PROP_MODS_DURING_RESOLVE)
-#include "xpc_map_end.h" /* This will #undef the above */
-
-
-nsJSIID::nsJSIID(const nsXPTInterfaceInfo* aInfo)
-    : mInfo(aInfo)
-{
-}
-
-nsJSIID::~nsJSIID() {}
-
-// If mInfo is present we use it and ignore mDetails, else we use mDetails.
-
-NS_IMETHODIMP nsJSIID::GetName(char * *aName)
-{
-    *aName = moz_xstrdup(mInfo->Name());
-    return NS_OK;
-}
-
-NS_IMETHODIMP nsJSIID::GetNumber(char * *aNumber)
-{
-    char str[NSID_LENGTH];
-    mInfo->IID().ToProvidedString(str);
-    *aNumber = (char*) moz_xmemdup(str, NSID_LENGTH);
-    return NS_OK;
-}
-
-NS_IMETHODIMP_(const nsID*) nsJSIID::GetID()
-{
-    return &mInfo->IID();
-}
-
-NS_IMETHODIMP nsJSIID::GetValid(bool* aValid)
-{
-    *aValid = true;
-    return NS_OK;
-}
-
-NS_IMETHODIMP nsJSIID::Equals(nsIJSID* other, bool* _retval)
-{
-    if (!_retval) {
-        return NS_ERROR_NULL_POINTER;
+    if (!aVal.isObject()) {
+        return Nothing();
     }
 
-    if (!other) {
-        *_retval = false;
-        return NS_OK;
-    }
-
-    *_retval = mInfo->IID() == *other->GetID();
-    return NS_OK;
-}
-
-NS_IMETHODIMP nsJSIID::Initialize(const char* idString)
-{
-    return NS_ERROR_FAILURE;
-}
+    mozilla::Maybe<nsID> id;
+    RootedObject obj(aCx, js::CheckedUnwrap(&aVal.toObject()));
+    if (js::GetObjectClass(obj) == &sID_Class) {
+        // Extract the raw bytes of the nsID from reserved slots.
+        uint32_t rawid[] = {
+            js::GetReservedSlot(obj, kID_Slot0).toPrivateUint32(),
+            js::GetReservedSlot(obj, kID_Slot1).toPrivateUint32(),
+            js::GetReservedSlot(obj, kID_Slot2).toPrivateUint32(),
+            js::GetReservedSlot(obj, kID_Slot3).toPrivateUint32()
+        };
 
-NS_IMETHODIMP nsJSIID::ToString(char** _retval)
-{
-    *_retval = moz_xstrdup(mInfo->Name());
-    return NS_OK;
-}
+        // Construct a nsID inside the Maybe, and copy the rawid into it.
+        id.emplace();
+        memcpy(id.ptr(), &rawid, sizeof(nsID));
+    } else if (js::GetObjectClass(obj) == &sIID_Class) {
+        // IfaceID objects store a nsXPTInterfaceInfo* pointer.
+        auto* info = static_cast<const nsXPTInterfaceInfo*>(
+            js::GetReservedSlot(obj, kIID_InfoSlot).toPrivate());
+        id.emplace(info->IID());
+    } else if (js::GetObjectClass(obj) == &sCID_Class) {
+        // ContractID objects store a ContractID string.
+        JS::UniqueChars contractId = JS_EncodeStringToLatin1(aCx,
+            js::GetReservedSlot(obj, kCID_ContractSlot).toString());
 
-// static
-already_AddRefed<nsJSIID>
-nsJSIID::NewID(const nsXPTInterfaceInfo* aInfo)
-{
-    if (!aInfo) {
-        NS_ERROR("no info");
-        return nullptr;
+        // NOTE(nika): If we directly access the nsComponentManager, we can do
+        // this with a more-basic pointer lookup:
+        //     nsFactoryEntry* entry = nsComponentManagerImpl::gComponentManager->
+        //         GetFactoryEntry(contractId.ptr(), contractId.length());
+        //     if (entry) id.emplace(entry->mCIDEntry->cid);
+
+        nsCOMPtr<nsIComponentRegistrar> registrar;
+        nsresult rv = NS_GetComponentRegistrar(getter_AddRefs(registrar));
+        if (NS_FAILED(rv) || !registrar) {
+            return Nothing();
+        }
+
+        nsCID* cid = nullptr;
+        if (NS_SUCCEEDED(registrar->ContractIDToCID(contractId.get(), &cid))) {
+            id.emplace(*cid);
+            free(cid);
+        }
     }
-
-    RefPtr<nsJSIID> idObj = new nsJSIID(aInfo);
-    return idObj.forget();
+    return id;
 }
 
 
-NS_IMETHODIMP
-nsJSIID::Resolve(nsIXPConnectWrappedNative* wrapper,
-                 JSContext * cx, JSObject * objArg,
-                 jsid idArg, bool* resolvedp,
-                 bool* _retval)
+/**
+ * Public ID Object Constructor Methods
+ */
+static JSObject*
+NewIDObjectHelper(JSContext* aCx, const js::Class* aClass)
 {
-    RootedObject obj(cx, objArg);
-    RootedId id(cx, idArg);
-    XPCCallContext ccx(cx);
+    RootedObject proto(aCx, GetIDPrototype(aCx, aClass));
+    if (proto) {
+        return JS_NewObjectWithGivenProto(aCx, Jsvalify(aClass), proto);
+    }
+    return nullptr;
+}
 
-    RefPtr<XPCNativeInterface> iface =
-        XPCNativeInterface::GetNewOrUsed(mInfo);
-
-    if (!iface) {
-        return NS_OK;
+bool
+ID2JSValue(JSContext* aCx, const nsID& aId, MutableHandleValue aVal)
+{
+    RootedObject obj(aCx, NewIDObjectHelper(aCx, &sID_Class));
+    if (!obj) {
+        return false;
     }
 
-    XPCNativeMember* member = iface->FindMember(id);
-    if (member && member->IsConstant()) {
-        RootedValue val(cx);
-        if (!member->GetConstantValue(ccx, iface, val.address())) {
-            return NS_ERROR_OUT_OF_MEMORY;
+    // Get the data in nsID as 4 uint32_ts, and store them in slots.
+    uint32_t rawid[4];
+    memcpy(&rawid, &aId, sizeof(nsID));
+    static_assert(sizeof(nsID) == sizeof(rawid), "Wrong size of nsID");
+    js::SetReservedSlot(obj, kID_Slot0, PrivateUint32Value(rawid[0]));
+    js::SetReservedSlot(obj, kID_Slot1, PrivateUint32Value(rawid[1]));
+    js::SetReservedSlot(obj, kID_Slot2, PrivateUint32Value(rawid[2]));
+    js::SetReservedSlot(obj, kID_Slot3, PrivateUint32Value(rawid[3]));
+
+    aVal.setObject(*obj);
+    return true;
+}
+
+bool
+IfaceID2JSValue(JSContext* aCx, const nsXPTInterfaceInfo& aInfo,
+                MutableHandleValue aVal)
+{
+    RootedObject obj(aCx, NewIDObjectHelper(aCx, &sIID_Class));
+    if (!obj) {
+        return false;
+    }
+
+    // Define any constants defined on the interface on the ID object.
+    //
+    // NOTE: When InterfaceIDs were implemented using nsIXPCScriptable and
+    // XPConnect, this was implemented using a 'resolve' hook. It has been
+    // changed to happen at creation-time as most interfaces shouldn't have many
+    // constants, and this is likely to turn out cheaper.
+    RootedValue constant(aCx);
+    for (uint16_t i = 0; i < aInfo.ConstantCount(); ++i) {
+        constant.set(aInfo.Constant(i).JSValue());
+        if (!JS_DefineProperty(aCx, obj, aInfo.Constant(i).Name(), constant,
+                               JSPROP_READONLY | JSPROP_ENUMERATE |
+                               JSPROP_PERMANENT)) {
+            return false;
         }
-
-        *resolvedp = true;
-        *_retval = JS_DefinePropertyById(cx, obj, id, val,
-                                         JSPROP_ENUMERATE | JSPROP_READONLY |
-                                         JSPROP_PERMANENT | JSPROP_RESOLVING);
     }
 
-    return NS_OK;
+    // The InterfaceInfo is stored in a reserved slot.
+    js::SetReservedSlot(obj, kIID_InfoSlot, PrivateValue((void*)&aInfo));
+    aVal.setObject(*obj);
+    return true;
+}
+
+bool
+ContractID2JSValue(JSContext* aCx, JSString* aContract, MutableHandleValue aVal)
+{
+    RootedString jsContract(aCx, aContract);
+
+    {
+        // It is perfectly safe to have a ContractID object with an invalid
+        // ContractID, but is usually a bug.
+        nsCOMPtr<nsIComponentRegistrar> registrar;
+        NS_GetComponentRegistrar(getter_AddRefs(registrar));
+        if (!registrar) {
+            return false;
+        }
+
+        bool registered = false;
+        JS::UniqueChars contract = JS_EncodeStringToLatin1(aCx, jsContract);
+        registrar->IsContractIDRegistered(contract.get(), &registered);
+        if (!registered) {
+            return false;
+        }
+    }
+
+    RootedObject obj(aCx, NewIDObjectHelper(aCx, &sCID_Class));
+    if (!obj) {
+        return false;
+    }
+
+    // The Contract is stored in a reserved slot.
+    js::SetReservedSlot(obj, kCID_ContractSlot, StringValue(jsContract));
+    aVal.setObject(*obj);
+    return true;
 }
 
-NS_IMETHODIMP
-nsJSIID::Enumerate(nsIXPConnectWrappedNative* wrapper,
-                   JSContext * cx, JSObject * objArg, bool* _retval)
-{
-    // In this case, let's just eagerly resolve...
+
+/******************************************************************************
+ * # Method & Property Getter Implementations #
+ */
 
-    RootedObject obj(cx, objArg);
-    XPCCallContext ccx(cx);
+// NOTE: This method is used both for 'get ID.prototype.number' and
+// 'ID.prototype.toString'.
+static bool
+ID_GetNumber(JSContext* aCx, unsigned aArgc, Value* aVp)
+{
+    CallArgs args = CallArgsFromVp(aArgc, aVp);
 
-    RefPtr<XPCNativeInterface> iface =
-        XPCNativeInterface::GetNewOrUsed(mInfo);
-
-    if (!iface) {
-        return NS_OK;
+    Maybe<nsID> id = JSValue2ID(aCx, args.thisv());
+    if (!id) {
+        return Throw(aCx, NS_ERROR_XPC_BAD_CONVERT_JS);
     }
 
-    uint16_t count = iface->GetMemberCount();
-    for (uint16_t i = 0; i < count; i++) {
-        XPCNativeMember* member = iface->GetMemberAt(i);
-        if (member && member->IsConstant() &&
-            !xpc_ForcePropertyResolve(cx, obj, member->GetName())) {
-            return NS_ERROR_UNEXPECTED;
-        }
+    char buf[NSID_LENGTH];
+    id->ToProvidedString(buf);
+    JSString* jsnum = JS_NewStringCopyZ(aCx, buf);
+    if (!jsnum) {
+        return Throw(aCx, NS_ERROR_OUT_OF_MEMORY);
     }
-    return NS_OK;
+
+    args.rval().setString(jsnum);
+    return true;
 }
 
+static bool
+ID_Equals(JSContext* aCx, unsigned aArgc, Value* aVp)
+{
+    CallArgs args = CallArgsFromVp(aArgc, aVp);
+    if (!args.requireAtLeast(aCx, "nsID.equals", 1)) {
+        return false;
+    }
+
+    Maybe<nsID> id = JSValue2ID(aCx, args.thisv());
+    Maybe<nsID> id2 = JSValue2ID(aCx, args[0]);
+    if (!id || !id2) {
+        return Throw(aCx, NS_ERROR_XPC_BAD_CONVERT_JS);
+    }
+
+    args.rval().setBoolean(id->Equals(*id2));
+    return true;
+}
+
+
 /*
  * HasInstance hooks need to find an appropriate reflector in order to function
  * properly. There are two complexities that we need to handle:
  *
  * 1 - Cross-compartment wrappers. Chrome uses over 100 compartments, all with
  *     system principal. The success of an instanceof check should not depend
  *     on which compartment an object comes from. At the same time, we want to
  *     make sure we don't unwrap important security wrappers.
@@ -473,17 +407,17 @@ FindObjectForHasInstance(JSContext* cx, 
             target.set(nullptr);
             return NS_OK;
         }
         obj = proto;
     }
 }
 
 nsresult
-xpc::HasInstance(JSContext* cx, HandleObject objArg, const nsID* iid, bool* bp)
+HasInstance(JSContext* cx, HandleObject objArg, const nsID* iid, bool* bp)
 {
     *bp = false;
 
     RootedObject obj(cx);
     nsresult rv = FindObjectForHasInstance(cx, objArg, &obj);
     if (NS_WARN_IF(NS_FAILED(rv))) {
         return rv;
     }
@@ -512,331 +446,135 @@ xpc::HasInstance(JSContext* cx, HandleOb
     // really care if it fails.
     if (IS_WN_REFLECTOR(obj)) {
         (void) XPCWrappedNative::Get(obj)->FindTearOff(*iid);
     }
 
     return NS_OK;
 }
 
-NS_IMETHODIMP
-nsJSIID::HasInstance(nsIXPConnectWrappedNative* wrapper,
-                     JSContext* cx, JSObject * /* unused */,
-                     HandleValue val, bool* bp, bool* _retval)
+static bool
+IID_HasInstance(JSContext* aCx, unsigned aArgc, Value* aVp)
 {
-    *bp = false;
-
-    if (val.isPrimitive()) {
-        return NS_OK;
+    CallArgs args = CallArgsFromVp(aArgc, aVp);
+    if (!args.requireAtLeast(aCx, "nsIID[Symbol.hasInstance]", 1)) {
+        return false;
     }
 
-    // we have a JSObject
-    RootedObject obj(cx, &val.toObject());
+    Maybe<nsID> id = JSValue2ID(aCx, args.thisv());
+    if (!id) {
+        return Throw(aCx, NS_ERROR_XPC_BAD_CONVERT_JS);
+    }
 
-    const nsIID* iid = &mInfo->IID();
-    return xpc::HasInstance(cx, obj, iid, bp);
+    bool hasInstance = false;
+    if (args[0].isObject()) {
+        RootedObject target(aCx, &args[0].toObject());
+        nsresult rv = HasInstance(aCx, target, id.ptr(), &hasInstance);
+        if (NS_FAILED(rv)) {
+            return Throw(aCx, rv);
+        }
+    }
+    args.rval().setBoolean(hasInstance);
+    return true;
 }
 
-/***************************************************************************/
-
-NS_IMPL_QUERY_INTERFACE_CI(nsJSCID,
-                           nsIJSID,
-                           nsIJSCID,
-                           nsIXPCScriptable)
-
-NS_IMPL_ADDREF(nsJSCID)
-NS_IMPL_RELEASE(nsJSCID)
-NS_IMPL_CI_INTERFACE_GETTER(nsJSCID, nsIJSID, nsIJSCID)
-
-// The nsIXPCScriptable map declaration that will generate stubs for us...
-#define XPC_MAP_CLASSNAME         nsJSCID
-#define XPC_MAP_QUOTED_CLASSNAME "nsJSCID"
-#define XPC_MAP_FLAGS (XPC_SCRIPTABLE_WANT_CONSTRUCT | \
-                       XPC_SCRIPTABLE_WANT_HASINSTANCE)
-#include "xpc_map_end.h" /* This will #undef the above */
-
-nsJSCID::nsJSCID()  { mDetails = new nsJSID(); }
-nsJSCID::~nsJSCID() {}
-
-NS_IMETHODIMP nsJSCID::GetName(char * *aName)
-    {ResolveName(); return mDetails->GetName(aName);}
-
-NS_IMETHODIMP nsJSCID::GetNumber(char * *aNumber)
-    {return mDetails->GetNumber(aNumber);}
-
-NS_IMETHODIMP_(const nsID*) nsJSCID::GetID()
-    {return &mDetails->ID();}
-
-NS_IMETHODIMP nsJSCID::GetValid(bool* aValid)
-    {return mDetails->GetValid(aValid);}
-
-NS_IMETHODIMP nsJSCID::Equals(nsIJSID* other, bool* _retval)
-    {return mDetails->Equals(other, _retval);}
-
-NS_IMETHODIMP
-nsJSCID::Initialize(const char* str)
+// NOTE: This method is used both for 'get IID.prototype.name' and
+// 'IID.prototype.toString'.
+static bool
+IID_GetName(JSContext* aCx, unsigned aArgc, Value* aVp)
 {
-    if (str[0] == '{') {
-        NS_ENSURE_SUCCESS(mDetails->Initialize(str), NS_ERROR_FAILURE);
-    } else {
-        nsCOMPtr<nsIComponentRegistrar> registrar;
-        NS_GetComponentRegistrar(getter_AddRefs(registrar));
-        NS_ENSURE_TRUE(registrar, NS_ERROR_FAILURE);
+    CallArgs args = CallArgsFromVp(aArgc, aVp);
 
-        nsCID* cid;
-        if (NS_FAILED(registrar->ContractIDToCID(str, &cid))) {
-            return NS_ERROR_FAILURE;
-        }
-        mDetails->InitWithName(*cid, str);
-        free(cid);
-    }
-    return NS_OK;
-}
-
-NS_IMETHODIMP nsJSCID::ToString(char** _retval)
-    {ResolveName(); return mDetails->ToString(_retval);}
-
-void
-nsJSCID::ResolveName()
-{
-    if (!mDetails->NameIsSet()) {
-        mDetails->SetNameToNoString();
-    }
-}
-
-//static
-already_AddRefed<nsJSCID>
-nsJSCID::NewID(const char* str)
-{
-    if (!str) {
-        NS_ERROR("no string");
-        return nullptr;
-    }
-
-    RefPtr<nsJSCID> idObj = new nsJSCID();
-    if (NS_FAILED(idObj->Initialize(str))) {
-        return nullptr;
-    }
-    return idObj.forget();
-}
-
-static const nsID*
-GetIIDArg(uint32_t argc, const JS::Value& val, JSContext* cx)
-{
-    const nsID* iid;
-
-    // If an IID was passed in then use it
-    if (argc) {
-        JSObject* iidobj;
-        if (val.isPrimitive() ||
-            !(iidobj = val.toObjectOrNull()) ||
-            !(iid = xpc_JSObjectToID(cx, iidobj))) {
-            return nullptr;
-        }
-    } else
-        iid = &NS_GET_IID(nsISupports);
-
-    return iid;
-}
-
-NS_IMETHODIMP
-nsJSCID::CreateInstance(HandleValue iidval, JSContext* cx,
-                        uint8_t optionalArgc, MutableHandleValue retval)
-{
-    if (!mDetails->IsValid()) {
-        return NS_ERROR_XPC_BAD_CID;
+    RootedObject obj(aCx, GetIDObject(args.thisv(), &sIID_Class));
+    if (!obj) {
+        return Throw(aCx, NS_ERROR_XPC_BAD_CONVERT_JS);
     }
 
-    if (NS_FAILED(nsXPConnect::SecurityManager()->CanCreateInstance(cx, mDetails->ID()))) {
-        NS_ERROR("how are we not being called from chrome here?");
-        return NS_OK;
-    }
-
-    // If an IID was passed in then use it
-    const nsID* iid = GetIIDArg(optionalArgc, iidval, cx);
-    if (!iid) {
-        return NS_ERROR_XPC_BAD_IID;
-    }
-
-    nsCOMPtr<nsIComponentManager> compMgr;
-    nsresult rv = NS_GetComponentManager(getter_AddRefs(compMgr));
-    if (NS_FAILED(rv)) {
-        return NS_ERROR_UNEXPECTED;
-    }
-
-    nsCOMPtr<nsISupports> inst;
-    rv = compMgr->CreateInstance(mDetails->ID(), nullptr, *iid, getter_AddRefs(inst));
-    MOZ_ASSERT(NS_FAILED(rv) || inst, "component manager returned success, but instance is null!");
-
-    NS_ENSURE_SUCCESS(rv, NS_ERROR_XPC_CI_RETURNED_FAILURE);
-    if (!inst) {
-      return NS_ERROR_XPC_CI_RETURNED_FAILURE;
-    }
+    auto* info = (const nsXPTInterfaceInfo*)
+        js::GetReservedSlot(obj, kIID_InfoSlot).toPrivate();
 
-    rv = nsContentUtils::WrapNative(cx, inst, iid, retval);
-    if (NS_FAILED(rv) || retval.isPrimitive()) {
-        return NS_ERROR_XPC_CANT_CREATE_WN;
-    }
-    return NS_OK;
-}
-
-NS_IMETHODIMP
-nsJSCID::GetService(HandleValue iidval, JSContext* cx, uint8_t optionalArgc,
-                    MutableHandleValue retval)
-{
-    if (!mDetails->IsValid()) {
-        return NS_ERROR_XPC_BAD_CID;
-    }
-
-    if (NS_FAILED(nsXPConnect::SecurityManager()->CanCreateInstance(cx, mDetails->ID()))) {
-        MOZ_ASSERT(JS_IsExceptionPending(cx),
-                   "security manager vetoed GetService without setting exception");
-        return NS_OK;
-    }
-
-    // If an IID was passed in then use it
-    const nsID* iid = GetIIDArg(optionalArgc, iidval, cx);
-    if (!iid) {
-        return NS_ERROR_XPC_BAD_IID;
-    }
-
-    nsCOMPtr<nsIServiceManager> svcMgr;
-    nsresult rv = NS_GetServiceManager(getter_AddRefs(svcMgr));
-    if (NS_FAILED(rv)) {
-        return rv;
+    // Name property is the name of the interface this nsIID was created from.
+    JSString* name = JS_NewStringCopyZ(aCx, info->Name());
+    if (!name) {
+        return Throw(aCx, NS_ERROR_OUT_OF_MEMORY);
     }
 
-    nsCOMPtr<nsISupports> srvc;
-    rv = svcMgr->GetService(mDetails->ID(), *iid, getter_AddRefs(srvc));
-    MOZ_ASSERT(NS_FAILED(rv) || srvc, "service manager returned success, but service is null!");
-
-    NS_ENSURE_SUCCESS(rv, NS_ERROR_XPC_GS_RETURNED_FAILURE);
-    if (!srvc) {
-        return NS_ERROR_XPC_GS_RETURNED_FAILURE;
-    }
-
-    RootedValue v(cx);
-    rv = nsContentUtils::WrapNative(cx, srvc, iid, &v);
-    if (NS_FAILED(rv) || !v.isObject()) {
-        return NS_ERROR_XPC_CANT_CREATE_WN;
-    }
-
-    retval.set(v);
-    return NS_OK;
+    args.rval().setString(name);
+    return true;
 }
 
-NS_IMETHODIMP
-nsJSCID::Construct(nsIXPConnectWrappedNative* wrapper,
-                   JSContext* cx, JSObject* objArg,
-                   const CallArgs& args, bool* _retval)
+
+// Common code for CID_CreateInstance and CID_GetService
+static bool
+CIGSHelper(JSContext* aCx, unsigned aArgc, Value* aVp, bool aGetService)
 {
-    RootedObject obj(cx, objArg);
-    XPCJSRuntime* xpcrt = nsXPConnect::GetRuntimeInstance();
-    if (!xpcrt) {
-        return NS_ERROR_FAILURE;
+    CallArgs args = CallArgsFromVp(aArgc, aVp);
+
+    // Extract the ContractID string from our reserved slot. Don't use
+    // JSValue2ID as this method should only be defined on Contract ID objects,
+    // and it allows us to avoid a duplicate hashtable lookup.
+    RootedObject obj(aCx, GetIDObject(args.thisv(), &sCID_Class));
+    if (!obj) {
+        return Throw(aCx, NS_ERROR_XPC_BAD_CONVERT_JS);
+    }
+    JS::UniqueChars contractID = JS_EncodeStringToLatin1(aCx,
+        js::GetReservedSlot(obj, kCID_ContractSlot).toString());
+
+    // Extract the IID from the first argument, if passed. Default: nsISupports.
+    Maybe<nsIID> iid = args.length() >= 1 ? JSValue2ID(aCx, args[0])
+                                          : Some(NS_GET_IID(nsISupports));
+    if (!iid) {
+        return Throw(aCx, NS_ERROR_XPC_BAD_CONVERT_JS);
     }
 
-    // 'push' a call context and call on it
-    RootedId name(cx, xpcrt->GetStringID(XPCJSContext::IDX_CREATE_INSTANCE));
-    XPCCallContext ccx(cx, obj, nullptr, name, args.length(), args.array(),
-                       args.rval().address());
-
-    *_retval = XPCWrappedNative::CallMethod(ccx);
-    return NS_OK;
-}
-
-NS_IMETHODIMP
-nsJSCID::HasInstance(nsIXPConnectWrappedNative* wrapper,
-                     JSContext* cx, JSObject * /* unused */,
-                     HandleValue val, bool* bp, bool* _retval)
-{
-    *bp = false;
-
-    if (!val.isObject()) {
-        return NS_OK;
-    }
-
-    RootedObject obj(cx, &val.toObject());
-
-    // is this really a native xpcom object with a wrapper?
-    RootedObject target(cx);
-    nsresult rv = FindObjectForHasInstance(cx, obj, &target);
-    if (NS_WARN_IF(NS_FAILED(rv))) {
-        return rv;
-    }
-
-    if (!target || !IS_WN_REFLECTOR(target)) {
-        return NS_OK;
-    }
-
-    if (XPCWrappedNative* other_wrapper = XPCWrappedNative::Get(target)) {
-        if (nsIClassInfo* ci = other_wrapper->GetClassInfo()) {
-            // We consider CID equality to be the thing that matters here.
-            // This is perhaps debatable.
-            nsID cid;
-            if (NS_SUCCEEDED(ci->GetClassIDNoAlloc(&cid))) {
-                *bp = cid.Equals(mDetails->ID());
-            }
+    // Invoke CreateInstance or GetService with our ContractID.
+    nsresult rv;
+    nsCOMPtr<nsISupports> result;
+    if (aGetService) {
+        rv = CallGetService(contractID.get(), *iid, getter_AddRefs(result));
+        if (NS_FAILED(rv) || !result) {
+            return Throw(aCx, NS_ERROR_XPC_GS_RETURNED_FAILURE);
+        }
+    } else {
+        rv = CallCreateInstance(contractID.get(), nullptr, *iid,
+                                getter_AddRefs(result));
+        if (NS_FAILED(rv) || !result) {
+            return Throw(aCx, NS_ERROR_XPC_CI_RETURNED_FAILURE);
         }
     }
 
-    return NS_OK;
+    // Wrap the created object and return it.
+    rv = nsContentUtils::WrapNative(aCx, result, iid.ptr(), args.rval());
+    if (NS_FAILED(rv) || args.rval().isPrimitive()) {
+        return Throw(aCx, NS_ERROR_XPC_CANT_CREATE_WN);
+    }
+    return true;
+}
+
+static bool
+CID_CreateInstance(JSContext* aCx, unsigned aArgc, Value* aVp)
+{
+    return CIGSHelper(aCx, aArgc, aVp, /* aGetService = */ false);
 }
 
-/***************************************************************************/
-// additional utilities...
-
-JSObject*
-xpc_NewIDObject(JSContext* cx, HandleObject scope, const nsID& aID)
+static bool
+CID_GetService(JSContext* aCx, unsigned aArgc, Value* aVp)
 {
-    RootedObject obj(cx);
-
-    nsCOMPtr<nsIJSID> iid = nsJSID::NewID(aID);
-    if (iid) {
-        nsIXPConnect* xpc = nsIXPConnect::XPConnect();
-        if (xpc) {
-            xpc->WrapNative(cx, scope, static_cast<nsISupports*>(iid),
-                            NS_GET_IID(nsIJSID), obj.address());
-        }
-    }
-    return obj;
+    return CIGSHelper(aCx, aArgc, aVp, /* aGetService = */ true);
 }
 
-// note: returned pointer is only valid while |obj| remains alive!
-const nsID*
-xpc_JSObjectToID(JSContext* cx, JSObject* obj)
+// NOTE: This method is used both for 'get CID.prototype.name' and
+// 'CID.prototype.toString'.
+static bool
+CID_GetName(JSContext* aCx, unsigned aArgc, Value* aVp)
 {
-    if (!cx || !obj) {
-        return nullptr;
+    CallArgs args = CallArgsFromVp(aArgc, aVp);
+    RootedObject obj(aCx, GetIDObject(args.thisv(), &sCID_Class));
+    if (!obj) {
+        return Throw(aCx, NS_ERROR_XPC_BAD_CONVERT_JS);
     }
 
-    // NOTE: this call does NOT addref
-    XPCWrappedNative* wrapper = nullptr;
-    obj = js::CheckedUnwrap(obj);
-    if (obj && IS_WN_REFLECTOR(obj)) {
-        wrapper = XPCWrappedNative::Get(obj);
-    }
-    if (wrapper &&
-        (wrapper->HasInterfaceNoQI(NS_GET_IID(nsIJSID))  ||
-         wrapper->HasInterfaceNoQI(NS_GET_IID(nsIJSIID)) ||
-         wrapper->HasInterfaceNoQI(NS_GET_IID(nsIJSCID)))) {
-        return ((nsIJSID*)wrapper->GetIdentityObject())->GetID();
-    }
-    return nullptr;
+    // Return the string stored in our reserved ContractID slot.
+    args.rval().set(js::GetReservedSlot(obj, kCID_ContractSlot));
+    return true;
 }
 
-bool
-xpc_JSObjectIsID(JSContext* cx, JSObject* obj)
-{
-    MOZ_ASSERT(cx && obj, "bad param");
-    // NOTE: this call does NOT addref
-    XPCWrappedNative* wrapper = nullptr;
-    obj = js::CheckedUnwrap(obj);
-    if (obj && IS_WN_REFLECTOR(obj)) {
-        wrapper = XPCWrappedNative::Get(obj);
-    }
-    return wrapper &&
-           (wrapper->HasInterfaceNoQI(NS_GET_IID(nsIJSID))  ||
-            wrapper->HasInterfaceNoQI(NS_GET_IID(nsIJSIID)) ||
-            wrapper->HasInterfaceNoQI(NS_GET_IID(nsIJSCID)));
-}
-
-
+} // namespace xpc
--- a/js/xpconnect/src/XPCJSRuntime.cpp
+++ b/js/xpconnect/src/XPCJSRuntime.cpp
@@ -111,16 +111,19 @@ const char* const XPCJSRuntime::mStrings
     "columnNumber",         // IDX_COLUMNNUMBER
     "stack",                // IDX_STACK
     "message",              // IDX_MESSAGE
     "lastIndex",            // IDX_LASTINDEX
     "then",                 // IDX_THEN
     "isInstance",           // IDX_ISINSTANCE
     "Infinity",             // IDX_INFINITY
     "NaN",                  // IDX_NAN
+    "classId",              // IDX_CLASS_ID
+    "interfaceId",          // IDX_INTERFACE_ID
+    "initializer",          // IDX_INITIALIZER
 };
 
 /***************************************************************************/
 
 // *Some* NativeSets are referenced from mClassInfo2NativeSetMap.
 // *All* NativeSets are referenced from mNativeSetMap.
 // So, in mClassInfo2NativeSetMap we just clear references to the unmarked.
 // In mNativeSetMap we clear the references to the unmarked *and* delete them.
--- a/js/xpconnect/src/XPCModule.cpp
+++ b/js/xpconnect/src/XPCModule.cpp
@@ -15,10 +15,9 @@ xpcModuleCtor()
     return NS_OK;
 }
 
 void
 xpcModuleDtor()
 {
     // Release our singletons
     nsXPConnect::ReleaseXPConnectSingleton();
-    xpc_DestroyJSxIDClassObjects();
 }
--- a/js/xpconnect/src/XPCModule.h
+++ b/js/xpconnect/src/XPCModule.h
@@ -14,23 +14,20 @@
 
 // {FE4F7592-C1FC-4662-AC83-538841318803}
 #define SCRIPTABLE_INTERFACES_CID                                             \
     {0xfe4f7592, 0xc1fc, 0x4662,                                              \
       { 0xac, 0x83, 0x53, 0x88, 0x41, 0x31, 0x88, 0x3 } }
 
 #define MOZJSSUBSCRIPTLOADER_CONTRACTID "@mozilla.org/moz/jssubscript-loader;1"
 
-NS_GENERIC_FACTORY_CONSTRUCTOR(nsJSID)
 NS_GENERIC_FACTORY_CONSTRUCTOR(mozJSSubScriptLoader)
 
-NS_DEFINE_NAMED_CID(NS_JS_ID_CID);
 NS_DEFINE_NAMED_CID(MOZ_JSSUBSCRIPTLOADER_CID);
 
 #define XPCONNECT_CIDENTRIES                                                  \
-  { &kNS_JS_ID_CID, false, nullptr,  nsJSIDConstructor },                     \
   { &kMOZ_JSSUBSCRIPTLOADER_CID, false, nullptr, mozJSSubScriptLoaderConstructor },
 
 #define XPCONNECT_CONTRACTS                                                   \
   { MOZJSSUBSCRIPTLOADER_CONTRACTID, &kMOZ_JSSUBSCRIPTLOADER_CID },
 
 nsresult xpcModuleCtor();
 void xpcModuleDtor();
--- a/js/xpconnect/src/XPCVariant.cpp
+++ b/js/xpconnect/src/XPCVariant.cpp
@@ -196,17 +196,17 @@ XPCArrayHomogenizer::GetTypeForArray(JSC
 
             bool isArray;
             if (!JS_IsArrayObject(cx, jsobj, &isArray)) {
                 return false;
             }
 
             if (isArray) {
                 type = tArr;
-            } else if (xpc_JSObjectIsID(cx, jsobj)) {
+            } else if (xpc::JSValue2ID(cx, val)) {
                 type = tID;
             } else {
                 type = tISup;
             }
         }
 
         MOZ_ASSERT(state != tErr, "bad state table!");
         MOZ_ASSERT(type  != tErr, "bad type!");
@@ -306,30 +306,26 @@ bool XPCVariant::InitializeData(JSContex
         mozilla::Range<char16_t> destChars(mData.u.wstr.mWStringValue, length);
         if (!JS_CopyStringChars(cx, destChars, str)) {
             return false;
         }
 
         MOZ_ASSERT(mData.u.wstr.mWStringValue[length] == '\0');
         return true;
     }
+    if (Maybe<nsID> id = xpc::JSValue2ID(cx, val)) {
+        mData.SetFromID(id.ref());
+        return true;
+    }
 
     // leaving only JSObject...
     MOZ_ASSERT(val.isObject(), "invalid type of jsval!");
 
     RootedObject jsobj(cx, &val.toObject());
 
-    // Let's see if it is a xpcJSID.
-
-    const nsID* id = xpc_JSObjectToID(cx, jsobj);
-    if (id) {
-        mData.SetFromID(*id);
-        return true;
-    }
-
     // Let's see if it is a js array object.
 
     uint32_t len;
 
     bool isArray;
     if (!JS_IsArrayObject(cx, jsobj, &isArray) ||
         (isArray && !JS_GetArrayLength(cx, jsobj, &len)))
     {
--- a/js/xpconnect/src/XPCWrappedJSClass.cpp
+++ b/js/xpconnect/src/XPCWrappedJSClass.cpp
@@ -169,20 +169,19 @@ JSObject*
 nsXPCWrappedJSClass::CallQueryInterfaceOnJSObject(JSContext* cx,
                                                   JSObject* jsobjArg,
                                                   HandleObject scope,
                                                   REFNSIID aIID)
 {
     js::AssertSameCompartment(scope, jsobjArg);
 
     RootedObject jsobj(cx, jsobjArg);
-    JSObject* id;
+    RootedValue arg(cx);
     RootedValue retval(cx);
     RootedObject retObj(cx);
-    bool success = false;
     RootedValue fun(cx);
 
     // In bug 503926, we added a security check to make sure that we don't
     // invoke content QI functions. In the modern world, this is probably
     // unnecessary, because invoking QI involves passing an IID object to
     // content, which will fail. But we do a belt-and-suspenders check to
     // make sure that content can never trigger the rat's nest of code below.
     // Once we completely turn off XPConnect for the web, this can definitely
@@ -219,65 +218,61 @@ nsXPCWrappedJSClass::CallQueryInterfaceO
     dom::MozQueryInterface* mozQI = nullptr;
     if (NS_SUCCEEDED(UNWRAP_OBJECT(MozQueryInterface, &fun, mozQI))) {
         if (mozQI->QueriesTo(aIID)) {
             return jsobj.get();
         }
         return nullptr;
     }
 
-    if ((id = xpc_NewIDObject(cx, scope, aIID))) {
-        // Throwing NS_NOINTERFACE is the prescribed way to fail QI from JS. It
-        // is not an exception that is ever worth reporting, but we don't want
-        // to eat all exceptions either.
+    if (!xpc::ID2JSValue(cx, aIID, &arg)) {
+        return nullptr;
+    }
 
-        {
-            RootedValue arg(cx, JS::ObjectValue(*id));
-            success = JS_CallFunctionValue(cx, jsobj, fun, HandleValueArray(arg), &retval);
-        }
+    // Throwing NS_NOINTERFACE is the prescribed way to fail QI from JS. It is
+    // not an exception that is ever worth reporting, but we don't want to eat
+    // all exceptions either.
 
-        if (!success && JS_IsExceptionPending(cx)) {
-            RootedValue jsexception(cx, NullValue());
+    bool success =
+        JS_CallFunctionValue(cx, jsobj, fun, HandleValueArray(arg), &retval);
+    if (!success && JS_IsExceptionPending(cx)) {
+        RootedValue jsexception(cx, NullValue());
 
-            if (JS_GetPendingException(cx, &jsexception)) {
-                if (jsexception.isObject()) {
-                    // XPConnect may have constructed an object to represent a
-                    // C++ QI failure. See if that is the case.
-                    JS::Rooted<JSObject*> exceptionObj(cx, &jsexception.toObject());
-                    Exception* e = nullptr;
-                    UNWRAP_OBJECT(Exception, &exceptionObj, e);
+        if (JS_GetPendingException(cx, &jsexception)) {
+            if (jsexception.isObject()) {
+                // XPConnect may have constructed an object to represent a
+                // C++ QI failure. See if that is the case.
+                JS::Rooted<JSObject*> exceptionObj(cx, &jsexception.toObject());
+                Exception* e = nullptr;
+                UNWRAP_OBJECT(Exception, &exceptionObj, e);
 
-                    if (e && e->GetResult() == NS_NOINTERFACE) {
-                        JS_ClearPendingException(cx);
-                    }
-                } else if (jsexception.isNumber()) {
-                    nsresult rv;
-                    // JS often throws an nsresult.
-                    if (jsexception.isDouble()) {
-                        // Visual Studio 9 doesn't allow casting directly from
-                        // a double to an enumeration type, contrary to
-                        // 5.2.9(10) of C++11, so add an intermediate cast.
-                        rv = (nsresult)(uint32_t)(jsexception.toDouble());
-                    } else {
-                        rv = (nsresult)(jsexception.toInt32());
-                    }
+                if (e && e->GetResult() == NS_NOINTERFACE) {
+                    JS_ClearPendingException(cx);
+                }
+            } else if (jsexception.isNumber()) {
+                nsresult rv;
+                // JS often throws an nsresult.
+                if (jsexception.isDouble())
+                    // Visual Studio 9 doesn't allow casting directly from
+                    // a double to an enumeration type, contrary to
+                    // 5.2.9(10) of C++11, so add an intermediate cast.
+                    rv = (nsresult)(uint32_t)(jsexception.toDouble());
+                else
+                    rv = (nsresult)(jsexception.toInt32());
 
-                    if (rv == NS_NOINTERFACE) {
-                        JS_ClearPendingException(cx);
-                    }
-                }
+                if (rv == NS_NOINTERFACE)
+                    JS_ClearPendingException(cx);
             }
-        } else if (!success) {
-            NS_WARNING("QI hook ran OOMed - this is probably a bug!");
         }
+    } else if (!success) {
+        NS_WARNING("QI hook ran OOMed - this is probably a bug!");
+    }
 
-        if (success) {
-            success = JS_ValueToObject(cx, retval, &retObj);
-        }
-    }
+    if (success)
+        success = JS_ValueToObject(cx, retval, &retObj);
 
     return success ? retObj.get() : nullptr;
 }
 
 /***************************************************************************/
 
 static bool
 GetNamedPropertyAsVariantRaw(XPCCallContext& ccx,
--- a/js/xpconnect/src/XPCWrappedNative.cpp
+++ b/js/xpconnect/src/XPCWrappedNative.cpp
@@ -1447,36 +1447,37 @@ CallMethodHelper::QueryInterfaceFastPath
         return false;
     }
 
     if (!mArgv[0].isObject()) {
         ThrowBadParam(NS_ERROR_XPC_BAD_CONVERT_JS, 0, mCallContext);
         return false;
     }
 
-    const nsID* iid = xpc_JSObjectToID(mCallContext, &mArgv[0].toObject());
+    JS::RootedValue iidarg(mCallContext, mArgv[0]);
+    Maybe<nsID> iid = xpc::JSValue2ID(mCallContext, iidarg);
     if (!iid) {
         ThrowBadParam(NS_ERROR_XPC_BAD_CONVERT_JS, 0, mCallContext);
         return false;
     }
 
     nsISupports* qiresult = nullptr;
-    mInvokeResult = mCallee->QueryInterface(*iid, (void**) &qiresult);
+    mInvokeResult = mCallee->QueryInterface(iid.ref(), (void**) &qiresult);
 
     if (NS_FAILED(mInvokeResult)) {
         ThrowBadResult(mInvokeResult, mCallContext);
         return false;
     }
 
     RootedValue v(mCallContext, NullValue());
     nsresult err;
     bool success =
         XPCConvert::NativeData2JS(&v, &qiresult,
                                   { nsXPTType::T_INTERFACE_IS },
-                                  iid, 0, &err);
+                                  iid.ptr(), 0, &err);
     NS_IF_RELEASE(qiresult);
 
     if (!success) {
         ThrowBadParam(err, 0, mCallContext);
         return false;
     }
 
     mCallContext.SetRetVal(v);
@@ -1589,16 +1590,27 @@ CallMethodHelper::ConvertIndependentPara
     }
 
     // All that's left to do is value conversion. Bail early if we don't need
     // to do that.
     if (!paramInfo.IsIn()) {
         return true;
     }
 
+    // Some types usually don't support default values, but we want to handle
+    // the default value if IsOptional is true.
+    if (i >= mArgc) {
+        MOZ_ASSERT(paramInfo.IsOptional(), "missing non-optional argument!");
+        if (type.Tag() == nsXPTType::T_IID) {
+            // NOTE: 'const nsIID&' is supported, so it must be allocated.
+            dp->val.p = new nsIID();
+            return true;
+        }
+    }
+
     // We're definitely some variety of 'in' now, so there's something to
     // convert. The source value for conversion depends on whether we're
     // dealing with an 'in' or an 'inout' parameter. 'inout' was handled above,
     // so all that's left is 'in'.
     if (!paramInfo.IsOut()) {
         // Handle the 'in' case.
         MOZ_ASSERT(i < mArgc || paramInfo.IsOptional(),
                    "Expected either enough arguments or an optional argument");
--- a/js/xpconnect/src/XPCWrappedNativeScope.cpp
+++ b/js/xpconnect/src/XPCWrappedNativeScope.cpp
@@ -390,16 +390,19 @@ XPCWrappedNativeScope::~XPCWrappedNative
     // XXX might not want to do this at xpconnect shutdown time???
     mComponents = nullptr;
 
     if (mXrayExpandos.initialized()) {
         mXrayExpandos.destroy();
     }
 
     JSContext* cx = dom::danger::GetJSContext();
+    mIDProto.finalize(cx);
+    mIIDProto.finalize(cx);
+    mCIDProto.finalize(cx);
     mGlobalJSObject.finalize(cx);
 }
 
 // static
 void
 XPCWrappedNativeScope::TraceWrappedNativesInAllScopes(JSTracer* trc)
 {
     // Do JS::TraceEdge for all wrapped natives with external references, as
--- a/js/xpconnect/src/xpcprivate.h
+++ b/js/xpconnect/src/xpcprivate.h
@@ -115,17 +115,16 @@
 #include "nsIObserver.h"
 #include "nsWeakReference.h"
 #include "nsCOMPtr.h"
 #include "nsXPTCUtils.h"
 #include "xptinfo.h"
 #include "XPCForwards.h"
 #include "XPCLog.h"
 #include "xpccomponents.h"
-#include "xpcjsid.h"
 #include "prenv.h"
 #include "prcvar.h"
 #include "nsString.h"
 #include "nsReadableUtils.h"
 
 #include "MainThreadUtils.h"
 
 #include "nsIConsoleService.h"
@@ -408,16 +407,19 @@ public:
         IDX_COLUMNNUMBER            ,
         IDX_STACK                   ,
         IDX_MESSAGE                 ,
         IDX_LASTINDEX               ,
         IDX_THEN                    ,
         IDX_ISINSTANCE              ,
         IDX_INFINITY                ,
         IDX_NAN                     ,
+        IDX_CLASS_ID                ,
+        IDX_INTERFACE_ID            ,
+        IDX_INITIALIZER             ,
         IDX_TOTAL_COUNT // just a count of the above
     };
 
     inline JS::HandleId GetStringID(unsigned index) const;
     inline const char* GetStringName(unsigned index) const;
 
 private:
     XPCJSContext();
@@ -883,16 +885,25 @@ public:
 
     void TraceInside(JSTracer* trc) {
         if (mContentXBLScope) {
             mContentXBLScope.trace(trc, "XPCWrappedNativeScope::mXBLScope");
         }
         if (mXrayExpandos.initialized()) {
             mXrayExpandos.trace(trc);
         }
+        if (mIDProto) {
+            mIDProto.trace(trc, "XPCWrappedNativeScope::mIDProto");
+        }
+        if (mIIDProto) {
+            mIIDProto.trace(trc, "XPCWrappedNativeScope::mIIDProto");
+        }
+        if (mCIDProto) {
+            mCIDProto.trace(trc, "XPCWrappedNativeScope::mCIDProto");
+        }
     }
 
     static void
     SuspectAllWrappers(nsCycleCollectionNoteRootCallback& cb);
 
     static void
     SweepAllWrappedNativeTearOffs();
 
@@ -944,16 +955,21 @@ public:
 
     JS::Compartment* Compartment() const { return js::GetObjectCompartment(mGlobalJSObject); }
 
     bool IsContentXBLScope() { return xpc::IsContentXBLCompartment(Compartment()); }
     bool AllowContentXBLScope();
     bool UseContentXBLScope() { return mUseContentXBLScope; }
     void ClearContentXBLScope() { mContentXBLScope = nullptr; }
 
+    // ID Object prototype caches.
+    JS::ObjectPtr mIDProto;
+    JS::ObjectPtr mIIDProto;
+    JS::ObjectPtr mCIDProto;
+
 protected:
     virtual ~XPCWrappedNativeScope();
 
     XPCWrappedNativeScope() = delete;
 
 private:
     static XPCWrappedNativeScope* gScopes;
     static XPCWrappedNativeScope* gDyingScopes;
@@ -2129,112 +2145,16 @@ public:
     static const void* IterateNSResults(nsresult* rv,
                                         const char** name,
                                         const char** format,
                                         const void** iterp);
 
     static uint32_t GetNSResultCount();
 };
 
-/***************************************************************************/
-/*
-* nsJSID implements nsIJSID. It is also used by nsJSIID and nsJSCID as a
-* member (as a hidden implementaion detail) to which they delegate many calls.
-*/
-
-// Initialization is done on demand, and calling the destructor below is always
-// safe.
-extern void xpc_DestroyJSxIDClassObjects();
-
-class nsJSID final : public nsIJSID
-{
-public:
-    NS_DEFINE_STATIC_CID_ACCESSOR(NS_JS_ID_CID)
-
-    NS_DECL_ISUPPORTS
-    NS_DECL_NSIJSID
-
-    void InitWithName(const nsID& id, const char* nameString);
-    void SetName(const char* name);
-    void   SetNameToNoString()
-        {MOZ_ASSERT(!mName, "name already set"); mName = const_cast<char*>(gNoString);}
-    bool NameIsSet() const {return nullptr != mName;}
-    const nsID& ID() const {return mID;}
-    bool IsValid() const {return !mID.Equals(GetInvalidIID());}
-
-    static already_AddRefed<nsJSID> NewID(const char* str);
-    static already_AddRefed<nsJSID> NewID(const nsID& id);
-
-    nsJSID();
-
-    void Reset();
-    const nsID& GetInvalidIID() const;
-
-protected:
-    virtual ~nsJSID();
-    static const char gNoString[];
-    nsID    mID;
-    char*   mNumber;
-    char*   mName;
-};
-
-
-// nsJSIID
-
-class nsJSIID : public nsIJSIID,
-                public nsIXPCScriptable
-{
-public:
-    NS_DECL_ISUPPORTS
-
-    // we manually delegate these to nsJSID
-    NS_DECL_NSIJSID
-
-    // we implement the rest...
-    NS_DECL_NSIJSIID
-    NS_DECL_NSIXPCSCRIPTABLE
-
-    static already_AddRefed<nsJSIID> NewID(const nsXPTInterfaceInfo* aInfo);
-
-    explicit nsJSIID(const nsXPTInterfaceInfo* aInfo);
-    nsJSIID() = delete;
-
-private:
-    virtual ~nsJSIID();
-
-    const nsXPTInterfaceInfo* mInfo;
-};
-
-// nsJSCID
-
-class nsJSCID : public nsIJSCID, public nsIXPCScriptable
-{
-public:
-    NS_DECL_ISUPPORTS
-
-    // we manually delegate these to nsJSID
-    NS_DECL_NSIJSID
-
-    // we implement the rest...
-    NS_DECL_NSIJSCID
-    NS_DECL_NSIXPCSCRIPTABLE
-
-    static already_AddRefed<nsJSCID> NewID(const char* str);
-
-    nsJSCID();
-
-private:
-    virtual ~nsJSCID();
-
-    void ResolveName();
-
-private:
-    RefPtr<nsJSID> mDetails;
-};
-
 
 /***************************************************************************/
 // 'Components' object implementations. nsXPCComponentsBase has the
 // less-privileged stuff that we're willing to expose to XBL.
 
 class nsXPCComponentsBase : public nsIXPCComponentsBase
 {
 public:
@@ -2251,17 +2171,16 @@ protected:
 
     explicit nsXPCComponentsBase(XPCWrappedNativeScope* aScope);
     virtual void ClearMembers();
 
     XPCWrappedNativeScope*                   mScope;
 
     // Unprivileged members from nsIXPCComponentsBase.
     RefPtr<nsXPCComponents_Interfaces>     mInterfaces;
-    RefPtr<nsXPCComponents_InterfacesByID> mInterfacesByID;
     RefPtr<nsXPCComponents_Results>        mResults;
 
     friend class XPCWrappedNativeScope;
 };
 
 class nsXPCComponents : public nsXPCComponentsBase,
                         public nsIXPCComponents
 {
@@ -2272,37 +2191,25 @@ public:
 
 protected:
     explicit nsXPCComponents(XPCWrappedNativeScope* aScope);
     virtual ~nsXPCComponents();
     virtual void ClearMembers() override;
 
     // Privileged members added by nsIXPCComponents.
     RefPtr<nsXPCComponents_Classes>     mClasses;
-    RefPtr<nsXPCComponents_ClassesByID> mClassesByID;
     RefPtr<nsXPCComponents_ID>          mID;
     RefPtr<nsXPCComponents_Exception>   mException;
     RefPtr<nsXPCComponents_Constructor> mConstructor;
     RefPtr<nsXPCComponents_Utils>       mUtils;
 
     friend class XPCWrappedNativeScope;
 };
 
 
-/***************************************************************************/
-
-extern JSObject*
-xpc_NewIDObject(JSContext* cx, JS::HandleObject scope, const nsID& aID);
-
-extern const nsID*
-xpc_JSObjectToID(JSContext* cx, JSObject* obj);
-
-extern bool
-xpc_JSObjectIsID(JSContext* cx, JSObject* obj);
-
 /******************************************************************************
  * Handles pre/post script processing.
  */
 class MOZ_RAII AutoScriptEvaluate
 {
 public:
     /**
      * Saves the JSContext as well as initializing our state
--- a/js/xpconnect/src/xpcpublic.h
+++ b/js/xpconnect/src/xpcpublic.h
@@ -27,16 +27,17 @@
 #include "nsMathUtils.h"
 #include "nsStringBuffer.h"
 #include "mozilla/dom/BindingDeclarations.h"
 #include "mozilla/Preferences.h"
 
 class nsGlobalWindowInner;
 class nsIPrincipal;
 class nsIHandleReportCallback;
+struct nsXPTInterfaceInfo;
 
 namespace mozilla {
 namespace dom {
 class Exception;
 }
 }
 
 typedef void (* xpcGCCallback)(JSGCStatus status);
@@ -728,16 +729,51 @@ DestroyCooperativeContext();
 // Please see JS_YieldCooperativeContext in jsapi.h.
 void
 YieldCooperativeContext();
 
 // Please see JS_ResumeCooperativeContext in jsapi.h.
 void
 ResumeCooperativeContext();
 
+/**
+ * Extract the native nsID object from a JS ID, IfaceID, ClassID, or ContractID
+ * value.
+ *
+ * Returns 'Nothing()' if 'aVal' does is not one of the supported ID types.
+ */
+mozilla::Maybe<nsID> JSValue2ID(JSContext* aCx, JS::HandleValue aVal);
+
+/**
+ * Reflect an ID into JS
+ */
+bool ID2JSValue(JSContext* aCx, const nsID& aId, JS::MutableHandleValue aVal);
+
+/**
+ * Reflect an IfaceID into JS
+ *
+ * This object will expose constants from the selected interface, and support
+ * 'instanceof', in addition to the other methods available on JS ID objects.
+ *
+ * Use 'xpc::JSValue2ID' to unwrap JS::Values created with this function.
+ */
+bool IfaceID2JSValue(JSContext* aCx, const nsXPTInterfaceInfo& aInfo,
+                     JS::MutableHandleValue aVal);
+
+/**
+ * Reflect a ContractID into JS
+ *
+ * This object will expose 'getService' and 'createInstance' methods in addition
+ * to the other methods available on nsID objects.
+ *
+ * Use 'xpc::JSValue2ID' to unwrap JS::Values created with this function.
+ */
+bool ContractID2JSValue(JSContext* aCx, JSString* aContract,
+                        JS::MutableHandleValue aVal);
+
 } // namespace xpc
 
 namespace mozilla {
 namespace dom {
 
 /**
  * A test for whether WebIDL methods that should only be visible to
  * chrome or XBL scopes should be exposed.
--- a/js/xpconnect/tests/unit/test_bug677864.js
+++ b/js/xpconnect/tests/unit/test_bug677864.js
@@ -1,11 +1,9 @@
 function check_cl(iface, desc) {
     Assert.equal(iface.QueryInterface(Ci.nsIClassInfo).classDescription, desc);
 }
 
 function run_test() {
     check_cl(Ci, 'XPCComponents_Interfaces');
-    check_cl(Components.interfacesByID, 'XPCComponents_InterfacesByID');
     check_cl(Cc, 'XPCComponents_Classes');
-    check_cl(Components.classesByID, 'XPCComponents_ClassesByID');
     check_cl(Cr, 'XPCComponents_Results');
 }
deleted file mode 100644
--- a/js/xpconnect/tests/unit/test_classesByID_instanceof.js
+++ /dev/null
@@ -1,86 +0,0 @@
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-
-Services.prefs.setBoolPref("security.allow_eval_with_system_principal", true);
-registerCleanupFunction(() => {
-  Services.prefs.clearUserPref("security.allow_eval_with_system_principal");
-});
-
-function testActual(CSPContextClassByID)
-{
-  var cspContext =
-    Cc["@mozilla.org/cspcontext;1"].createInstance();
-
-  Assert.equal(cspContext instanceof CSPContextClassByID, true);
-}
-
-function testInherited(CSPContextClassByID)
-{
-  var cspContext =
-    Cc["@mozilla.org/cspcontext;1"].createInstance();
-
-  var inherited = Object.create(cspContext);
-
-  Assert.equal(inherited instanceof CSPContextClassByID, true);
-}
-
-function testInheritedCrossGlobal(CSPContextClassByID)
-{
-  var cspContext =
-    Cc["@mozilla.org/cspcontext;1"].createInstance();
-
-  var sb = new Cu.Sandbox(this, { wantComponents: true });
-  var inheritedCross = sb.Object.create(cspContext);
-
-  Assert.equal(inheritedCross instanceof CSPContextClassByID, true);
-}
-
-function testCrossGlobalArbitraryGetPrototype(CSPContextClassByID)
-{
-  var cspContext =
-    Cc["@mozilla.org/cspcontext;1"].createInstance();
-
-  var sb = new Cu.Sandbox(this, { wantComponents: true });
-  var firstLevel = Object.create(cspContext);
-
-  var obj = { shouldThrow: false };
-  var secondLevel =
-    new sb.Proxy(Object.create(firstLevel),
-                 {
-                   getPrototypeOf: new sb.Function("obj", `return function(t) {
-                     if (obj.shouldThrow)
-                       throw 42;
-                     return Reflect.getPrototypeOf(t);
-                   };`)(obj)
-                 });
-  var thirdLevel = Object.create(secondLevel);
-
-  obj.shouldThrow = true;
-
-  var threw = false;
-  var err;
-  try
-  {
-    void (thirdLevel instanceof CSPContextClassByID);
-  }
-  catch (e)
-  {
-    threw = true;
-    err = e;
-  }
-
-  Assert.equal(threw, true);
-  Assert.equal(err, 42);
-
-  obj.shouldThrow = false;
-
-  Assert.equal(thirdLevel instanceof CSPContextClassByID, true);
-}
-
-function run_test() {
-  var CSPContextClassByID = Components.classesByID["{09d9ed1a-e5d4-4004-bfe0-27ceb923d9ac}"];
-
-  testActual(CSPContextClassByID);
-  testInherited(CSPContextClassByID);
-  testInheritedCrossGlobal(CSPContextClassByID);
-  testCrossGlobalArbitraryGetPrototype(CSPContextClassByID);
-}
--- a/js/xpconnect/tests/unit/test_generateQI.js
+++ b/js/xpconnect/tests/unit/test_generateQI.js
@@ -19,14 +19,11 @@ add_task(async function test_generateQI(
 
   // Non-IID values get stringified, and don't cause any errors as long
   // as there isn't a non-IID property with the same name on Ci.
   checkQI([Ci.nsIPropertyBag, "nsIPropertyBag2", null, Object], Ci.nsIPropertyBag2);
 
   ChromeUtils.generateQI([])(Ci.nsISupports);
 
   // Test failure scenarios.
-  Assert.throws(() => ChromeUtils.generateQI(["toString"]),
-                e => e.result == Cr.NS_ERROR_INVALID_ARG);
-
   Assert.throws(() => checkQI([], Ci.nsIPropertyBag),
                 e => e.result == Cr.NS_ERROR_NO_INTERFACE);
 });
--- a/js/xpconnect/tests/unit/test_import.js
+++ b/js/xpconnect/tests/unit/test_import.js
@@ -67,22 +67,15 @@ function run_test() {
 
   // Call getInterfaces to test line numbers in JS components.  But as long as
   // we're doing that, why not test what it returns too?
   // Kind of odd that this is not returning an array containing the
   // number... Or for that matter not returning an array containing an object?
   var interfaces = foo.getInterfaces({});
   Assert.equal(interfaces, Ci.nsIClassInfo.number);
 
-  // try to create a component by CID
-  const cid = "{6b933fe6-6eba-4622-ac86-e4f654f1b474}";
-  Assert.ok(cid in Components.classesByID);
-  foo = Components.classesByID[cid]
-                  .createInstance(Ci.nsIClassInfo);
-  Assert.ok(foo.contractID == contractID + "1");
-
   // try to create another component which doesn't directly implement QI
   Assert.ok((contractID + "2") in Cc);
   var bar = Cc[contractID + "2"]
               .createInstance(Ci.nsIClassInfo);
   Assert.ok(Boolean(bar));
   Assert.ok(bar.contractID == contractID + "2");
 }
--- a/js/xpconnect/tests/unit/xpcshell.ini
+++ b/js/xpconnect/tests/unit/xpcshell.ini
@@ -60,17 +60,16 @@ support-files =
 [test_bug1150106.js]
 [test_bug1150771.js]
 [test_bug1151385.js]
 [test_bug1170311.js]
 [test_bug1244222.js]
 [test_bug_442086.js]
 [test_callFunctionWithAsyncStack.js]
 [test_cenums.js]
-[test_classesByID_instanceof.js]
 [test_compileScript.js]
 [test_deepFreezeClone.js]
 [test_defineModuleGetter.js]
 [test_file.js]
 [test_blob.js]
 [test_blob2.js]
 [test_file2.js]
 [test_getCallerLocation.js]
--- a/security/manager/ssl/RootHashes.inc
+++ b/security/manager/ssl/RootHashes.inc
@@ -113,16 +113,22 @@ static const struct CertAuthorityHash RO
   },
   {
     /* Certplus_Root_CA_G1 */
     { 0x15, 0x2A, 0x40, 0x2B, 0xFC, 0xDF, 0x2C, 0xD5, 0x48, 0x05, 0x4D, 0x22, 0x75, 0xB3, 0x9C, 0x7F,
       0xCA, 0x3E, 0xC0, 0x97, 0x80, 0x78, 0xB0, 0xF0, 0xEA, 0x76, 0xE5, 0x61, 0xA6, 0xC7, 0x43, 0x3E },
       176 /* Bin Number */
   },
   {
+    /* GTS_Root_R3 */
+    { 0x15, 0xD5, 0xB8, 0x77, 0x46, 0x19, 0xEA, 0x7D, 0x54, 0xCE, 0x1C, 0xA6, 0xD0, 0xB0, 0xC4, 0x03,
+      0xE0, 0x37, 0xA9, 0x17, 0xF1, 0x31, 0xE8, 0xA0, 0x4E, 0x1E, 0x6B, 0x7A, 0x71, 0xBA, 0xBC, 0xE5 },
+      201 /* Bin Number */
+  },
+  {
     /* Network_Solutions_Certificate_Authority */
     { 0x15, 0xF0, 0xBA, 0x00, 0xA3, 0xAC, 0x7A, 0xF3, 0xAC, 0x88, 0x4C, 0x07, 0x2B, 0x10, 0x11, 0xA0,
       0x77, 0xBD, 0x77, 0xC0, 0x97, 0xF4, 0x01, 0x64, 0xB2, 0xF8, 0x59, 0x8A, 0xBD, 0x83, 0x86, 0x0C },
       64 /* Bin Number */
   },
   {
     /* Baltimore_CyberTrust_Root */
     { 0x16, 0xAF, 0x57, 0xA9, 0xF6, 0x76, 0xB0, 0xAB, 0x12, 0x60, 0x95, 0xAA, 0x5E, 0xBA, 0xDE, 0xF2,
@@ -191,16 +197,22 @@ static const struct CertAuthorityHash RO
   },
   {
     /* OpenTrust_Root_CA_G2 */
     { 0x27, 0x99, 0x58, 0x29, 0xFE, 0x6A, 0x75, 0x15, 0xC1, 0xBF, 0xE8, 0x48, 0xF9, 0xC4, 0x76, 0x1D,
       0xB1, 0x6C, 0x22, 0x59, 0x29, 0x25, 0x7B, 0xF4, 0x0D, 0x08, 0x94, 0xF2, 0x9E, 0xA8, 0xBA, 0xF2 },
       179 /* Bin Number */
   },
   {
+    /* GTS_Root_R1 */
+    { 0x2A, 0x57, 0x54, 0x71, 0xE3, 0x13, 0x40, 0xBC, 0x21, 0x58, 0x1C, 0xBD, 0x2C, 0xF1, 0x3E, 0x15,
+      0x84, 0x63, 0x20, 0x3E, 0xCE, 0x94, 0xBC, 0xF9, 0xD3, 0xCC, 0x19, 0x6B, 0xF0, 0x9A, 0x54, 0x72 },
+      199 /* Bin Number */
+  },
+  {
     /* Certinomis___Root_CA */
     { 0x2A, 0x99, 0xF5, 0xBC, 0x11, 0x74, 0xB7, 0x3C, 0xBB, 0x1D, 0x62, 0x08, 0x84, 0xE0, 0x1C, 0x34,
       0xE5, 0x1C, 0xCB, 0x39, 0x78, 0xDA, 0x12, 0x5F, 0x0E, 0x33, 0x26, 0x88, 0x83, 0xBF, 0x41, 0x58 },
       168 /* Bin Number */
   },
   {
     /* GlobalSign */
     { 0x2C, 0xAB, 0xEA, 0xFE, 0x37, 0xD0, 0x6C, 0xA2, 0x2A, 0xBA, 0x73, 0x91, 0xC0, 0x03, 0x3D, 0x25,
@@ -533,16 +545,22 @@ static const struct CertAuthorityHash RO
   },
   {
     /* AffirmTrust_Premium */
     { 0x70, 0xA7, 0x3F, 0x7F, 0x37, 0x6B, 0x60, 0x07, 0x42, 0x48, 0x90, 0x45, 0x34, 0xB1, 0x14, 0x82,
       0xD5, 0xBF, 0x0E, 0x69, 0x8E, 0xCC, 0x49, 0x8D, 0xF5, 0x25, 0x77, 0xEB, 0xF2, 0xE9, 0x3B, 0x9A },
       111 /* Bin Number */
   },
   {
+    /* GTS_Root_R4 */
+    { 0x71, 0xCC, 0xA5, 0x39, 0x1F, 0x9E, 0x79, 0x4B, 0x04, 0x80, 0x25, 0x30, 0xB3, 0x63, 0xE1, 0x21,
+      0xDA, 0x8A, 0x30, 0x43, 0xBB, 0x26, 0x66, 0x2F, 0xEA, 0x4D, 0xCA, 0x7F, 0xC9, 0x51, 0xA4, 0xBD },
+      202 /* Bin Number */
+  },
+  {
     /* Entrust_Root_Certification_Authority */
     { 0x73, 0xC1, 0x76, 0x43, 0x4F, 0x1B, 0xC6, 0xD5, 0xAD, 0xF4, 0x5B, 0x0E, 0x76, 0xE7, 0x27, 0x28,
       0x7C, 0x8D, 0xE5, 0x76, 0x16, 0xC1, 0xE6, 0xE6, 0x14, 0x1A, 0x2B, 0x2C, 0xBC, 0x7D, 0x8E, 0x4C },
       18 /* Bin Number */
   },
   {
     /* DigiCert_High_Assurance_EV_Root_CA */
     { 0x74, 0x31, 0xE5, 0xF4, 0xC3, 0xC1, 0xCE, 0x46, 0x90, 0x77, 0x4F, 0x0B, 0x61, 0xE0, 0x54, 0x40,
@@ -749,16 +767,22 @@ static const struct CertAuthorityHash RO
   },
   {
     /* VeriSign_Class_3_Public_Primary_Certification_Authority___G5 */
     { 0x9A, 0xCF, 0xAB, 0x7E, 0x43, 0xC8, 0xD8, 0x80, 0xD0, 0x6B, 0x26, 0x2A, 0x94, 0xDE, 0xEE, 0xE4,
       0xB4, 0x65, 0x99, 0x89, 0xC3, 0xD0, 0xCA, 0xF1, 0x9B, 0xAF, 0x64, 0x05, 0xE4, 0x1A, 0xB7, 0xDF },
       60 /* Bin Number */
   },
   {
+    /* UCA_Global_G2_Root */
+    { 0x9B, 0xEA, 0x11, 0xC9, 0x76, 0xFE, 0x01, 0x47, 0x64, 0xC1, 0xBE, 0x56, 0xA6, 0xF9, 0x14, 0xB5,
+      0xA5, 0x60, 0x31, 0x7A, 0xBD, 0x99, 0x88, 0x39, 0x33, 0x82, 0xE5, 0x16, 0x1A, 0xA0, 0x49, 0x3C },
+      203 /* Bin Number */
+  },
+  {
     /* GeoTrust_Universal_CA_2 */
     { 0xA0, 0x23, 0x4F, 0x3B, 0xC8, 0x52, 0x7C, 0xA5, 0x62, 0x8E, 0xEC, 0x81, 0xAD, 0x5D, 0x69, 0x89,
       0x5D, 0xA5, 0x68, 0x0D, 0xC9, 0x1D, 0x1C, 0xB8, 0x47, 0x7F, 0x33, 0xF8, 0x78, 0xB9, 0x5B, 0x0B },
       23 /* Bin Number */
   },
   {
     /* Hellenic_Academic_and_Research_Institutions_RootCA_2015 */
     { 0xA0, 0x40, 0x92, 0x9A, 0x02, 0xCE, 0x53, 0xB4, 0xAC, 0xF4, 0xF2, 0xFF, 0xC6, 0x98, 0x1C, 0xE4,
@@ -929,16 +953,22 @@ static const struct CertAuthorityHash RO
   },
   {
     /* OU_Go_Daddy_Class_2_Certification_Authority_O__The_Go_Daddy_Group__Inc___C_US */
     { 0xC3, 0x84, 0x6B, 0xF2, 0x4B, 0x9E, 0x93, 0xCA, 0x64, 0x27, 0x4C, 0x0E, 0xC6, 0x7C, 0x1E, 0xCC,
       0x5E, 0x02, 0x4F, 0xFC, 0xAC, 0xD2, 0xD7, 0x40, 0x19, 0x35, 0x0E, 0x81, 0xFE, 0x54, 0x6A, 0xE4 },
       43 /* Bin Number */
   },
   {
+    /* GTS_Root_R2 */
+    { 0xC4, 0x5D, 0x7B, 0xB0, 0x8E, 0x6D, 0x67, 0xE6, 0x2E, 0x42, 0x35, 0x11, 0x0B, 0x56, 0x4E, 0x5F,
+      0x78, 0xFD, 0x92, 0xEF, 0x05, 0x8C, 0x84, 0x0A, 0xEA, 0x4E, 0x64, 0x55, 0xD7, 0x58, 0x5C, 0x60 },
+      200 /* Bin Number */
+  },
+  {
     /* T_RKTRUST_Elektronik_Sertifika_Hizmet_Sa_lay_c_s_ */
     { 0xC4, 0x70, 0xCF, 0x54, 0x7E, 0x23, 0x02, 0xB9, 0x77, 0xFB, 0x29, 0xDD, 0x71, 0xA8, 0x9A, 0x7B,
       0x6C, 0x1F, 0x60, 0x77, 0x7B, 0x03, 0x29, 0xF5, 0x60, 0x17, 0xF3, 0x28, 0xBF, 0x4F, 0x6B, 0xE6 },
       55 /* Bin Number */
   },
   {
     /* StartCom_Certification_Authority */
     { 0xC7, 0x66, 0xA9, 0xBE, 0xF2, 0xD4, 0x07, 0x1C, 0x86, 0x3A, 0x31, 0xAA, 0x49, 0x20, 0xE8, 0x13,
@@ -995,22 +1025,34 @@ static const struct CertAuthorityHash RO
   },
   {
     /* Staat_der_Nederlanden_Root_CA */
     { 0xD4, 0x1D, 0x82, 0x9E, 0x8C, 0x16, 0x59, 0x82, 0x2A, 0xF9, 0x3F, 0xCE, 0x62, 0xBF, 0xFC, 0xDE,
       0x26, 0x4F, 0xC8, 0x4E, 0x8B, 0x95, 0x0C, 0x5F, 0xF2, 0x75, 0xD0, 0x52, 0x35, 0x46, 0x95, 0xA3 },
       36 /* Bin Number */
   },
   {
+    /* UCA_Extended_Validation_Root */
+    { 0xD4, 0x3A, 0xF9, 0xB3, 0x54, 0x73, 0x75, 0x5C, 0x96, 0x84, 0xFC, 0x06, 0xD7, 0xD8, 0xCB, 0x70,
+      0xEE, 0x5C, 0x28, 0xE7, 0x73, 0xFB, 0x29, 0x4E, 0xB4, 0x1E, 0xE7, 0x17, 0x22, 0x92, 0x4D, 0x24 },
+      204 /* Bin Number */
+  },
+  {
     /* Certification_Authority_of_WoSign_G2 */
     { 0xD4, 0x87, 0xA5, 0x6F, 0x83, 0xB0, 0x74, 0x82, 0xE8, 0x5E, 0x96, 0x33, 0x94, 0xC1, 0xEC, 0xC2,
       0xC9, 0xE5, 0x1D, 0x09, 0x03, 0xEE, 0x94, 0x6B, 0x02, 0xC3, 0x01, 0x58, 0x1E, 0xD9, 0x9E, 0x16 },
       170 /* Bin Number */
   },
   {
+    /* Certigna_Root_CA */
+    { 0xD4, 0x8D, 0x3D, 0x23, 0xEE, 0xDB, 0x50, 0xA4, 0x59, 0xE5, 0x51, 0x97, 0x60, 0x1C, 0x27, 0x77,
+      0x4B, 0x9D, 0x7B, 0x18, 0xC9, 0x4D, 0x5A, 0x05, 0x95, 0x11, 0xA1, 0x02, 0x50, 0xB9, 0x31, 0x68 },
+      205 /* Bin Number */
+  },
+  {
     /* CA______ */
     { 0xD6, 0xF0, 0x34, 0xBD, 0x94, 0xAA, 0x23, 0x3F, 0x02, 0x97, 0xEC, 0xA4, 0x24, 0x5B, 0x28, 0x39,
       0x73, 0xE4, 0x47, 0xAA, 0x59, 0x0F, 0x31, 0x0C, 0x77, 0xF4, 0x8F, 0xDF, 0x83, 0x11, 0x22, 0x54 },
       153 /* Bin Number */
   },
   {
     /* AAA_Certificate_Services */
     { 0xD7, 0xA7, 0xA0, 0xFB, 0x5D, 0x7E, 0x27, 0x31, 0xD7, 0x71, 0xE9, 0x48, 0x4E, 0xBC, 0xDE, 0xF7,
--- a/security/manager/tools/KnownRootHashes.json
+++ b/security/manager/tools/KnownRootHashes.json
@@ -993,12 +993,47 @@
       "label": "GlobalSign",
       "binNumber": 197,
       "sha256Fingerprint": "LKvq/jfQbKIqunORwAM9JZgpUsRTZHNJdjo6ta1sz2k="
     },
     {
       "label": "OISTE_WISeKey_Global_Root_GC_CA",
       "binNumber": 198,
       "sha256Fingerprint": "hWD5HDYk2rqVcLX+oNvjb/EagyO+lIaFT7PzSlVxGY0="
+    },
+    {
+      "label": "GTS_Root_R1",
+      "binNumber": 199,
+      "sha256Fingerprint": "KldUceMTQLwhWBy9LPE+FYRjID7OlLz508wZa/CaVHI="
+    },
+    {
+      "label": "GTS_Root_R2",
+      "binNumber": 200,
+      "sha256Fingerprint": "xF17sI5tZ+YuQjURC1ZOX3j9ku8FjIQK6k5kVddYXGA="
+    },
+    {
+      "label": "GTS_Root_R3",
+      "binNumber": 201,
+      "sha256Fingerprint": "FdW4d0YZ6n1Uzhym0LDEA+A3qRfxMeigTh5renG6vOU="
+    },
+    {
+      "label": "GTS_Root_R4",
+      "binNumber": 202,
+      "sha256Fingerprint": "ccylOR+eeUsEgCUws2PhIdqKMEO7JmYv6k3Kf8lRpL0="
+    },
+    {
+      "label": "UCA_Global_G2_Root",
+      "binNumber": 203,
+      "sha256Fingerprint": "m+oRyXb+AUdkwb5WpvkUtaVgMXq9mYg5M4LlFhqgSTw="
+    },
+    {
+      "label": "UCA_Extended_Validation_Root",
+      "binNumber": 204,
+      "sha256Fingerprint": "1Dr5s1RzdVyWhPwG19jLcO5cKOdz+ylOtB7nFyKSTSQ="
+    },
+    {
+      "label": "Certigna_Root_CA",
+      "binNumber": 205,
+      "sha256Fingerprint": "1I09I+7bUKRZ5VGXYBwnd0udexjJTVoFlRGhAlC5MWg="
     }
   ],
-  "maxBin": 198
+  "maxBin": 205
 }
\ No newline at end of file
--- a/security/nss/TAG-INFO
+++ b/security/nss/TAG-INFO
@@ -1,1 +1,1 @@
-aa7940a0d822
+59ef418bf925
--- a/security/nss/coreconf/coreconf.dep
+++ b/security/nss/coreconf/coreconf.dep
@@ -5,9 +5,8 @@
 
 /*
  * A dummy header file that is a dependency for all the object files.
  * Used to force a full recompilation of NSS in Mozilla's Tinderbox
  * depend builds.  See comments in rules.mk.
  */
 
 #error "Do not include this header file."
-
--- a/security/nss/lib/ckfw/builtins/certdata.txt
+++ b/security/nss/lib/ckfw/builtins/certdata.txt
@@ -6909,203 +6909,16 @@ CKA_SERIAL_NUMBER MULTILINE_OCTAL
 \002\011\000\376\334\343\001\017\311\110\377
 END
 CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_TRUSTED_DELEGATOR
 CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_TRUSTED_DELEGATOR
 CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_MUST_VERIFY_TRUST
 CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE
 
 #
-# Certificate "AC Raiz Certicamara S.A."
-#
-# Issuer: CN=AC Ra..z Certic..mara S.A.,O=Sociedad Cameral de Certificaci..n Digital - Certic..mara S.A.,C=CO
-# Serial Number:07:7e:52:93:7b:e0:15:e3:57:f0:69:8c:cb:ec:0c
-# Subject: CN=AC Ra..z Certic..mara S.A.,O=Sociedad Cameral de Certificaci..n Digital - Certic..mara S.A.,C=CO
-# Not Valid Before: Mon Nov 27 20:46:29 2006
-# Not Valid After : Tue Apr 02 21:42:02 2030
-# Fingerprint (MD5): 93:2A:3E:F6:FD:23:69:0D:71:20:D4:2B:47:99:2B:A6
-# Fingerprint (SHA1): CB:A1:C5:F8:B0:E3:5E:B8:B9:45:12:D3:F9:34:A2:E9:06:10:D3:36
-CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE
-CKA_TOKEN CK_BBOOL CK_TRUE
-CKA_PRIVATE CK_BBOOL CK_FALSE
-CKA_MODIFIABLE CK_BBOOL CK_FALSE
-CKA_LABEL UTF8 "AC Ra\xC3\xADz Certic\xC3\xA1mara S.A."
-CKA_CERTIFICATE_TYPE CK_CERTIFICATE_TYPE CKC_X_509
-CKA_SUBJECT MULTILINE_OCTAL
-\060\173\061\013\060\011\006\003\125\004\006\023\002\103\117\061
-\107\060\105\006\003\125\004\012\014\076\123\157\143\151\145\144
-\141\144\040\103\141\155\145\162\141\154\040\144\145\040\103\145
-\162\164\151\146\151\143\141\143\151\303\263\156\040\104\151\147
-\151\164\141\154\040\055\040\103\145\162\164\151\143\303\241\155
-\141\162\141\040\123\056\101\056\061\043\060\041\006\003\125\004
-\003\014\032\101\103\040\122\141\303\255\172\040\103\145\162\164
-\151\143\303\241\155\141\162\141\040\123\056\101\056
-END
-CKA_ID UTF8 "0"
-CKA_ISSUER MULTILINE_OCTAL
-\060\173\061\013\060\011\006\003\125\004\006\023\002\103\117\061
-\107\060\105\006\003\125\004\012\014\076\123\157\143\151\145\144
-\141\144\040\103\141\155\145\162\141\154\040\144\145\040\103\145
-\162\164\151\146\151\143\141\143\151\303\263\156\040\104\151\147
-\151\164\141\154\040\055\040\103\145\162\164\151\143\303\241\155
-\141\162\141\040\123\056\101\056\061\043\060\041\006\003\125\004
-\003\014\032\101\103\040\122\141\303\255\172\040\103\145\162\164
-\151\143\303\241\155\141\162\141\040\123\056\101\056
-END
-CKA_SERIAL_NUMBER MULTILINE_OCTAL
-\002\017\007\176\122\223\173\340\025\343\127\360\151\214\313\354
-\014
-END
-CKA_VALUE MULTILINE_OCTAL
-\060\202\006\146\060\202\004\116\240\003\002\001\002\002\017\007
-\176\122\223\173\340\025\343\127\360\151\214\313\354\014\060\015
-\006\011\052\206\110\206\367\015\001\001\005\005\000\060\173\061
-\013\060\011\006\003\125\004\006\023\002\103\117\061\107\060\105
-\006\003\125\004\012\014\076\123\157\143\151\145\144\141\144\040
-\103\141\155\145\162\141\154\040\144\145\040\103\145\162\164\151
-\146\151\143\141\143\151\303\263\156\040\104\151\147\151\164\141
-\154\040\055\040\103\145\162\164\151\143\303\241\155\141\162\141
-\040\123\056\101\056\061\043\060\041\006\003\125\004\003\014\032
-\101\103\040\122\141\303\255\172\040\103\145\162\164\151\143\303
-\241\155\141\162\141\040\123\056\101\056\060\036\027\015\060\066
-\061\061\062\067\062\060\064\066\062\071\132\027\015\063\060\060
-\064\060\062\062\061\064\062\060\062\132\060\173\061\013\060\011
-\006\003\125\004\006\023\002\103\117\061\107\060\105\006\003\125
-\004\012\014\076\123\157\143\151\145\144\141\144\040\103\141\155
-\145\162\141\154\040\144\145\040\103\145\162\164\151\146\151\143
-\141\143\151\303\263\156\040\104\151\147\151\164\141\154\040\055
-\040\103\145\162\164\151\143\303\241\155\141\162\141\040\123\056
-\101\056\061\043\060\041\006\003\125\004\003\014\032\101\103\040
-\122\141\303\255\172\040\103\145\162\164\151\143\303\241\155\141
-\162\141\040\123\056\101\056\060\202\002\042\060\015\006\011\052
-\206\110\206\367\015\001\001\001\005\000\003\202\002\017\000\060
-\202\002\012\002\202\002\001\000\253\153\211\243\123\314\110\043
-\010\373\303\317\121\226\010\056\270\010\172\155\074\220\027\206
-\251\351\355\056\023\064\107\262\320\160\334\311\074\320\215\312
-\356\113\027\253\320\205\260\247\043\004\313\250\242\374\345\165
-\333\100\312\142\211\217\120\236\001\075\046\133\030\204\034\313
-\174\067\267\175\354\323\177\163\031\260\152\262\330\210\212\055
-\105\164\250\367\263\270\300\324\332\315\042\211\164\115\132\025
-\071\163\030\164\117\265\353\231\247\301\036\210\264\302\223\220
-\143\227\363\247\247\022\262\011\042\007\063\331\221\315\016\234
-\037\016\040\307\356\273\063\215\217\302\322\130\247\137\375\145
-\067\342\210\302\330\217\206\165\136\371\055\247\207\063\362\170
-\067\057\213\274\035\206\067\071\261\224\362\330\274\112\234\203
-\030\132\006\374\363\324\324\272\214\025\011\045\360\371\266\215
-\004\176\027\022\063\153\127\110\114\117\333\046\036\353\314\220
-\347\213\371\150\174\160\017\243\052\320\072\070\337\067\227\342
-\133\336\200\141\323\200\330\221\203\102\132\114\004\211\150\021
-\074\254\137\150\200\101\314\140\102\316\015\132\052\014\017\233
-\060\300\246\360\206\333\253\111\327\227\155\110\213\371\003\300
-\122\147\233\022\367\302\362\056\230\145\102\331\326\232\343\320
-\031\061\014\255\207\325\127\002\172\060\350\206\046\373\217\043
-\212\124\207\344\277\074\356\353\303\165\110\137\036\071\157\201
-\142\154\305\055\304\027\124\031\267\067\215\234\067\221\310\366
-\013\325\352\143\157\203\254\070\302\363\077\336\232\373\341\043
-\141\360\310\046\313\066\310\241\363\060\217\244\243\242\241\335
-\123\263\336\360\232\062\037\203\221\171\060\301\251\037\123\233
-\123\242\025\123\077\335\235\263\020\073\110\175\211\017\374\355
-\003\365\373\045\144\165\016\027\031\015\217\000\026\147\171\172
-\100\374\055\131\007\331\220\372\232\255\075\334\200\212\346\134
-\065\242\147\114\021\153\261\370\200\144\000\055\157\042\141\305
-\254\113\046\345\132\020\202\233\244\203\173\064\367\236\211\221
-\040\227\216\267\102\307\146\303\320\351\244\326\365\040\215\304
-\303\225\254\104\012\235\133\163\074\046\075\057\112\276\247\311
-\247\020\036\373\237\120\151\363\002\003\001\000\001\243\201\346
-\060\201\343\060\017\006\003\125\035\023\001\001\377\004\005\060
-\003\001\001\377\060\016\006\003\125\035\017\001\001\377\004\004
-\003\002\001\006\060\035\006\003\125\035\016\004\026\004\024\321
-\011\320\351\327\316\171\164\124\371\072\060\263\364\155\054\003
-\003\033\150\060\201\240\006\003\125\035\040\004\201\230\060\201
-\225\060\201\222\006\004\125\035\040\000\060\201\211\060\053\006
-\010\053\006\001\005\005\007\002\001\026\037\150\164\164\160\072
-\057\057\167\167\167\056\143\145\162\164\151\143\141\155\141\162
-\141\056\143\157\155\057\144\160\143\057\060\132\006\010\053\006
-\001\005\005\007\002\002\060\116\032\114\114\151\155\151\164\141
-\143\151\157\156\145\163\040\144\145\040\147\141\162\141\156\164
-\355\141\163\040\144\145\040\145\163\164\145\040\143\145\162\164
-\151\146\151\143\141\144\157\040\163\145\040\160\165\145\144\145
-\156\040\145\156\143\157\156\164\162\141\162\040\145\156\040\154
-\141\040\104\120\103\056\060\015\006\011\052\206\110\206\367\015
-\001\001\005\005\000\003\202\002\001\000\134\224\265\270\105\221
-\115\216\141\037\003\050\017\123\174\346\244\131\251\263\212\172
-\305\260\377\010\174\054\243\161\034\041\023\147\241\225\022\100
-\065\203\203\217\164\333\063\134\360\111\166\012\201\122\335\111
-\324\232\062\063\357\233\247\313\165\345\172\313\227\022\220\134
-\272\173\305\233\337\273\071\043\310\377\230\316\012\115\042\001
-\110\007\176\212\300\325\040\102\224\104\357\277\167\242\211\147
-\110\033\100\003\005\241\211\354\317\142\343\075\045\166\146\277
-\046\267\273\042\276\157\377\071\127\164\272\172\311\001\225\301
-\225\121\350\253\054\370\261\206\040\351\077\313\065\133\322\027
-\351\052\376\203\023\027\100\356\210\142\145\133\325\073\140\351
-\173\074\270\311\325\177\066\002\045\252\150\302\061\025\267\060
-\145\353\177\035\110\171\261\317\071\342\102\200\026\323\365\223
-\043\374\114\227\311\132\067\154\174\042\330\112\315\322\216\066
-\203\071\221\220\020\310\361\311\065\176\077\270\323\201\306\040
-\144\032\266\120\302\041\244\170\334\320\057\073\144\223\164\360
-\226\220\361\357\373\011\132\064\100\226\360\066\022\301\243\164
-\214\223\176\101\336\167\213\354\206\331\322\017\077\055\321\314
-\100\242\211\146\110\036\040\263\234\043\131\163\251\104\163\274
-\044\171\220\126\067\263\306\051\176\243\017\361\051\071\357\176
-\134\050\062\160\065\254\332\270\310\165\146\374\233\114\071\107
-\216\033\157\233\115\002\124\042\063\357\141\272\236\051\204\357
-\116\113\063\107\166\227\152\313\176\137\375\025\246\236\102\103
-\133\146\132\212\210\015\367\026\271\077\121\145\053\146\152\213
-\321\070\122\242\326\106\021\372\374\232\034\164\236\217\227\013
-\002\117\144\306\365\150\323\113\055\377\244\067\036\213\077\277
-\104\276\141\106\241\204\075\010\047\114\201\040\167\211\010\352
-\147\100\136\154\010\121\137\064\132\214\226\150\315\327\367\211
-\302\034\323\062\000\257\122\313\323\140\133\052\072\107\176\153
-\060\063\241\142\051\177\112\271\341\055\347\024\043\016\016\030
-\107\341\171\374\025\125\320\261\374\045\161\143\165\063\034\043
-\053\257\134\331\355\107\167\140\016\073\017\036\322\300\334\144
-\005\211\374\170\326\134\054\046\103\251
-END
-CKA_NSS_MOZILLA_CA_POLICY CK_BBOOL CK_TRUE
-
-# Trust for Certificate "AC Raiz Certicamara S.A."
-# Issuer: CN=AC Ra..z Certic..mara S.A.,O=Sociedad Cameral de Certificaci..n Digital - Certic..mara S.A.,C=CO
-# Serial Number:07:7e:52:93:7b:e0:15:e3:57:f0:69:8c:cb:ec:0c
-# Subject: CN=AC Ra..z Certic..mara S.A.,O=Sociedad Cameral de Certificaci..n Digital - Certic..mara S.A.,C=CO
-# Not Valid Before: Mon Nov 27 20:46:29 2006
-# Not Valid After : Tue Apr 02 21:42:02 2030
-# Fingerprint (MD5): 93:2A:3E:F6:FD:23:69:0D:71:20:D4:2B:47:99:2B:A6
-# Fingerprint (SHA1): CB:A1:C5:F8:B0:E3:5E:B8:B9:45:12:D3:F9:34:A2:E9:06:10:D3:36
-CKA_CLASS CK_OBJECT_CLASS CKO_NSS_TRUST
-CKA_TOKEN CK_BBOOL CK_TRUE
-CKA_PRIVATE CK_BBOOL CK_FALSE
-CKA_MODIFIABLE CK_BBOOL CK_FALSE
-CKA_LABEL UTF8 "AC Ra\xC3\xADz Certic\xC3\xA1mara S.A."
-CKA_CERT_SHA1_HASH MULTILINE_OCTAL
-\313\241\305\370\260\343\136\270\271\105\022\323\371\064\242\351
-\006\020\323\066
-END
-CKA_CERT_MD5_HASH MULTILINE_OCTAL
-\223\052\076\366\375\043\151\015\161\040\324\053\107\231\053\246
-END
-CKA_ISSUER MULTILINE_OCTAL
-\060\173\061\013\060\011\006\003\125\004\006\023\002\103\117\061
-\107\060\105\006\003\125\004\012\014\076\123\157\143\151\145\144
-\141\144\040\103\141\155\145\162\141\154\040\144\145\040\103\145
-\162\164\151\146\151\143\141\143\151\303\263\156\040\104\151\147
-\151\164\141\154\040\055\040\103\145\162\164\151\143\303\241\155
-\141\162\141\040\123\056\101\056\061\043\060\041\006\003\125\004
-\003\014\032\101\103\040\122\141\303\255\172\040\103\145\162\164
-\151\143\303\241\155\141\162\141\040\123\056\101\056
-END
-CKA_SERIAL_NUMBER MULTILINE_OCTAL
-\002\017\007\176\122\223\173\340\025\343\127\360\151\214\313\354
-\014
-END
-CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_MUST_VERIFY_TRUST
-CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_TRUSTED_DELEGATOR
-CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_MUST_VERIFY_TRUST
-CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE
-
-#
 # Certificate "Deutsche Telekom Root CA 2"
 #
 # Issuer: CN=Deutsche Telekom Root CA 2,OU=T-TeleSec Trust Center,O=Deutsche Telekom AG,C=DE
 # Serial Number: 38 (0x26)
 # Subject: CN=Deutsche Telekom Root CA 2,OU=T-TeleSec Trust Center,O=Deutsche Telekom AG,C=DE
 # Not Valid Before: Fri Jul 09 12:11:00 1999
 # Not Valid After : Tue Jul 09 23:59:00 2019
 # Fingerprint (MD5): 74:01:4A:91:B1:08:C4:58:CE:47:CD:F0:DD:11:53:08
@@ -18874,717 +18687,16 @@ CKA_SERIAL_NUMBER MULTILINE_OCTAL
 \002\001\000
 END
 CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_TRUSTED_DELEGATOR
 CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_TRUSTED_DELEGATOR
 CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_MUST_VERIFY_TRUST
 CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE
 
 #
-# Certificate "Certplus Root CA G1"
-#
-# Issuer: CN=Certplus Root CA G1,O=Certplus,C=FR
-# Serial Number:11:20:55:83:e4:2d:3e:54:56:85:2d:83:37:b7:2c:dc:46:11
-# Subject: CN=Certplus Root CA G1,O=Certplus,C=FR
-# Not Valid Before: Mon May 26 00:00:00 2014
-# Not Valid After : Fri Jan 15 00:00:00 2038
-# Fingerprint (SHA-256): 15:2A:40:2B:FC:DF:2C:D5:48:05:4D:22:75:B3:9C:7F:CA:3E:C0:97:80:78:B0:F0:EA:76:E5:61:A6:C7:43:3E
-# Fingerprint (SHA1): 22:FD:D0:B7:FD:A2:4E:0D:AC:49:2C:A0:AC:A6:7B:6A:1F:E3:F7:66
-CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE
-CKA_TOKEN CK_BBOOL CK_TRUE
-CKA_PRIVATE CK_BBOOL CK_FALSE
-CKA_MODIFIABLE CK_BBOOL CK_FALSE
-CKA_LABEL UTF8 "Certplus Root CA G1"
-CKA_CERTIFICATE_TYPE CK_CERTIFICATE_TYPE CKC_X_509
-CKA_SUBJECT MULTILINE_OCTAL
-\060\076\061\013\060\011\006\003\125\004\006\023\002\106\122\061
-\021\060\017\006\003\125\004\012\014\010\103\145\162\164\160\154
-\165\163\061\034\060\032\006\003\125\004\003\014\023\103\145\162
-\164\160\154\165\163\040\122\157\157\164\040\103\101\040\107\061
-END
-CKA_ID UTF8 "0"
-CKA_ISSUER MULTILINE_OCTAL
-\060\076\061\013\060\011\006\003\125\004\006\023\002\106\122\061
-\021\060\017\006\003\125\004\012\014\010\103\145\162\164\160\154
-\165\163\061\034\060\032\006\003\125\004\003\014\023\103\145\162
-\164\160\154\165\163\040\122\157\157\164\040\103\101\040\107\061
-END
-CKA_SERIAL_NUMBER MULTILINE_OCTAL
-\002\022\021\040\125\203\344\055\076\124\126\205\055\203\067\267
-\054\334\106\021
-END
-CKA_VALUE MULTILINE_OCTAL
-\060\202\005\153\060\202\003\123\240\003\002\001\002\002\022\021
-\040\125\203\344\055\076\124\126\205\055\203\067\267\054\334\106
-\021\060\015\006\011\052\206\110\206\367\015\001\001\015\005\000
-\060\076\061\013\060\011\006\003\125\004\006\023\002\106\122\061
-\021\060\017\006\003\125\004\012\014\010\103\145\162\164\160\154
-\165\163\061\034\060\032\006\003\125\004\003\014\023\103\145\162
-\164\160\154\165\163\040\122\157\157\164\040\103\101\040\107\061
-\060\036\027\015\061\064\060\065\062\066\060\060\060\060\060\060
-\132\027\015\063\070\060\061\061\065\060\060\060\060\060\060\132
-\060\076\061\013\060\011\006\003\125\004\006\023\002\106\122\061
-\021\060\017\006\003\125\004\012\014\010\103\145\162\164\160\154
-\165\163\061\034\060\032\006\003\125\004\003\014\023\103\145\162
-\164\160\154\165\163\040\122\157\157\164\040\103\101\040\107\061
-\060\202\002\042\060\015\006\011\052\206\110\206\367\015\001\001
-\001\005\000\003\202\002\017\000\060\202\002\012\002\202\002\001
-\000\332\120\207\266\332\270\251\076\235\144\372\126\063\232\126
-\075\026\345\003\225\262\064\034\232\155\142\005\324\330\217\347
-\211\144\237\272\333\144\213\144\346\171\052\141\315\257\217\132
-\211\221\145\271\130\374\264\003\137\221\077\055\020\025\340\176
-\317\274\374\177\103\147\250\255\136\066\043\330\230\263\115\363
-\103\236\071\174\052\374\354\210\325\210\356\160\275\205\026\055
-\352\113\211\074\243\161\102\376\034\375\323\034\055\020\270\206
-\124\352\103\270\333\306\207\332\250\256\200\045\317\172\046\035
-\252\221\260\110\157\256\265\336\236\330\327\372\000\375\306\217
-\320\121\273\142\175\244\261\214\262\377\040\021\272\065\143\005
-\206\107\140\103\063\220\366\107\242\003\117\226\115\235\117\301
-\352\352\234\242\376\064\056\336\267\312\033\166\244\267\255\237
-\351\250\324\170\077\170\376\362\070\011\066\035\322\026\002\310
-\354\052\150\257\365\216\224\357\055\023\172\036\102\112\035\025
-\061\256\014\004\127\374\141\163\363\061\126\206\061\200\240\304
-\021\156\060\166\343\224\360\137\004\304\254\207\162\211\230\305
-\235\314\127\010\232\364\014\374\175\172\005\072\372\107\200\071
-\266\317\204\023\167\157\047\352\377\226\147\027\010\155\351\015
-\326\043\120\060\260\025\164\023\076\345\057\377\016\315\304\013
-\112\135\360\330\000\063\111\146\353\241\030\174\131\056\075\050
-\271\141\161\313\265\245\272\270\352\334\342\160\157\010\152\334
-\207\147\064\357\337\060\162\335\363\311\077\043\377\065\341\276
-\041\051\040\060\201\344\031\245\040\351\045\312\163\061\164\051
-\276\342\102\325\363\262\046\146\307\150\375\031\263\347\040\223
-\231\350\135\340\136\207\347\106\350\045\234\012\051\044\324\315
-\130\206\122\100\044\262\173\017\230\022\040\044\366\220\154\107
-\310\015\273\030\040\056\331\375\374\213\362\051\352\207\164\225
-\340\102\120\170\204\004\101\141\260\364\041\043\217\055\313\050
-\041\362\152\154\364\032\246\305\024\264\067\145\117\225\375\200
-\310\370\162\345\045\153\304\140\261\173\155\216\112\212\163\316
-\131\373\160\172\163\006\023\331\323\164\067\044\101\012\021\157
-\227\334\347\344\176\241\275\025\362\272\207\017\075\150\212\026
-\007\002\003\001\000\001\243\143\060\141\060\016\006\003\125\035
-\017\001\001\377\004\004\003\002\001\006\060\017\006\003\125\035
-\023\001\001\377\004\005\060\003\001\001\377\060\035\006\003\125
-\035\016\004\026\004\024\250\301\300\233\221\250\103\025\174\135
-\006\047\264\052\121\330\227\013\201\261\060\037\006\003\125\035
-\043\004\030\060\026\200\024\250\301\300\233\221\250\103\025\174
-\135\006\047\264\052\121\330\227\013\201\261\060\015\006\011\052
-\206\110\206\367\015\001\001\015\005\000\003\202\002\001\000\234
-\126\157\001\176\321\275\114\365\212\306\360\046\037\344\340\070
-\030\314\062\303\051\073\235\101\051\064\141\306\327\360\000\241
-\353\244\162\217\224\027\274\023\054\165\264\127\356\012\174\011
-\172\334\325\312\241\320\064\023\370\167\253\237\345\376\330\036
-\164\212\205\007\217\177\314\171\172\312\226\315\315\375\117\373
-\375\043\015\220\365\364\136\323\306\141\175\236\021\340\002\356
-\011\004\331\007\335\246\212\267\014\203\044\273\203\120\222\376
-\140\165\021\076\330\235\260\212\172\265\340\235\233\313\220\122
-\113\260\223\052\324\076\026\063\345\236\306\145\025\076\144\073
-\004\077\333\014\217\137\134\035\151\037\257\363\351\041\214\363
-\357\227\366\232\267\031\266\204\164\234\243\124\265\160\116\143
-\330\127\135\123\041\233\100\222\103\372\326\167\125\063\117\144
-\325\373\320\054\152\216\155\045\246\357\205\350\002\304\123\076
-\271\236\207\274\314\065\032\336\241\351\212\143\207\145\036\021
-\052\333\143\167\227\024\276\232\024\231\021\262\300\356\260\117
-\370\024\041\062\103\117\237\253\242\313\250\017\252\073\006\125
-\306\022\051\127\010\324\067\327\207\047\255\111\131\247\221\253
-\104\172\136\215\160\333\227\316\110\120\261\163\223\366\360\203
-\140\371\315\361\341\061\375\133\174\161\041\143\024\024\252\257
-\305\336\223\176\150\261\354\042\242\252\220\165\236\265\103\162
-\352\144\243\204\113\375\014\250\046\153\161\227\356\126\143\146
-\350\102\124\371\307\035\337\320\217\133\337\310\060\157\210\376
-\015\304\063\034\123\250\243\375\110\020\362\344\012\116\341\025
-\127\374\156\144\060\302\125\021\334\352\251\315\112\124\254\051
-\143\104\317\112\100\240\326\150\131\033\063\371\357\072\213\333
-\040\222\334\102\204\277\001\253\207\300\325\040\202\333\306\271
-\203\205\102\134\017\103\073\152\111\065\325\230\364\025\277\372
-\141\201\014\011\040\030\322\320\027\014\313\110\000\120\351\166
-\202\214\144\327\072\240\007\125\314\036\061\300\357\072\264\145
-\373\343\277\102\153\236\017\250\275\153\230\334\330\333\313\213
-\244\335\327\131\364\156\335\376\252\303\221\320\056\102\007\300
-\014\115\123\315\044\261\114\133\036\121\364\337\351\222\372
-END
-CKA_NSS_MOZILLA_CA_POLICY CK_BBOOL CK_TRUE
-
-# Trust for "Certplus Root CA G1"
-# Issuer: CN=Certplus Root CA G1,O=Certplus,C=FR
-# Serial Number:11:20:55:83:e4:2d:3e:54:56:85:2d:83:37:b7:2c:dc:46:11
-# Subject: CN=Certplus Root CA G1,O=Certplus,C=FR
-# Not Valid Before: Mon May 26 00:00:00 2014
-# Not Valid After : Fri Jan 15 00:00:00 2038
-# Fingerprint (SHA-256): 15:2A:40:2B:FC:DF:2C:D5:48:05:4D:22:75:B3:9C:7F:CA:3E:C0:97:80:78:B0:F0:EA:76:E5:61:A6:C7:43:3E
-# Fingerprint (SHA1): 22:FD:D0:B7:FD:A2:4E:0D:AC:49:2C:A0:AC:A6:7B:6A:1F:E3:F7:66
-CKA_CLASS CK_OBJECT_CLASS CKO_NSS_TRUST
-CKA_TOKEN CK_BBOOL CK_TRUE
-CKA_PRIVATE CK_BBOOL CK_FALSE
-CKA_MODIFIABLE CK_BBOOL CK_FALSE
-CKA_LABEL UTF8 "Certplus Root CA G1"
-CKA_CERT_SHA1_HASH MULTILINE_OCTAL
-\042\375\320\267\375\242\116\015\254\111\054\240\254\246\173\152
-\037\343\367\146
-END
-CKA_CERT_MD5_HASH MULTILINE_OCTAL
-\177\011\234\367\331\271\134\151\151\126\325\067\076\024\015\102
-END
-CKA_ISSUER MULTILINE_OCTAL
-\060\076\061\013\060\011\006\003\125\004\006\023\002\106\122\061
-\021\060\017\006\003\125\004\012\014\010\103\145\162\164\160\154
-\165\163\061\034\060\032\006\003\125\004\003\014\023\103\145\162
-\164\160\154\165\163\040\122\157\157\164\040\103\101\040\107\061
-END
-CKA_SERIAL_NUMBER MULTILINE_OCTAL
-\002\022\021\040\125\203\344\055\076\124\126\205\055\203\067\267
-\054\334\106\021
-END
-CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_MUST_VERIFY_TRUST
-CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_TRUSTED_DELEGATOR
-CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_MUST_VERIFY_TRUST
-CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE
-
-#
-# Certificate "Certplus Root CA G2"
-#
-# Issuer: CN=Certplus Root CA G2,O=Certplus,C=FR
-# Serial Number:11:20:d9:91:ce:ae:a3:e8:c5:e7:ff:e9:02:af:cf:73:bc:55
-# Subject: CN=Certplus Root CA G2,O=Certplus,C=FR
-# Not Valid Before: Mon May 26 00:00:00 2014
-# Not Valid After : Fri Jan 15 00:00:00 2038
-# Fingerprint (SHA-256): 6C:C0:50:41:E6:44:5E:74:69:6C:4C:FB:C9:F8:0F:54:3B:7E:AB:BB:44:B4:CE:6F:78:7C:6A:99:71:C4:2F:17
-# Fingerprint (SHA1): 4F:65:8E:1F:E9:06:D8:28:02:E9:54:47:41:C9:54:25:5D:69:CC:1A
-CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE
-CKA_TOKEN CK_BBOOL CK_TRUE
-CKA_PRIVATE CK_BBOOL CK_FALSE
-CKA_MODIFIABLE CK_BBOOL CK_FALSE
-CKA_LABEL UTF8 "Certplus Root CA G2"
-CKA_CERTIFICATE_TYPE CK_CERTIFICATE_TYPE CKC_X_509
-CKA_SUBJECT MULTILINE_OCTAL
-\060\076\061\013\060\011\006\003\125\004\006\023\002\106\122\061
-\021\060\017\006\003\125\004\012\014\010\103\145\162\164\160\154
-\165\163\061\034\060\032\006\003\125\004\003\014\023\103\145\162
-\164\160\154\165\163\040\122\157\157\164\040\103\101\040\107\062
-END
-CKA_ID UTF8 "0"
-CKA_ISSUER MULTILINE_OCTAL
-\060\076\061\013\060\011\006\003\125\004\006\023\002\106\122\061
-\021\060\017\006\003\125\004\012\014\010\103\145\162\164\160\154
-\165\163\061\034\060\032\006\003\125\004\003\014\023\103\145\162
-\164\160\154\165\163\040\122\157\157\164\040\103\101\040\107\062
-END
-CKA_SERIAL_NUMBER MULTILINE_OCTAL
-\002\022\021\040\331\221\316\256\243\350\305\347\377\351\002\257
-\317\163\274\125
-END
-CKA_VALUE MULTILINE_OCTAL
-\060\202\002\034\060\202\001\242\240\003\002\001\002\002\022\021
-\040\331\221\316\256\243\350\305\347\377\351\002\257\317\163\274
-\125\060\012\006\010\052\206\110\316\075\004\003\003\060\076\061
-\013\060\011\006\003\125\004\006\023\002\106\122\061\021\060\017
-\006\003\125\004\012\014\010\103\145\162\164\160\154\165\163\061
-\034\060\032\006\003\125\004\003\014\023\103\145\162\164\160\154
-\165\163\040\122\157\157\164\040\103\101\040\107\062\060\036\027
-\015\061\064\060\065\062\066\060\060\060\060\060\060\132\027\015
-\063\070\060\061\061\065\060\060\060\060\060\060\132\060\076\061
-\013\060\011\006\003\125\004\006\023\002\106\122\061\021\060\017
-\006\003\125\004\012\014\010\103\145\162\164\160\154\165\163\061
-\034\060\032\006\003\125\004\003\014\023\103\145\162\164\160\154
-\165\163\040\122\157\157\164\040\103\101\040\107\062\060\166\060
-\020\006\007\052\206\110\316\075\002\001\006\005\053\201\004\000
-\042\003\142\000\004\315\017\133\126\202\337\360\105\032\326\255
-\367\171\360\035\311\254\226\326\236\116\234\037\264\102\021\312
-\206\277\155\373\205\243\305\345\031\134\327\356\246\077\151\147
-\330\170\342\246\311\304\333\055\171\056\347\213\215\002\157\061
-\042\115\006\343\140\162\105\235\016\102\167\236\316\317\345\177
-\205\233\030\344\374\314\056\162\323\026\223\116\312\231\143\134
-\241\005\052\154\006\243\143\060\141\060\016\006\003\125\035\017
-\001\001\377\004\004\003\002\001\006\060\017\006\003\125\035\023
-\001\001\377\004\005\060\003\001\001\377\060\035\006\003\125\035
-\016\004\026\004\024\332\203\143\002\171\216\332\114\306\074\043
-\024\330\217\303\040\253\050\140\131\060\037\006\003\125\035\043
-\004\030\060\026\200\024\332\203\143\002\171\216\332\114\306\074
-\043\024\330\217\303\040\253\050\140\131\060\012\006\010\052\206
-\110\316\075\004\003\003\003\150\000\060\145\002\060\160\376\260
-\013\331\367\203\227\354\363\125\035\324\334\263\006\016\376\063
-\230\235\213\071\220\153\224\041\355\266\327\135\326\114\327\041
-\247\347\277\041\017\053\315\367\052\334\205\007\235\002\061\000
-\206\024\026\345\334\260\145\302\300\216\024\237\277\044\026\150
-\345\274\371\171\151\334\255\105\053\367\266\061\163\314\006\245
-\123\223\221\032\223\256\160\152\147\272\327\236\345\141\032\137
-END
-CKA_NSS_MOZILLA_CA_POLICY CK_BBOOL CK_TRUE
-
-# Trust for "Certplus Root CA G2"
-# Issuer: CN=Certplus Root CA G2,O=Certplus,C=FR
-# Serial Number:11:20:d9:91:ce:ae:a3:e8:c5:e7:ff:e9:02:af:cf:73:bc:55
-# Subject: CN=Certplus Root CA G2,O=Certplus,C=FR
-# Not Valid Before: Mon May 26 00:00:00 2014
-# Not Valid After : Fri Jan 15 00:00:00 2038
-# Fingerprint (SHA-256): 6C:C0:50:41:E6:44:5E:74:69:6C:4C:FB:C9:F8:0F:54:3B:7E:AB:BB:44:B4:CE:6F:78:7C:6A:99:71:C4:2F:17
-# Fingerprint (SHA1): 4F:65:8E:1F:E9:06:D8:28:02:E9:54:47:41:C9:54:25:5D:69:CC:1A
-CKA_CLASS CK_OBJECT_CLASS CKO_NSS_TRUST
-CKA_TOKEN CK_BBOOL CK_TRUE
-CKA_PRIVATE CK_BBOOL CK_FALSE
-CKA_MODIFIABLE CK_BBOOL CK_FALSE
-CKA_LABEL UTF8 "Certplus Root CA G2"
-CKA_CERT_SHA1_HASH MULTILINE_OCTAL
-\117\145\216\037\351\006\330\050\002\351\124\107\101\311\124\045
-\135\151\314\032
-END
-CKA_CERT_MD5_HASH MULTILINE_OCTAL
-\247\356\304\170\055\033\356\055\271\051\316\326\247\226\062\061
-END
-CKA_ISSUER MULTILINE_OCTAL
-\060\076\061\013\060\011\006\003\125\004\006\023\002\106\122\061
-\021\060\017\006\003\125\004\012\014\010\103\145\162\164\160\154
-\165\163\061\034\060\032\006\003\125\004\003\014\023\103\145\162
-\164\160\154\165\163\040\122\157\157\164\040\103\101\040\107\062
-END
-CKA_SERIAL_NUMBER MULTILINE_OCTAL
-\002\022\021\040\331\221\316\256\243\350\305\347\377\351\002\257
-\317\163\274\125
-END
-CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_MUST_VERIFY_TRUST
-CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_TRUSTED_DELEGATOR
-CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_MUST_VERIFY_TRUST
-CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE
-
-#
-# Certificate "OpenTrust Root CA G1"
-#
-# Issuer: CN=OpenTrust Root CA G1,O=OpenTrust,C=FR
-# Serial Number:11:20:b3:90:55:39:7d:7f:36:6d:64:c2:a7:9f:6b:63:8e:67
-# Subject: CN=OpenTrust Root CA G1,O=OpenTrust,C=FR
-# Not Valid Before: Mon May 26 08:45:50 2014
-# Not Valid After : Fri Jan 15 00:00:00 2038
-# Fingerprint (SHA-256): 56:C7:71:28:D9:8C:18:D9:1B:4C:FD:FF:BC:25:EE:91:03:D4:75:8E:A2:AB:AD:82:6A:90:F3:45:7D:46:0E:B4
-# Fingerprint (SHA1): 79:91:E8:34:F7:E2:EE:DD:08:95:01:52:E9:55:2D:14:E9:58:D5:7E
-CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE
-CKA_TOKEN CK_BBOOL CK_TRUE
-CKA_PRIVATE CK_BBOOL CK_FALSE
-CKA_MODIFIABLE CK_BBOOL CK_FALSE
-CKA_LABEL UTF8 "OpenTrust Root CA G1"
-CKA_CERTIFICATE_TYPE CK_CERTIFICATE_TYPE CKC_X_509
-CKA_SUBJECT MULTILINE_OCTAL
-\060\100\061\013\060\011\006\003\125\004\006\023\002\106\122\061
-\022\060\020\006\003\125\004\012\014\011\117\160\145\156\124\162
-\165\163\164\061\035\060\033\006\003\125\004\003\014\024\117\160
-\145\156\124\162\165\163\164\040\122\157\157\164\040\103\101\040
-\107\061
-END
-CKA_ID UTF8 "0"
-CKA_ISSUER MULTILINE_OCTAL
-\060\100\061\013\060\011\006\003\125\004\006\023\002\106\122\061
-\022\060\020\006\003\125\004\012\014\011\117\160\145\156\124\162
-\165\163\164\061\035\060\033\006\003\125\004\003\014\024\117\160
-\145\156\124\162\165\163\164\040\122\157\157\164\040\103\101\040
-\107\061
-END
-CKA_SERIAL_NUMBER MULTILINE_OCTAL
-\002\022\021\040\263\220\125\071\175\177\066\155\144\302\247\237
-\153\143\216\147
-END
-CKA_VALUE MULTILINE_OCTAL
-\060\202\005\157\060\202\003\127\240\003\002\001\002\002\022\021
-\040\263\220\125\071\175\177\066\155\144\302\247\237\153\143\216
-\147\060\015\006\011\052\206\110\206\367\015\001\001\013\005\000
-\060\100\061\013\060\011\006\003\125\004\006\023\002\106\122\061
-\022\060\020\006\003\125\004\012\014\011\117\160\145\156\124\162
-\165\163\164\061\035\060\033\006\003\125\004\003\014\024\117\160
-\145\156\124\162\165\163\164\040\122\157\157\164\040\103\101\040
-\107\061\060\036\027\015\061\064\060\065\062\066\060\070\064\065
-\065\060\132\027\015\063\070\060\061\061\065\060\060\060\060\060
-\060\132\060\100\061\013\060\011\006\003\125\004\006\023\002\106
-\122\061\022\060\020\006\003\125\004\012\014\011\117\160\145\156
-\124\162\165\163\164\061\035\060\033\006\003\125\004\003\014\024
-\117\160\145\156\124\162\165\163\164\040\122\157\157\164\040\103
-\101\040\107\061\060\202\002\042\060\015\006\011\052\206\110\206
-\367\015\001\001\001\005\000\003\202\002\017\000\060\202\002\012
-\002\202\002\001\000\370\171\106\332\226\305\060\136\212\161\003
-\055\160\244\273\260\305\010\334\315\346\065\300\200\244\021\055
-\335\346\207\256\135\075\221\322\207\154\067\267\332\142\236\233
-\302\044\327\217\361\333\246\246\337\106\157\121\246\161\313\076
-\033\061\147\142\367\021\133\064\047\325\171\116\214\233\130\275
-\042\020\015\134\047\014\335\060\345\250\323\135\041\070\164\027
-\376\343\037\266\117\073\153\055\333\175\140\037\214\175\114\005
-\302\353\001\026\025\230\024\216\321\220\167\042\077\354\302\071
-\270\171\072\360\111\044\342\225\221\334\141\064\222\214\124\164
-\357\261\175\214\001\342\070\175\301\137\152\137\044\262\216\142
-\027\255\171\040\255\253\035\267\340\264\226\110\117\146\103\020
-\006\026\044\003\341\340\234\216\306\106\117\216\032\231\341\217
-\271\216\063\154\151\336\130\255\240\016\247\144\124\021\151\104
-\146\117\114\022\247\216\054\175\304\324\133\305\000\064\060\301
-\331\231\376\062\316\007\204\264\116\315\012\377\066\115\142\361
-\247\143\127\344\333\152\247\256\277\053\271\311\346\262\047\211
-\345\176\232\034\115\150\306\301\030\336\063\053\121\106\113\034
-\216\367\075\014\371\212\064\024\304\373\063\065\043\361\314\361
-\052\307\245\273\260\242\316\376\123\153\115\101\033\146\050\262
-\226\372\247\256\012\116\271\071\063\104\234\164\301\223\034\370
-\340\236\044\045\103\361\233\043\202\252\337\054\040\260\334\066
-\116\003\263\174\002\324\346\173\032\252\207\023\277\076\241\164
-\273\233\016\341\300\223\237\327\244\146\312\273\033\073\343\060
-\364\063\131\212\007\162\003\125\347\163\152\003\061\156\157\226
-\033\343\242\237\257\222\307\355\365\102\267\045\114\073\023\004
-\317\034\226\257\034\042\243\320\253\005\262\114\022\043\122\334
-\375\031\133\047\234\036\073\172\375\102\043\333\043\200\023\360
-\274\121\025\124\224\246\167\076\320\164\121\275\121\024\010\071
-\067\313\037\064\251\060\235\122\204\056\125\220\261\272\337\125
-\000\013\330\126\055\261\111\111\162\200\251\142\327\300\366\030
-\021\004\125\315\164\173\317\141\160\171\364\173\054\134\134\222
-\374\345\270\132\253\114\223\225\241\047\356\245\276\317\161\043
-\102\272\233\166\055\002\003\001\000\001\243\143\060\141\060\016
-\006\003\125\035\017\001\001\377\004\004\003\002\001\006\060\017
-\006\003\125\035\023\001\001\377\004\005\060\003\001\001\377\060
-\035\006\003\125\035\016\004\026\004\024\227\106\041\127\041\065
-\332\066\125\307\363\361\067\160\345\010\366\223\051\266\060\037
-\006\003\125\035\043\004\030\060\026\200\024\227\106\041\127\041
-\065\332\066\125\307\363\361\067\160\345\010\366\223\051\266\060
-\015\006\011\052\206\110\206\367\015\001\001\013\005\000\003\202
-\002\001\000\035\335\002\140\174\340\065\247\346\230\173\352\104
-\316\147\100\117\362\223\156\146\324\071\211\046\254\323\115\004
-\074\273\207\041\077\067\364\161\045\332\113\272\253\226\202\201
-\221\266\355\331\261\244\145\227\342\157\144\131\244\226\356\140
-\312\037\043\373\105\272\377\217\044\360\312\251\061\177\171\037
-\200\263\055\062\272\144\147\140\257\271\131\315\337\232\111\323
-\250\202\261\371\230\224\212\314\340\273\340\004\033\231\140\261
-\106\145\334\010\242\262\106\236\104\210\352\223\176\127\026\322
-\025\162\137\056\113\253\324\235\143\270\343\110\345\376\204\056
-\130\012\237\103\035\376\267\030\222\206\103\113\016\234\062\206
-\054\140\365\351\110\352\225\355\160\051\361\325\057\375\065\264
-\127\317\333\205\110\231\271\302\157\154\217\315\170\225\254\144
-\050\375\126\260\303\157\303\276\131\122\341\137\204\217\200\362
-\364\015\066\255\166\263\243\265\341\144\166\072\130\334\175\117
-\136\126\154\345\125\131\127\245\337\361\212\146\060\214\324\122
-\142\070\167\264\276\050\327\312\066\304\233\005\360\370\025\333
-\333\361\357\064\235\035\170\112\210\126\147\156\140\377\217\310
-\213\341\216\275\102\251\063\012\131\102\022\022\052\372\261\235
-\103\216\005\233\231\332\142\255\127\066\263\035\266\015\171\055
-\226\270\353\362\014\113\014\245\224\306\060\247\046\031\055\355
-\114\006\120\060\361\375\130\075\271\113\027\137\031\264\152\204
-\124\264\070\117\071\242\015\226\150\303\050\224\375\355\055\037
-\112\153\103\226\056\220\001\020\373\070\246\201\013\320\277\165
-\323\324\271\316\361\077\157\016\034\036\067\161\345\030\207\165
-\031\077\120\271\136\244\105\064\255\260\312\346\345\023\166\017
-\061\024\251\216\055\224\326\325\205\115\163\025\117\113\362\262
-\076\355\154\275\375\016\235\146\163\260\075\264\367\277\250\340
-\021\244\304\256\165\011\112\143\000\110\040\246\306\235\013\011
-\212\264\340\346\316\076\307\076\046\070\351\053\336\246\010\111
-\003\004\220\212\351\217\277\350\266\264\052\243\043\215\034\034
-\262\071\222\250\217\002\134\100\071\165\324\163\101\002\167\336
-\315\340\103\207\326\344\272\112\303\154\022\177\376\052\346\043
-\326\214\161
-END
-CKA_NSS_MOZILLA_CA_POLICY CK_BBOOL CK_TRUE
-
-# Trust for "OpenTrust Root CA G1"
-# Issuer: CN=OpenTrust Root CA G1,O=OpenTrust,C=FR
-# Serial Number:11:20:b3:90:55:39:7d:7f:36:6d:64:c2:a7:9f:6b:63:8e:67
-# Subject: CN=OpenTrust Root CA G1,O=OpenTrust,C=FR
-# Not Valid Before: Mon May 26 08:45:50 2014
-# Not Valid After : Fri Jan 15 00:00:00 2038
-# Fingerprint (SHA-256): 56:C7:71:28:D9:8C:18:D9:1B:4C:FD:FF:BC:25:EE:91:03:D4:75:8E:A2:AB:AD:82:6A:90:F3:45:7D:46:0E:B4
-# Fingerprint (SHA1): 79:91:E8:34:F7:E2:EE:DD:08:95:01:52:E9:55:2D:14:E9:58:D5:7E
-CKA_CLASS CK_OBJECT_CLASS CKO_NSS_TRUST
-CKA_TOKEN CK_BBOOL CK_TRUE
-CKA_PRIVATE CK_BBOOL CK_FALSE
-CKA_MODIFIABLE CK_BBOOL CK_FALSE
-CKA_LABEL UTF8 "OpenTrust Root CA G1"
-CKA_CERT_SHA1_HASH MULTILINE_OCTAL
-\171\221\350\064\367\342\356\335\010\225\001\122\351\125\055\024
-\351\130\325\176
-END
-CKA_CERT_MD5_HASH MULTILINE_OCTAL
-\166\000\314\201\051\315\125\136\210\152\172\056\367\115\071\332
-END
-CKA_ISSUER MULTILINE_OCTAL
-\060\100\061\013\060\011\006\003\125\004\006\023\002\106\122\061
-\022\060\020\006\003\125\004\012\014\011\117\160\145\156\124\162
-\165\163\164\061\035\060\033\006\003\125\004\003\014\024\117\160
-\145\156\124\162\165\163\164\040\122\157\157\164\040\103\101\040
-\107\061
-END
-CKA_SERIAL_NUMBER MULTILINE_OCTAL
-\002\022\021\040\263\220\125\071\175\177\066\155\144\302\247\237
-\153\143\216\147
-END
-CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_MUST_VERIFY_TRUST
-CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_TRUSTED_DELEGATOR
-CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_MUST_VERIFY_TRUST
-CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE
-
-#
-# Certificate "OpenTrust Root CA G2"
-#
-# Issuer: CN=OpenTrust Root CA G2,O=OpenTrust,C=FR
-# Serial Number:11:20:a1:69:1b:bf:bd:b9:bd:52:96:8f:23:e8:48:bf:26:11
-# Subject: CN=OpenTrust Root CA G2,O=OpenTrust,C=FR
-# Not Valid Before: Mon May 26 00:00:00 2014
-# Not Valid After : Fri Jan 15 00:00:00 2038
-# Fingerprint (SHA-256): 27:99:58:29:FE:6A:75:15:C1:BF:E8:48:F9:C4:76:1D:B1:6C:22:59:29:25:7B:F4:0D:08:94:F2:9E:A8:BA:F2
-# Fingerprint (SHA1): 79:5F:88:60:C5:AB:7C:3D:92:E6:CB:F4:8D:E1:45:CD:11:EF:60:0B
-CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE
-CKA_TOKEN CK_BBOOL CK_TRUE
-CKA_PRIVATE CK_BBOOL CK_FALSE
-CKA_MODIFIABLE CK_BBOOL CK_FALSE
-CKA_LABEL UTF8 "OpenTrust Root CA G2"
-CKA_CERTIFICATE_TYPE CK_CERTIFICATE_TYPE CKC_X_509
-CKA_SUBJECT MULTILINE_OCTAL
-\060\100\061\013\060\011\006\003\125\004\006\023\002\106\122\061
-\022\060\020\006\003\125\004\012\014\011\117\160\145\156\124\162
-\165\163\164\061\035\060\033\006\003\125\004\003\014\024\117\160
-\145\156\124\162\165\163\164\040\122\157\157\164\040\103\101\040
-\107\062
-END
-CKA_ID UTF8 "0"
-CKA_ISSUER MULTILINE_OCTAL
-\060\100\061\013\060\011\006\003\125\004\006\023\002\106\122\061
-\022\060\020\006\003\125\004\012\014\011\117\160\145\156\124\162
-\165\163\164\061\035\060\033\006\003\125\004\003\014\024\117\160
-\145\156\124\162\165\163\164\040\122\157\157\164\040\103\101\040
-\107\062
-END
-CKA_SERIAL_NUMBER MULTILINE_OCTAL
-\002\022\021\040\241\151\033\277\275\271\275\122\226\217\043\350
-\110\277\046\021
-END
-CKA_VALUE MULTILINE_OCTAL
-\060\202\005\157\060\202\003\127\240\003\002\001\002\002\022\021
-\040\241\151\033\277\275\271\275\122\226\217\043\350\110\277\046
-\021\060\015\006\011\052\206\110\206\367\015\001\001\015\005\000
-\060\100\061\013\060\011\006\003\125\004\006\023\002\106\122\061
-\022\060\020\006\003\125\004\012\014\011\117\160\145\156\124\162
-\165\163\164\061\035\060\033\006\003\125\004\003\014\024\117\160
-\145\156\124\162\165\163\164\040\122\157\157\164\040\103\101\040
-\107\062\060\036\027\015\061\064\060\065\062\066\060\060\060\060
-\060\060\132\027\015\063\070\060\061\061\065\060\060\060\060\060
-\060\132\060\100\061\013\060\011\006\003\125\004\006\023\002\106
-\122\061\022\060\020\006\003\125\004\012\014\011\117\160\145\156
-\124\162\165\163\164\061\035\060\033\006\003\125\004\003\014\024
-\117\160\145\156\124\162\165\163\164\040\122\157\157\164\040\103
-\101\040\107\062\060\202\002\042\060\015\006\011\052\206\110\206
-\367\015\001\001\001\005\000\003\202\002\017\000\060\202\002\012
-\002\202\002\001\000\314\266\127\245\063\224\020\201\062\123\337
-\141\176\017\166\071\317\134\302\123\165\035\111\172\226\070\335
-\242\163\152\361\157\336\136\242\132\271\161\041\276\066\331\241
-\374\274\356\154\250\174\064\032\161\032\350\032\330\137\016\104
-\006\355\247\340\363\322\141\013\340\062\242\226\321\070\360\302
-\332\001\027\374\344\254\117\350\356\211\036\164\253\117\277\036
-\011\266\066\152\126\363\341\356\226\211\146\044\006\344\315\102
-\072\112\335\340\232\260\304\202\105\263\376\311\253\134\174\076
-\311\353\027\057\014\175\156\256\245\217\310\254\045\012\157\372
-\325\105\230\322\065\011\366\003\103\224\376\331\277\040\225\171
-\200\230\212\331\211\065\273\121\033\244\067\175\374\231\073\253
-\377\277\254\015\217\103\261\231\173\026\020\176\035\157\107\304
-\025\217\004\226\010\006\102\004\370\204\326\035\274\221\246\102
-\276\111\325\152\210\077\274\055\121\321\236\215\340\122\314\127
-\335\065\065\130\333\264\217\044\210\344\213\337\334\153\124\322
-\201\053\262\316\222\113\034\037\106\372\035\330\222\313\166\147
-\265\011\231\011\345\254\027\024\125\160\306\074\240\126\012\003
-\263\334\142\031\337\310\265\060\177\365\074\046\165\021\275\327
-\033\263\207\236\007\257\145\161\345\240\317\032\247\011\020\035
-\223\211\146\133\350\074\142\062\265\265\072\156\351\205\001\213
-\236\103\214\147\163\050\131\133\353\343\334\054\314\245\046\162
-\142\022\264\346\234\203\104\366\121\244\342\300\172\044\127\312
-\016\245\077\072\265\073\213\345\166\356\160\346\222\336\026\134
-\050\133\227\031\047\222\376\172\222\124\316\223\071\012\026\207
-\274\143\263\365\261\223\134\340\156\267\320\352\371\142\062\210
-\104\373\277\047\050\266\060\225\135\022\050\271\225\276\217\123
-\030\345\242\030\026\342\126\244\262\054\020\365\035\067\246\370
-\267\366\320\131\134\211\367\302\325\265\224\164\321\325\376\033
-\266\360\346\326\036\173\322\074\313\250\343\365\030\363\041\037
-\156\357\115\150\006\173\055\135\156\103\211\246\300\371\240\277
-\202\036\317\123\177\264\353\054\333\135\366\152\175\100\044\005
-\162\211\070\001\223\313\161\302\071\135\006\021\366\157\170\370
-\067\015\071\204\047\002\003\001\000\001\243\143\060\141\060\016
-\006\003\125\035\017\001\001\377\004\004\003\002\001\006\060\017
-\006\003\125\035\023\001\001\377\004\005\060\003\001\001\377\060
-\035\006\003\125\035\016\004\026\004\024\152\071\372\102\042\367
-\346\211\000\115\136\175\063\203\313\270\156\167\206\257\060\037
-\006\003\125\035\043\004\030\060\026\200\024\152\071\372\102\042
-\367\346\211\000\115\136\175\063\203\313\270\156\167\206\257\060
-\015\006\011\052\206\110\206\367\015\001\001\015\005\000\003\202
-\002\001\000\230\313\253\100\074\345\063\002\227\177\055\207\246
-\217\324\136\112\257\270\036\347\273\161\373\200\144\045\251\263
-\032\076\150\135\047\046\247\272\052\341\360\127\203\012\144\117
-\036\042\164\033\351\220\137\360\254\317\377\117\150\172\070\244
-\020\154\015\261\307\244\167\200\030\266\242\050\104\166\247\064
-\235\161\204\057\312\131\322\107\210\231\101\042\311\060\230\141
-\156\075\250\250\005\155\321\037\300\121\104\126\177\047\065\002
-\335\136\230\012\102\353\060\277\215\241\233\121\252\073\352\223
-\106\144\305\000\171\336\041\153\366\127\240\206\327\006\162\354
-\160\106\113\213\163\335\240\041\165\076\334\035\300\217\323\117
-\163\034\205\331\376\177\142\310\225\157\266\323\173\214\272\123
-\302\157\233\104\114\171\320\035\160\263\327\237\002\364\262\007
-\260\307\345\370\255\043\016\246\126\311\051\022\167\110\331\057
-\106\375\073\360\374\164\160\222\245\216\070\010\037\144\060\266
-\267\113\373\066\254\020\216\240\122\063\143\235\003\065\126\305
-\151\275\306\043\132\047\224\366\244\022\370\055\063\074\241\126
-\245\137\326\031\351\355\174\010\275\167\315\047\144\314\224\332
-\116\106\120\207\340\371\301\123\200\036\273\255\373\107\122\213
-\033\375\242\371\336\016\042\267\075\063\131\154\324\336\365\225
-\006\062\015\121\031\101\134\076\117\006\367\271\053\200\047\366
-\243\252\172\174\006\341\103\303\023\071\142\032\066\275\340\050
-\056\224\002\344\051\056\140\125\256\100\075\260\164\222\136\360
-\040\144\226\077\137\105\135\210\265\212\332\002\240\133\105\124
-\336\070\075\011\300\250\112\145\106\026\374\252\277\124\116\115
-\133\276\070\103\267\050\312\213\063\252\032\045\272\045\134\051
-\057\133\112\156\214\352\055\234\052\366\005\166\340\167\227\200
-\210\335\147\023\157\035\150\044\213\117\267\164\201\345\364\140
-\237\172\125\327\076\067\332\026\153\076\167\254\256\030\160\225
-\010\171\051\003\212\376\301\073\263\077\032\017\244\073\136\037
-\130\241\225\311\253\057\163\112\320\055\156\232\131\017\125\030
-\170\055\074\121\246\227\213\346\273\262\160\252\114\021\336\377
-\174\053\067\324\172\321\167\064\217\347\371\102\367\074\201\014
-\113\122\012
-END
-CKA_NSS_MOZILLA_CA_POLICY CK_BBOOL CK_TRUE
-
-# Trust for "OpenTrust Root CA G2"
-# Issuer: CN=OpenTrust Root CA G2,O=OpenTrust,C=FR
-# Serial Number:11:20:a1:69:1b:bf:bd:b9:bd:52:96:8f:23:e8:48:bf:26:11
-# Subject: CN=OpenTrust Root CA G2,O=OpenTrust,C=FR
-# Not Valid Before: Mon May 26 00:00:00 2014
-# Not Valid After : Fri Jan 15 00:00:00 2038
-# Fingerprint (SHA-256): 27:99:58:29:FE:6A:75:15:C1:BF:E8:48:F9:C4:76:1D:B1:6C:22:59:29:25:7B:F4:0D:08:94:F2:9E:A8:BA:F2
-# Fingerprint (SHA1): 79:5F:88:60:C5:AB:7C:3D:92:E6:CB:F4:8D:E1:45:CD:11:EF:60:0B
-CKA_CLASS CK_OBJECT_CLASS CKO_NSS_TRUST
-CKA_TOKEN CK_BBOOL CK_TRUE
-CKA_PRIVATE CK_BBOOL CK_FALSE
-CKA_MODIFIABLE CK_BBOOL CK_FALSE
-CKA_LABEL UTF8 "OpenTrust Root CA G2"
-CKA_CERT_SHA1_HASH MULTILINE_OCTAL
-\171\137\210\140\305\253\174\075\222\346\313\364\215\341\105\315
-\021\357\140\013
-END
-CKA_CERT_MD5_HASH MULTILINE_OCTAL
-\127\044\266\131\044\153\256\310\376\034\014\040\362\300\116\353
-END
-CKA_ISSUER MULTILINE_OCTAL
-\060\100\061\013\060\011\006\003\125\004\006\023\002\106\122\061
-\022\060\020\006\003\125\004\012\014\011\117\160\145\156\124\162
-\165\163\164\061\035\060\033\006\003\125\004\003\014\024\117\160
-\145\156\124\162\165\163\164\040\122\157\157\164\040\103\101\040
-\107\062
-END
-CKA_SERIAL_NUMBER MULTILINE_OCTAL
-\002\022\021\040\241\151\033\277\275\271\275\122\226\217\043\350
-\110\277\046\021
-END
-CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_MUST_VERIFY_TRUST
-CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_TRUSTED_DELEGATOR
-CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_MUST_VERIFY_TRUST
-CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE
-
-#
-# Certificate "OpenTrust Root CA G3"
-#
-# Issuer: CN=OpenTrust Root CA G3,O=OpenTrust,C=FR
-# Serial Number:11:20:e6:f8:4c:fc:24:b0:be:05:40:ac:da:83:1b:34:60:3f
-# Subject: CN=OpenTrust Root CA G3,O=OpenTrust,C=FR
-# Not Valid Before: Mon May 26 00:00:00 2014
-# Not Valid After : Fri Jan 15 00:00:00 2038
-# Fingerprint (SHA-256): B7:C3:62:31:70:6E:81:07:8C:36:7C:B8:96:19:8F:1E:32:08:DD:92:69:49:DD:8F:57:09:A4:10:F7:5B:62:92
-# Fingerprint (SHA1): 6E:26:64:F3:56:BF:34:55:BF:D1:93:3F:7C:01:DE:D8:13:DA:8A:A6
-CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE
-CKA_TOKEN CK_BBOOL CK_TRUE
-CKA_PRIVATE CK_BBOOL CK_FALSE
-CKA_MODIFIABLE CK_BBOOL CK_FALSE
-CKA_LABEL UTF8 "OpenTrust Root CA G3"
-CKA_CERTIFICATE_TYPE CK_CERTIFICATE_TYPE CKC_X_509
-CKA_SUBJECT MULTILINE_OCTAL
-\060\100\061\013\060\011\006\003\125\004\006\023\002\106\122\061
-\022\060\020\006\003\125\004\012\014\011\117\160\145\156\124\162
-\165\163\164\061\035\060\033\006\003\125\004\003\014\024\117\160
-\145\156\124\162\165\163\164\040\122\157\157\164\040\103\101\040
-\107\063
-END
-CKA_ID UTF8 "0"
-CKA_ISSUER MULTILINE_OCTAL
-\060\100\061\013\060\011\006\003\125\004\006\023\002\106\122\061
-\022\060\020\006\003\125\004\012\014\011\117\160\145\156\124\162
-\165\163\164\061\035\060\033\006\003\125\004\003\014\024\117\160
-\145\156\124\162\165\163\164\040\122\157\157\164\040\103\101\040
-\107\063
-END
-CKA_SERIAL_NUMBER MULTILINE_OCTAL
-\002\022\021\040\346\370\114\374\044\260\276\005\100\254\332\203
-\033\064\140\077
-END
-CKA_VALUE MULTILINE_OCTAL
-\060\202\002\041\060\202\001\246\240\003\002\001\002\002\022\021
-\040\346\370\114\374\044\260\276\005\100\254\332\203\033\064\140
-\077\060\012\006\010\052\206\110\316\075\004\003\003\060\100\061
-\013\060\011\006\003\125\004\006\023\002\106\122\061\022\060\020
-\006\003\125\004\012\014\011\117\160\145\156\124\162\165\163\164
-\061\035\060\033\006\003\125\004\003\014\024\117\160\145\156\124
-\162\165\163\164\040\122\157\157\164\040\103\101\040\107\063\060
-\036\027\015\061\064\060\065\062\066\060\060\060\060\060\060\132
-\027\015\063\070\060\061\061\065\060\060\060\060\060\060\132\060
-\100\061\013\060\011\006\003\125\004\006\023\002\106\122\061\022
-\060\020\006\003\125\004\012\014\011\117\160\145\156\124\162\165
-\163\164\061\035\060\033\006\003\125\004\003\014\024\117\160\145
-\156\124\162\165\163\164\040\122\157\157\164\040\103\101\040\107
-\063\060\166\060\020\006\007\052\206\110\316\075\002\001\006\005
-\053\201\004\000\042\003\142\000\004\112\356\130\256\115\312\146
-\336\006\072\243\021\374\340\030\360\156\034\272\055\060\014\211
-\331\326\356\233\163\203\251\043\025\214\057\131\212\132\335\024
-\352\235\131\053\103\267\006\354\062\266\272\356\101\265\255\135
-\241\205\314\352\035\024\146\243\147\176\106\342\224\363\347\266
-\126\241\025\131\241\117\067\227\271\042\036\275\021\353\364\262
-\037\136\303\024\232\345\331\227\231\243\143\060\141\060\016\006
-\003\125\035\017\001\001\377\004\004\003\002\001\006\060\017\006
-\003\125\035\023\001\001\377\004\005\060\003\001\001\377\060\035
-\006\003\125\035\016\004\026\004\024\107\167\303\024\213\142\071
-\014\311\157\341\120\115\320\020\130\334\225\210\155\060\037\006
-\003\125\035\043\004\030\060\026\200\024\107\167\303\024\213\142
-\071\014\311\157\341\120\115\320\020\130\334\225\210\155\060\012
-\006\010\052\206\110\316\075\004\003\003\003\151\000\060\146\002
-\061\000\217\250\334\235\272\014\004\027\372\025\351\075\057\051
-\001\227\277\201\026\063\100\223\154\374\371\355\200\160\157\252
-\217\333\204\302\213\365\065\312\006\334\144\157\150\026\341\217
-\221\271\002\061\000\330\113\245\313\302\320\010\154\351\030\373
-\132\335\115\137\044\013\260\000\041\045\357\217\247\004\046\161
-\342\174\151\345\135\232\370\101\037\073\071\223\223\235\125\352
-\315\215\361\373\301
-END
-CKA_NSS_MOZILLA_CA_POLICY CK_BBOOL CK_TRUE
-
-# Trust for "OpenTrust Root CA G3"
-# Issuer: CN=OpenTrust Root CA G3,O=OpenTrust,C=FR
-# Serial Number:11:20:e6:f8:4c:fc:24:b0:be:05:40:ac:da:83:1b:34:60:3f
-# Subject: CN=OpenTrust Root CA G3,O=OpenTrust,C=FR
-# Not Valid Before: Mon May 26 00:00:00 2014
-# Not Valid After : Fri Jan 15 00:00:00 2038
-# Fingerprint (SHA-256): B7:C3:62:31:70:6E:81:07:8C:36:7C:B8:96:19:8F:1E:32:08:DD:92:69:49:DD:8F:57:09:A4:10:F7:5B:62:92
-# Fingerprint (SHA1): 6E:26:64:F3:56:BF:34:55:BF:D1:93:3F:7C:01:DE:D8:13:DA:8A:A6
-CKA_CLASS CK_OBJECT_CLASS CKO_NSS_TRUST
-CKA_TOKEN CK_BBOOL CK_TRUE
-CKA_PRIVATE CK_BBOOL CK_FALSE
-CKA_MODIFIABLE CK_BBOOL CK_FALSE
-CKA_LABEL UTF8 "OpenTrust Root CA G3"
-CKA_CERT_SHA1_HASH MULTILINE_OCTAL
-\156\046\144\363\126\277\064\125\277\321\223\077\174\001\336\330
-\023\332\212\246
-END
-CKA_CERT_MD5_HASH MULTILINE_OCTAL
-\041\067\264\027\026\222\173\147\106\160\251\226\327\250\023\044
-END
-CKA_ISSUER MULTILINE_OCTAL
-\060\100\061\013\060\011\006\003\125\004\006\023\002\106\122\061
-\022\060\020\006\003\125\004\012\014\011\117\160\145\156\124\162
-\165\163\164\061\035\060\033\006\003\125\004\003\014\024\117\160
-\145\156\124\162\165\163\164\040\122\157\157\164\040\103\101\040
-\107\063
-END
-CKA_SERIAL_NUMBER MULTILINE_OCTAL
-\002\022\021\040\346\370\114\374\044\260\276\005\100\254\332\203
-\033\064\140\077
-END
-CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_MUST_VERIFY_TRUST
-CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_TRUSTED_DELEGATOR
-CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_MUST_VERIFY_TRUST
-CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE
-
-#
 # Certificate "ISRG Root X1"
 #
 # Issuer: CN=ISRG Root X1,O=Internet Security Research Group,C=US
 # Serial Number:00:82:10:cf:b0:d2:40:e3:59:44:63:e0:bb:63:82:8b:00
 # Subject: CN=ISRG Root X1,O=Internet Security Research Group,C=US
 # Not Valid Before: Thu Jun 04 11:04:38 2015
 # Not Valid After : Mon Jun 04 11:04:38 2035
 # Fingerprint (SHA-256): 96:BC:EC:06:26:49:76:F3:74:60:77:9A:CF:28:C5:A7:CF:E8:A3:C0:AA:E1:1A:8F:FC:EE:05:C0:BD:DF:08:C6
@@ -23000,8 +22112,1044 @@ END
 CKA_SERIAL_NUMBER MULTILINE_OCTAL
 \002\020\041\052\126\014\256\332\014\253\100\105\277\053\242\055
 \072\352
 END
 CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_TRUSTED_DELEGATOR
 CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_TRUSTED_DELEGATOR
 CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_MUST_VERIFY_TRUST
 CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE
+
+#
+# Certificate "GTS Root R1"
+#
+# Issuer: CN=GTS Root R1,O=Google Trust Services LLC,C=US
+# Serial Number:6e:47:a9:c5:4b:47:0c:0d:ec:33:d0:89:b9:1c:f4:e1
+# Subject: CN=GTS Root R1,O=Google Trust Services LLC,C=US
+# Not Valid Before: Wed Jun 22 00:00:00 2016
+# Not Valid After : Sun Jun 22 00:00:00 2036
+# Fingerprint (SHA-256): 2A:57:54:71:E3:13:40:BC:21:58:1C:BD:2C:F1:3E:15:84:63:20:3E:CE:94:BC:F9:D3:CC:19:6B:F0:9A:54:72
+# Fingerprint (SHA1): E1:C9:50:E6:EF:22:F8:4C:56:45:72:8B:92:20:60:D7:D5:A7:A3:E8
+CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE
+CKA_TOKEN CK_BBOOL CK_TRUE
+CKA_PRIVATE CK_BBOOL CK_FALSE
+CKA_MODIFIABLE CK_BBOOL CK_FALSE
+CKA_LABEL UTF8 "GTS Root R1"
+CKA_CERTIFICATE_TYPE CK_CERTIFICATE_TYPE CKC_X_509
+CKA_SUBJECT MULTILINE_OCTAL
+\060\107\061\013\060\011\006\003\125\004\006\023\002\125\123\061
+\042\060\040\006\003\125\004\012\023\031\107\157\157\147\154\145
+\040\124\162\165\163\164\040\123\145\162\166\151\143\145\163\040
+\114\114\103\061\024\060\022\006\003\125\004\003\023\013\107\124
+\123\040\122\157\157\164\040\122\061
+END
+CKA_ID UTF8 "0"
+CKA_ISSUER MULTILINE_OCTAL
+\060\107\061\013\060\011\006\003\125\004\006\023\002\125\123\061
+\042\060\040\006\003\125\004\012\023\031\107\157\157\147\154\145
+\040\124\162\165\163\164\040\123\145\162\166\151\143\145\163\040
+\114\114\103\061\024\060\022\006\003\125\004\003\023\013\107\124
+\123\040\122\157\157\164\040\122\061
+END
+CKA_SERIAL_NUMBER MULTILINE_OCTAL
+\002\020\156\107\251\305\113\107\014\015\354\063\320\211\271\034
+\364\341
+END
+CKA_VALUE MULTILINE_OCTAL
+\060\202\005\132\060\202\003\102\240\003\002\001\002\002\020\156
+\107\251\305\113\107\014\015\354\063\320\211\271\034\364\341\060
+\015\006\011\052\206\110\206\367\015\001\001\014\005\000\060\107
+\061\013\060\011\006\003\125\004\006\023\002\125\123\061\042\060
+\040\006\003\125\004\012\023\031\107\157\157\147\154\145\040\124
+\162\165\163\164\040\123\145\162\166\151\143\145\163\040\114\114
+\103\061\024\060\022\006\003\125\004\003\023\013\107\124\123\040
+\122\157\157\164\040\122\061\060\036\027\015\061\066\060\066\062
+\062\060\060\060\060\060\060\132\027\015\063\066\060\066\062\062
+\060\060\060\060\060\060\132\060\107\061\013\060\011\006\003\125
+\004\006\023\002\125\123\061\042\060\040\006\003\125\004\012\023
+\031\107\157\157\147\154\145\040\124\162\165\163\164\040\123\145
+\162\166\151\143\145\163\040\114\114\103\061\024\060\022\006\003
+\125\004\003\023\013\107\124\123\040\122\157\157\164\040\122\061
+\060\202\002\042\060\015\006\011\052\206\110\206\367\015\001\001
+\001\005\000\003\202\002\017\000\060\202\002\012\002\202\002\001
+\000\266\021\002\213\036\343\241\167\233\073\334\277\224\076\267
+\225\247\100\074\241\375\202\371\175\062\006\202\161\366\366\214
+\177\373\350\333\274\152\056\227\227\243\214\113\371\053\366\261
+\371\316\204\035\261\371\305\227\336\357\271\362\243\351\274\022
+\211\136\247\252\122\253\370\043\047\313\244\261\234\143\333\327
+\231\176\360\012\136\353\150\246\364\306\132\107\015\115\020\063
+\343\116\261\023\243\310\030\154\113\354\374\011\220\337\235\144
+\051\045\043\007\241\264\322\075\056\140\340\317\322\011\207\273
+\315\110\360\115\302\302\172\210\212\273\272\317\131\031\326\257
+\217\260\007\260\236\061\361\202\301\300\337\056\246\155\154\031
+\016\265\330\176\046\032\105\003\075\260\171\244\224\050\255\017
+\177\046\345\250\010\376\226\350\074\150\224\123\356\203\072\210
+\053\025\226\011\262\340\172\214\056\165\326\234\353\247\126\144
+\217\226\117\150\256\075\227\302\204\217\300\274\100\300\013\134
+\275\366\207\263\065\154\254\030\120\177\204\340\114\315\222\323
+\040\351\063\274\122\231\257\062\265\051\263\045\052\264\110\371
+\162\341\312\144\367\346\202\020\215\350\235\302\212\210\372\070
+\146\212\374\143\371\001\371\170\375\173\134\167\372\166\207\372
+\354\337\261\016\171\225\127\264\275\046\357\326\001\321\353\026
+\012\273\216\013\265\305\305\212\125\253\323\254\352\221\113\051
+\314\031\244\062\045\116\052\361\145\104\320\002\316\252\316\111
+\264\352\237\174\203\260\100\173\347\103\253\247\154\243\217\175
+\211\201\372\114\245\377\325\216\303\316\113\340\265\330\263\216
+\105\317\166\300\355\100\053\375\123\017\260\247\325\073\015\261
+\212\242\003\336\061\255\314\167\352\157\173\076\326\337\221\042
+\022\346\276\372\330\062\374\020\143\024\121\162\336\135\326\026
+\223\275\051\150\063\357\072\146\354\007\212\046\337\023\327\127
+\145\170\047\336\136\111\024\000\242\000\177\232\250\041\266\251
+\261\225\260\245\271\015\026\021\332\307\154\110\074\100\340\176
+\015\132\315\126\074\321\227\005\271\313\113\355\071\113\234\304
+\077\322\125\023\156\044\260\326\161\372\364\301\272\314\355\033
+\365\376\201\101\330\000\230\075\072\310\256\172\230\067\030\005
+\225\002\003\001\000\001\243\102\060\100\060\016\006\003\125\035
+\017\001\001\377\004\004\003\002\001\006\060\017\006\003\125\035
+\023\001\001\377\004\005\060\003\001\001\377\060\035\006\003\125
+\035\016\004\026\004\024\344\257\053\046\161\032\053\110\047\205
+\057\122\146\054\357\360\211\023\161\076\060\015\006\011\052\206
+\110\206\367\015\001\001\014\005\000\003\202\002\001\000\070\226
+\012\356\075\264\226\036\137\357\235\234\013\063\237\053\340\312
+\375\322\216\012\037\101\164\245\174\252\204\324\345\362\036\346
+\067\122\062\234\013\321\141\035\277\050\301\266\104\051\065\165
+\167\230\262\174\331\275\164\254\212\150\343\251\061\011\051\001
+\140\163\343\107\174\123\250\220\112\047\357\113\327\237\223\347
+\202\066\316\232\150\014\202\347\317\324\020\026\157\137\016\231
+\134\366\037\161\175\357\357\173\057\176\352\066\326\227\160\013
+\025\356\327\134\126\152\063\245\343\111\070\014\270\175\373\215
+\205\244\261\131\136\364\152\341\335\241\366\144\104\256\346\121
+\203\041\146\306\021\076\363\316\107\356\234\050\037\045\332\377
+\254\146\225\335\065\017\134\357\040\054\142\375\221\272\251\314
+\374\132\234\223\201\203\051\227\112\174\132\162\264\071\320\267
+\167\313\171\375\151\072\222\067\355\156\070\145\106\176\351\140
+\275\171\210\227\137\070\022\364\356\257\133\202\310\206\325\341
+\231\155\214\004\362\166\272\111\366\156\351\155\036\137\240\357
+\047\202\166\100\370\246\323\130\134\017\054\102\332\102\306\173
+\210\064\307\301\330\105\233\301\076\305\141\035\331\143\120\111
+\366\064\205\152\340\030\305\156\107\253\101\102\051\233\366\140
+\015\322\061\323\143\230\043\223\132\000\201\110\264\357\315\212
+\315\311\317\231\356\331\236\252\066\341\150\113\161\111\024\066
+\050\072\075\035\316\232\217\045\346\200\161\141\053\265\173\314
+\371\045\026\201\341\061\137\241\243\176\026\244\234\026\152\227
+\030\275\166\162\245\013\236\035\066\346\057\241\057\276\160\221
+\017\250\346\332\370\304\222\100\154\045\176\173\263\011\334\262
+\027\255\200\104\360\150\245\217\224\165\377\164\132\350\250\002
+\174\014\011\342\251\113\013\240\205\013\142\271\357\241\061\222
+\373\357\366\121\004\211\154\350\251\164\241\273\027\263\265\375
+\111\017\174\074\354\203\030\040\103\116\325\223\272\264\064\261
+\037\026\066\037\014\346\144\071\026\114\334\340\376\035\310\251
+\142\075\100\352\312\305\064\002\264\256\211\210\063\065\334\054
+\023\163\330\047\361\320\162\356\165\073\042\336\230\150\146\133
+\361\306\143\107\125\034\272\245\010\121\165\246\110\045
+END
+CKA_NSS_MOZILLA_CA_POLICY CK_BBOOL CK_TRUE
+
+# Trust for "GTS Root R1"
+# Issuer: CN=GTS Root R1,O=Google Trust Services LLC,C=US
+# Serial Number:6e:47:a9:c5:4b:47:0c:0d:ec:33:d0:89:b9:1c:f4:e1
+# Subject: CN=GTS Root R1,O=Google Trust Services LLC,C=US
+# Not Valid Before: Wed Jun 22 00:00:00 2016
+# Not Valid After : Sun Jun 22 00:00:00 2036
+# Fingerprint (SHA-256): 2A:57:54:71:E3:13:40:BC:21:58:1C:BD:2C:F1:3E:15:84:63:20:3E:CE:94:BC:F9:D3:CC:19:6B:F0:9A:54:72
+# Fingerprint (SHA1): E1:C9:50:E6:EF:22:F8:4C:56:45:72:8B:92:20:60:D7:D5:A7:A3:E8
+CKA_CLASS CK_OBJECT_CLASS CKO_NSS_TRUST
+CKA_TOKEN CK_BBOOL CK_TRUE
+CKA_PRIVATE CK_BBOOL CK_FALSE
+CKA_MODIFIABLE CK_BBOOL CK_FALSE
+CKA_LABEL UTF8 "GTS Root R1"
+CKA_CERT_SHA1_HASH MULTILINE_OCTAL
+\341\311\120\346\357\042\370\114\126\105\162\213\222\040\140\327
+\325\247\243\350
+END
+CKA_CERT_MD5_HASH MULTILINE_OCTAL
+\202\032\357\324\322\112\362\237\342\075\227\006\024\160\162\205
+END
+CKA_ISSUER MULTILINE_OCTAL
+\060\107\061\013\060\011\006\003\125\004\006\023\002\125\123\061
+\042\060\040\006\003\125\004\012\023\031\107\157\157\147\154\145
+\040\124\162\165\163\164\040\123\145\162\166\151\143\145\163\040
+\114\114\103\061\024\060\022\006\003\125\004\003\023\013\107\124
+\123\040\122\157\157\164\040\122\061
+END
+CKA_SERIAL_NUMBER MULTILINE_OCTAL
+\002\020\156\107\251\305\113\107\014\015\354\063\320\211\271\034
+\364\341
+END
+CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_TRUSTED_DELEGATOR
+CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_MUST_VERIFY_TRUST
+CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_MUST_VERIFY_TRUST
+CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE
+
+#
+# Certificate "GTS Root R2"
+#
+# Issuer: CN=GTS Root R2,O=Google Trust Services LLC,C=US
+# Serial Number:6e:47:a9:c6:5a:b3:e7:20:c5:30:9a:3f:68:52:f2:6f
+# Subject: CN=GTS Root R2,O=Google Trust Services LLC,C=US
+# Not Valid Before: Wed Jun 22 00:00:00 2016
+# Not Valid After : Sun Jun 22 00:00:00 2036
+# Fingerprint (SHA-256): C4:5D:7B:B0:8E:6D:67:E6:2E:42:35:11:0B:56:4E:5F:78:FD:92:EF:05:8C:84:0A:EA:4E:64:55:D7:58:5C:60
+# Fingerprint (SHA1): D2:73:96:2A:2A:5E:39:9F:73:3F:E1:C7:1E:64:3F:03:38:34:FC:4D
+CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE
+CKA_TOKEN CK_BBOOL CK_TRUE
+CKA_PRIVATE CK_BBOOL CK_FALSE
+CKA_MODIFIABLE CK_BBOOL CK_FALSE
+CKA_LABEL UTF8 "GTS Root R2"
+CKA_CERTIFICATE_TYPE CK_CERTIFICATE_TYPE CKC_X_509
+CKA_SUBJECT MULTILINE_OCTAL
+\060\107\061\013\060\011\006\003\125\004\006\023\002\125\123\061
+\042\060\040\006\003\125\004\012\023\031\107\157\157\147\154\145
+\040\124\162\165\163\164\040\123\145\162\166\151\143\145\163\040
+\114\114\103\061\024\060\022\006\003\125\004\003\023\013\107\124
+\123\040\122\157\157\164\040\122\062
+END
+CKA_ID UTF8 "0"
+CKA_ISSUER MULTILINE_OCTAL
+\060\107\061\013\060\011\006\003\125\004\006\023\002\125\123\061
+\042\060\040\006\003\125\004\012\023\031\107\157\157\147\154\145
+\040\124\162\165\163\164\040\123\145\162\166\151\143\145\163\040
+\114\114\103\061\024\060\022\006\003\125\004\003\023\013\107\124
+\123\040\122\157\157\164\040\122\062
+END
+CKA_SERIAL_NUMBER MULTILINE_OCTAL
+\002\020\156\107\251\306\132\263\347\040\305\060\232\077\150\122
+\362\157
+END
+CKA_VALUE MULTILINE_OCTAL
+\060\202\005\132\060\202\003\102\240\003\002\001\002\002\020\156
+\107\251\306\132\263\347\040\305\060\232\077\150\122\362\157\060
+\015\006\011\052\206\110\206\367\015\001\001\014\005\000\060\107
+\061\013\060\011\006\003\125\004\006\023\002\125\123\061\042\060
+\040\006\003\125\004\012\023\031\107\157\157\147\154\145\040\124
+\162\165\163\164\040\123\145\162\166\151\143\145\163\040\114\114
+\103\061\024\060\022\006\003\125\004\003\023\013\107\124\123\040
+\122\157\157\164\040\122\062\060\036\027\015\061\066\060\066\062
+\062\060\060\060\060\060\060\132\027\015\063\066\060\066\062\062
+\060\060\060\060\060\060\132\060\107\061\013\060\011\006\003\125
+\004\006\023\002\125\123\061\042\060\040\006\003\125\004\012\023
+\031\107\157\157\147\154\145\040\124\162\165\163\164\040\123\145
+\162\166\151\143\145\163\040\114\114\103\061\024\060\022\006\003
+\125\004\003\023\013\107\124\123\040\122\157\157\164\040\122\062
+\060\202\002\042\060\015\006\011\052\206\110\206\367\015\001\001
+\001\005\000\003\202\002\017\000\060\202\002\012\002\202\002\001
+\000\316\336\375\246\373\354\354\024\064\074\007\006\132\154\131
+\367\031\065\335\367\301\235\125\252\323\315\073\244\223\162\357
+\012\372\155\235\366\360\205\200\133\241\110\122\237\071\305\267
+\356\050\254\357\313\166\150\024\271\337\255\001\154\231\037\304
+\042\035\237\376\162\167\340\054\133\257\344\004\277\117\162\240
+\032\064\230\350\071\150\354\225\045\173\166\241\346\151\271\205
+\031\275\211\214\376\255\355\066\352\163\274\377\203\342\313\175
+\301\322\316\112\263\215\005\236\213\111\223\337\301\133\320\156
+\136\360\056\060\056\202\374\372\274\264\027\012\110\345\210\233
+\305\233\153\336\260\312\264\003\360\332\364\220\270\145\144\367
+\134\114\255\350\176\146\136\231\327\270\302\076\310\320\023\235
+\255\356\344\105\173\211\125\367\212\037\142\122\204\022\263\302
+\100\227\343\212\037\107\221\246\164\132\322\370\261\143\050\020
+\270\263\011\270\126\167\100\242\046\230\171\306\376\337\045\356
+\076\345\240\177\324\141\017\121\113\074\077\214\332\341\160\164
+\330\302\150\241\371\301\014\351\241\342\177\273\125\074\166\006
+\356\152\116\314\222\210\060\115\232\275\117\013\110\232\204\265
+\230\243\325\373\163\301\127\141\335\050\126\165\023\256\207\216
+\347\014\121\011\020\165\210\114\274\215\371\173\074\324\042\110
+\037\052\334\353\153\273\104\261\313\063\161\062\106\257\255\112
+\361\214\350\164\072\254\347\032\042\163\200\322\060\367\045\102
+\307\042\073\073\022\255\226\056\306\303\166\007\252\040\267\065
+\111\127\351\222\111\350\166\026\162\061\147\053\226\176\212\243
+\307\224\126\042\277\152\113\176\001\041\262\043\062\337\344\232
+\104\155\131\133\135\365\000\240\034\233\306\170\227\215\220\377
+\233\310\252\264\257\021\121\071\136\331\373\147\255\325\133\021
+\235\062\232\033\275\325\272\133\245\311\313\045\151\123\125\047
+\134\340\312\066\313\210\141\373\036\267\320\313\356\026\373\323
+\246\114\336\222\245\324\342\337\365\006\124\336\056\235\113\264
+\223\060\252\201\316\335\032\334\121\163\015\117\160\351\345\266
+\026\041\031\171\262\346\211\013\165\144\312\325\253\274\011\301
+\030\241\377\324\124\241\205\074\375\024\044\003\262\207\323\244
+\267\002\003\001\000\001\243\102\060\100\060\016\006\003\125\035
+\017\001\001\377\004\004\003\002\001\006\060\017\006\003\125\035
+\023\001\001\377\004\005\060\003\001\001\377\060\035\006\003\125
+\035\016\004\026\004\024\273\377\312\216\043\237\117\231\312\333
+\342\150\246\245\025\047\027\036\331\016\060\015\006\011\052\206
+\110\206\367\015\001\001\014\005\000\003\202\002\001\000\266\151
+\360\246\167\376\236\356\013\201\255\341\300\251\307\371\065\035
+\100\202\253\346\004\264\337\313\367\035\017\203\360\176\023\115
+\215\214\356\343\063\042\303\071\374\100\337\156\101\113\102\123
+\276\026\210\361\322\070\136\304\150\231\034\230\122\223\214\347
+\150\355\033\152\163\172\005\100\115\177\145\073\326\130\361\316
+\203\107\140\343\377\227\251\234\140\167\030\125\265\176\010\223
+\317\320\366\074\147\003\025\141\011\371\201\171\365\354\123\244
+\237\311\217\001\213\163\304\167\166\334\203\242\365\014\111\032
+\250\166\336\222\233\144\370\263\054\305\047\323\007\300\010\200
+\244\230\222\343\001\226\002\252\002\356\217\073\305\321\155\012
+\063\060\163\170\271\117\124\026\277\013\007\241\244\134\346\313
+\311\134\204\217\017\340\025\167\054\176\046\176\332\304\113\333
+\247\026\167\007\260\315\165\350\162\102\326\225\204\235\206\203
+\362\344\220\315\011\107\324\213\003\160\332\132\306\003\102\364
+\355\067\242\360\033\120\124\113\016\330\204\336\031\050\231\201
+\107\256\011\033\077\110\321\303\157\342\260\140\027\365\356\043
+\002\245\332\000\133\155\220\253\356\242\351\033\073\351\307\104
+\047\105\216\153\237\365\244\204\274\167\371\153\227\254\076\121
+\105\242\021\246\314\205\356\012\150\362\076\120\070\172\044\142
+\036\027\040\067\155\152\115\267\011\233\311\374\244\130\365\266
+\373\234\116\030\273\225\002\347\241\255\233\007\356\066\153\044
+\322\071\206\301\223\203\120\322\201\106\250\137\142\127\054\273
+\154\144\210\010\156\357\023\124\137\335\055\304\147\143\323\317
+\211\067\277\235\040\364\373\172\203\233\240\036\201\000\120\302
+\344\014\042\131\122\020\355\103\126\207\000\370\024\122\247\035
+\213\223\214\242\115\106\177\047\306\161\233\044\336\344\332\206
+\213\015\176\153\040\301\300\236\341\145\330\152\243\246\350\205
+\213\072\007\010\034\272\365\217\125\232\030\165\176\345\354\201
+\146\321\041\163\241\065\104\013\200\075\133\234\136\157\052\027
+\226\321\203\043\210\146\155\346\206\342\160\062\057\122\042\347
+\310\347\177\304\054\140\135\057\303\257\236\105\005\303\204\002
+\267\375\054\010\122\117\202\335\243\360\324\206\011\002
+END
+CKA_NSS_MOZILLA_CA_POLICY CK_BBOOL CK_TRUE
+
+# Trust for "GTS Root R2"
+# Issuer: CN=GTS Root R2,O=Google Trust Services LLC,C=US
+# Serial Number:6e:47:a9:c6:5a:b3:e7:20:c5:30:9a:3f:68:52:f2:6f
+# Subject: CN=GTS Root R2,O=Google Trust Services LLC,C=US
+# Not Valid Before: Wed Jun 22 00:00:00 2016
+# Not Valid After : Sun Jun 22 00:00:00 2036
+# Fingerprint (SHA-256): C4:5D:7B:B0:8E:6D:67:E6:2E:42:35:11:0B:56:4E:5F:78:FD:92:EF:05:8C:84:0A:EA:4E:64:55:D7:58:5C:60
+# Fingerprint (SHA1): D2:73:96:2A:2A:5E:39:9F:73:3F:E1:C7:1E:64:3F:03:38:34:FC:4D
+CKA_CLASS CK_OBJECT_CLASS CKO_NSS_TRUST
+CKA_TOKEN CK_BBOOL CK_TRUE
+CKA_PRIVATE CK_BBOOL CK_FALSE
+CKA_MODIFIABLE CK_BBOOL CK_FALSE
+CKA_LABEL UTF8 "GTS Root R2"
+CKA_CERT_SHA1_HASH MULTILINE_OCTAL
+\322\163\226\052\052\136\071\237\163\077\341\307\036\144\077\003
+\070\064\374\115
+END
+CKA_CERT_MD5_HASH MULTILINE_OCTAL
+\104\355\232\016\244\011\073\000\362\256\114\243\306\141\260\213
+END
+CKA_ISSUER MULTILINE_OCTAL
+\060\107\061\013\060\011\006\003\125\004\006\023\002\125\123\061
+\042\060\040\006\003\125\004\012\023\031\107\157\157\147\154\145
+\040\124\162\165\163\164\040\123\145\162\166\151\143\145\163\040
+\114\114\103\061\024\060\022\006\003\125\004\003\023\013\107\124
+\123\040\122\157\157\164\040\122\062
+END
+CKA_SERIAL_NUMBER MULTILINE_OCTAL
+\002\020\156\107\251\306\132\263\347\040\305\060\232\077\150\122
+\362\157
+END
+CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_TRUSTED_DELEGATOR
+CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_MUST_VERIFY_TRUST
+CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_MUST_VERIFY_TRUST
+CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE
+
+#
+# Certificate "GTS Root R3"
+#
+# Issuer: CN=GTS Root R3,O=Google Trust Services LLC,C=US
+# Serial Number:6e:47:a9:c7:6c:a9:73:24:40:89:0f:03:55:dd:8d:1d
+# Subject: CN=GTS Root R3,O=Google Trust Services LLC,C=US
+# Not Valid Before: Wed Jun 22 00:00:00 2016
+# Not Valid After : Sun Jun 22 00:00:00 2036
+# Fingerprint (SHA-256): 15:D5:B8:77:46:19:EA:7D:54:CE:1C:A6:D0:B0:C4:03:E0:37:A9:17:F1:31:E8:A0:4E:1E:6B:7A:71:BA:BC:E5
+# Fingerprint (SHA1): 30:D4:24:6F:07:FF:DB:91:89:8A:0B:E9:49:66:11:EB:8C:5E:46:E5
+CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE
+CKA_TOKEN CK_BBOOL CK_TRUE
+CKA_PRIVATE CK_BBOOL CK_FALSE
+CKA_MODIFIABLE CK_BBOOL CK_FALSE
+CKA_LABEL UTF8 "GTS Root R3"
+CKA_CERTIFICATE_TYPE CK_CERTIFICATE_TYPE CKC_X_509
+CKA_SUBJECT MULTILINE_OCTAL
+\060\107\061\013\060\011\006\003\125\004\006\023\002\125\123\061
+\042\060\040\006\003\125\004\012\023\031\107\157\157\147\154\145
+\040\124\162\165\163\164\040\123\145\162\166\151\143\145\163\040
+\114\114\103\061\024\060\022\006\003\125\004\003\023\013\107\124
+\123\040\122\157\157\164\040\122\063
+END
+CKA_ID UTF8 "0"
+CKA_ISSUER MULTILINE_OCTAL
+\060\107\061\013\060\011\006\003\125\004\006\023\002\125\123\061
+\042\060\040\006\003\125\004\012\023\031\107\157\157\147\154\145
+\040\124\162\165\163\164\040\123\145\162\166\151\143\145\163\040
+\114\114\103\061\024\060\022\006\003\125\004\003\023\013\107\124
+\123\040\122\157\157\164\040\122\063
+END
+CKA_SERIAL_NUMBER MULTILINE_OCTAL
+\002\020\156\107\251\307\154\251\163\044\100\211\017\003\125\335
+\215\035
+END
+CKA_VALUE MULTILINE_OCTAL
+\060\202\002\014\060\202\001\221\240\003\002\001\002\002\020\156
+\107\251\307\154\251\163\044\100\211\017\003\125\335\215\035\060
+\012\006\010\052\206\110\316\075\004\003\003\060\107\061\013\060
+\011\006\003\125\004\006\023\002\125\123\061\042\060\040\006\003
+\125\004\012\023\031\107\157\157\147\154\145\040\124\162\165\163
+\164\040\123\145\162\166\151\143\145\163\040\114\114\103\061\024
+\060\022\006\003\125\004\003\023\013\107\124\123\040\122\157\157
+\164\040\122\063\060\036\027\015\061\066\060\066\062\062\060\060
+\060\060\060\060\132\027\015\063\066\060\066\062\062\060\060\060
+\060\060\060\132\060\107\061\013\060\011\006\003\125\004\006\023
+\002\125\123\061\042\060\040\006\003\125\004\012\023\031\107\157
+\157\147\154\145\040\124\162\165\163\164\040\123\145\162\166\151
+\143\145\163\040\114\114\103\061\024\060\022\006\003\125\004\003
+\023\013\107\124\123\040\122\157\157\164\040\122\063\060\166\060
+\020\006\007\052\206\110\316\075\002\001\006\005\053\201\004\000
+\042\003\142\000\004\037\117\063\207\063\051\212\241\204\336\313
+\307\041\130\101\211\352\126\235\053\113\205\306\035\114\047\274
+\177\046\121\162\157\342\237\326\243\312\314\105\024\106\213\255
+\357\176\206\214\354\261\176\057\377\251\161\235\030\204\105\004
+\101\125\156\053\352\046\177\273\220\001\343\113\031\272\344\124
+\226\105\011\261\325\154\221\104\255\204\023\216\232\214\015\200
+\014\062\366\340\047\243\102\060\100\060\016\006\003\125\035\017
+\001\001\377\004\004\003\002\001\006\060\017\006\003\125\035\023
+\001\001\377\004\005\060\003\001\001\377\060\035\006\003\125\035
+\016\004\026\004\024\301\361\046\272\240\055\256\205\201\317\323
+\361\052\022\275\270\012\147\375\274\060\012\006\010\052\206\110
+\316\075\004\003\003\003\151\000\060\146\002\061\000\200\133\244
+\174\043\300\225\245\054\334\276\211\157\043\271\243\335\145\000
+\122\136\221\254\310\235\162\164\202\123\013\175\251\100\275\150
+\140\305\341\270\124\073\301\066\027\045\330\301\275\002\061\000
+\236\065\222\164\205\045\121\365\044\354\144\122\044\120\245\037
+\333\350\313\311\166\354\354\202\156\365\205\030\123\350\270\343
+\232\051\252\226\323\203\043\311\244\173\141\263\314\002\350\135
+END
+CKA_NSS_MOZILLA_CA_POLICY CK_BBOOL CK_TRUE
+
+# Trust for "GTS Root R3"
+# Issuer: CN=GTS Root R3,O=Google Trust Services LLC,C=US
+# Serial Number:6e:47:a9:c7:6c:a9:73:24:40:89:0f:03:55:dd:8d:1d
+# Subject: CN=GTS Root R3,O=Google Trust Services LLC,C=US
+# Not Valid Before: Wed Jun 22 00:00:00 2016
+# Not Valid After : Sun Jun 22 00:00:00 2036
+# Fingerprint (SHA-256): 15:D5:B8:77:46:19:EA:7D:54:CE:1C:A6:D0:B0:C4:03:E0:37:A9:17:F1:31:E8:A0:4E:1E:6B:7A:71:BA:BC:E5
+# Fingerprint (SHA1): 30:D4:24:6F:07:FF:DB:91:89:8A:0B:E9:49:66:11:EB:8C:5E:46:E5
+CKA_CLASS CK_OBJECT_CLASS CKO_NSS_TRUST
+CKA_TOKEN CK_BBOOL CK_TRUE
+CKA_PRIVATE CK_BBOOL CK_FALSE
+CKA_MODIFIABLE CK_BBOOL CK_FALSE
+CKA_LABEL UTF8 "GTS Root R3"
+CKA_CERT_SHA1_HASH MULTILINE_OCTAL
+\060\324\044\157\007\377\333\221\211\212\013\351\111\146\021\353
+\214\136\106\345
+END
+CKA_CERT_MD5_HASH MULTILINE_OCTAL
+\032\171\133\153\004\122\234\135\307\164\063\033\045\232\371\045
+END
+CKA_ISSUER MULTILINE_OCTAL
+\060\107\061\013\060\011\006\003\125\004\006\023\002\125\123\061
+\042\060\040\006\003\125\004\012\023\031\107\157\157\147\154\145
+\040\124\162\165\163\164\040\123\145\162\166\151\143\145\163\040
+\114\114\103\061\024\060\022\006\003\125\004\003\023\013\107\124
+\123\040\122\157\157\164\040\122\063
+END
+CKA_SERIAL_NUMBER MULTILINE_OCTAL
+\002\020\156\107\251\307\154\251\163\044\100\211\017\003\125\335
+\215\035
+END
+CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_TRUSTED_DELEGATOR
+CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_MUST_VERIFY_TRUST
+CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_MUST_VERIFY_TRUST
+CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE
+
+#
+# Certificate "GTS Root R4"
+#
+# Issuer: CN=GTS Root R4,O=Google Trust Services LLC,C=US
+# Serial Number:6e:47:a9:c8:8b:94:b6:e8:bb:3b:2a:d8:a2:b2:c1:99
+# Subject: CN=GTS Root R4,O=Google Trust Services LLC,C=US
+# Not Valid Before: Wed Jun 22 00:00:00 2016
+# Not Valid After : Sun Jun 22 00:00:00 2036
+# Fingerprint (SHA-256): 71:CC:A5:39:1F:9E:79:4B:04:80:25:30:B3:63:E1:21:DA:8A:30:43:BB:26:66:2F:EA:4D:CA:7F:C9:51:A4:BD
+# Fingerprint (SHA1): 2A:1D:60:27:D9:4A:B1:0A:1C:4D:91:5C:CD:33:A0:CB:3E:2D:54:CB
+CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE
+CKA_TOKEN CK_BBOOL CK_TRUE
+CKA_PRIVATE CK_BBOOL CK_FALSE
+CKA_MODIFIABLE CK_BBOOL CK_FALSE
+CKA_LABEL UTF8 "GTS Root R4"
+CKA_CERTIFICATE_TYPE CK_CERTIFICATE_TYPE CKC_X_509
+CKA_SUBJECT MULTILINE_OCTAL
+\060\107\061\013\060\011\006\003\125\004\006\023\002\125\123\061
+\042\060\040\006\003\125\004\012\023\031\107\157\157\147\154\145
+\040\124\162\165\163\164\040\123\145\162\166\151\143\145\163\040
+\114\114\103\061\024\060\022\006\003\125\004\003\023\013\107\124
+\123\040\122\157\157\164\040\122\064
+END
+CKA_ID UTF8 "0"
+CKA_ISSUER MULTILINE_OCTAL
+\060\107\061\013\060\011\006\003\125\004\006\023\002\125\123\061
+\042\060\040\006\003\125\004\012\023\031\107\157\157\147\154\145
+\040\124\162\165\163\164\040\123\145\162\166\151\143\145\163\040
+\114\114\103\061\024\060\022\006\003\125\004\003\023\013\107\124
+\123\040\122\157\157\164\040\122\064
+END
+CKA_SERIAL_NUMBER MULTILINE_OCTAL
+\002\020\156\107\251\310\213\224\266\350\273\073\052\330\242\262
+\301\231
+END
+CKA_VALUE MULTILINE_OCTAL
+\060\202\002\012\060\202\001\221\240\003\002\001\002\002\020\156
+\107\251\310\213\224\266\350\273\073\052\330\242\262\301\231\060
+\012\006\010\052\206\110\316\075\004\003\003\060\107\061\013\060
+\011\006\003\125\004\006\023\002\125\123\061\042\060\040\006\003
+\125\004\012\023\031\107\157\157\147\154\145\040\124\162\165\163
+\164\040\123\145\162\166\151\143\145\163\040\114\114\103\061\024
+\060\022\006\003\125\004\003\023\013\107\124\123\040\122\157\157
+\164\040\122\064\060\036\027\015\061\066\060\066\062\062\060\060
+\060\060\060\060\132\027\015\063\066\060\066\062\062\060\060\060
+\060\060\060\132\060\107\061\013\060\011\006\003\125\004\006\023
+\002\125\123\061\042\060\040\006\003\125\004\012\023\031\107\157
+\157\147\154\145\040\124\162\165\163\164\040\123\145\162\166\151
+\143\145\163\040\114\114\103\061\024\060\022\006\003\125\004\003
+\023\013\107\124\123\040\122\157\157\164\040\122\064\060\166\060
+\020\006\007\052\206\110\316\075\002\001\006\005\053\201\004\000
+\042\003\142\000\004\363\164\163\247\150\213\140\256\103\270\065
+\305\201\060\173\113\111\235\373\301\141\316\346\336\106\275\153
+\325\141\030\065\256\100\335\163\367\211\221\060\132\353\074\356
+\205\174\242\100\166\073\251\306\270\107\330\052\347\222\221\152
+\163\351\261\162\071\237\051\237\242\230\323\137\136\130\206\145
+\017\241\204\145\006\321\334\213\311\307\163\310\214\152\057\345
+\304\253\321\035\212\243\102\060\100\060\016\006\003\125\035\017
+\001\001\377\004\004\003\002\001\006\060\017\006\003\125\035\023
+\001\001\377\004\005\060\003\001\001\377\060\035\006\003\125\035
+\016\004\026\004\024\200\114\326\353\164\377\111\066\243\325\330
+\374\265\076\305\152\360\224\035\214\060\012\006\010\052\206\110
+\316\075\004\003\003\003\147\000\060\144\002\060\152\120\122\164
+\010\304\160\334\236\120\164\041\350\215\172\041\303\117\226\156
+\025\321\042\065\141\055\372\010\067\356\031\155\255\333\262\314
+\175\007\064\365\140\031\054\265\064\331\157\040\002\060\003\161
+\261\272\243\140\013\206\355\232\010\152\225\150\237\342\263\341
+\223\144\174\136\223\246\337\171\055\215\205\343\224\317\043\135
+\161\314\362\260\115\326\376\231\310\224\251\165\242\343
+END
+CKA_NSS_MOZILLA_CA_POLICY CK_BBOOL CK_TRUE
+
+# Trust for "GTS Root R4"
+# Issuer: CN=GTS Root R4,O=Google Trust Services LLC,C=US
+# Serial Number:6e:47:a9:c8:8b:94:b6:e8:bb:3b:2a:d8:a2:b2:c1:99
+# Subject: CN=GTS Root R4,O=Google Trust Services LLC,C=US
+# Not Valid Before: Wed Jun 22 00:00:00 2016
+# Not Valid After : Sun Jun 22 00:00:00 2036
+# Fingerprint (SHA-256): 71:CC:A5:39:1F:9E:79:4B:04:80:25:30:B3:63:E1:21:DA:8A:30:43:BB:26:66:2F:EA:4D:CA:7F:C9:51:A4:BD
+# Fingerprint (SHA1): 2A:1D:60:27:D9:4A:B1:0A:1C:4D:91:5C:CD:33:A0:CB:3E:2D:54:CB
+CKA_CLASS CK_OBJECT_CLASS CKO_NSS_TRUST
+CKA_TOKEN CK_BBOOL CK_TRUE
+CKA_PRIVATE CK_BBOOL CK_FALSE
+CKA_MODIFIABLE CK_BBOOL CK_FALSE
+CKA_LABEL UTF8 "GTS Root R4"
+CKA_CERT_SHA1_HASH MULTILINE_OCTAL
+\052\035\140\047\331\112\261\012\034\115\221\134\315\063\240\313
+\076\055\124\313
+END
+CKA_CERT_MD5_HASH MULTILINE_OCTAL
+\135\266\152\304\140\027\044\152\032\231\250\113\356\136\264\046
+END
+CKA_ISSUER MULTILINE_OCTAL
+\060\107\061\013\060\011\006\003\125\004\006\023\002\125\123\061
+\042\060\040\006\003\125\004\012\023\031\107\157\157\147\154\145
+\040\124\162\165\163\164\040\123\145\162\166\151\143\145\163\040
+\114\114\103\061\024\060\022\006\003\125\004\003\023\013\107\124
+\123\040\122\157\157\164\040\122\064
+END
+CKA_SERIAL_NUMBER MULTILINE_OCTAL
+\002\020\156\107\251\310\213\224\266\350\273\073\052\330\242\262
+\301\231
+END
+CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_TRUSTED_DELEGATOR
+CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_MUST_VERIFY_TRUST
+CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_MUST_VERIFY_TRUST
+CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE
+
+#
+# Certificate "UCA Global G2 Root"
+#
+# Issuer: CN=UCA Global G2 Root,O=UniTrust,C=CN
+# Serial Number:5d:df:b1:da:5a:a3:ed:5d:be:5a:65:20:65:03:90:ef
+# Subject: CN=UCA Global G2 Root,O=UniTrust,C=CN
+# Not Valid Before: Fri Mar 11 00:00:00 2016
+# Not Valid After : Mon Dec 31 00:00:00 2040
+# Fingerprint (SHA-256): 9B:EA:11:C9:76:FE:01:47:64:C1:BE:56:A6:F9:14:B5:A5:60:31:7A:BD:99:88:39:33:82:E5:16:1A:A0:49:3C
+# Fingerprint (SHA1): 28:F9:78:16:19:7A:FF:18:25:18:AA:44:FE:C1:A0:CE:5C:B6:4C:8A
+CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE
+CKA_TOKEN CK_BBOOL CK_TRUE
+CKA_PRIVATE CK_BBOOL CK_FALSE
+CKA_MODIFIABLE CK_BBOOL CK_FALSE
+CKA_LABEL UTF8 "UCA Global G2 Root"
+CKA_CERTIFICATE_TYPE CK_CERTIFICATE_TYPE CKC_X_509
+CKA_SUBJECT MULTILINE_OCTAL
+\060\075\061\013\060\011\006\003\125\004\006\023\002\103\116\061
+\021\060\017\006\003\125\004\012\014\010\125\156\151\124\162\165
+\163\164\061\033\060\031\006\003\125\004\003\014\022\125\103\101
+\040\107\154\157\142\141\154\040\107\062\040\122\157\157\164
+END
+CKA_ID UTF8 "0"
+CKA_ISSUER MULTILINE_OCTAL
+\060\075\061\013\060\011\006\003\125\004\006\023\002\103\116\061
+\021\060\017\006\003\125\004\012\014\010\125\156\151\124\162\165
+\163\164\061\033\060\031\006\003\125\004\003\014\022\125\103\101
+\040\107\154\157\142\141\154\040\107\062\040\122\157\157\164
+END
+CKA_SERIAL_NUMBER MULTILINE_OCTAL
+\002\020\135\337\261\332\132\243\355\135\276\132\145\040\145\003
+\220\357
+END
+CKA_VALUE MULTILINE_OCTAL
+\060\202\005\106\060\202\003\056\240\003\002\001\002\002\020\135
+\337\261\332\132\243\355\135\276\132\145\040\145\003\220\357\060
+\015\006\011\052\206\110\206\367\015\001\001\013\005\000\060\075
+\061\013\060\011\006\003\125\004\006\023\002\103\116\061\021\060
+\017\006\003\125\004\012\014\010\125\156\151\124\162\165\163\164
+\061\033\060\031\006\003\125\004\003\014\022\125\103\101\040\107
+\154\157\142\141\154\040\107\062\040\122\157\157\164\060\036\027
+\015\061\066\060\063\061\061\060\060\060\060\060\060\132\027\015
+\064\060\061\062\063\061\060\060\060\060\060\060\132\060\075\061
+\013\060\011\006\003\125\004\006\023\002\103\116\061\021\060\017
+\006\003\125\004\012\014\010\125\156\151\124\162\165\163\164\061
+\033\060\031\006\003\125\004\003\014\022\125\103\101\040\107\154
+\157\142\141\154\040\107\062\040\122\157\157\164\060\202\002\042
+\060\015\006\011\052\206\110\206\367\015\001\001\001\005\000\003
+\202\002\017\000\060\202\002\012\002\202\002\001\000\305\346\053
+\157\174\357\046\005\047\243\201\044\332\157\313\001\371\231\232
+\251\062\302\042\207\141\101\221\073\313\303\150\033\006\305\114
+\251\053\301\147\027\042\035\053\355\371\051\211\223\242\170\275
+\222\153\240\243\015\242\176\312\223\263\246\321\214\065\325\165
+\371\027\366\317\105\305\345\172\354\167\223\240\217\043\256\016
+\032\003\177\276\324\320\355\056\173\253\106\043\133\377\054\346
+\124\172\224\300\052\025\360\311\215\260\172\073\044\341\327\150
+\342\061\074\006\063\106\266\124\021\246\245\057\042\124\052\130
+\015\001\002\361\372\025\121\147\154\300\372\327\266\033\177\321
+\126\210\057\032\072\215\073\273\202\021\340\107\000\320\122\207
+\253\373\206\176\017\044\153\100\235\064\147\274\215\307\055\206
+\157\171\076\216\251\074\027\113\177\260\231\343\260\161\140\334
+\013\365\144\303\316\103\274\155\161\271\322\336\047\133\212\350
+\330\306\256\341\131\175\317\050\055\065\270\225\126\032\361\262
+\130\113\267\022\067\310\174\263\355\113\200\341\215\372\062\043
+\266\157\267\110\225\010\261\104\116\205\214\072\002\124\040\057
+\337\277\127\117\073\072\220\041\327\301\046\065\124\040\354\307
+\077\107\354\357\132\277\113\172\301\255\073\027\120\134\142\330
+\017\113\112\334\053\372\156\274\163\222\315\354\307\120\350\101
+\226\327\251\176\155\330\351\035\217\212\265\271\130\222\272\112
+\222\053\014\126\375\200\353\010\360\136\051\156\033\034\014\257
+\217\223\211\255\333\275\243\236\041\312\211\031\354\337\265\303
+\032\353\026\376\170\066\114\326\156\320\076\027\034\220\027\153
+\046\272\373\172\057\277\021\034\030\016\055\163\003\217\240\345
+\065\240\132\342\114\165\035\161\341\071\070\123\170\100\314\203
+\223\327\012\236\235\133\217\212\344\345\340\110\344\110\262\107
+\315\116\052\165\052\173\362\042\366\311\276\011\221\226\127\172
+\210\210\254\356\160\254\371\334\051\343\014\034\073\022\116\104
+\326\247\116\260\046\310\363\331\032\227\221\150\352\357\215\106
+\006\322\126\105\130\232\074\014\017\203\270\005\045\303\071\317
+\073\244\064\211\267\171\022\057\107\305\347\251\227\151\374\246
+\167\147\265\337\173\361\172\145\025\344\141\126\145\002\003\001
+\000\001\243\102\060\100\060\016\006\003\125\035\017\001\001\377
+\004\004\003\002\001\006\060\017\006\003\125\035\023\001\001\377
+\004\005\060\003\001\001\377\060\035\006\003\125\035\016\004\026
+\004\024\201\304\214\314\365\344\060\377\245\014\010\137\214\025
+\147\041\164\001\337\337\060\015\006\011\052\206\110\206\367\015
+\001\001\013\005\000\003\202\002\001\000\023\145\042\365\216\053
+\255\104\344\313\377\271\150\346\303\200\110\075\004\173\372\043
+\057\172\355\066\332\262\316\155\366\346\236\345\137\130\217\313
+\067\062\241\310\145\266\256\070\075\065\033\076\274\073\266\004
+\320\274\371\111\365\233\367\205\305\066\266\313\274\370\310\071
+\325\344\137\007\275\025\124\227\164\312\312\355\117\272\272\144
+\166\237\201\270\204\105\111\114\215\157\242\353\261\314\321\303
+\224\332\104\302\346\342\352\030\350\242\037\047\005\272\327\345
+\326\251\315\335\357\166\230\215\000\016\315\033\372\003\267\216
+\200\130\016\047\077\122\373\224\242\312\136\145\311\326\204\332
+\271\065\161\363\046\300\117\167\346\201\047\322\167\073\232\024
+\157\171\364\366\320\341\323\224\272\320\127\121\275\047\005\015
+\301\375\310\022\060\356\157\215\021\053\010\235\324\324\277\200
+\105\024\232\210\104\332\060\352\264\247\343\356\357\133\202\325
+\076\326\255\170\222\333\134\074\363\330\255\372\270\153\177\304
+\066\050\266\002\025\212\124\054\234\260\027\163\216\320\067\243
+\024\074\230\225\000\014\051\005\133\236\111\111\261\137\307\343
+\313\317\047\145\216\065\027\267\127\310\060\331\101\133\271\024
+\266\350\302\017\224\061\247\224\230\314\152\353\265\341\047\365
+\020\250\001\350\216\022\142\350\210\314\265\177\106\227\300\233
+\020\146\070\032\066\106\137\042\150\075\337\311\306\023\047\253
+\123\006\254\242\074\206\006\145\157\261\176\261\051\104\232\243
+\272\111\151\050\151\217\327\345\137\255\004\206\144\157\032\240
+\014\305\010\142\316\200\243\320\363\354\150\336\276\063\307\027
+\133\177\200\304\114\114\261\246\204\212\303\073\270\011\315\024
+\201\272\030\343\124\127\066\376\333\057\174\107\241\072\063\310
+\371\130\073\104\117\261\312\002\211\004\226\050\150\305\113\270
+\046\211\273\326\063\057\120\325\376\232\211\272\030\062\222\124
+\306\133\340\235\371\136\345\015\042\233\366\332\342\310\041\262
+\142\041\252\206\100\262\056\144\323\137\310\343\176\021\147\105
+\037\005\376\343\242\357\263\250\263\363\175\217\370\014\037\042
+\037\055\160\264\270\001\064\166\060\000\345\043\170\247\126\327
+\120\037\212\373\006\365\302\031\360\320
+END
+CKA_NSS_MOZILLA_CA_POLICY CK_BBOOL CK_TRUE
+
+# Trust for "UCA Global G2 Root"
+# Issuer: CN=UCA Global G2 Root,O=UniTrust,C=CN
+# Serial Number:5d:df:b1:da:5a:a3:ed:5d:be:5a:65:20:65:03:90:ef
+# Subject: CN=UCA Global G2 Root,O=UniTrust,C=CN
+# Not Valid Before: Fri Mar 11 00:00:00 2016
+# Not Valid After : Mon Dec 31 00:00:00 2040
+# Fingerprint (SHA-256): 9B:EA:11:C9:76:FE:01:47:64:C1:BE:56:A6:F9:14:B5:A5:60:31:7A:BD:99:88:39:33:82:E5:16:1A:A0:49:3C
+# Fingerprint (SHA1): 28:F9:78:16:19:7A:FF:18:25:18:AA:44:FE:C1:A0:CE:5C:B6:4C:8A
+CKA_CLASS CK_OBJECT_CLASS CKO_NSS_TRUST
+CKA_TOKEN CK_BBOOL CK_TRUE
+CKA_PRIVATE CK_BBOOL CK_FALSE
+CKA_MODIFIABLE CK_BBOOL CK_FALSE
+CKA_LABEL UTF8 "UCA Global G2 Root"
+CKA_CERT_SHA1_HASH MULTILINE_OCTAL
+\050\371\170\026\031\172\377\030\045\030\252\104\376\301\240\316
+\134\266\114\212
+END
+CKA_CERT_MD5_HASH MULTILINE_OCTAL
+\200\376\360\304\112\360\134\142\062\237\034\272\170\251\120\370
+END
+CKA_ISSUER MULTILINE_OCTAL
+\060\075\061\013\060\011\006\003\125\004\006\023\002\103\116\061
+\021\060\017\006\003\125\004\012\014\010\125\156\151\124\162\165
+\163\164\061\033\060\031\006\003\125\004\003\014\022\125\103\101
+\040\107\154\157\142\141\154\040\107\062\040\122\157\157\164
+END
+CKA_SERIAL_NUMBER MULTILINE_OCTAL
+\002\020\135\337\261\332\132\243\355\135\276\132\145\040\145\003
+\220\357
+END
+CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_TRUSTED_DELEGATOR
+CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_TRUSTED_DELEGATOR
+CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_MUST_VERIFY_TRUST
+CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE
+
+#
+# Certificate "UCA Extended Validation Root"
+#
+# Issuer: CN=UCA Extended Validation Root,O=UniTrust,C=CN
+# Serial Number:4f:d2:2b:8f:f5:64:c8:33:9e:4f:34:58:66:23:70:60
+# Subject: CN=UCA Extended Validation Root,O=UniTrust,C=CN
+# Not Valid Before: Fri Mar 13 00:00:00 2015
+# Not Valid After : Fri Dec 31 00:00:00 2038
+# Fingerprint (SHA-256): D4:3A:F9:B3:54:73:75:5C:96:84:FC:06:D7:D8:CB:70:EE:5C:28:E7:73:FB:29:4E:B4:1E:E7:17:22:92:4D:24
+# Fingerprint (SHA1): A3:A1:B0:6F:24:61:23:4A:E3:36:A5:C2:37:FC:A6:FF:DD:F0:D7:3A
+CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE
+CKA_TOKEN CK_BBOOL CK_TRUE
+CKA_PRIVATE CK_BBOOL CK_FALSE
+CKA_MODIFIABLE CK_BBOOL CK_FALSE
+CKA_LABEL UTF8 "UCA Extended Validation Root"
+CKA_CERTIFICATE_TYPE CK_CERTIFICATE_TYPE CKC_X_509
+CKA_SUBJECT MULTILINE_OCTAL
+\060\107\061\013\060\011\006\003\125\004\006\023\002\103\116\061
+\021\060\017\006\003\125\004\012\014\010\125\156\151\124\162\165
+\163\164\061\045\060\043\006\003\125\004\003\014\034\125\103\101
+\040\105\170\164\145\156\144\145\144\040\126\141\154\151\144\141
+\164\151\157\156\040\122\157\157\164
+END
+CKA_ID UTF8 "0"
+CKA_ISSUER MULTILINE_OCTAL
+\060\107\061\013\060\011\006\003\125\004\006\023\002\103\116\061
+\021\060\017\006\003\125\004\012\014\010\125\156\151\124\162\165
+\163\164\061\045\060\043\006\003\125\004\003\014\034\125\103\101
+\040\105\170\164\145\156\144\145\144\040\126\141\154\151\144\141
+\164\151\157\156\040\122\157\157\164
+END
+CKA_SERIAL_NUMBER MULTILINE_OCTAL
+\002\020\117\322\053\217\365\144\310\063\236\117\064\130\146\043
+\160\140
+END
+CKA_VALUE MULTILINE_OCTAL
+\060\202\005\132\060\202\003\102\240\003\002\001\002\002\020\117
+\322\053\217\365\144\310\063\236\117\064\130\146\043\160\140\060
+\015\006\011\052\206\110\206\367\015\001\001\013\005\000\060\107
+\061\013\060\011\006\003\125\004\006\023\002\103\116\061\021\060
+\017\006\003\125\004\012\014\010\125\156\151\124\162\165\163\164
+\061\045\060\043\006\003\125\004\003\014\034\125\103\101\040\105
+\170\164\145\156\144\145\144\040\126\141\154\151\144\141\164\151
+\157\156\040\122\157\157\164\060\036\027\015\061\065\060\063\061
+\063\060\060\060\060\060\060\132\027\015\063\070\061\062\063\061
+\060\060\060\060\060\060\132\060\107\061\013\060\011\006\003\125
+\004\006\023\002\103\116\061\021\060\017\006\003\125\004\012\014
+\010\125\156\151\124\162\165\163\164\061\045\060\043\006\003\125
+\004\003\014\034\125\103\101\040\105\170\164\145\156\144\145\144
+\040\126\141\154\151\144\141\164\151\157\156\040\122\157\157\164
+\060\202\002\042\060\015\006\011\052\206\110\206\367\015\001\001
+\001\005\000\003\202\002\017\000\060\202\002\012\002\202\002\001
+\000\251\011\007\050\023\002\260\231\340\144\252\036\103\026\172
+\163\261\221\240\165\076\250\372\343\070\000\172\354\211\152\040
+\017\213\305\260\233\063\003\132\206\306\130\206\325\301\205\273
+\117\306\234\100\115\312\276\356\151\226\270\255\201\060\232\174
+\222\005\353\005\053\232\110\320\270\166\076\226\310\040\273\322
+\260\361\217\330\254\105\106\377\252\147\140\264\167\176\152\037
+\074\032\122\172\004\075\007\074\205\015\204\320\037\166\012\367
+\152\024\337\162\343\064\174\127\116\126\001\076\171\361\252\051
+\073\154\372\370\217\155\115\310\065\337\256\353\334\044\356\171
+\105\247\205\266\005\210\336\210\135\045\174\227\144\147\011\331
+\277\132\025\005\206\363\011\036\354\130\062\063\021\363\167\144
+\260\166\037\344\020\065\027\033\362\016\261\154\244\052\243\163
+\374\011\037\036\062\031\123\021\347\331\263\054\056\166\056\241
+\243\336\176\152\210\011\350\362\007\212\370\262\315\020\347\342
+\163\100\223\273\010\321\077\341\374\013\224\263\045\357\174\246
+\327\321\257\237\377\226\232\365\221\173\230\013\167\324\176\350
+\007\322\142\265\225\071\343\363\361\155\017\016\145\204\212\143
+\124\305\200\266\340\236\113\175\107\046\247\001\010\135\321\210
+\236\327\303\062\104\372\202\112\012\150\124\177\070\123\003\314
+\244\000\063\144\121\131\013\243\202\221\172\136\354\026\302\363
+\052\346\142\332\052\333\131\142\020\045\112\052\201\013\107\007
+\103\006\160\207\322\372\223\021\051\172\110\115\353\224\307\160
+\115\257\147\325\121\261\200\040\001\001\264\172\010\246\220\177
+\116\340\357\007\101\207\257\152\245\136\213\373\317\120\262\232
+\124\257\303\211\272\130\055\365\060\230\261\066\162\071\176\111
+\004\375\051\247\114\171\344\005\127\333\224\271\026\123\215\106
+\263\035\225\141\127\126\177\257\360\026\133\141\130\157\066\120
+\021\013\330\254\053\225\026\032\016\037\010\315\066\064\145\020
+\142\146\325\200\137\024\040\137\055\014\240\170\012\150\326\054
+\327\351\157\053\322\112\005\223\374\236\157\153\147\377\210\361
+\116\245\151\112\122\067\005\352\306\026\215\322\304\231\321\202
+\053\073\272\065\165\367\121\121\130\363\310\007\335\344\264\003
+\177\002\003\001\000\001\243\102\060\100\060\035\006\003\125\035
+\016\004\026\004\024\331\164\072\344\060\075\015\367\022\334\176
+\132\005\237\036\064\232\367\341\024\060\017\006\003\125\035\023
+\001\001\377\004\005\060\003\001\001\377\060\016\006\003\125\035
+\017\001\001\377\004\004\003\002\001\206\060\015\006\011\052\206
+\110\206\367\015\001\001\013\005\000\003\202\002\001\000\066\215
+\227\314\102\025\144\051\067\233\046\054\326\373\256\025\151\054
+\153\032\032\367\137\266\371\007\114\131\352\363\311\310\271\256
+\314\272\056\172\334\300\365\260\055\300\073\257\237\160\005\021
+\152\237\045\117\001\051\160\343\345\014\341\352\132\174\334\111
+\273\301\036\052\201\365\026\113\162\221\310\242\061\271\252\332
+\374\235\037\363\135\100\002\023\374\116\034\006\312\263\024\220
+\124\027\031\022\032\361\037\327\014\151\132\366\161\170\364\224
+\175\221\013\216\354\220\124\216\274\157\241\114\253\374\164\144
+\375\161\232\370\101\007\241\315\221\344\074\232\340\233\062\071
+\163\253\052\325\151\310\170\221\046\061\175\342\307\060\361\374
+\024\170\167\022\016\023\364\335\026\224\277\113\147\173\160\123
+\205\312\260\273\363\070\115\054\220\071\300\015\302\135\153\351
+\342\345\325\210\215\326\054\277\253\033\276\265\050\207\022\027
+\164\156\374\175\374\217\320\207\046\260\033\373\271\154\253\342
+\236\075\025\301\073\056\147\002\130\221\237\357\370\102\037\054
+\267\150\365\165\255\317\265\366\377\021\175\302\360\044\245\255
+\323\372\240\074\251\372\135\334\245\240\357\104\244\276\326\350
+\345\344\023\226\027\173\006\076\062\355\307\267\102\274\166\243
+\330\145\070\053\070\065\121\041\016\016\157\056\064\023\100\341
+\053\147\014\155\112\101\060\030\043\132\062\125\231\311\027\340
+\074\336\366\354\171\255\053\130\031\242\255\054\042\032\225\216
+\276\226\220\135\102\127\304\371\024\003\065\053\034\055\121\127
+\010\247\072\336\077\344\310\264\003\163\302\301\046\200\273\013
+\102\037\255\015\257\046\162\332\314\276\263\243\203\130\015\202
+\305\037\106\121\343\234\030\314\215\233\215\354\111\353\165\120
+\325\214\050\131\312\164\064\332\214\013\041\253\036\352\033\345
+\307\375\025\076\300\027\252\373\043\156\046\106\313\372\371\261
+\162\153\151\317\042\204\013\142\017\254\331\031\000\224\242\166
+\074\324\055\232\355\004\236\055\006\142\020\067\122\034\205\162
+\033\047\345\314\306\061\354\067\354\143\131\233\013\035\166\314
+\176\062\232\210\225\010\066\122\273\336\166\137\166\111\111\255
+\177\275\145\040\262\311\301\053\166\030\166\237\126\261
+END
+CKA_NSS_MOZILLA_CA_POLICY CK_BBOOL CK_TRUE
+
+# Trust for "UCA Extended Validation Root"
+# Issuer: CN=UCA Extended Validation Root,O=UniTrust,C=CN
+# Serial Number:4f:d2:2b:8f:f5:64:c8:33:9e:4f:34:58:66:23:70:60
+# Subject: CN=UCA Extended Validation Root,O=UniTrust,C=CN
+# Not Valid Before: Fri Mar 13 00:00:00 2015
+# Not Valid After : Fri Dec 31 00:00:00 2038
+# Fingerprint (SHA-256): D4:3A:F9:B3:54:73:75:5C:96:84:FC:06:D7:D8:CB:70:EE:5C:28:E7:73:FB:29:4E:B4:1E:E7:17:22:92:4D:24
+# Fingerprint (SHA1): A3:A1:B0:6F:24:61:23:4A:E3:36:A5:C2:37:FC:A6:FF:DD:F0:D7:3A
+CKA_CLASS CK_OBJECT_CLASS CKO_NSS_TRUST
+CKA_TOKEN CK_BBOOL CK_TRUE
+CKA_PRIVATE CK_BBOOL CK_FALSE
+CKA_MODIFIABLE CK_BBOOL CK_FALSE
+CKA_LABEL UTF8 "UCA Extended Validation Root"
+CKA_CERT_SHA1_HASH MULTILINE_OCTAL
+\243\241\260\157\044\141\043\112\343\066\245\302\067\374\246\377
+\335\360\327\072
+END
+CKA_CERT_MD5_HASH MULTILINE_OCTAL
+\241\363\137\103\306\064\233\332\277\214\176\005\123\255\226\342
+END
+CKA_ISSUER MULTILINE_OCTAL
+\060\107\061\013\060\011\006\003\125\004\006\023\002\103\116\061
+\021\060\017\006\003\125\004\012\014\010\125\156\151\124\162\165
+\163\164\061\045\060\043\006\003\125\004\003\014\034\125\103\101
+\040\105\170\164\145\156\144\145\144\040\126\141\154\151\144\141
+\164\151\157\156\040\122\157\157\164
+END
+CKA_SERIAL_NUMBER MULTILINE_OCTAL
+\002\020\117\322\053\217\365\144\310\063\236\117\064\130\146\043
+\160\140
+END
+CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_TRUSTED_DELEGATOR
+CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_MUST_VERIFY_TRUST
+CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_MUST_VERIFY_TRUST
+CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE
+
+#
+# Certificate "Certigna Root CA"
+#
+# Issuer: CN=Certigna Root CA,OU=0002 48146308100036,O=Dhimyotis,C=FR
+# Serial Number:00:ca:e9:1b:89:f1:55:03:0d:a3:e6:41:6d:c4:e3:a6:e1
+# Subject: CN=Certigna Root CA,OU=0002 48146308100036,O=Dhimyotis,C=FR
+# Not Valid Before: Tue Oct 01 08:32:27 2013
+# Not Valid After : Sat Oct 01 08:32:27 2033
+# Fingerprint (SHA-256): D4:8D:3D:23:EE:DB:50:A4:59:E5:51:97:60:1C:27:77:4B:9D:7B:18:C9:4D:5A:05:95:11:A1:02:50:B9:31:68
+# Fingerprint (SHA1): 2D:0D:52:14:FF:9E:AD:99:24:01:74:20:47:6E:6C:85:27:27:F5:43
+CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE
+CKA_TOKEN CK_BBOOL CK_TRUE
+CKA_PRIVATE CK_BBOOL CK_FALSE
+CKA_MODIFIABLE CK_BBOOL CK_FALSE
+CKA_LABEL UTF8 "Certigna Root CA"
+CKA_CERTIFICATE_TYPE CK_CERTIFICATE_TYPE CKC_X_509
+CKA_SUBJECT MULTILINE_OCTAL
+\060\132\061\013\060\011\006\003\125\004\006\023\002\106\122\061
+\022\060\020\006\003\125\004\012\014\011\104\150\151\155\171\157
+\164\151\163\061\034\060\032\006\003\125\004\013\014\023\060\060
+\060\062\040\064\070\061\064\066\063\060\070\061\060\060\060\063
+\066\061\031\060\027\006\003\125\004\003\014\020\103\145\162\164
+\151\147\156\141\040\122\157\157\164\040\103\101
+END
+CKA_ID UTF8 "0"
+CKA_ISSUER MULTILINE_OCTAL
+\060\132\061\013\060\011\006\003\125\004\006\023\002\106\122\061
+\022\060\020\006\003\125\004\012\014\011\104\150\151\155\171\157
+\164\151\163\061\034\060\032\006\003\125\004\013\014\023\060\060
+\060\062\040\064\070\061\064\066\063\060\070\061\060\060\060\063
+\066\061\031\060\027\006\003\125\004\003\014\020\103\145\162\164
+\151\147\156\141\040\122\157\157\164\040\103\101
+END
+CKA_SERIAL_NUMBER MULTILINE_OCTAL
+\002\021\000\312\351\033\211\361\125\003\015\243\346\101\155\304
+\343\246\341
+END
+CKA_VALUE MULTILINE_OCTAL
+\060\202\006\133\060\202\004\103\240\003\002\001\002\002\021\000
+\312\351\033\211\361\125\003\015\243\346\101\155\304\343\246\341
+\060\015\006\011\052\206\110\206\367\015\001\001\013\005\000\060
+\132\061\013\060\011\006\003\125\004\006\023\002\106\122\061\022
+\060\020\006\003\125\004\012\014\011\104\150\151\155\171\157\164
+\151\163\061\034\060\032\006\003\125\004\013\014\023\060\060\060
+\062\040\064\070\061\064\066\063\060\070\061\060\060\060\063\066
+\061\031\060\027\006\003\125\004\003\014\020\103\145\162\164\151
+\147\156\141\040\122\157\157\164\040\103\101\060\036\027\015\061
+\063\061\060\060\061\060\070\063\062\062\067\132\027\015\063\063
+\061\060\060\061\060\070\063\062\062\067\132\060\132\061\013\060
+\011\006\003\125\004\006\023\002\106\122\061\022\060\020\006\003
+\125\004\012\014\011\104\150\151\155\171\157\164\151\163\061\034
+\060\032\006\003\125\004\013\014\023\060\060\060\062\040\064\070
+\061\064\066\063\060\070\061\060\060\060\063\066\061\031\060\027
+\006\003\125\004\003\014\020\103\145\162\164\151\147\156\141\040
+\122\157\157\164\040\103\101\060\202\002\042\060\015\006\011\052
+\206\110\206\367\015\001\001\001\005\000\003\202\002\017\000\060
+\202\002\012\002\202\002\001\000\315\030\071\145\032\131\261\352
+\144\026\016\214\224\044\225\174\203\323\305\071\046\334\014\357
+\026\127\215\327\330\254\243\102\177\202\312\355\315\133\333\016
+\267\055\355\105\010\027\262\331\263\313\326\027\122\162\050\333
+\216\116\236\212\266\013\371\236\204\232\115\166\336\042\051\134
+\322\263\322\006\076\060\071\251\164\243\222\126\034\241\157\114
+\012\040\155\237\043\172\264\306\332\054\344\035\054\334\263\050
+\320\023\362\114\116\002\111\241\124\100\236\346\345\005\240\055
+\204\310\377\230\154\320\353\212\032\204\010\036\267\150\043\356
+\043\325\160\316\155\121\151\020\356\241\172\302\321\042\061\302
+\202\205\322\362\125\166\120\174\045\172\311\204\134\013\254\335
+\102\116\053\347\202\242\044\211\313\220\262\320\356\043\272\146
+\114\273\142\244\371\123\132\144\173\174\230\372\243\110\236\017
+\225\256\247\030\364\152\354\056\003\105\257\360\164\370\052\315
+\172\135\321\276\104\046\062\051\361\361\365\154\314\176\002\041
+\013\237\157\244\077\276\235\123\342\317\175\251\054\174\130\032
+\227\341\075\067\067\030\146\050\322\100\305\121\212\214\303\055
+\316\123\210\044\130\144\060\026\305\252\340\326\012\246\100\337
+\170\366\365\004\174\151\023\204\274\321\321\247\006\317\001\367
+\150\300\250\127\273\072\141\255\004\214\223\343\255\374\360\333
+\104\155\131\334\111\131\256\254\232\231\066\060\101\173\166\063
+\042\207\243\302\222\206\156\371\160\356\256\207\207\225\033\304
+\172\275\061\363\324\322\345\231\377\276\110\354\165\365\170\026
+\035\246\160\301\177\074\033\241\222\373\317\310\074\326\305\223
+\012\217\365\125\072\166\225\316\131\230\212\011\225\167\062\232
+\203\272\054\004\072\227\275\324\057\276\327\154\233\242\312\175
+\155\046\311\125\325\317\303\171\122\010\011\231\007\044\055\144
+\045\153\246\041\151\233\152\335\164\115\153\227\172\101\275\253
+\027\371\220\027\110\217\066\371\055\325\305\333\356\252\205\105
+\101\372\315\072\105\261\150\346\066\114\233\220\127\354\043\271
+\207\010\302\304\011\361\227\206\052\050\115\342\164\300\332\304
+\214\333\337\342\241\027\131\316\044\131\164\061\332\177\375\060
+\155\331\334\341\152\341\374\137\002\003\001\000\001\243\202\001
+\032\060\202\001\026\060\017\006\003\125\035\023\001\001\377\004
+\005\060\003\001\001\377\060\016\006\003\125\035\017\001\001\377
+\004\004\003\002\001\006\060\035\006\003\125\035\016\004\026\004
+\024\030\207\126\340\156\167\356\044\065\074\116\163\232\037\326
+\341\342\171\176\053\060\037\006\003\125\035\043\004\030\060\026
+\200\024\030\207\126\340\156\167\356\044\065\074\116\163\232\037
+\326\341\342\171\176\053\060\104\006\003\125\035\040\004\075\060
+\073\060\071\006\004\125\035\040\000\060\061\060\057\006\010\053
+\006\001\005\005\007\002\001\026\043\150\164\164\160\163\072\057
+\057\167\167\167\167\056\143\145\162\164\151\147\156\141\056\146
+\162\057\141\165\164\157\162\151\164\145\163\057\060\155\006\003
+\125\035\037\004\146\060\144\060\057\240\055\240\053\206\051\150
+\164\164\160\072\057\057\143\162\154\056\143\145\162\164\151\147
+\156\141\056\146\162\057\143\145\162\164\151\147\156\141\162\157
+\157\164\143\141\056\143\162\154\060\061\240\057\240\055\206\053
+\150\164\164\160\072\057\057\143\162\154\056\144\150\151\155\171
+\157\164\151\163\056\143\157\155\057\143\145\162\164\151\147\156
+\141\162\157\157\164\143\141\056\143\162\154\060\015\006\011\052
+\206\110\206\367\015\001\001\013\005\000\003\202\002\001\000\224
+\270\236\117\360\343\225\010\042\347\315\150\101\367\034\125\325
+\174\000\342\055\072\211\135\150\070\057\121\042\013\112\215\313
+\351\273\135\076\273\134\075\261\050\376\344\123\125\023\317\241
+\220\033\002\035\137\146\106\011\063\050\341\015\044\227\160\323
+\020\037\352\144\127\226\273\135\332\347\304\214\117\114\144\106
+\035\134\207\343\131\336\102\321\233\250\176\246\211\335\217\034
+\311\060\202\355\073\234\315\300\351\031\340\152\330\002\165\067
+\253\367\064\050\050\221\362\004\012\117\065\343\140\046\001\372
+\320\021\214\371\021\152\356\257\075\303\120\323\217\137\063\171
+\074\206\250\163\105\220\214\040\266\162\163\027\043\276\007\145
+\345\170\222\015\272\001\300\353\214\034\146\277\254\206\167\001
+\224\015\234\346\351\071\215\037\246\121\214\231\014\071\167\341
+\264\233\372\034\147\127\157\152\152\216\251\053\114\127\171\172
+\127\042\317\315\137\143\106\215\134\131\072\206\370\062\107\142
+\243\147\015\030\221\334\373\246\153\365\110\141\163\043\131\216
+\002\247\274\104\352\364\111\235\361\124\130\371\140\257\332\030
+\244\057\050\105\334\172\240\210\206\135\363\073\347\377\051\065
+\200\374\144\103\224\346\343\034\157\276\255\016\052\143\231\053
+\311\176\205\366\161\350\006\003\225\376\336\217\110\034\132\324
+\222\350\053\356\347\061\333\272\004\152\207\230\347\305\137\357
+\175\247\042\367\001\330\115\371\211\320\016\232\005\131\244\236
+\230\331\157\053\312\160\276\144\302\125\243\364\351\257\303\222
+\051\334\210\026\044\231\074\215\046\230\266\133\267\314\316\267
+\067\007\375\046\331\230\205\044\377\131\043\003\232\355\235\235
+\250\344\136\070\316\327\122\015\157\322\077\155\261\005\153\111
+\316\212\221\106\163\364\366\057\360\250\163\167\016\145\254\241
+\215\146\122\151\176\113\150\014\307\036\067\047\203\245\214\307
+\002\344\024\315\111\001\260\163\263\375\306\220\072\157\322\154
+\355\073\356\354\221\276\242\103\135\213\000\112\146\045\104\160
+\336\100\017\370\174\025\367\242\316\074\327\136\023\214\201\027
+\030\027\321\275\361\167\020\072\324\145\071\301\047\254\127\054
+\045\124\377\242\332\117\212\141\071\136\256\075\112\214\275
+END
+CKA_NSS_MOZILLA_CA_POLICY CK_BBOOL CK_TRUE
+
+# Trust for "Certigna Root CA"
+# Issuer: CN=Certigna Root CA,OU=0002 48146308100036,O=Dhimyotis,C=FR
+# Serial Number:00:ca:e9:1b:89:f1:55:03:0d:a3:e6:41:6d:c4:e3:a6:e1
+# Subject: CN=Certigna Root CA,OU=0002 48146308100036,O=Dhimyotis,C=FR
+# Not Valid Before: Tue Oct 01 08:32:27 2013
+# Not Valid After : Sat Oct 01 08:32:27 2033
+# Fingerprint (SHA-256): D4:8D:3D:23:EE:DB:50:A4:59:E5:51:97:60:1C:27:77:4B:9D:7B:18:C9:4D:5A:05:95:11:A1:02:50:B9:31:68
+# Fingerprint (SHA1): 2D:0D:52:14:FF:9E:AD:99:24:01:74:20:47:6E:6C:85:27:27:F5:43
+CKA_CLASS CK_OBJECT_CLASS CKO_NSS_TRUST
+CKA_TOKEN CK_BBOOL CK_TRUE
+CKA_PRIVATE CK_BBOOL CK_FALSE
+CKA_MODIFIABLE CK_BBOOL CK_FALSE
+CKA_LABEL UTF8 "Certigna Root CA"
+CKA_CERT_SHA1_HASH MULTILINE_OCTAL
+\055\015\122\024\377\236\255\231\044\001\164\040\107\156\154\205
+\047\047\365\103
+END
+CKA_CERT_MD5_HASH MULTILINE_OCTAL
+\016\134\060\142\047\353\133\274\327\256\142\272\351\325\337\167
+END
+CKA_ISSUER MULTILINE_OCTAL
+\060\132\061\013\060\011\006\003\125\004\006\023\002\106\122\061
+\022\060\020\006\003\125\004\012\014\011\104\150\151\155\171\157
+\164\151\163\061\034\060\032\006\003\125\004\013\014\023\060\060
+\060\062\040\064\070\061\064\066\063\060\070\061\060\060\060\063
+\066\061\031\060\027\006\003\125\004\003\014\020\103\145\162\164
+\151\147\156\141\040\122\157\157\164\040\103\101
+END
+CKA_SERIAL_NUMBER MULTILINE_OCTAL
+\002\021\000\312\351\033\211\361\125\003\015\243\346\101\155\304
+\343\246\341
+END
+CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_TRUSTED_DELEGATOR
+CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_TRUSTED_DELEGATOR
+CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_MUST_VERIFY_TRUST
+CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE
--- a/security/nss/lib/ckfw/builtins/nssckbi.h
+++ b/security/nss/lib/ckfw/builtins/nssckbi.h
@@ -41,18 +41,18 @@
  *   made on that branch.
  *
  * NSS_BUILTINS_LIBRARY_VERSION_MINOR is a CK_BYTE.  It's not clear
  * whether we may use its full range (0-255) or only 0-99 because
  * of the comment in the CK_VERSION type definition.
  * It's recommend to switch back to 0 after having reached version 98/99.
  */
 #define NSS_BUILTINS_LIBRARY_VERSION_MAJOR 2
-#define NSS_BUILTINS_LIBRARY_VERSION_MINOR 28
-#define NSS_BUILTINS_LIBRARY_VERSION "2.28"
+#define NSS_BUILTINS_LIBRARY_VERSION_MINOR 30
+#define NSS_BUILTINS_LIBRARY_VERSION "2.30"
 
 /* These version numbers detail the semantic changes to the ckfw engine. */
 #define NSS_BUILTINS_HARDWARE_VERSION_MAJOR 1
 #define NSS_BUILTINS_HARDWARE_VERSION_MINOR 0
 
 /* These version numbers detail the semantic changes to ckbi itself
  * (new PKCS #11 objects), etc. */
 #define NSS_BUILTINS_FIRMWARE_VERSION_MAJOR 1
--- a/servo/components/malloc_size_of/Cargo.toml
+++ b/servo/components/malloc_size_of/Cargo.toml
@@ -26,18 +26,18 @@ servo = [
 
 [dependencies]
 app_units = "0.7"
 cssparser = "0.25"
 euclid = "0.19"
 hashglobe = { path = "../hashglobe" }
 hyper = { version = "0.12", optional = true }
 hyper_serde = { version = "0.9", optional = true }
-keyboard-types = {version = "0.4.2-servo", features = ["serde"], optional = true}
-mozjs = { version = "0.9.3", optional = true }
+keyboard-types = {version = "0.4.3", optional = true}
+mozjs = { version = "0.9.4", optional = true }
 selectors = { path = "../selectors" }
 serde = { version = "1.0.27", optional = true }
 serde_bytes = { version = "0.10", optional = true }
 servo_arc = { path = "../servo_arc" }
 servo_channel = { path = "../channel", optional = true }
 smallbitvec = "2.1.0"
 smallvec = "0.6"
 string_cache = { version = "0.7", optional = true }
--- a/servo/components/style/custom_properties.rs
+++ b/servo/components/style/custom_properties.rs
@@ -330,17 +330,18 @@ impl VariableValue {
 
     /// Parse a custom property value.
     pub fn parse<'i, 't>(input: &mut Parser<'i, 't>) -> Result<Arc<Self>, ParseError<'i>> {
         let mut references = VarOrEnvReferences::default();
 
         let (first_token_type, css, last_token_type) =
             parse_self_contained_declaration_value(input, Some(&mut references))?;
 
-        let custom_property_references = references.custom_property_references
+        let custom_property_references = references
+            .custom_property_references
             .into_iter()
             .collect::<Vec<_>>()
             .into_boxed_slice();
 
         Ok(Arc::new(VariableValue {
             css: css.into_owned(),
             first_token_type,
             last_token_type,
--- a/servo/components/style/media_queries/media_feature_expression.rs
+++ b/servo/components/style/media_queries/media_feature_expression.rs
@@ -320,17 +320,21 @@ impl MediaFeatureExpression {
                 } else if starts_with_ignore_ascii_case(feature_name, "max-") {
                     feature_name = &feature_name[4..];
                     Some(Range::Max)
                 } else {
                     None
                 };
 
                 let atom = Atom::from(string_as_ascii_lowercase(feature_name));
-                match MEDIA_FEATURES.iter().enumerate().find(|(_, f)| f.name == atom) {
+                match MEDIA_FEATURES
+                    .iter()
+                    .enumerate()
+                    .find(|(_, f)| f.name == atom)
+                {
                     Some((i, f)) => Ok((i, f, range)),
                     None => Err(()),
                 }
             };
 
             match result {
                 Ok((i, f, r)) => {
                     feature_index = i;
--- a/servo/components/style/values/computed/box.rs
+++ b/servo/components/style/values/computed/box.rs
@@ -7,18 +7,18 @@
 use crate::values::computed::length::{LengthOrPercentage, NonNegativeLength};
 use crate::values::computed::{Context, Number, ToComputedValue};
 use crate::values::generics::box_::AnimationIterationCount as GenericAnimationIterationCount;
 use crate::values::generics::box_::Perspective as GenericPerspective;
 use crate::values::generics::box_::VerticalAlign as GenericVerticalAlign;
 use crate::values::specified::box_ as specified;
 
 pub use crate::values::specified::box_::{AnimationName, Appearance, BreakBetween, BreakWithin};
+pub use crate::values::specified::box_::{Clear as SpecifiedClear, Float as SpecifiedFloat};
 pub use crate::values::specified::box_::{Contain, Display, OverflowClipBox};
-pub use crate::values::specified::box_::{Clear as SpecifiedClear, Float as SpecifiedFloat};
 pub use crate::values::specified::box_::{OverscrollBehavior, ScrollSnapType};
 pub use crate::values::specified::box_::{TouchAction, TransitionProperty, WillChange};
 
 /// A computed value for the `vertical-align` property.
 pub type VerticalAlign = GenericVerticalAlign<LengthOrPercentage>;
 
 /// A computed value for the `animation-iteration-count` property.
 pub type AnimationIterationCount = GenericAnimationIterationCount<Number>;
--- a/servo/components/style/values/computed/mod.rs
+++ b/servo/components/style/values/computed/mod.rs
@@ -1,14 +1,15 @@
 /* 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/. */
 
 //! Computed values.
 
+use self::transform::DirectionVector;
 use super::animated::ToAnimatedValue;
 use super::generics::grid::GridTemplateComponent as GenericGridTemplateComponent;
 use super::generics::grid::{GridLine as GenericGridLine, TrackBreadth as GenericTrackBreadth};
 use super::generics::grid::{TrackList as GenericTrackList, TrackSize as GenericTrackSize};
 use super::generics::transform::IsParallelTo;
 use super::generics::{GreaterThanOrEqualToOne, NonNegative};
 use super::specified;
 use super::{CSSFloat, CSSInteger};
@@ -18,17 +19,16 @@ use crate::media_queries::Device;
 #[cfg(feature = "gecko")]
 use crate::properties;
 use crate::properties::{ComputedValues, LonghandId, StyleBuilder};
 use crate::rule_cache::RuleCacheConditions;
 use crate::Atom;
 #[cfg(feature = "servo")]
 use crate::Prefix;
 use euclid::Size2D;
-use self::transform::DirectionVector;
 use std::cell::RefCell;
 use std::cmp;
 use std::f32;
 use std::fmt::{self, Write};
 use style_traits::cursor::CursorKind;
 use style_traits::{CssWriter, ToCss};
 
 #[cfg(feature = "gecko")]
@@ -462,17 +462,20 @@ trivial_to_computed_value!(Box<str>);
 pub type Number = CSSFloat;
 
 impl IsParallelTo for (Number, Number, Number) {
     fn is_parallel_to(&self, vector: &DirectionVector) -> bool {
         use euclid::approxeq::ApproxEq;
         // If a and b is parallel, the angle between them is 0deg, so
         // a x b = |a|*|b|*sin(0)*n = 0 * n, |a x b| == 0.
         let self_vector = DirectionVector::new(self.0, self.1, self.2);
-        self_vector.cross(*vector).square_length().approx_eq(&0.0f32)
+        self_vector
+            .cross(*vector)
+            .square_length()
+            .approx_eq(&0.0f32)
     }
 }
 
 /// A wrapper of Number, but the value >= 0.
 pub type NonNegativeNumber = NonNegative<CSSFloat>;
 
 impl ToAnimatedValue for NonNegativeNumber {
     type AnimatedValue = CSSFloat;
--- a/servo/components/style/values/specified/align.rs
+++ b/servo/components/style/values/specified/align.rs
@@ -282,17 +282,17 @@ impl From<u16> for AlignContent {
 impl From<AlignContent> for u16 {
     fn from(v: AlignContent) -> u16 {
         v.0.as_bits()
     }
 }
 
 /// Value for the `justify-content` property.
 ///
-/// <https://drafts.csswg.org/css-align/#propdef-align-content>
+/// <https://drafts.csswg.org/css-align/#propdef-justify-content>
 #[derive(Clone, Copy, Debug, Eq, MallocSizeOf, PartialEq, ToComputedValue, ToCss)]
 pub struct JustifyContent(pub ContentDistribution);
 
 impl Parse for JustifyContent {
     fn parse<'i, 't>(
         _: &ParserContext,
         input: &mut Parser<'i, 't>,
     ) -> Result<Self, ParseError<'i>> {
@@ -456,17 +456,17 @@ impl From<u8> for JustifySelf {
 impl From<JustifySelf> for u8 {
     fn from(justify: JustifySelf) -> u8 {
         (justify.0).0.bits()
     }
 }
 
 /// Value of the `align-items` property
 ///
-/// <https://drafts.csswg.org/css-align/#self-alignment>
+/// <https://drafts.csswg.org/css-align/#propdef-align-items>
 #[derive(Clone, Copy, Debug, Eq, MallocSizeOf, PartialEq, ToComputedValue, ToCss)]
 pub struct AlignItems(pub AlignFlags);
 
 impl AlignItems {
     /// The initial value 'normal'
     #[inline]
     pub fn normal() -> Self {
         AlignItems(AlignFlags::NORMAL)
--- a/servo/components/style/values/specified/basic_shape.rs
+++ b/servo/components/style/values/specified/basic_shape.rs
@@ -9,17 +9,17 @@
 
 use crate::parser::{Parse, ParserContext};
 use crate::values::generics::basic_shape as generic;
 use crate::values::generics::basic_shape::{GeometryBox, Path, PolygonCoord};
 use crate::values::generics::basic_shape::{ShapeBox, ShapeSource};
 use crate::values::generics::rect::Rect;
 use crate::values::specified::border::BorderRadius;
 use crate::values::specified::image::Image;
-use crate::values::specified::position::{HorizontalPosition, VerticalPosition, Position};
+use crate::values::specified::position::{HorizontalPosition, Position, VerticalPosition};
 use crate::values::specified::url::SpecifiedUrl;
 use crate::values::specified::LengthOrPercentage;
 use crate::values::specified::SVGPathData;
 use cssparser::Parser;
 use std::fmt::{self, Write};
 use style_traits::{CssWriter, ParseError, StyleParseErrorKind, ToCss};
 
 /// A specified alias for FillRule.
--- a/servo/components/style/values/specified/mod.rs
+++ b/servo/components/style/values/specified/mod.rs
@@ -295,17 +295,20 @@ impl ToCss for Number {
 }
 
 impl IsParallelTo for (Number, Number, Number) {
     fn is_parallel_to(&self, vector: &DirectionVector) -> bool {
         use euclid::approxeq::ApproxEq;
         // If a and b is parallel, the angle between them is 0deg, so
         // a x b = |a|*|b|*sin(0)*n = 0 * n, |a x b| == 0.
         let self_vector = DirectionVector::new(self.0.get(), self.1.get(), self.2.get());
-        self_vector.cross(*vector).square_length().approx_eq(&0.0f32)
+        self_vector
+            .cross(*vector)
+            .square_length()
+            .approx_eq(&0.0f32)
     }
 }
 
 impl SpecifiedValueInfo for Number {}
 
 impl From<Number> for f32 {
     #[inline]
     fn from(n: Number) -> Self {
--- a/servo/components/style/values/specified/transform.rs
+++ b/servo/components/style/values/specified/transform.rs
@@ -357,31 +357,34 @@ impl Parse for Rotate {
             return Ok(generic::Rotate::None);
         }
 
         // Parse <angle> or [ x | y | z | <number>{3} ] && <angle>.
         //
         // The rotate axis and angle could be in any order, so we parse angle twice to cover
         // two cases. i.e. `<number>{3} <angle>` or `<angle> <number>{3}`
         let angle = input.try(|i| specified::Angle::parse(context, i)).ok();
-        let axis = input.try(|i| {
-            Ok(try_match_ident_ignore_ascii_case! { i,
-                "x" => (Number::new(1.), Number::new(0.), Number::new(0.)),
-                "y" => (Number::new(0.), Number::new(1.), Number::new(0.)),
-                "z" => (Number::new(0.), Number::new(0.), Number::new(1.)),
+        let axis = input
+            .try(|i| {
+                Ok(try_match_ident_ignore_ascii_case! { i,
+                    "x" => (Number::new(1.), Number::new(0.), Number::new(0.)),
+                    "y" => (Number::new(0.), Number::new(1.), Number::new(0.)),
+                    "z" => (Number::new(0.), Number::new(0.), Number::new(1.)),
+                })
             })
-        }).or_else(|_: ParseError| -> Result<_, ParseError> {
-            input.try(|i| {
-                Ok((
-                    Number::parse(context, i)?,
-                    Number::parse(context, i)?,
-                    Number::parse(context, i)?,
-                ))
+            .or_else(|_: ParseError| -> Result<_, ParseError> {
+                input.try(|i| {
+                    Ok((
+                        Number::parse(context, i)?,
+                        Number::parse(context, i)?,
+                        Number::parse(context, i)?,
+                    ))
+                })
             })
-        }).ok();
+            .ok();
         let angle = match angle {
             Some(a) => a,
             None => specified::Angle::parse(context, input)?,
         };
 
         Ok(match axis {
             Some((x, y, z)) => generic::Rotate::Rotate3D(x, y, z, angle),
             None => generic::Rotate::Rotate(angle),
--- a/testing/modules/AppInfo.jsm
+++ b/testing/modules/AppInfo.jsm
@@ -107,34 +107,29 @@ var getAppInfo = function() { return cur
  *
  * To change the current XULAppInfo, simply call this function. If there was
  * a previously registered app info object, it will be unloaded and replaced.
  */
 var updateAppInfo = function(options) {
   currentAppInfo = newAppInfo(options);
 
   let id = Components.ID("{fbfae60b-64a4-44ef-a911-08ceb70b9f31}");
-  let cid = "@mozilla.org/xre/app-info;1";
+  let contractid = "@mozilla.org/xre/app-info;1";
   let registrar = Components.manager.QueryInterface(Ci.nsIComponentRegistrar);
 
   // Unregister an existing factory if one exists.
   try {
-    let existing = Components.manager.getClassObjectByContractID(cid, Ci.nsIFactory);
+    let existing = Components.manager.getClassObjectByContractID(contractid, Ci.nsIFactory);
     registrar.unregisterFactory(id, existing);
   } catch (ex) {}
 
   let factory = {
     createInstance(outer, iid) {
       if (outer != null) {
         throw Cr.NS_ERROR_NO_AGGREGATION;
       }
 
       return currentAppInfo.QueryInterface(iid);
     },
   };
 
-  registrar.registerFactory(id, "XULAppInfo", cid, factory);
-
-  // Ensure that Cc actually maps cid to the new shim AppInfo. This is
-  // needed when JSM global sharing is enabled, because some prior
-  // code may already have looked up |Cc[cid]|.
-  Cc.initialize(Cc[cid], cid);
+  registrar.registerFactory(id, "XULAppInfo", contractid, factory);
 };
--- a/toolkit/components/satchel/FormHistoryStartup.js
+++ b/toolkit/components/satchel/FormHistoryStartup.js
@@ -11,17 +11,16 @@ ChromeUtils.defineModuleGetter(this, "Fo
 function FormHistoryStartup() { }
 
 FormHistoryStartup.prototype = {
   classID: Components.ID("{3A0012EB-007F-4BB8-AA81-A07385F77A25}"),
 
   QueryInterface: ChromeUtils.generateQI([
     Ci.nsIObserver,
     Ci.nsISupportsWeakReference,
-    Ci.nsIFrameMessageListener,
   ]),
 
   observe(subject, topic, data) {
     switch (topic) {
       case "nsPref:changed":
         FormHistory.updatePrefs();
         break;
       case "idle-daily":
--- a/toolkit/components/search/tests/xpcshell/head_search.js
+++ b/toolkit/components/search/tests/xpcshell/head_search.js
@@ -20,18 +20,17 @@ const MODE_RDONLY = FileUtils.MODE_RDONL
 const MODE_WRONLY = FileUtils.MODE_WRONLY;
 const MODE_CREATE = FileUtils.MODE_CREATE;
 const MODE_TRUNCATE = FileUtils.MODE_TRUNCATE;
 
 const CACHE_FILENAME = "search.json.mozlz4";
 
 // nsSearchService.js uses Services.appinfo.name to build a salt for a hash.
 // eslint-disable-next-line mozilla/use-services
-var XULRuntime = Components.classesByID["{95d89e3e-a169-41a3-8e56-719978e15b12}"]
-                           .getService(Ci.nsIXULRuntime);
+var XULRuntime = Cc["@mozilla.org/xre/runtime;1"].getService(Ci.nsIXULRuntime);
 
 var isChild = XULRuntime.processType == XULRuntime.PROCESS_TYPE_CONTENT;
 
 updateAppInfo({
   name: "XPCShell",
   ID: "xpcshell@test.mozilla.org",
   version: "5",
   platformVersion: "1.9",
--- a/toolkit/content/widgets/tree.js
+++ b/toolkit/content/widgets/tree.js
@@ -2,16 +2,173 @@
   * 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/. */
 
   "use strict";
 
   // This is loaded into all XUL windows. Wrap in a block to prevent
   // leaking to window scope.
   {
+  class MozTreeChildren extends MozElements.BaseControl {
+    constructor() {
+      super();
+
+      /**
+       * If there is no modifier key, we select on mousedown, not
+       * click, so that drags work correctly.
+       */
+      this.addEventListener("mousedown", (event) => {
+        if (this.parentNode.disabled)
+          return;
+        if (((!event.getModifierState("Accel") ||
+              !this.parentNode.pageUpOrDownMovesSelection) &&
+            !event.shiftKey && !event.metaKey) ||
+          this.parentNode.view.selection.single) {
+          var b = this.parentNode.treeBoxObject;
+          var cell = b.getCellAt(event.clientX, event.clientY);
+          var view = this.parentNode.view;
+
+          // save off the last selected row
+          this._lastSelectedRow = cell.row;
+
+          if (cell.row == -1)
+            return;
+
+          if (cell.childElt == "twisty")
+            return;
+
+          if (cell.col && event.button == 0) {
+            if (cell.col.cycler) {
+              view.cycleCell(cell.row, cell.col);
+              return;
+            } else if (cell.col.type == window.TreeColumn.TYPE_CHECKBOX) {
+              if (this.parentNode.editable && cell.col.editable &&
+                view.isEditable(cell.row, cell.col)) {
+                var value = view.getCellValue(cell.row, cell.col);
+                value = value == "true" ? "false" : "true";
+                view.setCellValue(cell.row, cell.col, value);
+                return;
+              }
+            }
+          }
+
+          if (!view.selection.isSelected(cell.row)) {
+            view.selection.select(cell.row);
+            b.ensureRowIsVisible(cell.row);
+          }
+        }
+      });
+
+      /**
+       * On a click (up+down on the same item), deselect everything
+       * except this item.
+       */
+      this.addEventListener("click", (event) => {
+        if (event.button != 0) { return; }
+        if (this.parentNode.disabled)
+          return;
+        var b = this.parentNode.treeBoxObject;
+        var cell = b.getCellAt(event.clientX, event.clientY);
+        var view = this.parentNode.view;
+
+        if (cell.row == -1)
+          return;
+
+        if (cell.childElt == "twisty") {
+          if (view.selection.currentIndex >= 0 &&
+            view.isContainerOpen(cell.row)) {
+            var parentIndex = view.getParentIndex(view.selection.currentIndex);
+            while (parentIndex >= 0 && parentIndex != cell.row)
+              parentIndex = view.getParentIndex(parentIndex);
+            if (parentIndex == cell.row) {
+              var parentSelectable = true;
+              if (parentSelectable)
+                view.selection.select(parentIndex);
+            }
+          }
+          this.parentNode.changeOpenState(cell.row);
+          return;
+        }
+
+        if (!view.selection.single) {
+          var augment = event.getModifierState("Accel");
+          if (event.shiftKey) {
+            view.selection.rangedSelect(-1, cell.row, augment);
+            b.ensureRowIsVisible(cell.row);
+            return;
+          }
+          if (augment) {
+            view.selection.toggleSelect(cell.row);
+            b.ensureRowIsVisible(cell.row);
+            view.selection.currentIndex = cell.row;
+            return;
+          }
+        }
+
+        /* We want to deselect all the selected items except what was
+          clicked, UNLESS it was a right-click.  We have to do this
+          in click rather than mousedown so that you can drag a
+          selected group of items */
+
+        if (!cell.col) return;
+
+        // if the last row has changed in between the time we
+        // mousedown and the time we click, don't fire the select handler.
+        // see bug #92366
+        if (!cell.col.cycler && this._lastSelectedRow == cell.row &&
+          cell.col.type != window.TreeColumn.TYPE_CHECKBOX) {
+          view.selection.select(cell.row);
+          b.ensureRowIsVisible(cell.row);
+        }
+      });
+
+      /**
+       * double-click
+       */
+      this.addEventListener("dblclick", (event) => {
+        if (this.parentNode.disabled)
+          return;
+        var tbo = this.parentNode.treeBoxObject;
+        var view = this.parentNode.view;
+        var row = view.selection.currentIndex;
+
+        if (row == -1)
+          return;
+
+        var cell = tbo.getCellAt(event.clientX, event.clientY);
+
+        if (cell.childElt != "twisty") {
+          view.selection.currentColumn = cell.col;
+          this.parentNode.startEditing(row, cell.col);
+        }
+
+        if (this.parentNode._editingColumn || !view.isContainer(row))
+          return;
+
+        // Cyclers and twisties respond to single clicks, not double clicks
+        if (cell.col && !cell.col.cycler && cell.childElt != "twisty")
+          this.parentNode.changeOpenState(row);
+      });
+
+    }
+
+    connectedCallback() {
+      if (this.delayConnectedCallback()) {
+        return;
+      }
+
+      this._lastSelectedRow = -1;
+
+      if ("_ensureColumnOrder" in this.parentNode)
+        this.parentNode._ensureColumnOrder();
+
+    }
+  }
+
+  customElements.define("treechildren", MozTreeChildren);
 
   class MozTreecol extends MozElements.BaseControl {
     static get observedAttributes() {
       return [
         "label",
         "sortdirection",
         "hideheader",
         "crop",
--- a/toolkit/content/widgets/tree.xml
+++ b/toolkit/content/widgets/tree.xml
@@ -967,167 +967,16 @@
           else if (event.detail == 0)
             tree.removeAttribute("hidevscroll");
           event.stopPropagation();
         ]]>
       </handler>
     </handlers>
   </binding>
 
-  <binding id="treebody" extends="chrome://global/content/bindings/general.xml#basecontrol">
-    <implementation>
-      <constructor>
-        if ("_ensureColumnOrder" in this.parentNode)
-          this.parentNode._ensureColumnOrder();
-      </constructor>
-
-      <field name="_lastSelectedRow">
-        -1
-      </field>
-    </implementation>
-    <handlers>
-      <!-- If there is no modifier key, we select on mousedown, not
-           click, so that drags work correctly. -->
-      <handler event="mousedown" clickcount="1">
-      <![CDATA[
-         if (this.parentNode.disabled)
-           return;
-         if (((!event.getModifierState("Accel") ||
-             !this.parentNode.pageUpOrDownMovesSelection) &&
-             !event.shiftKey && !event.metaKey) ||
-             this.parentNode.view.selection.single) {
-           var b = this.parentNode.treeBoxObject;
-           var cell = b.getCellAt(event.clientX, event.clientY);
-           var view = this.parentNode.view;
-
-           // save off the last selected row
-           this._lastSelectedRow = cell.row;
-
-           if (cell.row == -1)
-             return;
-
-           if (cell.childElt == "twisty")
-             return;
-
-           if (cell.col && event.button == 0) {
-             if (cell.col.cycler) {
-               view.cycleCell(cell.row, cell.col);
-               return;
-             } else if (cell.col.type == window.TreeColumn.TYPE_CHECKBOX) {
-               if (this.parentNode.editable && cell.col.editable &&
-                   view.isEditable(cell.row, cell.col)) {
-                 var value = view.getCellValue(cell.row, cell.col);
-                 value = value == "true" ? "false" : "true";
-                 view.setCellValue(cell.row, cell.col, value);
-                 return;
-               }
-             }
-           }
-
-           if (!view.selection.isSelected(cell.row)) {
-             view.selection.select(cell.row);
-             b.ensureRowIsVisible(cell.row);
-           }
-         }
-      ]]>
-      </handler>
-
-      <!-- On a click (up+down on the same item), deselect everything
-           except this item. -->
-      <handler event="click" button="0" clickcount="1">
-      <![CDATA[
-        if (this.parentNode.disabled)
-          return;
-        var b = this.parentNode.treeBoxObject;
-        var cell = b.getCellAt(event.clientX, event.clientY);
-        var view = this.parentNode.view;
-
-        if (cell.row == -1)
-          return;
-
-        if (cell.childElt == "twisty") {
-          if (view.selection.currentIndex >= 0 &&
-              view.isContainerOpen(cell.row)) {
-            var parentIndex = view.getParentIndex(view.selection.currentIndex);
-            while (parentIndex >= 0 && parentIndex != cell.row)
-              parentIndex = view.getParentIndex(parentIndex);
-            if (parentIndex == cell.row) {
-              var parentSelectable = true;
-              if (parentSelectable)
-                view.selection.select(parentIndex);
-            }
-          }
-          this.parentNode.changeOpenState(cell.row);
-          return;
-        }
-
-        if (!view.selection.single) {
-          var augment = event.getModifierState("Accel");
-          if (event.shiftKey) {
-            view.selection.rangedSelect(-1, cell.row, augment);
-            b.ensureRowIsVisible(cell.row);
-            return;
-          }
-          if (augment) {
-            view.selection.toggleSelect(cell.row);
-            b.ensureRowIsVisible(cell.row);
-            view.selection.currentIndex = cell.row;
-            return;
-          }
-        }
-
-        /* We want to deselect all the selected items except what was
-          clicked, UNLESS it was a right-click.  We have to do this
-          in click rather than mousedown so that you can drag a
-          selected group of items */
-
-        if (!cell.col) return;
-
-        // if the last row has changed in between the time we
-        // mousedown and the time we click, don't fire the select handler.
-        // see bug #92366
-        if (!cell.col.cycler && this._lastSelectedRow == cell.row &&
-            cell.col.type != window.TreeColumn.TYPE_CHECKBOX) {
-          view.selection.select(cell.row);
-          b.ensureRowIsVisible(cell.row);
-        }
-      ]]>
-      </handler>
-
-      <!-- double-click -->
-      <handler event="click" clickcount="2">
-      <![CDATA[
-        if (this.parentNode.disabled)
-          return;
-        var tbo = this.parentNode.treeBoxObject;
-        var view = this.parentNode.view;
-        var row = view.selection.currentIndex;
-
-        if (row == -1)
-          return;
-
-        var cell = tbo.getCellAt(event.clientX, event.clientY);
-
-        if (cell.childElt != "twisty") {
-          view.selection.currentColumn = cell.col;
-          this.parentNode.startEditing(row, cell.col);
-        }
-
-        if (this.parentNode._editingColumn || !view.isContainer(row))
-          return;
-
-        // Cyclers and twisties respond to single clicks, not double clicks
-        if (cell.col && !cell.col.cycler && cell.childElt != "twisty")
-          this.parentNode.changeOpenState(row);
-      ]]>
-      </handler>
-
-    </handlers>
-  </binding>
-
   <binding id="columnpicker" display="xul:button"
            extends="chrome://global/content/bindings/general.xml#basecontrol">
     <content>
       <xul:image class="tree-columnpicker-icon"/>
       <xul:menupopup anonid="popup">
         <xul:menuseparator anonid="menuseparator"/>
         <xul:menuitem anonid="menuitem" label="&restoreColumnOrder.label;"/>
       </xul:menupopup>
--- a/toolkit/content/xul.css
+++ b/toolkit/content/xul.css
@@ -443,17 +443,16 @@ treecols {
 }
 
 treecol {
   -moz-box-ordinal-group: 2147483646;
 }
 
 tree > treechildren {
   display: -moz-box;
-  -moz-binding: url("chrome://global/content/bindings/tree.xml#treebody");
   -moz-user-select: none;
   -moz-box-flex: 1;
 }
 
 treerows {
   -moz-binding: url("chrome://global/content/bindings/tree.xml#treerows");
 }
 
--- a/xpcom/ds/nsArray.cpp
+++ b/xpcom/ds/nsArray.cpp
@@ -2,17 +2,16 @@
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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 "nsArray.h"
 #include "nsArrayEnumerator.h"
 #include "nsThreadUtils.h"
-#include "xpcjsid.h"
 
 NS_INTERFACE_MAP_BEGIN(nsArray)
   NS_INTERFACE_MAP_ENTRY(nsIArray)
   NS_INTERFACE_MAP_ENTRY(nsIArrayExtensions)
   NS_INTERFACE_MAP_ENTRY(nsIMutableArray)
   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIMutableArray)
 NS_INTERFACE_MAP_END
 
@@ -75,21 +74,21 @@ nsArrayBase::IndexOf(uint32_t aStartInde
     return NS_ERROR_FAILURE;
   }
 
   *aResult = static_cast<uint32_t>(idx);
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsArrayBase::ScriptedEnumerate(nsIJSIID* aElemIID, uint8_t aArgc,
+nsArrayBase::ScriptedEnumerate(const nsIID& aElemIID, uint8_t aArgc,
                                nsISimpleEnumerator** aResult)
 {
-  if (aArgc > 0 && aElemIID) {
-    return NS_NewArrayEnumerator(aResult, static_cast<nsIArray*>(this), *aElemIID->GetID());
+  if (aArgc > 0) {
+    return NS_NewArrayEnumerator(aResult, static_cast<nsIArray*>(this), aElemIID);
   }
   return NS_NewArrayEnumerator(aResult, static_cast<nsIArray*>(this));
 }
 
 
 NS_IMETHODIMP
 nsArrayBase::EnumerateImpl(const nsID& aElemIID, nsISimpleEnumerator** aResult)
 {
--- a/xpcom/ds/nsIArray.idl
+++ b/xpcom/ds/nsIArray.idl
@@ -1,16 +1,15 @@
 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
 /* 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 "nsISupports.idl"
 
-interface nsIJSIID;
 interface nsISimpleEnumerator;
 
 /**
  * nsIArray
  *
  * An indexed collection of elements. Provides basic functionality for
  * retrieving elements at a specific position, searching for
  * elements. Indexes are zero-based, such that the last element in the
@@ -43,38 +42,38 @@ interface nsIArray : nsISupports
     readonly attribute unsigned long length;
 
     /**
      * queryElementAt()
      *
      * Retrieve a specific element of the array, and QueryInterface it
      * to the specified interface. null is a valid result for
      * this method, but exceptions are thrown in other circumstances
-     * 
+     *
      * @param index position of element
      * @param uuid the IID of the requested interface
      * @param result the object, QI'd to the requested interface
      *
      * @throws NS_ERROR_NO_INTERFACE when an entry exists at the
      *         specified index, but the requested interface is not
      *         available.
      * @throws NS_ERROR_ILLEGAL_VALUE when index > length-1
      *
      */
     void queryElementAt(in unsigned long index,
                         in nsIIDRef uuid,
                         [iid_is(uuid), retval] out nsQIResult result);
-    
+
     /**
      * indexOf()
-     * 
+     *
      * Get the position of a specific element. Note that since null is
      * a valid input, exceptions are used to indicate that an element
      * is not found.
-     * 
+     *
      * @param startIndex The initial element to search in the array
      *                   To start at the beginning, use 0 as the
      *                   startIndex
      * @param element    The element you are looking for
      * @returns a number >= startIndex which is the position of the
      *          element in the array.
      * @throws NS_ERROR_FAILURE if the element was not in the array.
      */
@@ -84,17 +83,17 @@ interface nsIArray : nsISupports
     /**
      * enumerate the array
      *
      * @returns a new enumerator positioned at the start of the array
      * @throws NS_ERROR_FAILURE if the array is empty (to make it easy
      *         to detect errors), or NS_ERROR_OUT_OF_MEMORY if out of memory.
      */
     [binaryname(ScriptedEnumerate), optional_argc]
-    nsISimpleEnumerator enumerate([optional] in nsIJSIID aElemIID);
+    nsISimpleEnumerator enumerate([optional] in nsIIDRef aElemIID);
 
     [noscript]
     nsISimpleEnumerator enumerateImpl(in nsIDRef aElemIID);
 
     %{C++
     nsresult
     Enumerate(nsISimpleEnumerator** aRetVal, const nsID& aElemIID = NS_GET_IID(nsISupports))
     {
deleted file mode 100644
--- a/xpcom/tests/unit/test_bug656331.js
+++ /dev/null
@@ -1,36 +0,0 @@
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-
-/* global registerAppManifest */
-
-function info(s) {
-  dump("TEST-INFO | test_bug656331.js | " + s + "\n");
-}
-
-var gMessageExpected = /Native module.*has version 3.*expected/;
-var gFound = false;
-
-const kConsoleListener = {
-  QueryInterface: ChromeUtils.generateQI([Ci.nsIConsoleListener]),
-
-  observe: function listener_observe(message) {
-    if (gMessageExpected.test(message.message))
-      gFound = true;
-  },
-};
-
-function run_test() {
-  Services.console.registerListener(kConsoleListener);
-
-  let manifest = do_get_file("components/bug656331.manifest");
-  registerAppManifest(manifest);
-
-  Assert.equal(false, "{f18fb09b-28b4-4435-bc5b-8027f18df743}" in Components.classesByID);
-
-  do_test_pending();
-  Services.tm.dispatchToMainThread(function() {
-    Services.console.unregisterListener(kConsoleListener);
-    Assert.ok(gFound);
-    do_test_finished();
-  });
-}