Bug 1480245, part 3 - Remove always-true nsXPTInterfaceInfo::EnsureResolved(). r=nika
authorAdrian Wielgosik <adrian.wielgosik@gmail.com>
Wed, 24 Oct 2018 17:39:47 +0000
changeset 491310 8d3ccc933550a677ecf201e688010fee2170800d
parent 491309 cd5d392de5314c0cd3aa82571d96a4d03853e987
child 491311 0248f5aff651af4b8138843a6eb16b6a67ba80e2
push id247
push userfmarier@mozilla.com
push dateSat, 27 Oct 2018 01:06:44 +0000
reviewersnika
bugs1480245
milestone65.0a1
Bug 1480245, part 3 - Remove always-true nsXPTInterfaceInfo::EnsureResolved(). r=nika Differential Revision: https://phabricator.services.mozilla.com/D9645
xpcom/reflect/xptcall/xptcall.cpp
xpcom/reflect/xptinfo/xptinfo.h
--- a/xpcom/reflect/xptcall/xptcall.cpp
+++ b/xpcom/reflect/xptcall/xptcall.cpp
@@ -38,18 +38,19 @@ nsXPTCStubBase::Release()
 EXPORT_XPCOM_API(nsresult)
 NS_GetXPTCallStub(REFNSIID aIID, nsIXPTCProxy* aOuter,
                   nsISomeInterface* *aResult)
 {
     if (NS_WARN_IF(!aOuter) || NS_WARN_IF(!aResult))
         return NS_ERROR_INVALID_ARG;
 
     const nsXPTInterfaceInfo* iie = nsXPTInterfaceInfo::ByIID(aIID);
-    if (!iie || !iie->EnsureResolved() || iie->IsBuiltinClass())
+    if (!iie || iie->IsBuiltinClass()) {
         return NS_ERROR_FAILURE;
+    }
 
     *aResult = new nsXPTCStubBase(aOuter, iie);
     return NS_OK;
 }
 
 EXPORT_XPCOM_API(void)
 NS_DestroyXPTCallStub(nsISomeInterface* aStub)
 {
--- a/xpcom/reflect/xptinfo/xptinfo.h
+++ b/xpcom/reflect/xptinfo/xptinfo.h
@@ -101,18 +101,16 @@ struct nsXPTInterfaceInfo
   uint16_t MethodCount() const { return mNumMethods; }
   const nsXPTMethodInfo& Method(uint16_t aIndex) const;
 
   nsresult GetMethodInfo(uint16_t aIndex, const nsXPTMethodInfo** aInfo) const;
   nsresult GetConstant(uint16_t aIndex,
                        JS::MutableHandleValue constant,
                        char** aName) const;
 
-  bool EnsureResolved() const { return true; } // XXX: Remove (bug 1480245)
-
   ////////////////////////////////////////////////////////////////
   // Ensure these fields are in the same order as xptcodegen.py //
   ////////////////////////////////////////////////////////////////
 
   nsID mIID;
   uint32_t mName; // Index into xpt::detail::sStrings
 
   uint16_t mParent : 14;