Bug 1066182: Backout patch from bug 768802 due to bug fix in Flash 15; r=bsmedberg

This commit is contained in:
Aaron Klotz
2014-09-12 13:04:09 -06:00
parent e07d73a455
commit 229c4e2b4e

View File

@@ -34,7 +34,6 @@
#ifdef XP_WIN
#include "PluginHangUIParent.h"
#include "mozilla/GuardObjects.h"
#include "mozilla/widget/AudioSession.h"
#endif
@@ -1218,26 +1217,6 @@ PluginModuleParent::NP_Initialize(NPNetscapeFuncs* bFuncs, NPPluginFuncs* pFuncs
return NS_OK;
}
#else
#if defined(XP_WIN)
class MOZ_STACK_CLASS SetForegroundLocker
{
public:
SetForegroundLocker(MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM)
{
MOZ_GUARD_OBJECT_NOTIFIER_INIT;
::LockSetForegroundWindow(LSFW_LOCK);
}
~SetForegroundLocker()
{
::LockSetForegroundWindow(LSFW_UNLOCK);
}
private:
MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER
};
#endif
nsresult
PluginModuleParent::NP_Initialize(NPNetscapeFuncs* bFuncs, NPError* error)
{
@@ -1253,11 +1232,6 @@ PluginModuleParent::NP_Initialize(NPNetscapeFuncs* bFuncs, NPError* error)
uint32_t flags = 0;
#ifdef XP_WIN
flags |= kAllowAsyncDrawing;
// Bug 768802: We need to call LockSetForegroundWindow before calling
// NP_Initialize to prevent our window from losing focus when the
// plugin starts.
SetForegroundLocker fgLock;
#endif
if (!CallNP_Initialize(flags, error)) {