Bug 1460007 - Only call PluginInstanceChild's HookSetWindowLongPtr once. r=aklotz

This commit is contained in:
Jim Mathies 2018-05-16 13:29:43 -05:00
Родитель ba6f25a6f4
Коммит 5bb082d6a1
1 изменённых файлов: 9 добавлений и 1 удалений

Просмотреть файл

@ -87,6 +87,7 @@ static decltype(ImmAssociateContextEx)* sImm32ImmAssociateContextExStub =
static PluginInstanceChild* sCurrentPluginInstance = nullptr; static PluginInstanceChild* sCurrentPluginInstance = nullptr;
static const HIMC sHookIMC = (const HIMC)0xefefefef; static const HIMC sHookIMC = (const HIMC)0xefefefef;
static bool sPopupMenuHookSet; static bool sPopupMenuHookSet;
static bool sSetWindowLongHookSet;
using mozilla::gfx::SharedDIB; using mozilla::gfx::SharedDIB;
@ -1898,8 +1899,15 @@ PluginInstanceChild::SetWindowLongWHook(HWND hWnd,
void void
PluginInstanceChild::HookSetWindowLongPtr() PluginInstanceChild::HookSetWindowLongPtr()
{ {
if (!(GetQuirks() & QUIRK_FLASH_HOOK_SETLONGPTR)) if (!(GetQuirks() & QUIRK_FLASH_HOOK_SETLONGPTR)) {
return; return;
}
// Only pass through here once
if (sSetWindowLongHookSet) {
return;
}
sSetWindowLongHookSet = true;
sUser32Intercept.Init("user32.dll"); sUser32Intercept.Init("user32.dll");
#ifdef _WIN64 #ifdef _WIN64