mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-26 14:18:48 +00:00
8121b81d5d
- Bug 1190495 - Fix include. r=me (47b87f15e) - bug 1190285 move GraphTime definition to avoid GraphDriver.h includes r=padenot (341c85fe6) - Bug 1190495 - Separate FlushableTaskQueue into its own file. r=cpearce (aef97dc9a) - Bug 1184460 - Remove sync dispatch since SharedThreadPool::Get() can be called off the main thread. r=cpearce. (108fa8e13) - Bug 1190495 - Remove TaskQueue::SyncDispatch. r=cpearce (34ab2b7a5) - Bug 1190495 - Switch TaskQueue entirely to nsRefPtr. r=cpearce (6a8e7e98f) - Bug 1190495 - Hoist TaskQueue into xpcom. r=froydnj (ee81e2796) - Bug 1190495 - Followup #include fix. r=me (8855f0810) - Bug 1188976 - Fix up include. r=me (dea4f8e48) - Bug 1188976 - Rename ProxyMediaCall to InvokeAsync. r=froydnj (a20401dac) - Bug 1188976 - Use mozilla::Tuple for InvokeAsync. r=froydnj (9a46feaf6) - Bug 1188976 - Hoist MozPromise into xpcom. r=froydnj (5727febde) - Bug 1190496 - Add a comment warning about MSCOM modes. r=cpearce (742043a84) - Bug 1190496 - Use the normal XPCOM way to dispatch to the main thread. r=cpearce (c63bca613) - Bug 1190496 - Do shutdown on xpcom-shutdown-threads. r=cpearce (3e8e8c793) - Bug 1190496 - Init SharedThreadPool from XPCOM rather than MediaDecoder. r=froydnj (40bf2d69b) - Bug 1188976 - Improve MozPromise.h comment. r=me DONTBUILD (2314b087f) - Bug 1188439 - Fixed GMPLoader.cpp compilation with sandbox disabled. r=cpearce (0a4ab4fb3)
54 lines
1.3 KiB
C++
54 lines
1.3 KiB
C++
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* 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/. */
|
|
|
|
#ifndef FlushableTaskQueue_h_
|
|
#define FlushableTaskQueue_h_
|
|
|
|
#include "mozilla/TaskQueue.h"
|
|
|
|
//
|
|
// WARNING: THIS CLASS IS DEPRECATED AND GOING AWAY. DO NOT USE IT!
|
|
//
|
|
|
|
namespace mozilla {
|
|
|
|
class FlushableTaskQueue : public TaskQueue
|
|
{
|
|
public:
|
|
explicit FlushableTaskQueue(already_AddRefed<SharedThreadPool> aPool) : TaskQueue(Move(aPool)) {}
|
|
nsresult FlushAndDispatch(already_AddRefed<nsIRunnable> aRunnable);
|
|
void Flush();
|
|
|
|
bool IsDispatchReliable() override { return false; }
|
|
|
|
private:
|
|
|
|
class MOZ_STACK_CLASS AutoSetFlushing
|
|
{
|
|
public:
|
|
explicit AutoSetFlushing(FlushableTaskQueue* aTaskQueue) : mTaskQueue(aTaskQueue)
|
|
{
|
|
mTaskQueue->mQueueMonitor.AssertCurrentThreadOwns();
|
|
mTaskQueue->mIsFlushing = true;
|
|
}
|
|
~AutoSetFlushing()
|
|
{
|
|
mTaskQueue->mQueueMonitor.AssertCurrentThreadOwns();
|
|
mTaskQueue->mIsFlushing = false;
|
|
}
|
|
|
|
private:
|
|
FlushableTaskQueue* mTaskQueue;
|
|
};
|
|
|
|
void FlushLocked();
|
|
|
|
};
|
|
|
|
} // namespace mozilla
|
|
|
|
#endif // FlushableTaskQueue_h_
|