Bug 1124452 - Store the main thread's MessageLoop in ChromeProcessController. r=kats

--HG--
extra : rebase_source : 9c163795564dbe2fae1fd3a6e371b6455277d811
This commit is contained in:
Botond Ballo 2015-01-14 18:03:43 -05:00
parent b4c29b2836
commit 024f0d71f6
2 changed files with 10 additions and 1 deletions

View File

@ -3,7 +3,10 @@
* 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 "mozilla/layers/ChromeProcessController.h"
#include "ChromeProcessController.h"
#include "MainThreadUtils.h" // for NS_IsMainThread()
#include "base/message_loop.h" // for MessageLoop
#include "mozilla/layers/CompositorParent.h"
#include "mozilla/layers/APZCCallbackHelper.h"
#include "nsLayoutUtils.h"
@ -14,7 +17,10 @@ using namespace mozilla::widget;
ChromeProcessController::ChromeProcessController(nsIWidget* aWidget)
: mWidget(aWidget)
, mUILoop(MessageLoop::current())
{
// Otherwise we're initializing mUILoop incorrectly.
MOZ_ASSERT(NS_IsMainThread());
}
void

View File

@ -11,6 +11,8 @@
class nsIWidget;
class MessageLoop;
namespace mozilla {
namespace layers {
@ -46,6 +48,7 @@ public:
private:
nsCOMPtr<nsIWidget> mWidget;
MessageLoop* mUILoop;
};
} // namespace layers