зеркало из https://github.com/mozilla/pjs.git
Bug 173206 -- crash after Shockwave registration, r=serge, sr=beard, a=asa
This commit is contained in:
Родитель
973f62e3f8
Коммит
7d3fd3a871
|
@ -367,7 +367,7 @@ nsresult nsPluginNativeWindowWin::SubclassAndAssociateWindow()
|
||||||
|
|
||||||
nsresult nsPluginNativeWindowWin::UndoSubclassAndAssociateWindow()
|
nsresult nsPluginNativeWindowWin::UndoSubclassAndAssociateWindow()
|
||||||
{
|
{
|
||||||
// undo association and release plugin instance
|
// release plugin instance
|
||||||
SetPluginInstance(nsnull);
|
SetPluginInstance(nsnull);
|
||||||
|
|
||||||
// remove window property
|
// remove window property
|
||||||
|
@ -376,8 +376,12 @@ nsresult nsPluginNativeWindowWin::UndoSubclassAndAssociateWindow()
|
||||||
::RemoveProp(hWnd, NS_PLUGIN_WINDOW_PROPERTY_ASSOCIATION);
|
::RemoveProp(hWnd, NS_PLUGIN_WINDOW_PROPERTY_ASSOCIATION);
|
||||||
|
|
||||||
// restore the original win proc
|
// restore the original win proc
|
||||||
if (mPluginWinProc)
|
// but only do this if this were us last time
|
||||||
SubclassWindow(hWnd, (LONG)mPluginWinProc);
|
if (mPluginWinProc) {
|
||||||
|
WNDPROC currentWndProc = (WNDPROC)::GetWindowLong(hWnd, GWL_WNDPROC);
|
||||||
|
if (currentWndProc == PluginWndProc)
|
||||||
|
SubclassWindow(hWnd, (LONG)mPluginWinProc);
|
||||||
|
}
|
||||||
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче