Backed out 3 changesets (bug 1686229) for causing failure on test_ThirdPartyModulesPing.js.
authorButkovits Atila <abutkovits@mozilla.com>
Fri, 22 Jan 2021 22:56:05 +0200
changeset 564355 56664dad9df0315c0841f8d9009aad7da2240168
parent 564354 62050554681e52fed4d6d2e924c0a3795f07d2e4
child 564356 4872fa27a5a404abf3fc339ca5d32bd0a207afff
push id134804
push userabutkovits@mozilla.com
push dateFri, 22 Jan 2021 20:58:20 +0000
treeherderautoland@4872fa27a5a4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1686229
milestone86.0a1
backs outf8a9c1efddec9b6f8b157999d0a427277ea16435
a839d56cb6783575bce20afeb93987cfe656c3b7
1878295822f44ec2d5d20a694eba979321e64a6a
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out 3 changesets (bug 1686229) for causing failure on test_ThirdPartyModulesPing.js. Backed out changeset f8a9c1efddec (bug 1686229) Backed out changeset a839d56cb678 (bug 1686229) Backed out changeset 1878295822f4 (bug 1686229)
browser/app/winlauncher/freestanding/DllBlocklist.cpp
browser/app/winlauncher/freestanding/ModuleLoadFrame.cpp
browser/app/winlauncher/freestanding/ModuleLoadFrame.h
mozglue/dllservices/LoaderObserver.cpp
mozglue/dllservices/ModuleLoadInfo.h
toolkit/components/telemetry/docs/data/third-party-modules-ping.rst
toolkit/components/telemetry/other/UntrustedModulesDataSerializer.cpp
toolkit/components/telemetry/tests/unit/test_ThirdPartyModulesPing.js
toolkit/content/aboutSupport.js
toolkit/locales/en-US/toolkit/about/aboutSupport.ftl
toolkit/xre/UntrustedModulesData.cpp
toolkit/xre/UntrustedModulesData.h
toolkit/xre/test/gtest/TestUntrustedModules.cpp
--- a/browser/app/winlauncher/freestanding/DllBlocklist.cpp
+++ b/browser/app/winlauncher/freestanding/DllBlocklist.cpp
@@ -432,51 +432,38 @@ NTSTATUS NTAPI patched_NtMapViewOfSectio
             : BlockAction::Allow;
   } else {
     // Check blocklist
     blockAction = DetermineBlockAction(
         leafOnStack, *aBaseAddress,
         resultView.isOk() ? &resultView.inspect()->mK32Exports : nullptr);
   }
 
