Coverage Report

Created: 2018-09-25 14:53

/src/mozilla-central/dom/media/QueueObject.cpp
Line
Count
Source (jump to first uncovered line)
1
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
3
/* This Source Code Form is subject to the terms of the Mozilla Public
4
 * License, v. 2.0. If a copy of the MPL was not distributed with this
5
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6
7
#include "QueueObject.h"
8
#include "mozilla/AbstractThread.h"
9
#include "mozilla/TaskQueue.h"
10
#include "nsThreadUtils.h"
11
12
namespace mozilla {
13
14
0
QueueObject::QueueObject(RefPtr<AbstractThread> aThread) : mThread(aThread) {}
15
16
0
QueueObject::~QueueObject() {}
17
18
void
19
QueueObject::Dispatch(nsIRunnable* aRunnable)
20
0
{
21
0
  Dispatch(do_AddRef(aRunnable));
22
0
}
23
24
void
25
QueueObject::Dispatch(already_AddRefed<nsIRunnable> aRunnable)
26
0
{
27
0
  mThread->Dispatch(std::move(aRunnable));
28
0
}
29
30
bool
31
QueueObject::OnThread()
32
0
{
33
0
  return mThread->IsCurrentThreadIn();
34
0
}
35
36
AbstractThread*
37
QueueObject::Thread()
38
0
{
39
0
  return mThread;
40
0
}
41
}