/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* vim:set ts=2 sw=2 sts=2 et cindent: */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
class ReadableByteStreamController final : public ReadableStreamController, public nsWrapperCache { public:
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_INHERITED(
ReadableByteStreamController, ReadableStreamController)
private: // A boolean flag indicating whether the stream has been closed by its // underlying byte source, but still has chunks in its internal queue that // have not yet been read bool mCloseRequested = false;
// A boolean flag set to true if the stream’s mechanisms requested a call // to the underlying byte source's pull algorithm to pull more data, but the // pull could not yet be done since a previous call is still executing bool mPullAgain = false;
// A boolean flag indicating whether the underlying byte source has finished // starting bool mStarted = false;
// A boolean flag set to true while the underlying byte source's pull // algorithm is executing and the returned promise has not yet fulfilled, // used to prevent reentrant calls bool mPulling = false;
// A positive integer, when the automatic buffer allocation feature is // enabled. In that case, this value specifies the size of buffer to allocate. // It is undefined otherwise.
Maybe<uint64_t> mAutoAllocateChunkSize;
// A ReadableStreamBYOBRequest instance representing the current BYOB pull // request, or null if there are no pending requests
RefPtr<ReadableStreamBYOBRequest> mByobRequest;
// A list of pull-into descriptors
LinkedList<RefPtr<PullIntoDescriptor>> mPendingPullIntos;
// A list of readable byte stream queue entries representing the stream’s // internal queue of chunks // // This is theoretically supposed to be a QueueWithSizes, but it is // mostly not actually manipulated or used like QueueWithSizes, so instead we // use a LinkedList.
LinkedList<RefPtr<ReadableByteStreamQueueEntry>> mQueue;
// The total size, in bytes, of all the chunks stored in [[queue]] (see § 8.1 // Queue-with-sizes) double mQueueTotalSize = 0.0;
// A number supplied to the constructor as part of the stream’s queuing // strategy, indicating the point at which the stream will apply backpressure // to its underlying byte source double mStrategyHWM = 0.0;
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.