// Copyright (c) 2026 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=9b9af257f8b11eacbe9f38aa3ea1684181380df8$
//

#include "libcef_dll/ctocpp/v8_stack_frame_ctocpp.h"

// VIRTUAL METHODS - Body may be edited by hand.

NO_SANITIZE("cfi-icall") bool CefV8StackFrameCToCpp::IsValid() {
  auto *_struct = GetStruct();
  if (!_struct->is_valid) {
    return false;
  }

  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  // Execute
  int _retval = _struct->is_valid(_struct);

  // Return type: bool
  return _retval ? true : false;
}

NO_SANITIZE("cfi-icall") CefString CefV8StackFrameCToCpp::GetScriptName() {
  auto *_struct = GetStruct();
  if (!_struct->get_script_name) {
    return CefString();
  }

  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  // Execute
  cef_string_userfree_t _retval = _struct->get_script_name(_struct);

  // Return type: string
  CefString _retvalStr;
  _retvalStr.AttachToUserFree(_retval);
  return _retvalStr;
}

NO_SANITIZE("cfi-icall")
CefString CefV8StackFrameCToCpp::GetScriptNameOrSourceURL() {
  auto *_struct = GetStruct();
  if (!_struct->get_script_name_or_source_url) {
    return CefString();
  }

  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  // Execute
  cef_string_userfree_t _retval =
      _struct->get_script_name_or_source_url(_struct);

  // Return type: string
  CefString _retvalStr;
  _retvalStr.AttachToUserFree(_retval);
  return _retvalStr;
}

NO_SANITIZE("cfi-icall") CefString CefV8StackFrameCToCpp::GetFunctionName() {
  auto *_struct = GetStruct();
  if (!_struct->get_function_name) {
    return CefString();
  }

  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  // Execute
  cef_string_userfree_t _retval = _struct->get_function_name(_struct);

  // Return type: string
  CefString _retvalStr;
  _retvalStr.AttachToUserFree(_retval);
  return _retvalStr;
}

NO_SANITIZE("cfi-icall") int CefV8StackFrameCToCpp::GetLineNumber() {
  auto *_struct = GetStruct();
  if (!_struct->get_line_number) {
    return 0;
  }

  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  // Execute
  int _retval = _struct->get_line_number(_struct);

  // Return type: simple
  return _retval;
}

NO_SANITIZE("cfi-icall") int CefV8StackFrameCToCpp::GetColumn() {
  auto *_struct = GetStruct();
  if (!_struct->get_column) {
    return 0;
  }

  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  // Execute
  int _retval = _struct->get_column(_struct);

  // Return type: simple
  return _retval;
}

NO_SANITIZE("cfi-icall") bool CefV8StackFrameCToCpp::IsEval() {
  auto *_struct = GetStruct();
  if (!_struct->is_eval) {
    return false;
  }

  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  // Execute
  int _retval = _struct->is_eval(_struct);

  // Return type: bool
  return _retval ? true : false;
}

NO_SANITIZE("cfi-icall") bool CefV8StackFrameCToCpp::IsConstructor() {
  auto *_struct = GetStruct();
  if (!_struct->is_constructor) {
    return false;
  }

  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  // Execute
  int _retval = _struct->is_constructor(_struct);

  // Return type: bool
  return _retval ? true : false;
}

// CONSTRUCTOR - Do not edit by hand.

CefV8StackFrameCToCpp::CefV8StackFrameCToCpp() {}

// DESTRUCTOR - Do not edit by hand.

CefV8StackFrameCToCpp::~CefV8StackFrameCToCpp() {}

template <>
cef_v8_stack_frame_t *
CefCToCppRefCounted<CefV8StackFrameCToCpp, CefV8StackFrame,
                    cef_v8_stack_frame_t>::UnwrapDerived(CefWrapperType type,
                                                         CefV8StackFrame *c) {
  CHECK(false) << __func__ << " called with unexpected class type " << type;
  return nullptr;
}

template <>
CefWrapperType CefCToCppRefCounted<CefV8StackFrameCToCpp, CefV8StackFrame,
                                   cef_v8_stack_frame_t>::kWrapperType =
    WT_V8_STACK_FRAME;
