Bug 1445444: Properly initialize plugin window drawing type on Windows r=jimm a=ritu
authorDavid Parks <dparks@mozilla.com>
Mon, 25 Jun 2018 13:16:44 -0700
changeset 478131 5627d6ef29163f8b14305a7c612fb15475801b7e
parent 478130 9eb2810ff638ec9c26b7963af9ab91a7b76ec0fc
child 478132 7a7bb13a3f1477e00a86d68172d43ff5184afc8b
push id9541
push userarchaeopteryx@coole-files.de
push dateThu, 26 Jul 2018 16:18:19 +0000
treeherdermozilla-beta@23bc64507f53 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjimm, ritu
bugs1445444
milestone62.0
Bug 1445444: Properly initialize plugin window drawing type on Windows r=jimm a=ritu Sets the default plugin window type to windowed on Windows. Most of the time, plugins use async drawing so this will be overwritten but it should be properly initialized for cases where we do not switch to async.
dom/plugins/base/nsPluginNativeWindowWin.cpp
--- a/dom/plugins/base/nsPluginNativeWindowWin.cpp
+++ b/dom/plugins/base/nsPluginNativeWindowWin.cpp
@@ -474,16 +474,17 @@ HookSetWindowLongPtr()
 nsPluginNativeWindowWin::nsPluginNativeWindowWin() : nsPluginNativeWindow()
 {
   // initialize the struct fields
   window = nullptr;
   x = 0;
   y = 0;
   width = 0;
   height = 0;
+  type = NPWindowTypeWindow;
 
   mPrevWinProc = nullptr;
   mPluginWinProc = nullptr;
   mPluginType = nsPluginHost::eSpecialType_None;
 
   mParentWnd = nullptr;
   mParentProc = 0;