Bug 1776761 [wpt PR 34611] - [FedCM] Remove traces of revoke, a=testonly
[gecko.git] / parser / html / nsHtml5Speculation.cpp
blob07796e77b80da93020ca32715e17129fc14e3025
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #include "nsHtml5Speculation.h"
7 using namespace mozilla;
9 nsHtml5Speculation::nsHtml5Speculation(nsHtml5OwningUTF16Buffer* aBuffer,
10 int32_t aStart, int32_t aStartLineNumber,
11 nsAHtml5TreeBuilderState* aSnapshot)
12 : mBuffer(aBuffer),
13 mStart(aStart),
14 mStartLineNumber(aStartLineNumber),
15 mSnapshot(aSnapshot) {
16 MOZ_COUNT_CTOR(nsHtml5Speculation);
19 nsHtml5Speculation::~nsHtml5Speculation() {
20 MOZ_COUNT_DTOR(nsHtml5Speculation);
23 [[nodiscard]] bool nsHtml5Speculation::MoveOpsFrom(
24 nsTArray<nsHtml5TreeOperation>& aOpQueue) {
25 return !!mOpQueue.AppendElements(std::move(aOpQueue), mozilla::fallible_t());
28 [[nodiscard]] bool nsHtml5Speculation::FlushToSink(nsAHtml5TreeOpSink* aSink) {
29 return aSink->MoveOpsFrom(mOpQueue);