js/src/builtin/Stream.h
author criss <ccozmuta@mozilla.com>
Mon, 18 Oct 2021 16:30:48 +0300
changeset 596179 ee8efced380b871deac4fba285955953a4a89ef5
parent 567116 1f385759e3f5f8e8070ef7f0442562d74cbb97e8
permissions -rw-r--r--
Backed out changeset 21276955f659 (bug 1720926) for causing hybrid bustages on nsIPrincipal. CLOSED TREE

/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
 * vim: set ts=8 sts=2 et sw=2 tw=80:
 * 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/. */

#ifndef builtin_Stream_h
#define builtin_Stream_h

#include "jstypes.h"        // JS_PUBLIC_API
#include "js/RootingAPI.h"  // JS::Handle

struct JS_PUBLIC_API JSContext;

namespace js {

class PromiseObject;
class ReadableByteStreamController;
class ReadableStreamController;

[[nodiscard]] extern bool ReadableByteStreamControllerClearPendingPullIntos(
    JSContext* cx,
    JS::Handle<ReadableByteStreamController*> unwrappedController);

[[nodiscard]] extern bool ReadableByteStreamControllerClose(
    JSContext* cx,
    JS::Handle<ReadableByteStreamController*> unwrappedController);

[[nodiscard]] extern PromiseObject* ReadableStreamControllerPullSteps(
    JSContext* cx, JS::Handle<ReadableStreamController*> unwrappedController);

}  // namespace js

#endif /* builtin_Stream_h */