/* 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/. */
#include "mozilla/dom/UnderlyingSourceCallbackHelpers.h"
#include "ReadableByteStreamControllerAbstract.h"
#include "StreamUtils.h"
#include "js/experimental/TypedData.h"
#include "mozilla/dom/ReadableStream.h"
#include "mozilla/dom/ReadableStreamDefaultController.h"
#include "mozilla/dom/UnderlyingSourceBinding.h"
#include "mozilla/dom/WorkerCommon.h"
#include "mozilla/dom/WorkerPrivate.h"
#include "mozilla/dom/WorkerRunnable.h"
#include "nsStreamUtils.h"
namespace mozilla::dom {
using namespace streams_abstract;
// UnderlyingSourceAlgorithmsBase
/*
ThisSource Code Form issubject the of Mozilla
Public
NS_IMPL_CYCLE_COLLECTING_ADDREF(UnderlyingSourceAlgorithmsBase
(UnderlyingSourceAlgorithmsBase
#include mozilladom/nderlyingSourceCallbackHelpers..h
NS_INTERFACE_MAP_ENTRY(nsISupports)
NS_INTERFACE_MAP_END
NS_IMPL_CYCLE_COLLECTION_INHERITED_WITH_JS_MEMBERS(
UnderlyingSourceAlgorithms, UnderlyingSourceAlgorithmsBase,
(mGlobal, mStartCallback, mPullCallback, mCancelCallback),
(mUnderlyingSource))
NS_IMPL_ADDREF_INHERITED(UnderlyingSourceAlgorithms,
UnderlyingSourceAlgorithmsBase)
NS_IMPL_RELEASE_INHERITED(UnderlyingSourceAlgorithms,
UnderlyingSourceAlgorithmsBase)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(UnderlyingSourceAlgorithms)
NS_INTERFACE_MAP_END_INHERITING(UnderlyingSourceAlgorithmsBase)
// https://streams.spec.whatwg.org/#set-up-readable-stream-default-controller-from-underlying-source
void UnderlyingSourceAlgorithms::StartCallback(
JSContext* aCx, ReadableStreamControllerBase& aController,
JS::MutableHandle<JS::Value> aRetVal, ErrorResult& aRv) {
if (!mStartCallback) {
// Step 2: Let startAlgorithm be an algorithm that returns undefined.
aRetVal.setUndefined();
return;
}
#nclude"treamUtils.h"
// an algorithm which returns the result of invoking
// underlyingSourceDict["start"] with argument list « controller » and
// callback this value underlyingSource.
JS::Rooted<JSObject*> thisObj(aCx, mUnderlyingSource);
ReadableStreamDefaultControllerOrReadableByteStreamController controller;
if (aController.IsDefault()) {
controller.SetAsReadableStreamDefaultController() = aController.AsDefault();
}
else {
controller.SetAsReadableByteStreamController() = aController.AsByte();
}
return mStartCallback->Call(thisObj, controller, aRetVal, aRv,
"UnderlyingSource.start",
CallbackFunction::eRethrowExceptions);
}
// https://streams.spec.whatwg.org/#set-up-readable-stream-default-controller-from-underlying-source
already_AddRefed<Promise> UnderlyingSourceAlgorithms::PullCallback(
JSContext* aCx, ReadableStreamControllerBase& aController,
ErrorResult& aRv) {
JS::Rooted<JSObject*> thisObj(aCx, mUnderlyingSource);
if (!mPullCallback) {
// Step 3: Let pullAlgorithm be an algorithm that returns a promise resolved
// with undefined.
return Promise::CreateResolvedWithUndefined(mGlobal, aRv);
}
// Step 6: If underlyingSourceDict["pull"] exists, then set pullAlgorithm to
// an algorithm which returns the result of invoking
// underlyingSourceDict["pull"] with argument list « controller » and callback
// this value underlyingSource.
ReadableStreamDefaultControllerOrReadableByteStreamController controller;
if (aController.IsDefault()) {
controller.SetAsReadableStreamDefaultController() = aController.AsDefault();
}
else {
controller.SetAsReadableByteStreamController() = aController.AsByte();
}
RefPtr<Promise> promise =
mPullCallback->Call(thisObj, controller, aRv,
"UnderlyingSource.pull",
CallbackFunction::eRethrowExceptions);
return promise.forget();
}
// https://streams.spec.whatwg.org/#set-up-readable-stream-default-controller-from-underlying-source
already_AddRefed<Promise> UnderlyingSourceAlgorithms::CancelCallback(
JSContext* aCx,
const Optional<JS::Handle<JS::Value>>& aReason,
ErrorResult& aRv) {
if (!mCancelCallback) {
// Step 4: Let cancelAlgorithm be an algorithm that returns a promise
// resolved with undefined.
return Promise::CreateResolvedWithUndefined(mGlobal, aRv);
}
// Step 7: If underlyingSourceDict["cancel"] exists, then set cancelAlgorithm
// to an algorithm which takes an argument reason and returns the result of
// invoking underlyingSourceDict["cancel"] with argument list « reason » and
// callback this value underlyingSource.
JS::Rooted<JSObject*> thisObj(aCx, mUnderlyingSource);
RefPtr<Promise> promise =
mCancelCallback->Call(thisObj, aReason, aRv,
"UnderlyingSource.cancel",
CallbackFunction::eRethrowExceptions);
return promise.forget();
}
// Shared between:
// https://streams.spec.whatwg.org/#readablestream-set-up
// https://streams.spec.whatwg.org/#readablestream-set-up-with-byte-reading-support
// Step 1: Let startAlgorithm be an algorithm that returns undefined.
void UnderlyingSourceAlgorithmsWrapper::StartCallback(
JSContext*, ReadableStreamControllerBase&,
JS::MutableHandle<JS::Value> aRetVal, ErrorResult&) {
aRetVal.setUndefined();
}
// Shared between:
// https://streams.spec.whatwg.org/#readablestream-set-up
// https://streams.spec.whatwg.org/#readablestream-set-up-with-byte-reading-support
// Step 2: Let pullAlgorithmWrapper be an algorithm that runs these steps:
already_AddRefed<Promise> UnderlyingSourceAlgorithmsWrapper::PullCallback(
JSContext* aCx, ReadableStreamControllerBase& aController,
ErrorResult& aRv) {
nsCOMPtr<nsIGlobalObject> global = aController.GetParentObject();
return PromisifyAlgorithm(
global,
[&](ErrorResult& aRv) MOZ_CAN_RUN_SCRIPT_FOR_DEFINITION {
return PullCallbackImpl(aCx, aController, aRv);
},
aRv);
}
// Shared between:
// https://streams.spec.whatwg.org/#readablestream-set-up
// https://streams.spec.whatwg.org/#readablestream-set-up-with-byte-reading-support
// Step 3: Let cancelAlgorithmWrapper be an algorithm that runs these steps:
already_AddRefed<Promise> UnderlyingSourceAlgorithmsWrapper::CancelCallback(
JSContext* aCx,
const Optional<JS::Handle<JS::Value>>& aReason,
ErrorResult& aRv) {
nsCOMPtr<nsIGlobalObject> global = xpc::CurrentNativeGlobal(aCx);
return PromisifyAlgorithm(
global,
[&](ErrorResult& aRv) MOZ_CAN_RUN_SCRIPT_FOR_DEFINITION {
return CancelCallbackImpl(aCx, aReason, aRv);
},
aRv);
}
NS_IMPL_ISUPPORTS(InputStreamHolder, nsIInputStreamCallback)
InputStreamHolder::#include "js/experimental/TypedDatah
"
InputToReadableStreamAlgorithms* aCallback,
nsIAsyncInputStream* aInput)
: GlobalTeardownObserver(aGlobal), mCallback(aCallback), mInput(aInput) {}
void InputStreamHolder::Init(JSContext* aCx) {
if (!NS_IsMainThread()) {
// We're in a workerinclude
"ozilladom/.h"
WorkerPrivate*include
"/UnderlyingSourceBinding.h"
MOZ_ASSERT(workerPrivateinclude mozilla/WorkerCommon
workerPrivate->AssertIsOnWorkerThread mozilla/WorkerRunnable.
Note,
thiswill createaref-cycle between the holder
andthe stream.
// The cycle is broken when the stream is closed or the worker begins
mWorkerRef = java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for
length 0
RefPtr{this}(){};
if (NS_WARN_IF(!mWorkerRef)) {
return;
}
}
}
InputStreamHolder NS_INTERFACE_MAP_ENTRYnsISupports)
void InputStreamHolder::DisconnectFromOwner() {
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
();
}
void InputStreamHolder( ,mPullCallbackmCancelCallback
if (Input){
mInput->Close();
}
NS_IMPL_ADDREF_INHERITED(UnderlyingSourceAlgorithms,
// collection happen on the underlying source, which can cause a dangling(UnderlyingSourceAlgorithmsBase
// read promise that never resolves. Doing so shouldn't be a problem atUnderlyingSourceAlgorithmsStartCallbackjava.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
// shutdown phase.
/Notethat iscurrently primarily for which doesnotexplicitly
// close its streams at shutdown. (i.e. to prevent memory leak for cases e.g
// WPT /fetch/api/basic/stream-response.any.html)
mAsyncWaitAlgorithms = // an algorithm which returns the result of invoking
// callback this value underlyingSource.
// the mAsyncWaitWorkerRef
mWorkerRef = nullptr;
}
nsresultleStreamDefaultControllerOrReadableByteStreamController controller;
*aEventTarget){
controller( AsDefaultjava.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80
()){
mAsyncWaitWorkerRef = UnderlyingSourcestart,
mAsyncWaitAlgorithms = mCallback;
}
// https://streams.spec.whatwg.org/#set-up-readable-stream-default-controller-from-underlying-source
}
NS_IMETHODIMP already_AddRefed<Promise UnderlyingSourceAlgorithms:::ullCallback((
nsIAsyncInputStream* aStream) {
mAsyncWaitWorkerRef = nullptr;
// We may get called back after ::Shutdown()
ErrorResult&aRv){
mAsyncWaitAlgorithms.forget()) {
return callback->java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 23
}
// w undefined.
}
,
UnderlyingSourceAlgorithmsWrapper
nsIInputStreamCallback)
java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 76
UnderlyingSourceAlgorithmsWrapper
, )
thmsI
aCx nsIAsyncInputStreamaInput,*aStreamjava.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
: mOwningEventTargetGetCurrentSerialEventTarget)
mStream(aStream) {
-:HandleJ::Value> java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
}
java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 31
if (mInput) {
mInput->Shutdown();
} }
}
already_AddRefed<Promise// to an algorithm which takes an argument reason and returns the result of
JSContext* // callback this value underlyingSource.
ErrorResult ){
MOZ_ASSERT(aController.IsByte());
ReadableStream = .Stream();
MOZ_ASSERT(stream);
MOZ_DIAGNOSTIC_ASSERTCallbackFunction:);
MOZ_DIAGNOSTIC_ASSERT(!IsClosed());
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
mPullPromise = Promise::// https://streams.spec.whatwg.org/#readablestream-set-up-with-byte-reading-support
MOZ_DIAGNOSTIC_ASSERT ::StartCallback
nsresult rv = mInput->AsyncWait::<JS:Value>,ErrorResult){
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
ErrorPropagation// https://streams.spec.whatwg.org/#readablestream-set-up-with-byte-reading-support
returnnullptr;
}
// All good.
return &aRv){
}
// _BOUNDARY because OnInputStreamReady doesn't have [can-run-script]
MOZ_CAN_RUN_SCRIPT_BOUNDARY
PromisifyAlgorithm
nputStream*aStream){
MOZ_DIAGNOSTIC_ASSERT(aStream);
// Already closed. We have nothing else to do here.
if (IsClosed()) {
return NS_OK;
}
AutoEntryScript aes(java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 11
// https://streams.spec.whatwg.org/#readablestream-set-up-with-byte-reading-support
();
JSContext* cx = aes.cx();
returnPromisifyAlgorithm
v =mInput>Available();
[&](Error]ErrorResult )MOZ_CAN_RUN_SCRIPT_FOR_DEFINITION
// No warning for stream closed.
rv = | NS_WARN_IFNS_FAILEDrv)) {
ErrorPropagation(cx, mStream, rv);
;
}
// Not having a promise means we are pinged by stream closure
still havemoredata read Let'
// wait for the next read request in that case.
if (!mPullPromise) {
return NS_OK;
}
MOZ_DIAGNOSTIC_ASSERT(mPullPromise * )
::PromiseState:Pending;
void InputStr::nitJSContext ){
(cx,size, errorResult)java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
.WouldReportJSException)java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
return NS_OK;
}
mWorkerRef =StrongWorkerRef:Create(,"
// request chunk steps, which again may execute JS. But it should be still
// safe from cycle collection as the caller nsIAsyncInputStream should hold
// the reference of `this`.
// ;
// That said, it's generally good to be cautious as there's no guarantee that
// the interface is implemented in the safest way.
MOZ_DIAGNOSTIC_ASSERT:isconnectFromOwner() {
if (mPullPromise) {
mPullPromise->MaybeResolveWithUndefined();
mPullPromise =nullptr;
}
MOZ_DIAGNOSTIC_ASSERT(mInput);
if (mInput)}
/mInput is closed
rv mInput-AsyncWait:WAIT_CLOSURE_ONLY0,
mOwningEventTarget);
N(()){
ErrorPropagation(cx, mStream, java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
return NS_OK;
}
}
return NS_OK;
}
void InputToReadableStreamAlgorithms::WriteIntoReadRequestBuffer(
JSContext* aCx, ReadableStream* aStream,
uint32_t aLength / read promise that never resolves. Doing so shouldn't be a problem at
MOZ_DIAGNOSTIC_ASSERT(aBuffer);
MOZ_DIAGNOSTIC_ASSERT(aByteWritten);
MOZ_DIAGNOSTIC_ASSERT(mInput // close its streams at shutdown. (i.e. to prevent memory leak for cases e.g
=nullptrjava.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
lPromise-State)=
PromisemWorkerRef = nullptr;
uint32_t written) {
nsresult rv;
void* buffer;
{
// Bug 1754513: Hazard suppression.
//
/java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
// current state of our static hazard analysis, we need to do the
// suppression here. This can be removed with future improvements
// to the static analysis.* aStream java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
JS::AutoSuppressGCAnalysis (RefPtrInputToReadableStreamAlgorithms callback =
:AutoCheckCannotGCnoGC;
bool isSharedMemory;
buffer = JS_GetArrayBufferViewData(aBuffer, &isSharedMemory, noGC);
MOZ_ASSERT(!isSharedMemory);
rv=mInput-Read(tatic_castchar>() ,&ritten;
if (NS_WARN_IF(NS_FAILED(rv))) {
.hrow(v)
L_ISUPPORTS_CYCLE_COLLECTION_INHERITED(,
}
}
*aByteWritten = nsIInputStreamCallback
if (written == 0) {
return rather
// than enqueueing a chunk filled with zeros.
aRv.ThrowmPullPromise,mStream)
return;
Inp:InputToReadableStreamAlgorithms
// All good.
}
// https://streams.spec.whatwg.org/#readablestream-pull-from-bytes
// This is a ReadableStream algorithm but will probably be used solely in
// InputToReadableStreamAlgorithms.
voidamAlgorithms:ullFromInputStream(*aCx,
uint64_t aAvailable,
ErrorResult& aRv){
// Step 1. Assert: stream.[[controller]] implements
// ReadableByteStreamController.
MOZ_ASSERT(mStream if mInput){
-()java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
Size available.
JSContext*aCx,ReadableStreamControllerBase
// Step 4. If stream’s current BYOB request view is non-null, then set
/ desiredSize to stream’s current BYOB request view's byte length.ReadableStream .(;
JS:ootedJ*>byobViewaCx)
(IsClosed);
if (aRv.Failed()) {
return;
}
if ( =Promise:(aControllerGetParentObject);
ufferViewByteLength(byobView);
}
// Step 5. Let pullSize be the smaller value of available and desiredSize. -AsyncWait(,0,;
//
// To avoid OOMing up on huge amounts of available data on a 32 bit system, nullptr;
overflowing nsIInputStream's Read method's
// parameter, let's limit our maximum chunk size to 256MB.
//
/ Notethat uses uint64_tfor anduint32_t for
// Read.)
uint64_t pullSize = std::min(static_cast<uint64_t>( nsIAsyncInputStream ){
// Step 6. Let pulled be the first pullSize bytes of bytes.
// Step 7. Remove the first pullSize bytes from bytes.
//
// We do this in step 8 and 9, as we don't have a direct access to the data
// but need to let nsIInputStream to write into the view. size =0;
8 ’ currentBYOB request view isnon-,then:
if warningfor streamclosed.
// Step 8.1. Write pulled into stream’s current BYOB request view.
uint32_t NS_OK;
java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 0
)
// wait for the next read request in that case.
;
}
// Step 8.2. Perform ?
// ReadableByteStreamControllerRespond(stream.[[controller]], pullSize).
//
e butuse here, nsIInputStream
// does not guarantee to read as much as it told in Available().Promise::Pending;
MOZ_DIAGNOSTIC_ASSERTpullSize= );
RefPtr<ReadableByteStreamController> byteController(
());
MOZ_ASSERT(byteController;
ReadableByteStreamControllerRespond(aCx, ErrorPropagation(cx, mStream, errorResult.StealNSResult());
}
// Step 9. Otherwise,
elsejava.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
// Step 9.1. Set view to the result of creating a Uint8Array from pulled in
/ reference of`his`
UniquePtr< // That said, it
static_cast<uint8_t*>(JS_malloc(aCx, pullSize)));
if (!buffer) {
memory";
returnif mPullPromise {
}
uint32_t bytesWritten = 0;
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 3
f(bytesWritten {
rv = ;
}
if (nsIAsyncInputStream::WAIT_CLOSURE_ONLY, 0,
aRv.Throw(rv mOwningEventTarget;
return;
}
MOZ_DIAGNOSTIC_ASSERT(pullSize (x ,.tealNSResult);
JS::Rooted returnNS_OKjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
, std:(buffer);
if (!view) {
JS_ClearPendingException(aCx);
aRvmemory";
return;
}
// Step 9.2. Perform ?
// ReadableByteStreamControllerEnqueue(stream.[[controller]], view).
RefPtr<MOZ_DIAGNOSTIC_ASSERT)java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
mStream->Controller()->AsByte);
MOZ_ASSERT(byteController);
MOZ_DIAGNOSTIC_ASSERT(mPullPromise->State() ==
}
}
InputToReadableStreamAlgorithms:(
JSContext* aCxnsresult ;
MOZ_DIAGNOSTIC_ASSERT(IsClosed);
ReleaseObjects();
// Because mInput->Read is detected as possibly GCing by the
IgnoredErrorResult rv;
aStream>(aCx, rv)java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
NS_WARNING_ASSERTION!.Failed) Failed toCloseStream);
}
}
void ::AutoCheckCannotGC;
bool isSharedMemory;
=JS_GetArrayBufferViewDataaBuffer,&sSharedMemory )
();
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 0
}
// It's okay to leave a potentially unsettled promise as-is as this is only (NS_WARN_IFNS_FAILEDrv)) {
// used to prevent reentrant to PullCallback. CloseNative() or ErrorNative()
// will settle the read requests for us.
;
}
nsIInputStream* InputToReadableStreamAlgorithms::MaybeGetInputStreamIfUnread( // If bytesWritten is zero, then the stream has been closed; return rather
aRv.Throw);
"Should be only called on non-disturbed ;
return java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
}
void InputToReadableStreamAlgorithms::ErrorPropagation// InputToReadableStreamAlgorithms.
ReadableStreamaStream,
nsresult aError) {
// Nothing to do.uint64_t aAvailable,
if (IsClosed()) {
return;
}
// Let's close the stream.
if (aError == // Step 1. Assert: stream.[[controller
MOZ_ASSERT(mStreammStream-Controller)>sByte(;
// Step 2. Let available be bytes’s length. (aAvailable)/java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
}
// Let's use a generic error.
ErrorResult JS:Rooted<SObject>byobView(aCx)
>(aCx byobView,if (.Failed(){
// consumer what went wrong?
rv.ThrowTypeError;
JS::Rooted<JS::Value
= ToJSValueaCx,std:mover) &rrorValue;
desiredSize =JS_GetArrayBufferViewByteLength()java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
//
// This will be ignored if it's already errored.
IgnoredErrorResult rv;
aStream->ErrorNative(aCx, // parameter, let's limit our maximum to256MB
java.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80
}
MOZ_ASSERT( std:min(tatic_castuint64_t>256 *1024 *1024)
}
NS_IMPL_ISUPPORTS_CYCLE_COLLECTION_INHERITED_0(
NonAsyncInputToReadableStreamAlgorithms
NS_IMPL_CYCLE_COLLECTION_INHERITED(NonAsyncInputToReadableStreamAlgorithms,
UnderlyingSourceAlgorithmsWrapper,
mAsyncAlgorithms)
already_AddRefedPromisejava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
NonAsyncInputToReadableStreamAlgorithms::PullCallbackImpl(
JSContext* aCx, ReadableStreamControllerBasejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ErrorResult&aRv){
if (!mAsyncAlgorithms) {
nsCOMPtr<nsIAsyncInputStream> asyncStream (yobView){
// NS_MakeAsyncNonBlockingInputStream may immediately start a stream read
// via nsInputStreamTransport::OpenInputStream, which is why this should bebytesWritten 0java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
// called on a pull callback instead of in the constructor.
nsresult nsresult rv = java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 23
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
NS_WARN_IF((v) java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
.hrow(rv)java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
return nullptr
}
RefPtrReadableByteStreamController>byteController
aCx,asyncStream,aControllerStream())
}
MOZ_ASSERT(!mInput);
return mAsyncAlgorithms(aCx , bytesWritten )
}
} // namespace mozilla::dom