chromium/third_party/blink/renderer/platform/bindings/bigint.h

// Copyright 2023 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_PLATFORM_BINDINGS_BIGINT_H_
#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_BINDINGS_BIGINT_H_

#include <optional>

#include "base/compiler_specific.h"
#include "third_party/abseil-cpp/absl/numeric/int128.h"
#include "third_party/blink/renderer/platform/platform_export.h"
#include "third_party/blink/renderer/platform/wtf/vector.h"
#include "v8/include/v8-context.h"
#include "v8/include/v8-forward.h"
#include "v8/include/v8-local-handle.h"
#include "v8/include/v8-primitive.h"
#include "v8/include/v8-value.h"

namespace blink {

class ExceptionState;

class PLATFORM_EXPORT BigInt final {};

// Convert a value to a BigInt. This can fail depending on the input type
// and value.
// https://webidl.spec.whatwg.org/#es-bigint
PLATFORM_EXPORT BigInt ToBigIntSlow(v8::Isolate*,
                                    v8::Local<v8::Value>,
                                    ExceptionState&);
inline BigInt ToBigInt(v8::Isolate* isolate,
                       v8::Local<v8::Value> value,
                       ExceptionState& exception_state) {}

}  // namespace blink

#endif  // THIRD_PARTY_BLINK_RENDERER_PLATFORM_BINDINGS_BIGINT_H_