Bug 1319278 P2 Make the WorkerPrivate create a WorkerControlEventTarget. r=baku

This commit is contained in:
Ben Kelly 2017-01-26 08:01:32 -08:00
Родитель 9dfba8baab
Коммит e3e5175758
2 изменённых файлов: 3 добавлений и 0 удалений

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

@ -4143,6 +4143,7 @@ WorkerPrivate::WorkerPrivate(WorkerPrivate* aParent,
, mPRThread(nullptr)
, mDebuggerEventLoopLevel(0)
, mMainThreadEventTarget(do_GetMainThread())
, mWorkerControlEventTarget(new WorkerControlEventTarget(this))
, mErrorHandlerRecursionCount(0)
, mNextTimeoutId(1)
, mStatus(Pending)
@ -4209,6 +4210,7 @@ WorkerPrivate::WorkerPrivate(WorkerPrivate* aParent,
WorkerPrivate::~WorkerPrivate()
{
mWorkerControlEventTarget->ForgetWorkerPrivate(this);
}
// static

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

@ -937,6 +937,7 @@ class WorkerPrivate : public WorkerPrivateParent<WorkerPrivate>
uint32_t mDebuggerEventLoopLevel;
RefPtr<ThrottledEventQueue> mMainThreadThrottledEventQueue;
nsCOMPtr<nsIEventTarget> mMainThreadEventTarget;
RefPtr<WorkerControlEventTarget> mWorkerControlEventTarget;
struct SyncLoopInfo
{