Bug 1852740: add tests for the `fetchpriority` attribute in Link headers. r=necko...
[gecko.git] / js / src / threading / noop / NoopThread.cpp
blob5cab9cb5b42e99d0bbf53ffa7bdf4cd7209f75f3
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/. */
7 #include "mozilla/Assertions.h"
9 #include "threading/noop/ThreadPlatformData.h"
11 namespace js {
13 inline ThreadId::PlatformData* ThreadId::platformData() {
14 return reinterpret_cast<PlatformData*>(platformData_);
17 inline const ThreadId::PlatformData* ThreadId::platformData() const {
18 return reinterpret_cast<const PlatformData*>(platformData_);
21 ThreadId::ThreadId() {}
22 ThreadId::operator bool() const { return false; }
23 bool ThreadId::operator==(const ThreadId& aOther) const { return true; }
24 bool Thread::create(void* (*aMain)(void*), void* aArg) { return false; }
25 void Thread::join() {}
26 void Thread::detach() {}
27 ThreadId ThreadId::ThisThreadId() { return ThreadId(); }
28 void ThisThread::SetName(const char*) {}
29 void ThisThread::GetName(char*, size_t) {}
30 void ThisThread::SleepMilliseconds(size_t) {
31 MOZ_CRASH("There is no any implementation for sleep.");
34 } // namespace js