Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Commit 112cc1f

Browse files
committed
Backed out 3 changesets (bug 1430857) for breaking tests on Windows Code Coverage builds a=backout
Backed out changeset a992887a6060 (bug 1430857) Backed out changeset cc9b0ac5f66b (bug 1430857) Backed out changeset 4bdd6d82f993 (bug 1430857)
1 parent 106842f commit 112cc1f

18 files changed

Lines changed: 63 additions & 694 deletions

browser/app/nsBrowserApp.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@
2828
#ifdef MOZ_SANDBOX
2929
#include "mozilla/sandboxing/SandboxInitialization.h"
3030
#endif
31-
#include "mozilla/WindowsDllBlocklist.h"
3231
#endif
3332
#include "BinaryPath.h"
3433

3534
#include "nsXPCOMPrivate.h" // for MAXPATHLEN and XPCOM_DLL
3635

3736
#include "mozilla/Sprintf.h"
3837
#include "mozilla/StartupTimeline.h"
38+
#include "mozilla/WindowsDllBlocklist.h"
3939

4040
#ifdef LIBFUZZER
4141
#include "FuzzerDefs.h"

ipc/app/MozillaRuntimeMain.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,7 @@
77
#include "../contentproc/plugin-container.cpp"
88

99
#include "mozilla/Bootstrap.h"
10-
11-
#if defined(XP_WIN)
1210
#include "mozilla/WindowsDllBlocklist.h"
13-
#endif // defined(XP_WIN)
1411

1512
using namespace mozilla;
1613

js/xpconnect/shell/xpcshell.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
#include <stdio.h>
1010

11+
#include "mozilla/WindowsDllBlocklist.h"
1112
#include "mozilla/Bootstrap.h"
1213

1314
#include "nsXULAppAPI.h"
@@ -25,7 +26,6 @@
2526
#ifdef MOZ_SANDBOX
2627
#include "mozilla/sandboxing/SandboxInitialization.h"
2728
#endif
28-
#include "mozilla/WindowsDllBlocklist.h"
2929
#endif
3030

3131
#ifdef MOZ_WIDGET_GTK

mozglue/build/Authenticode.cpp

Lines changed: 0 additions & 210 deletions
This file was deleted.

mozglue/build/Authenticode.h

Lines changed: 0 additions & 24 deletions
This file was deleted.

mozglue/build/WindowsDllBlocklist.cpp

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
#include <map>
2424
#pragma warning( pop )
2525

26-
#include "Authenticode.h"
2726
#include "nsAutoPtr.h"
27+
2828
#include "nsWindowsDllInterceptor.h"
2929
#include "mozilla/Sprintf.h"
3030
#include "mozilla/StackWalk_windows.h"
@@ -33,7 +33,7 @@
3333
#include "nsWindowsHelpers.h"
3434
#include "WindowsDllBlocklist.h"
3535
#include "mozilla/AutoProfilerLabel.h"
36-
#include "mozilla/glue/WindowsDllServices.h"
36+
#include "mozilla/WindowsDllServices.h"
3737

3838
using namespace mozilla;
3939

@@ -938,7 +938,7 @@ DllBlocklist_CheckStatus()
938938

939939

940940
static SRWLOCK gDllServicesLock = SRWLOCK_INIT;
941-
static mozilla::glue::detail::DllServicesBase* gDllServices;
941+
static mozilla::detail::DllServicesBase* gDllServices;
942942

943943
class MOZ_RAII AutoSharedLock final
944944
{
@@ -1047,30 +1047,22 @@ DllLoadNotification(ULONG aReason, PCLDR_DLL_NOTIFICATION_DATA aNotificationData
10471047
gDllServices->DispatchDllLoadNotification(fullDllName);
10481048
}
10491049

1050-
namespace mozilla {
1051-
Authenticode* GetAuthenticode();
1052-
} // namespace mozilla
1053-
10541050
MFBT_API void
1055-
DllBlocklist_SetDllServices(mozilla::glue::detail::DllServicesBase* aSvc)
1051+
DllBlocklist_SetDllServices(mozilla::detail::DllServicesBase* aSvc)
10561052
{
10571053
AutoExclusiveLock lock(gDllServicesLock);
10581054

1059-
if (aSvc) {
1060-
aSvc->SetAuthenticodeImpl(GetAuthenticode());
1055+
if (aSvc && !gNotificationCookie) {
1056+
auto pLdrRegisterDllNotification =
1057+
reinterpret_cast<decltype(&::LdrRegisterDllNotification)>(
1058+
::GetProcAddress(::GetModuleHandleW(L"ntdll.dll"),
1059+
"LdrRegisterDllNotification"));
10611060

1062-
if (!gNotificationCookie) {
1063-
auto pLdrRegisterDllNotification =
1064-
reinterpret_cast<decltype(&::LdrRegisterDllNotification)>(
1065-
::GetProcAddress(::GetModuleHandleW(L"ntdll.dll"),
1066-
"LdrRegisterDllNotification"));
1061+
MOZ_DIAGNOSTIC_ASSERT(pLdrRegisterDllNotification);
10671062

1068-
MOZ_DIAGNOSTIC_ASSERT(pLdrRegisterDllNotification);
1069-
1070-
NTSTATUS ntStatus = pLdrRegisterDllNotification(0, &DllLoadNotification,
1071-
nullptr, &gNotificationCookie);
1072-
MOZ_DIAGNOSTIC_ASSERT(NT_SUCCESS(ntStatus));
1073-
}
1063+
NTSTATUS ntStatus = pLdrRegisterDllNotification(0, &DllLoadNotification,
1064+
nullptr, &gNotificationCookie);
1065+
MOZ_DIAGNOSTIC_ASSERT(NT_SUCCESS(ntStatus));
10741066
}
10751067

10761068
gDllServices = aSvc;

mozglue/build/WindowsDllBlocklist.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,12 @@ MFBT_API bool DllBlocklist_CheckStatus();
2626

2727
// Forward declaration
2828
namespace mozilla {
29-
namespace glue {
3029
namespace detail {
3130
class DllServicesBase;
3231
} // namespace detail
33-
} // namespace glue
3432
} // namespace mozilla
3533

36-
MFBT_API void DllBlocklist_SetDllServices(mozilla::glue::detail::DllServicesBase* aSvc);
34+
MFBT_API void DllBlocklist_SetDllServices(mozilla::detail::DllServicesBase* aSvc);
3735

3836
#endif // defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_X64))
3937
#endif // mozilla_windowsdllblocklist_h

0 commit comments

Comments
 (0)