• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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=bcf73c22701825bb552e78ece2e62c1e6b8da282$
13 //
14 
15 #include "libcef_dll/cpptoc/v8exception_cpptoc.h"
16 
17 namespace {
18 
19 // MEMBER FUNCTIONS - Body may be edited by hand.
20 
21 cef_string_userfree_t CEF_CALLBACK
v8exception_get_message(struct _cef_v8exception_t * self)22 v8exception_get_message(struct _cef_v8exception_t* self) {
23   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
24 
25   DCHECK(self);
26   if (!self)
27     return NULL;
28 
29   // Execute
30   CefString _retval = CefV8ExceptionCppToC::Get(self)->GetMessage();
31 
32   // Return type: string
33   return _retval.DetachToUserFree();
34 }
35 
36 cef_string_userfree_t CEF_CALLBACK
v8exception_get_source_line(struct _cef_v8exception_t * self)37 v8exception_get_source_line(struct _cef_v8exception_t* self) {
38   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
39 
40   DCHECK(self);
41   if (!self)
42     return NULL;
43 
44   // Execute
45   CefString _retval = CefV8ExceptionCppToC::Get(self)->GetSourceLine();
46 
47   // Return type: string
48   return _retval.DetachToUserFree();
49 }
50 
51 cef_string_userfree_t CEF_CALLBACK
v8exception_get_script_resource_name(struct _cef_v8exception_t * self)52 v8exception_get_script_resource_name(struct _cef_v8exception_t* self) {
53   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
54 
55   DCHECK(self);
56   if (!self)
57     return NULL;
58 
59   // Execute
60   CefString _retval = CefV8ExceptionCppToC::Get(self)->GetScriptResourceName();
61 
62   // Return type: string
63   return _retval.DetachToUserFree();
64 }
65 
v8exception_get_line_number(struct _cef_v8exception_t * self)66 int CEF_CALLBACK v8exception_get_line_number(struct _cef_v8exception_t* self) {
67   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
68 
69   DCHECK(self);
70   if (!self)
71     return 0;
72 
73   // Execute
74   int _retval = CefV8ExceptionCppToC::Get(self)->GetLineNumber();
75 
76   // Return type: simple
77   return _retval;
78 }
79 
80 int CEF_CALLBACK
v8exception_get_start_position(struct _cef_v8exception_t * self)81 v8exception_get_start_position(struct _cef_v8exception_t* self) {
82   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
83 
84   DCHECK(self);
85   if (!self)
86     return 0;
87 
88   // Execute
89   int _retval = CefV8ExceptionCppToC::Get(self)->GetStartPosition();
90 
91   // Return type: simple
92   return _retval;
93 }
94 
v8exception_get_end_position(struct _cef_v8exception_t * self)95 int CEF_CALLBACK v8exception_get_end_position(struct _cef_v8exception_t* self) {
96   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
97 
98   DCHECK(self);
99   if (!self)
100     return 0;
101 
102   // Execute
103   int _retval = CefV8ExceptionCppToC::Get(self)->GetEndPosition();
104 
105   // Return type: simple
106   return _retval;
107 }
108 
v8exception_get_start_column(struct _cef_v8exception_t * self)109 int CEF_CALLBACK v8exception_get_start_column(struct _cef_v8exception_t* self) {
110   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
111 
112   DCHECK(self);
113   if (!self)
114     return 0;
115 
116   // Execute
117   int _retval = CefV8ExceptionCppToC::Get(self)->GetStartColumn();
118 
119   // Return type: simple
120   return _retval;
121 }
122 
v8exception_get_end_column(struct _cef_v8exception_t * self)123 int CEF_CALLBACK v8exception_get_end_column(struct _cef_v8exception_t* self) {
124   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
125 
126   DCHECK(self);
127   if (!self)
128     return 0;
129 
130   // Execute
131   int _retval = CefV8ExceptionCppToC::Get(self)->GetEndColumn();
132 
133   // Return type: simple
134   return _retval;
135 }
136 
137 }  // namespace
138 
139 // CONSTRUCTOR - Do not edit by hand.
140 
CefV8ExceptionCppToC()141 CefV8ExceptionCppToC::CefV8ExceptionCppToC() {
142   GetStruct()->get_message = v8exception_get_message;
143   GetStruct()->get_source_line = v8exception_get_source_line;
144   GetStruct()->get_script_resource_name = v8exception_get_script_resource_name;
145   GetStruct()->get_line_number = v8exception_get_line_number;
146   GetStruct()->get_start_position = v8exception_get_start_position;
147   GetStruct()->get_end_position = v8exception_get_end_position;
148   GetStruct()->get_start_column = v8exception_get_start_column;
149   GetStruct()->get_end_column = v8exception_get_end_column;
150 }
151 
152 // DESTRUCTOR - Do not edit by hand.
153 
~CefV8ExceptionCppToC()154 CefV8ExceptionCppToC::~CefV8ExceptionCppToC() {}
155 
156 template <>
157 CefRefPtr<CefV8Exception>
158 CefCppToCRefCounted<CefV8ExceptionCppToC, CefV8Exception, cef_v8exception_t>::
UnwrapDerived(CefWrapperType type,cef_v8exception_t * s)159     UnwrapDerived(CefWrapperType type, cef_v8exception_t* s) {
160   NOTREACHED() << "Unexpected class type: " << type;
161   return nullptr;
162 }
163 
164 template <>
165 CefWrapperType CefCppToCRefCounted<CefV8ExceptionCppToC,
166                                    CefV8Exception,
167                                    cef_v8exception_t>::kWrapperType =
168     WT_V8EXCEPTION;
169