Bug 1382251: Part 2 - Allow constructing nsWindowsDllInterceptor from module name r=akoltz
☠☠ backed out by 398fb8533bcb ☠ ☠
authorDavid Parks <dparks@mozilla.com>
Mon, 06 Nov 2017 09:51:06 -0800
changeset 454119 5f33ad77c5b468c73b29a056780fdae9ea397a57
parent 454118 d2f531c6a6d8cb4d638799c0bea3b5e13a1a631c
child 454120 24de376fb860c10fe5a0e47ba89786a8015c7c00
push id1648
push usermtabara@mozilla.com
push dateThu, 01 Mar 2018 12:45:47 +0000
treeherdermozilla-release@cbb9688c2eeb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersakoltz
bugs1382251
milestone59.0a1
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
Bug 1382251: Part 2 - Allow constructing nsWindowsDllInterceptor from module name r=akoltz Allow constructor to behave like Init().
xpcom/build/nsWindowsDllInterceptor.h
--- a/xpcom/build/nsWindowsDllInterceptor.h
+++ b/xpcom/build/nsWindowsDllInterceptor.h
@@ -1396,20 +1396,25 @@ class WindowsDllInterceptor
 {
   internal::WindowsDllNopSpacePatcher mNopSpacePatcher;
   internal::WindowsDllDetourPatcher mDetourPatcher;
 
   const char* mModuleName;
   int mNHooks;
 
 public:
-  WindowsDllInterceptor()
+  explicit WindowsDllInterceptor(const char* aModuleName = nullptr,
+                                 int aNumHooks = 0)
     : mModuleName(nullptr)
     , mNHooks(0)
-  {}
+  {
+    if (aModuleName) {
+      Init(aModuleName, aNumHooks);
+    }
+  }
 
   void Init(const char* aModuleName, int aNumHooks = 0)
   {
     if (mModuleName) {
       return;
     }
 
     mModuleName = aModuleName;