chromium/third_party/blink/renderer/core/streams/promise_handler.cc

// 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.

#include "third_party/blink/renderer/core/streams/promise_handler.h"


namespace blink {

namespace {

void NoopFunctionCallback(const v8::FunctionCallbackInfo<v8::Value>&) {}

// Creating a new v8::Promise::Resolver to create a new promise can fail. If
// JavaScript will no longer execute, then we can safely return the original
// promise. Otherwise we have no choice but to crash.
v8::Local<v8::Promise> AttemptToReturnDummyPromise(
    v8::Local<v8::Context> context,
    v8::Local<v8::Promise> original_promise) {}

}  // namespace

PromiseHandler::PromiseHandler() = default;

void PromiseHandler::CallRaw(ScriptState* script_state,
                             const v8::FunctionCallbackInfo<v8::Value>& args) {}

PromiseHandlerWithValue::PromiseHandlerWithValue() = default;

void PromiseHandlerWithValue::CallRaw(
    ScriptState* script_state,
    const v8::FunctionCallbackInfo<v8::Value>& args) {}

v8::Local<v8::Promise> StreamThenPromise(v8::Local<v8::Context> context,
                                         v8::Local<v8::Promise> promise,
                                         ScriptFunction* on_fulfilled,
                                         ScriptFunction* on_rejected) {}

}  // namespace blink