1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim:set ts=2 sw=2 sts=2 et cindent: */
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/. */
12 MOZ_DIAGNOSTIC_ASSERT(mTarget
.isNothing());
13 MOZ_DIAGNOSTIC_ASSERT(mPromise
.IsEmpty());
16 bool SeekJob::Exists() const {
17 MOZ_ASSERT(mTarget
.isSome() == !mPromise
.IsEmpty());
18 return mTarget
.isSome();
21 void SeekJob::Resolve(StaticString aCallSite
) {
22 mPromise
.Resolve(true, aCallSite
);
26 void SeekJob::RejectIfExists(StaticString aCallSite
) {
28 mPromise
.RejectIfExists(true, aCallSite
);
31 } // namespace mozilla