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