Backed out 13 changesets (bug 1460022) for bustages in :/build/build/src/mozglue/tests/interceptor/TestDllInterceptor.cpp(113) on a CLOSED TREE

Backed out changeset b798c3689bbf (bug 1460022)
Backed out changeset c3b3b854affd (bug 1460022)
Backed out changeset ecb1b6fd3134 (bug 1460022)
Backed out changeset 91fed649dd5a (bug 1460022)
Backed out changeset be7032cddad2 (bug 1460022)
Backed out changeset d4a036b976e6 (bug 1460022)
Backed out changeset 5f3dfde41e38 (bug 1460022)
Backed out changeset a16486a6f685 (bug 1460022)
Backed out changeset 69eacc5c3ab8 (bug 1460022)
Backed out changeset 34aa7c29b31e (bug 1460022)
Backed out changeset 00b20c0a7637 (bug 1460022)
Backed out changeset b8e8aea4a01f (bug 1460022)
Backed out changeset 15822d9848d8 (bug 1460022)
This commit is contained in:
shindli
2018-07-04 03:37:11 +03:00
parent c3d7bfcc16
commit 3ffa44b530
17 changed files with 770 additions and 660 deletions

View File

@@ -357,10 +357,8 @@ typedef LONG_PTR
(WINAPI *User32SetWindowLongPtrW)(HWND hWnd,
int nIndex,
LONG_PTR dwNewLong);
static WindowsDllInterceptor::FuncHookType<User32SetWindowLongPtrA>
sUser32SetWindowLongAHookStub;
static WindowsDllInterceptor::FuncHookType<User32SetWindowLongPtrW>
sUser32SetWindowLongWHookStub;
static User32SetWindowLongPtrA sUser32SetWindowLongAHookStub = nullptr;
static User32SetWindowLongPtrW sUser32SetWindowLongWHookStub = nullptr;
#else
typedef LONG
(WINAPI *User32SetWindowLongA)(HWND hWnd,
@@ -370,10 +368,8 @@ typedef LONG
(WINAPI *User32SetWindowLongW)(HWND hWnd,
int nIndex,
LONG dwNewLong);
static WindowsDllInterceptor::FuncHookType<User32SetWindowLongA>
sUser32SetWindowLongAHookStub;
static WindowsDllInterceptor::FuncHookType<User32SetWindowLongW>
sUser32SetWindowLongWHookStub;
static User32SetWindowLongA sUser32SetWindowLongAHookStub = nullptr;
static User32SetWindowLongW sUser32SetWindowLongWHookStub = nullptr;
#endif
static inline bool
SetWindowLongHookCheck(HWND hWnd,
@@ -452,15 +448,23 @@ HookSetWindowLongPtr()
{
sUser32Intercept.Init("user32.dll");
#ifdef _WIN64
sUser32SetWindowLongAHookStub.Set(sUser32Intercept, "SetWindowLongPtrA",
&SetWindowLongPtrAHook);
sUser32SetWindowLongWHookStub.Set(sUser32Intercept, "SetWindowLongPtrW",
&SetWindowLongPtrWHook);
if (!sUser32SetWindowLongAHookStub)
sUser32Intercept.AddHook("SetWindowLongPtrA",
reinterpret_cast<intptr_t>(SetWindowLongPtrAHook),
(void**) &sUser32SetWindowLongAHookStub);
if (!sUser32SetWindowLongWHookStub)
sUser32Intercept.AddHook("SetWindowLongPtrW",
reinterpret_cast<intptr_t>(SetWindowLongPtrWHook),
(void**) &sUser32SetWindowLongWHookStub);
#else
sUser32SetWindowLongAHookStub.Set(sUser32Intercept, "SetWindowLongA",
&SetWindowLongAHook);
sUser32SetWindowLongWHookStub.Set(sUser32Intercept, "SetWindowLongW",
&SetWindowLongWHook);
if (!sUser32SetWindowLongAHookStub)
sUser32Intercept.AddHook("SetWindowLongA",
reinterpret_cast<intptr_t>(SetWindowLongAHook),
(void**) &sUser32SetWindowLongAHookStub);
if (!sUser32SetWindowLongWHookStub)
sUser32Intercept.AddHook("SetWindowLongW",
reinterpret_cast<intptr_t>(SetWindowLongWHook),
(void**) &sUser32SetWindowLongWHookStub);
#endif
}