Bug 681924: Plugin container should not hook functions multiple times. no-r, landing as a bustage fix.

This commit is contained in:
Makoto Kato
2011-09-02 10:22:02 -04:00
parent 1805928bf5
commit 062ecf8a87
3 changed files with 35 additions and 20 deletions

View File

@@ -1913,7 +1913,8 @@ PluginModuleChild::AllocPPluginInstance(const nsCString& aMimeType,
InitQuirksModes(aMimeType);
#ifdef XP_WIN
if (mQuirks & QUIRK_FLASH_HOOK_GETWINDOWINFO) {
if ((mQuirks & QUIRK_FLASH_HOOK_GETWINDOWINFO) &&
!sGetWindowInfoPtrStub) {
sUser32Intercept.Init("user32.dll");
sUser32Intercept.AddHook("GetWindowInfo", reinterpret_cast<intptr_t>(PMCGetWindowInfoHook),
(void**) &sGetWindowInfoPtrStub);