chromium/third_party/blink/renderer/core/streams/stream_promise_resolver.h

// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_STREAMS_STREAM_PROMISE_RESOLVER_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_STREAMS_STREAM_PROMISE_RESOLVER_H_

#include "third_party/blink/renderer/core/core_export.h"
#include "third_party/blink/renderer/platform/bindings/exception_state.h"
#include "third_party/blink/renderer/platform/bindings/trace_wrapper_v8_reference.h"
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
#include "third_party/blink/renderer/platform/heap/visitor.h"
#include "v8/include/v8.h"

namespace blink {

class ScriptPromiseUntyped;
class ScriptState;

// A thin wrapper around v8::Promise::Resolver that matches the semantics used
// for promises in the standard. StreamPromiseResolver is used for promises that
// need to be stored somewhere: promises on the stack should generally use
// v8::Local<v8::Promise>, or ScriptPromiseUntyped if they are to be returned to
// the bindings code.
class CORE_EXPORT StreamPromiseResolver final
    : public GarbageCollected<StreamPromiseResolver> {};

}  // namespace blink

#endif  // THIRD_PARTY_BLINK_RENDERER_CORE_STREAMS_STREAM_PROMISE_RESOLVER_H_