Commit 762db04b authored by Masatoshi Kimura's avatar Masatoshi Kimura
Browse files

Bug 1533344 - Stop reading Universal CRT forwarder DLLs ahead on Windows 10. r=froydnj

Differential Revision: https://phabricator.services.mozilla.com/D22487

--HG--
extra : moz-landing-system : lando
parent 8c04bb80
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@ typedef void (*NSFuncPtr)();
#if defined(XP_WIN)
#  include <windows.h>
#  include <mbstring.h>
#  include "mozilla/WindowsVersion.h"

typedef HINSTANCE LibHandleType;

@@ -277,6 +278,13 @@ static nsresult XPCOMGlueLoad(const char* aXPCOMFile) {
    if (l == 0 || *buffer == '#') {
      continue;
    }
#  ifdef XP_WIN
    // There is no point in reading Universal CRT forwarder DLLs ahead on
    // Windows 10 because they will not be touched later.
    if (IsWin10OrLater() && !strncmp(buffer, "api-", 4)) {
      continue;
    }
#  endif

    // cut the trailing newline, if present
    if (buffer[l - 1] == '\n') {