/src/mozilla-central/dom/base/DispatcherTrait.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 "mozilla/dom/DispatcherTrait.h" |
8 | | |
9 | | #include "mozilla/AbstractThread.h" |
10 | | #include "mozilla/SchedulerGroup.h" |
11 | | #include "nsINamed.h" |
12 | | |
13 | | using namespace mozilla; |
14 | | using namespace mozilla::dom; |
15 | | |
16 | | nsresult |
17 | | DispatcherTrait::Dispatch(TaskCategory aCategory, |
18 | | already_AddRefed<nsIRunnable>&& aRunnable) |
19 | 0 | { |
20 | 0 | return SchedulerGroup::UnlabeledDispatch(aCategory, std::move(aRunnable)); |
21 | 0 | } |
22 | | |
23 | | nsISerialEventTarget* |
24 | | DispatcherTrait::EventTargetFor(TaskCategory aCategory) const |
25 | 0 | { |
26 | 0 | return GetMainThreadSerialEventTarget(); |
27 | 0 | } |
28 | | |
29 | | AbstractThread* |
30 | | DispatcherTrait::AbstractMainThreadFor(TaskCategory aCategory) |
31 | 0 | { |
32 | 0 | // Return non DocGroup version by default. |
33 | 0 | return AbstractThread::MainThread(); |
34 | 0 | } |