fune/browser/app/winlauncher/DllBlocklistWin.h
Aaron Klotz 8630a054fc Bug 1445025: Part 5 - Implement a Native NT version of the DLL blocklist; r=mhowell
This version of the blocklist should be functionally comparable to the mozglue
based blocklist, except:

* We hook NtMapViewOfSection instead of LdrLoadDll: The former allows us to
  easily obtain the module file name being used for the load. The latter
  requires us to essentially emulate the loader's path searching, which is
  a perf hit, potentially a correctness issue, and more work to do given the
  limited native NT API set.

* Since the paths in native NT land are all unicode, and since this code is
  critical to startup performance, this version of the blocklist uses unicode
  strings instead of ASCII strings. My thoughts here are that we don't want to
  be wasting time on every DLL load doing ASCII-to-unicode conversion every
  time we want to do a blocklist string comparison.

* I am completely aware that this leaves us in a bizarre situation where we have
  two copies of the blocklist in our binaries: one unicode version in firefox.exe,
  and one ASCII version in mozglue.dll. Once we (hopefully) move to using the
  launcher process by default, the ASCII copy can go away. In the meantime, we
  need to be able to use either one depending on how Firefox was started. I am
  happy to make the Native NT blocklist Nightly-only to assuage these concerns.
2018-06-05 15:21:19 -06:00

18 lines
555 B
C++

/* -*- 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 https://mozilla.org/MPL/2.0/. */
#ifndef mozilla_DllBlocklistWin_h
#define mozilla_DllBlocklistWin_h
#include <windows.h>
namespace mozilla {
bool InitializeDllBlocklistOOP(HANDLE aChildProcess);
} // namespace mozilla
#endif // mozilla_DllBlocklistWin_h