-  ModuleLoadInfo::Status loadStatus = ModuleLoadInfo::Status::Blocked;
-
-  switch (blockAction) {
-    case BlockAction::Allow:
-      loadStatus = ModuleLoadInfo::Status::Loaded;
-      break;
-
-    case BlockAction::NoOpEntryPoint:
-      loadStatus = ModuleLoadInfo::Status::Redirected;
-      break;
-
-    case BlockAction::SubstituteLSP:
-      // The process heap needs to be available here because
-      // NotifyLSPSubstitutionRequired below copies a given string into
-      // the heap. We use a soft assert here, assuming LSP load always
-      // occurs after the heap is initialized.
-      MOZ_ASSERT(nt::RtlGetProcessHeap());
-
-      // Notify patched_LdrLoadDll that it will be necessary to perform
-      // a substitution before returning.
-      ModuleLoadFrame::NotifyLSPSubstitutionRequired(&leafOnStack);
-      break;
-
-    default:
-      break;
+  if (blockAction == BlockAction::Allow) {
+    if (nt::RtlGetProcessHeap()) {
+      ModuleLoadFrame::NotifySectionMap(
+          nt::AllocatedUnicodeString(sectionFileName), *aBaseAddress,
+          stubStatus);
+    }
+    return stubStatus;
   }
 
-  if (nt::RtlGetProcessHeap()) {
-    ModuleLoadFrame::NotifySectionMap(
-        nt::AllocatedUnicodeString(sectionFileName), *aBaseAddress, stubStatus,
-        loadStatus);
+  if (blockAction == BlockAction::SubstituteLSP) {
+    // The process heap needs to be available here because
+    // NotifyLSPSubstitutionRequired below copies a given string into the heap.
+    // We use a soft assert here, assuming LSP load always occurs after the heap
+    // is initialized.
+    MOZ_ASSERT(nt::RtlGetProcessHeap());
+
+    // Notify patched_LdrLoadDll that it will be necessary to perform a
+    // substitution before returning.
+    ModuleLoadFrame::NotifyLSPSubstitutionRequired(&leafOnStack);
   }
 
-  if (loadStatus == ModuleLoadInfo::Status::Loaded ||
-      loadStatus == ModuleLoadInfo::Status::Redirected) {
+  if (blockAction == BlockAction::NoOpEntryPoint) {
     return stubStatus;
   }
 
   ::NtUnmapViewOfSection(aProcess, *aBaseAddress);
   return STATUS_ACCESS_DENIED;
 }
 
 }  // namespace freestanding
--- a/browser/app/winlauncher/freestanding/ModuleLoadFrame.cpp
+++ b/browser/app/winlauncher/freestanding/ModuleLoadFrame.cpp
@@ -19,23 +19,22 @@ ModuleLoadFrame::ModuleLoadFrame(PCUNICO
       mLoadInfo(aRequestedDllName) {
   EnsureInitialized();
   sTopFrame.set(this);
 
   gLoaderPrivateAPI.NotifyBeginDllLoad(mLoadInfo, &mContext, aRequestedDllName);
 }
 
 ModuleLoadFrame::ModuleLoadFrame(nt::AllocatedUnicodeString&& aSectionName,
-                                 const void* aMapBaseAddr, NTSTATUS aNtStatus,
-                                 ModuleLoadInfo::Status aLoadStatus)
+                                 const void* aMapBaseAddr, NTSTATUS aNtStatus)
     : mPrev(sTopFrame.get()),
       mContext(nullptr),
       mLSPSubstitutionRequired(false),
       mLoadNtStatus(aNtStatus),
-      mLoadInfo(std::move(aSectionName), aMapBaseAddr, aLoadStatus) {
+      mLoadInfo(std::move(aSectionName), aMapBaseAddr) {
   sTopFrame.set(this);
 
   gLoaderPrivateAPI.NotifyBeginDllLoad(&mContext, mLoadInfo.mSectionName);
 }
 
 ModuleLoadFrame::~ModuleLoadFrame() {
   gLoaderPrivateAPI.NotifyEndDllLoad(mContext, mLoadNtStatus,
                                      std::move(mLoadInfo));
@@ -65,61 +64,55 @@ void ModuleLoadFrame::SetLSPSubstitution
   // SubstituteForLSP
   mLoadInfo.mRequestedDllName = aLeafName;
   mLSPSubstitutionRequired = true;
 }
 
 /* static */
 void ModuleLoadFrame::NotifySectionMap(
     nt::AllocatedUnicodeString&& aSectionName, const void* aMapBaseAddr,
-    NTSTATUS aMapNtStatus, ModuleLoadInfo::Status aLoadStatus) {
+    NTSTATUS aMapNtStatus) {
   ModuleLoadFrame* topFrame = sTopFrame.get();
   if (!topFrame) {
     // The only time that this data is useful is during initial mapping of
     // the executable's dependent DLLs. If mozglue is present then
     // IsDefaultObserver will return false, indicating that we are beyond
     // initial process startup.
     if (gLoaderPrivateAPI.IsDefaultObserver()) {
-      OnBareSectionMap(std::move(aSectionName), aMapBaseAddr, aMapNtStatus,
-                       aLoadStatus);
+      OnBareSectionMap(std::move(aSectionName), aMapBaseAddr, aMapNtStatus);
     }
     return;
   }
 
-  topFrame->OnSectionMap(std::move(aSectionName), aMapBaseAddr, aMapNtStatus,
-                         aLoadStatus);
+  topFrame->OnSectionMap(std::move(aSectionName), aMapBaseAddr, aMapNtStatus);
 }
 
 /* static */
 bool ModuleLoadFrame::ExistsTopFrame() { return !!sTopFrame.get(); }
 
 void ModuleLoadFrame::OnSectionMap(nt::AllocatedUnicodeString&& aSectionName,
                                    const void* aMapBaseAddr,
-                                   NTSTATUS aMapNtStatus,
-                                   ModuleLoadInfo::Status aLoadStatus) {
+                                   NTSTATUS aMapNtStatus) {
   if (mLoadInfo.mBaseAddr) {
     // If mBaseAddr is not null then |this| has already seen a module load. This
     // means that we are witnessing a bare section map.
-    OnBareSectionMap(std::move(aSectionName), aMapBaseAddr, aMapNtStatus,
-                     aLoadStatus);
+    OnBareSectionMap(std::move(aSectionName), aMapBaseAddr, aMapNtStatus);
     return;
   }
 
   mLoadInfo.mSectionName = std::move(aSectionName);
   mLoadInfo.mBaseAddr = aMapBaseAddr;
-  mLoadInfo.mStatus = aLoadStatus;
 }
 
 /* static */
 void ModuleLoadFrame::OnBareSectionMap(
     nt::AllocatedUnicodeString&& aSectionName, const void* aMapBaseAddr,
-    NTSTATUS aMapNtStatus, ModuleLoadInfo::Status aLoadStatus) {
+    NTSTATUS aMapNtStatus) {
   // We call the special constructor variant that is used for bare mappings.
-  ModuleLoadFrame frame(std::move(aSectionName), aMapBaseAddr, aMapNtStatus,
-                        aLoadStatus);
+  ModuleLoadFrame frame(std::move(aSectionName), aMapBaseAddr, aMapNtStatus);
 }
 
 NTSTATUS ModuleLoadFrame::SetLoadStatus(NTSTATUS aNtStatus,
                                         PHANDLE aOutHandle) {
   mLoadNtStatus = aNtStatus;
 
   if (!mLSPSubstitutionRequired) {
     return aNtStatus;
--- a/browser/app/winlauncher/freestanding/ModuleLoadFrame.h
+++ b/browser/app/winlauncher/freestanding/ModuleLoadFrame.h
@@ -31,18 +31,17 @@ class MOZ_RAII ModuleLoadFrame final {
   ~ModuleLoadFrame();
 
   static void NotifyLSPSubstitutionRequired(PCUNICODE_STRING aLeafName);
 
   /**
    * This static method is called by the NtMapViewOfSection hook.
    */
   static void NotifySectionMap(nt::AllocatedUnicodeString&& aSectionName,
-                               const void* aMapBaseAddr, NTSTATUS aMapNtStatus,
-                               ModuleLoadInfo::Status aLoadStatus);
+                               const void* aMapBaseAddr, NTSTATUS aMapNtStatus);
   static bool ExistsTopFrame();
 
   /**
    * Called by the LdrLoadDll hook to indicate the status of the load and for
    * us to provide a substitute output handle if necessary.
    */
   NTSTATUS SetLoadStatus(NTSTATUS aNtStatus, PHANDLE aOutHandle);
 
@@ -51,32 +50,29 @@ class MOZ_RAII ModuleLoadFrame final {
   ModuleLoadFrame& operator=(const ModuleLoadFrame&) = delete;
   ModuleLoadFrame& operator=(ModuleLoadFrame&&) = delete;
 
  private:
   /**
    * Called by OnBareSectionMap to construct a frame for a bare load.
    */
   ModuleLoadFrame(nt::AllocatedUnicodeString&& aSectionName,
-                  const void* aMapBaseAddr, NTSTATUS aNtStatus,
-                  ModuleLoadInfo::Status aLoadStatus);
+                  const void* aMapBaseAddr, NTSTATUS aNtStatus);
 
   void SetLSPSubstitutionRequired(PCUNICODE_STRING aLeafName);
   void OnSectionMap(nt::AllocatedUnicodeString&& aSectionName,
-                    const void* aMapBaseAddr, NTSTATUS aMapNtStatus,
-                    ModuleLoadInfo::Status aLoadStatus);
+                    const void* aMapBaseAddr, NTSTATUS aMapNtStatus);
 
   /**
    * A "bare" section mapping is one that was mapped without the code passing
    * through a call to ntdll!LdrLoadDll. This method is invoked when we detect
    * that condition.
    */
   static void OnBareSectionMap(nt::AllocatedUnicodeString&& aSectionName,
-                               const void* aMapBaseAddr, NTSTATUS aMapNtStatus,
-                               ModuleLoadInfo::Status aLoadStatus);
+                               const void* aMapBaseAddr, NTSTATUS aMapNtStatus);
 
  private:
   // Link to the previous frame
   ModuleLoadFrame* mPrev;
   // Pointer to context managed by the nt::LoaderObserver implementation
   void* mContext;
   // Set to |true| when we need to block a WinSock LSP
   bool mLSPSubstitutionRequired;
--- a/mozglue/dllservices/LoaderObserver.cpp
+++ b/mozglue/dllservices/LoaderObserver.cpp
@@ -69,20 +69,17 @@ void LoaderObserver::OnEndDllLoad(void* 
     ProfilerLabelEnd(loadContext->mProfilerLabel);
     BASE_PROFILER_MARKER_TEXT(
         "DllLoad", OTHER,
         MarkerTiming::IntervalUntilNowFrom(loadContext->mStartTime),
         mozilla::ProfilerString8View::WrapNullTerminatedString(
             loadContext->mDynamicStringStorage.get()));
   }
 
-  // We want to record a denied DLL load regardless of |aNtStatus| because
-  // |aNtStatus| is set to access-denied when DLL load was blocked.
-  if ((!NT_SUCCESS(aNtStatus) && !aModuleLoadInfo.WasDenied()) ||
-      !aModuleLoadInfo.WasMapped()) {
+  if (!NT_SUCCESS(aNtStatus) || !aModuleLoadInfo.WasMapped()) {
     return;
   }
 
   {  // Scope for lock
     AutoSharedLock lock(gDllServicesLock);
     if (gDllServices) {
       gDllServices->DispatchDllLoadNotification(std::move(aModuleLoadInfo));
       return;
--- a/mozglue/dllservices/ModuleLoadInfo.h
+++ b/mozglue/dllservices/ModuleLoadInfo.h
@@ -9,25 +9,16 @@
 
 #include "mozilla/NativeNt.h"
 #include "mozilla/Vector.h"
 #include "mozilla/Unused.h"
 
 namespace mozilla {
 
 struct ModuleLoadInfo final {
-  // If you add a new value or change the meaning of the values, please
-  // update createLoadStatusElement in aboutSupport.js accordingly, which
-  // defines text labels of these enum values displayed on about:support.
-  enum class Status : uint32_t {
-    Loaded = 0,
-    Blocked,
-    Redirected,
-  };
-
   // We do not provide these methods inside Gecko proper.
 #if !defined(MOZILLA_INTERNAL_API)
 
   /**
    * This constructor is for use by the LdrLoadDll hook.
    */
   explicit ModuleLoadInfo(PCUNICODE_STRING aRequestedDllName)
       : mLoadTimeInfo(),
@@ -43,22 +34,21 @@ struct ModuleLoadInfo final {
 
   /**
    * This constructor is used by the NtMapViewOfSection hook IF AND ONLY IF
    * the LdrLoadDll hook did not already construct a ModuleLoadInfo for the
    * current DLL load. This may occur while the loader is loading dependencies
    * of another library.
    */
   ModuleLoadInfo(nt::AllocatedUnicodeString&& aSectionName,
-                 const void* aBaseAddr, Status aLoadStatus)
+                 const void* aBaseAddr)
       : mLoadTimeInfo(),
         mThreadId(nt::RtlGetCurrentThreadId()),
         mSectionName(std::move(aSectionName)),
-        mBaseAddr(aBaseAddr),
-        mStatus(aLoadStatus) {
+        mBaseAddr(aBaseAddr) {
 #  if defined(IMPL_MFBT)
     ::QueryPerformanceCounter(&mBeginTimestamp);
 #  else
     ::RtlQueryPerformanceCounter(&mBeginTimestamp);
 #  endif  // defined(IMPL_MFBT)
   }
 
   /**
@@ -132,41 +122,31 @@ struct ModuleLoadInfo final {
 
   /**
    * Returns true for DLL loads where LdrLoadDll was called but
    * NtMapViewOfSection was not. This will happen for DLL requests where the DLL
    * was already mapped into memory by a previous request.
    */
   bool WasMapped() const { return !mSectionName.IsEmpty(); }
 
-  /**
-   * Returns true for DLL load which was denied by our blocklist.
-   */
-  bool WasDenied() const {
-    return mStatus == ModuleLoadInfo::Status::Blocked ||
-           mStatus == ModuleLoadInfo::Status::Redirected;
-  }
-
   // Timestamp for the creation of this event
   LARGE_INTEGER mBeginTimestamp;
   // Duration of the LdrLoadDll call
   LARGE_INTEGER mLoadTimeInfo;
   // Thread ID of this DLL load
   DWORD mThreadId;
   // The name requested of LdrLoadDll by its caller
   nt::AllocatedUnicodeString mRequestedDllName;
   // The name of the DLL that backs section that was mapped by the loader. This
   // string is the effective name of the DLL that was resolved by the loader's
   // path search algorithm.
   nt::AllocatedUnicodeString mSectionName;
   // The base address of the module's mapped section
   const void* mBaseAddr;
   // If the module was successfully loaded, stack trace of the DLL load request
   Vector<PVOID, 0, nt::RtlAllocPolicy> mBacktrace;
-  // The status of DLL load
-  Status mStatus;
 };
 
 using ModuleLoadInfoVec = Vector<ModuleLoadInfo, 0, nt::RtlAllocPolicy>;
 
 }  // namespace mozilla
 
 #endif  // mozilla_ModuleLoadInfo_h
--- a/toolkit/components/telemetry/docs/data/third-party-modules-ping.rst
+++ b/toolkit/components/telemetry/docs/data/third-party-modules-ping.rst
@@ -54,19 +54,17 @@ were loaded into Firefox processes.
                 "threadName": <string>,
                 // The sanitized name of the module that was requested by the invoking code. Only exists when it is different from resolvedDllName.
                 "requestedDllName": <string>,
                 // The base address to which the loader mapped the module.
                 "baseAddress": <string formatted as "0x%x">,
                 // Index of the element in the modules array that contains details about the module that was loaded during this event.
                 "moduleIndex": <int>,
                 // True if the module is included in the executable's Import Directory Table.
-                "isDependent": <bool>,
-                // The status of DLL load. This corresponds to enum ModuleLoadInfo::Status.
-                "loadStatus": <int>
+                "isDependent": <bool>
               },
               ... Additional events (maximum 50)
             ],
             "combinedStacks": [
               "memoryMap": [
                 [
                   // Name of the module symbol file, e.g. ``xul.pdb``
                   <string>,
--- a/toolkit/components/telemetry/other/UntrustedModulesDataSerializer.cpp
+++ b/toolkit/components/telemetry/other/UntrustedModulesDataSerializer.cpp
@@ -292,23 +292,16 @@ bool UntrustedModulesDataSerializer::Ser
 
   JS::RootedValue jsIsDependent(aCx);
   jsIsDependent.setBoolean(aEvent.mIsDependent);
   if (!JS_DefineProperty(aCx, obj, "isDependent", jsIsDependent,
                          JSPROP_ENUMERATE)) {
     return false;
   }
 
-  JS::RootedValue jsLoadStatus(aCx);
-  jsLoadStatus.setNumber(aEvent.mLoadStatus);
-  if (!JS_DefineProperty(aCx, obj, "loadStatus", jsLoadStatus,
-                         JSPROP_ENUMERATE)) {
-    return false;
-  }
-
   aElement.setObject(*obj);
 
   return true;
 }
 
 static nsDependentCString GetProcessTypeString(GeckoProcessType aType) {
   nsDependentCString strProcType;
   if (aType == GeckoProcessType_Default) {
--- a/toolkit/components/telemetry/tests/unit/test_ThirdPartyModulesPing.js
+++ b/toolkit/components/telemetry/tests/unit/test_ThirdPartyModulesPing.js
@@ -127,19 +127,16 @@ add_task(async function test_send_ping()
     Assert.ok(typeof event.baseAddress == "string", "'baseAddress' exists");
 
     Assert.ok(typeof event.moduleIndex == "number", "'moduleIndex' exists");
     Assert.ok(event.moduleIndex >= 0, "'moduleIndex' is non-negative");
 
     Assert.ok(typeof event.isDependent == "boolean", "'isDependent' exists");
     Assert.ok(!event.isDependent, "'isDependent' is false");
 
-    Assert.ok(typeof event.loadStatus == "number", "'loadStatus' exists");
-    Assert.ok(event.loadStatus, "'loadStatus' is 0 (Loaded)");
-
     let modRecord = found.payload.modules[event.moduleIndex];
     Assert.ok(modRecord, "module record for this event exists");
     Assert.ok(
       typeof modRecord.resolvedDllName == "string",
       "'resolvedDllName' exists"
     );
     Assert.ok(typeof modRecord.trustFlags == "number", "'trustFlags' exists");
 
--- a/toolkit/content/aboutSupport.js
+++ b/toolkit/content/aboutSupport.js
@@ -1184,26 +1184,16 @@ var snapshotFormatters = {
     }
 
     const createElementWithLabel = (tag, label) =>
       label
         ? $.new(tag, label)
         : $.new(tag, "", "", {
             "data-l10n-id": "support-third-party-modules-no-value",
           });
-    const createLoadStatusElement = (tag, status) => {
-      const labelLoadStatus = [
-        "support-third-party-modules-status-loaded",
-        "support-third-party-modules-status-blocked",
-        "support-third-party-modules-status-redirected",
-      ];
-      return status >= 0 && status < labelLoadStatus.length
-        ? $.new(tag, "", "", { "data-l10n-id": labelLoadStatus[status] })
-        : $.new(tag, status);
-    };
 
     const iconUp = "chrome://global/skin/icons/arrow-up-12.svg";
     const iconDown = "chrome://global/skin/icons/arrow-dropdown-12.svg";
     const iconFolder = "chrome://global/skin/icons/findFile.svg";
     const iconUnsigned =
       "chrome://global/skin/icons/connection-mixed-active-loaded.svg";
     const outerTHead = $("third-party-modules-thead");
     const outerTBody = $("third-party-modules-tbody");
@@ -1238,17 +1228,16 @@ var snapshotFormatters = {
           $.new("tr", [
             $.new("td", event.processIdAndType),
             createElementWithLabel("td", event.threadName),
             $.new("td", event.baseAddress),
             $.new("td", event.processUptimeMS),
             // loadDurationMS can be empty (not zero) when a module is loaded
             // very early in the process.  processUptimeMS always has a value.
             createElementWithLabel("td", event.loadDurationMS),
-            createLoadStatusElement("td", event.loadStatus),
           ])
         );
       }
 
       const detailRow = $.new(
         "tr",
         [
           $.new(
@@ -1266,19 +1255,16 @@ var snapshotFormatters = {
                     "data-l10n-id": "support-third-party-modules-base",
                   }),
                   $.new("th", "", "", {
                     "data-l10n-id": "support-third-party-modules-uptime",
                   }),
                   $.new("th", "", "", {
                     "data-l10n-id": "support-third-party-modules-duration",
                   }),
-                  $.new("th", "", "", {
-                    "data-l10n-id": "support-third-party-modules-status",
-                  }),
                 ]),
                 innerTBody,
               ]),
             ],
             "",
             { colspan: outerTHead.children.length + 1 }
           ),
         ],
--- a/toolkit/locales/en-US/toolkit/about/aboutSupport.ftl
+++ b/toolkit/locales/en-US/toolkit/about/aboutSupport.ftl
@@ -187,20 +187,16 @@ support-third-party-modules-module = Mod
 support-third-party-modules-version = File Version
 support-third-party-modules-vendor = Vendor Info
 support-third-party-modules-occurrence = Occurrence
 support-third-party-modules-process = Process Type & ID
 support-third-party-modules-thread = Thread
 support-third-party-modules-base = Imagebase Address
 support-third-party-modules-uptime = Process Uptime (ms)
 support-third-party-modules-duration = Loading Duration (ms)
-support-third-party-modules-status = Status
-support-third-party-modules-status-loaded = Loaded
-support-third-party-modules-status-blocked = Blocked
-support-third-party-modules-status-redirected = Redirected
 support-third-party-modules-empty = No third-party modules were loaded.
 support-third-party-modules-no-value = (No value)
 support-third-party-modules-button-open =
     .title = Open file location…
 support-third-party-modules-expand =
     .title = Show detailed information
 support-third-party-modules-collapse =
     .title = Collapse detailed information
--- a/toolkit/xre/UntrustedModulesData.cpp
+++ b/toolkit/xre/UntrustedModulesData.cpp
@@ -195,32 +195,30 @@ bool ModuleRecord::IsTrusted() const {
                   50;
   return score >= GetScoreThreshold();
 }
 
 ProcessedModuleLoadEvent::ProcessedModuleLoadEvent()
     : mProcessUptimeMS(0ULL),
       mThreadId(0UL),
       mBaseAddress(0U),
-      mIsDependent(false),
-      mLoadStatus(0) {}
+      mIsDependent(false) {}
 
 ProcessedModuleLoadEvent::ProcessedModuleLoadEvent(
     glue::EnhancedModuleLoadInfo&& aModLoadInfo,
     RefPtr<ModuleRecord>&& aModuleRecord, bool aIsDependent)
     : mProcessUptimeMS(QPCTimeStampToProcessUptimeMilliseconds(
           aModLoadInfo.mNtLoadInfo.mBeginTimestamp)),
       mLoadDurationMS(QPCLoadDurationToMilliseconds(aModLoadInfo.mNtLoadInfo)),
       mThreadId(aModLoadInfo.mNtLoadInfo.mThreadId),
       mThreadName(std::move(aModLoadInfo.mThreadName)),
       mBaseAddress(
           reinterpret_cast<uintptr_t>(aModLoadInfo.mNtLoadInfo.mBaseAddr)),
       mModule(std::move(aModuleRecord)),
-      mIsDependent(aIsDependent),
-      mLoadStatus(static_cast<uint32_t>(aModLoadInfo.mNtLoadInfo.mStatus)) {
+      mIsDependent(aIsDependent) {
   if (!mModule || !(*mModule)) {
     return;
   }
 
   // Sanitize the requested DLL name. It is not a critical failure if we
   // cannot do so; we simply do not provide that field to Telemetry.
   nsAutoString strRequested(
       aModLoadInfo.mNtLoadInfo.mRequestedDllName.AsString());
--- a/toolkit/xre/UntrustedModulesData.h
+++ b/toolkit/xre/UntrustedModulesData.h
@@ -140,17 +140,16 @@ class ProcessedModuleLoadEvent final {
   nsCString mThreadName;
   nsString mRequestedDllName;
   // We intentionally store mBaseAddress as part of the event and not the
   // module, as relocation may cause it to change between loads. If so, we want
   // to know about it.
   uintptr_t mBaseAddress;
   RefPtr<ModuleRecord> mModule;
   bool mIsDependent;
-  uint32_t mLoadStatus;  // corresponding to enum ModuleLoadInfo::Status
 
   ProcessedModuleLoadEvent(const ProcessedModuleLoadEvent&) = delete;
   ProcessedModuleLoadEvent& operator=(const ProcessedModuleLoadEvent&) = delete;
 
   ProcessedModuleLoadEvent(ProcessedModuleLoadEvent&&) = default;
   ProcessedModuleLoadEvent& operator=(ProcessedModuleLoadEvent&&) = default;
 
  private:
@@ -511,17 +510,16 @@ struct ParamTraits<mozilla::UntrustedMod
                          const mozilla::ProcessedModuleLoadEvent& aParam) {
     aMsg->WriteUInt64(aParam.mProcessUptimeMS);
     WriteParam(aMsg, aParam.mLoadDurationMS);
     aMsg->WriteULong(aParam.mThreadId);
     WriteParam(aMsg, aParam.mThreadName);
     WriteParam(aMsg, aParam.mRequestedDllName);
     WriteParam(aMsg, aParam.mBaseAddress);
     WriteParam(aMsg, aParam.mIsDependent);
-    WriteParam(aMsg, aParam.mLoadStatus);
 
     // We don't write the ModuleRecord directly; we write its key into the
     // UntrustedModulesData::mModules hash table.
     MOZ_ASSERT(aParam.mModule && !aParam.mModule->mResolvedNtName.IsEmpty());
     WriteParam(aMsg, aParam.mModule->mResolvedNtName);
   }
 
   // Because ProcessedModuleLoadEvent depends on a hash table from
@@ -553,20 +551,16 @@ struct ParamTraits<mozilla::UntrustedMod
     if (!ReadParam(aMsg, aIter, &aResult->mBaseAddress)) {
       return false;
     }
 
     if (!ReadParam(aMsg, aIter, &aResult->mIsDependent)) {
       return false;
     }
 
-    if (!ReadParam(aMsg, aIter, &aResult->mLoadStatus)) {
-      return false;
-    }
-
     nsAutoString resolvedNtName;
     if (!ReadParam(aMsg, aIter, &resolvedNtName)) {
       return false;
     }
 
     // NB: While bad data integrity might for some reason result in a null
     // mModule, we do not fail the deserialization; this is a data error,
     // rather than an IPC error. The error is detected and dealt with in
--- a/toolkit/xre/test/gtest/TestUntrustedModules.cpp
+++ b/toolkit/xre/test/gtest/TestUntrustedModules.cpp
@@ -144,17 +144,16 @@ static void ValidateUntrustedModules(con
     moduleSet.PutEntry(module);
   }
 
   for (const auto& evt : aData.mEvents) {
     EXPECT_EQ(evt.mThreadId, ::GetCurrentThreadId());
     // Make sure mModule is pointing to an entry of mModules.
     EXPECT_TRUE(moduleSet.Contains(evt.mModule));
     EXPECT_FALSE(evt.mIsDependent);
-    EXPECT_EQ(evt.mLoadStatus, 0);
   }
 
   // No check for the mXULLoadDurationMS field because the field has a value
   // in CCov build GTest, but it is empty in non-CCov build (bug 1681936).
   EXPECT_GT(aData.mEvents.length(), 0);
   EXPECT_GT(aData.mStacks.GetModuleCount(), 0);
   EXPECT_EQ(aData.mSanitizationFailures, 0);
   EXPECT_EQ(aData.mTrustTestFailures, 0);
@@ -309,17 +308,17 @@ BOOL CALLBACK UntrustedModulesFixture::I
 #define PROCESS_OBJ(TYPE, PID) \
   u"\"" TYPE u"\\." PID u"\":{" \
     u"\"processType\":\"" TYPE u"\",\"elapsed\":\\d+\\.\\d+," \
     u"\"sanitizationFailures\":0,\"trustTestFailures\":0," \
     u"\"events\":\\[{" \
       u"\"processUptimeMS\":\\d+,\"loadDurationMS\":\\d+\\.\\d+," \
       u"\"threadID\":\\d+,\"threadName\":\"Main Thread\"," \
       u"\"baseAddress\":\"0x[0-9a-f]+\",\"moduleIndex\":0," \
-      u"\"isDependent\":false,\"loadStatus\":0}\\]," \
+      u"\"isDependent\":false}\\]," \
     u"\"combinedStacks\":{" \
       u"\"memoryMap\":\\[\\[\"\\w+\\.\\w+\",\"[0-9A-Z]+\"\\]" \
         u"(,\\[\"\\w+\\.\\w+\",\"[0-9A-Z]+\\\"\\])*\\]," \
       u"\"stacks\":\\[\\[\\[\\d+,\\d+\\]" \
         u"(,\\[\\d+,\\d+\\])*\\]\\]}}"
 
 TEST_F(UntrustedModulesFixture, Serialize) {
   // clang-format off