Bug 1011685 - Call ipc InitUIThread from MetroAppShell Init. Follow up for bug 1009590. r=me
authorJim Mathies <jmathies@mozilla.com>
Thu, 17 Jul 2014 13:17:14 -0500
changeset 211333 f4634527cd7860f6cca0cba6e90158c7bd2414b0
parent 211332 cfb070beb663437274057a91f96039ce9d258b95
child 211334 99e0716c5d6613dce82b16a8380ddb1ba94a1bdb
push id27673
push userkwierso@gmail.com
push dateTue, 21 Oct 2014 01:57:45 +0000
treeherdermozilla-central@29fbfc1b31aa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
bugs1011685, 1009590
milestone36.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1011685 - Call ipc InitUIThread from MetroAppShell Init. Follow up for bug 1009590. r=me
widget/windows/winrt/MetroAppShell.cpp
--- a/widget/windows/winrt/MetroAppShell.cpp
+++ b/widget/windows/winrt/MetroAppShell.cpp
@@ -3,16 +3,17 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "MetroAppShell.h"
 
 #include "mozilla/AutoRestore.h"
 #include "mozilla/TimeStamp.h"
 #include "mozilla/widget/AudioSession.h"
+#include "mozilla/ipc/WindowsMessageLoop.h"
 
 #include "nsIObserverService.h"
 #include "nsIAppStartup.h"
 #include "nsToolkitCompsCID.h"
 #include "nsIPowerManagerService.h"
 
 #include "nsXULAppAPI.h"
 #include "nsServiceManagerUtils.h"
@@ -68,16 +69,18 @@ MetroAppShell::~MetroAppShell()
 nsresult
 MetroAppShell::Init()
 {
   LogFunction();
 
   WNDCLASSW wc;
   HINSTANCE module = GetModuleHandle(nullptr);
 
+  mozilla::ipc::windows::InitUIThread();
+
   const char16_t *const kWindowClass = L"nsAppShell:EventWindowClass";
   if (!GetClassInfoW(module, kWindowClass, &wc)) {
     wc.style         = 0;
     wc.lpfnWndProc   = EventWindowProc;
     wc.cbClsExtra    = 0;
     wc.cbWndExtra    = 0;
     wc.hInstance     = module;
     wc.hIcon         = nullptr;