1 // Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights
2 // reserved. Use of this source code is governed by a BSD-style license that
3 // can be found in the LICENSE file.
4 //
5 // ---------------------------------------------------------------------------
6 //
7 // This file was generated by the CEF translator tool. If making changes by
8 // hand only do so within the body of existing method and function
9 // implementations. See the translator.README.txt file in the tools directory
10 // for more information.
11 //
12 // $hash=bf78c133604e1535633ac8c93ca153bcefe2718d$
13 //
14
15 #include "libcef_dll/ctocpp/v8stack_trace_ctocpp.h"
16 #include "libcef_dll/ctocpp/v8stack_frame_ctocpp.h"
17 #include "libcef_dll/shutdown_checker.h"
18
19 // STATIC METHODS - Body may be edited by hand.
20
21 NO_SANITIZE("cfi-icall")
GetCurrent(int frame_limit)22 CefRefPtr<CefV8StackTrace> CefV8StackTrace::GetCurrent(int frame_limit) {
23 shutdown_checker::AssertNotShutdown();
24
25 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
26
27 // Execute
28 cef_v8stack_trace_t* _retval = cef_v8stack_trace_get_current(frame_limit);
29
30 // Return type: refptr_same
31 return CefV8StackTraceCToCpp::Wrap(_retval);
32 }
33
34 // VIRTUAL METHODS - Body may be edited by hand.
35
IsValid()36 NO_SANITIZE("cfi-icall") bool CefV8StackTraceCToCpp::IsValid() {
37 shutdown_checker::AssertNotShutdown();
38
39 cef_v8stack_trace_t* _struct = GetStruct();
40 if (CEF_MEMBER_MISSING(_struct, is_valid))
41 return false;
42
43 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
44
45 // Execute
46 int _retval = _struct->is_valid(_struct);
47
48 // Return type: bool
49 return _retval ? true : false;
50 }
51
GetFrameCount()52 NO_SANITIZE("cfi-icall") int CefV8StackTraceCToCpp::GetFrameCount() {
53 shutdown_checker::AssertNotShutdown();
54
55 cef_v8stack_trace_t* _struct = GetStruct();
56 if (CEF_MEMBER_MISSING(_struct, get_frame_count))
57 return 0;
58
59 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
60
61 // Execute
62 int _retval = _struct->get_frame_count(_struct);
63
64 // Return type: simple
65 return _retval;
66 }
67
68 NO_SANITIZE("cfi-icall")
GetFrame(int index)69 CefRefPtr<CefV8StackFrame> CefV8StackTraceCToCpp::GetFrame(int index) {
70 shutdown_checker::AssertNotShutdown();
71
72 cef_v8stack_trace_t* _struct = GetStruct();
73 if (CEF_MEMBER_MISSING(_struct, get_frame))
74 return nullptr;
75
76 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
77
78 // Execute
79 cef_v8stack_frame_t* _retval = _struct->get_frame(_struct, index);
80
81 // Return type: refptr_same
82 return CefV8StackFrameCToCpp::Wrap(_retval);
83 }
84
85 // CONSTRUCTOR - Do not edit by hand.
86
CefV8StackTraceCToCpp()87 CefV8StackTraceCToCpp::CefV8StackTraceCToCpp() {}
88
89 // DESTRUCTOR - Do not edit by hand.
90
~CefV8StackTraceCToCpp()91 CefV8StackTraceCToCpp::~CefV8StackTraceCToCpp() {
92 shutdown_checker::AssertNotShutdown();
93 }
94
95 template <>
96 cef_v8stack_trace_t*
97 CefCToCppRefCounted<CefV8StackTraceCToCpp,
98 CefV8StackTrace,
UnwrapDerived(CefWrapperType type,CefV8StackTrace * c)99 cef_v8stack_trace_t>::UnwrapDerived(CefWrapperType type,
100 CefV8StackTrace* c) {
101 NOTREACHED() << "Unexpected class type: " << type;
102 return nullptr;
103 }
104
105 template <>
106 CefWrapperType CefCToCppRefCounted<CefV8StackTraceCToCpp,
107 CefV8StackTrace,
108 cef_v8stack_trace_t>::kWrapperType =
109 WT_V8STACK_TRACE;
110