зеркало из https://github.com/mozilla/gecko-dev.git
Making plugins work on Windows CE. There many crashes do to subclassing. This addresses those problem by not subclassing. This is WinCE only. r/sr=jst. a=asa. Relanding
This commit is contained in:
Родитель
f83ecb998c
Коммит
b94fc67083
|
@ -2545,6 +2545,10 @@ nsPluginHostImpl::nsPluginHostImpl()
|
|||
|
||||
mPrefService->GetBoolPref("plugin.default_plugin_disabled", &tmp);
|
||||
mDefaultPluginDisabled = tmp;
|
||||
|
||||
#ifdef WINCE
|
||||
mDefaultPluginDisabled = PR_TRUE;
|
||||
#endif
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIObserverService> obsService = do_GetService("@mozilla.org/observer-service;1");
|
||||
|
|
|
@ -129,8 +129,10 @@ public:
|
|||
virtual nsresult CallSetWindow(nsCOMPtr<nsIPluginInstance> &aPluginInstance);
|
||||
|
||||
private:
|
||||
#ifndef WINCE
|
||||
nsresult SubclassAndAssociateWindow();
|
||||
nsresult UndoSubclassAndAssociateWindow();
|
||||
#endif
|
||||
|
||||
public:
|
||||
// locals
|
||||
|
@ -474,17 +476,25 @@ nsresult nsPluginNativeWindowWin::CallSetWindow(nsCOMPtr<nsIPluginInstance> &aPl
|
|||
{
|
||||
// check the incoming instance, null indicates that window is going away and we are
|
||||
// not interested in subclassing business any more, undo and don't subclass
|
||||
|
||||
// WINCE does not subclass windows. See bug 300011 for the details.
|
||||
#ifndef WINCE
|
||||
if (!aPluginInstance)
|
||||
UndoSubclassAndAssociateWindow();
|
||||
#endif
|
||||
|
||||
nsPluginNativeWindow::CallSetWindow(aPluginInstance);
|
||||
|
||||
#ifndef WINCE
|
||||
if (aPluginInstance)
|
||||
SubclassAndAssociateWindow();
|
||||
#endif
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
#ifndef WINCE
|
||||
|
||||
nsresult nsPluginNativeWindowWin::SubclassAndAssociateWindow()
|
||||
{
|
||||
if (type != nsPluginWindowType_Window)
|
||||
|
@ -532,6 +542,7 @@ nsresult nsPluginNativeWindowWin::UndoSubclassAndAssociateWindow()
|
|||
|
||||
return NS_OK;
|
||||
}
|
||||
#endif // WINCE
|
||||
|
||||
nsresult PLUG_NewPluginNativeWindow(nsPluginNativeWindow ** aPluginNativeWindow)
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче