Bug 1379243 P1 Make WorkerControlEventTarget implement nsISerialEventTarget. r=baku

This commit is contained in:
Ben Kelly 2017-07-21 08:16:23 -07:00
Родитель 9eedac7ef8
Коммит 5fe4521ee0
2 изменённых файлов: 5 добавлений и 4 удалений

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

@ -1628,7 +1628,7 @@ public:
BEGIN_WORKERS_NAMESPACE
class WorkerControlEventTarget final : public nsIEventTarget
class WorkerControlEventTarget final : public nsISerialEventTarget
{
mozilla::Mutex mMutex;
WorkerPrivate* mWorkerPrivate;
@ -1704,7 +1704,8 @@ public:
NS_DECL_THREADSAFE_ISUPPORTS
};
NS_IMPL_ISUPPORTS(WorkerControlEventTarget, nsIEventTarget)
NS_IMPL_ISUPPORTS(WorkerControlEventTarget, nsIEventTarget,
nsISerialEventTarget)
END_WORKERS_NAMESPACE
@ -5189,7 +5190,7 @@ WorkerPrivate::DispatchToMainThread(already_AddRefed<nsIRunnable> aRunnable,
return mMainThreadEventTarget->Dispatch(runnable.forget(), aFlags);
}
nsIEventTarget*
nsISerialEventTarget*
WorkerPrivate::ControlEventTarget()
{
return mWorkerControlEventTarget;

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

@ -1461,7 +1461,7 @@ public:
// Get an event target that will dispatch runnables as control runnables on
// the worker thread. Implement nsICancelableRunnable if you wish to take
// action on cancelation.
nsIEventTarget*
nsISerialEventTarget*
ControlEventTarget();
private: