Bug 1384260: Part 1 - Remove RegisterWindowMessage from Windows plugin content process r=jmathies

This message was always being created in the constructor for nsPluginNativeWindowWin.  We want to remove RegisterWindowMessage from content for sandboxing (win32k-lockdown).  The message is only used in the old windowed plugin behavior, which is no longer supported, although the code remains in the code base.  I've simply moved RegisterWindowMessage to the windowed plugin path instead of removing it, since there is no need to break it.

Differential Revision: https://phabricator.services.mozilla.com/D47935

--HG--
extra : moz-landing-system : lando
This commit is contained in:
David Parks 2019-10-16 21:21:43 +00:00
Родитель 6ded71ab21
Коммит 2c043f0a5f
1 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -454,10 +454,6 @@ nsPluginNativeWindowWin::nsPluginNativeWindowWin() : nsPluginNativeWindow() {
mParentWnd = nullptr;
mParentProc = 0;
if (!sWM_FLASHBOUNCEMSG) {
sWM_FLASHBOUNCEMSG = ::RegisterWindowMessage(NS_PLUGIN_CUSTOM_MSG_ID);
}
}
WNDPROC nsPluginNativeWindowWin::GetPrevWindowProc() { return mPrevWinProc; }
@ -545,6 +541,10 @@ nsresult nsPluginNativeWindowWin::CallSetWindow(
return NS_OK;
}
if (!sWM_FLASHBOUNCEMSG) {
sWM_FLASHBOUNCEMSG = ::RegisterWindowMessage(NS_PLUGIN_CUSTOM_MSG_ID);
}
if (window) {
// grab the widget procedure before the plug-in does a subclass in
// setwindow. We'll use this in PluginWndProc for forwarding focus