Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(425)

Side by Side Diff: Source/bindings/tests/results/V8TestInterface2.cpp

Issue 234403004: Rename V8TRYCATCH_* macros in v8/V8BindingMacros.h (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: BOOL*_BOOL -> BOOL* Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! 5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY!
6 6
7 #include "config.h" 7 #include "config.h"
8 #include "V8TestInterface2.h" 8 #include "V8TestInterface2.h"
9 9
10 #include "RuntimeEnabledFeatures.h" 10 #include "RuntimeEnabledFeatures.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 template <typename T> void V8_USE(T) { } 49 template <typename T> void V8_USE(T) { }
50 50
51 static void itemMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 51 static void itemMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
52 { 52 {
53 ExceptionState exceptionState(ExceptionState::ExecutionContext, "item", "Tes tInterface2", info.Holder(), info.GetIsolate()); 53 ExceptionState exceptionState(ExceptionState::ExecutionContext, "item", "Tes tInterface2", info.Holder(), info.GetIsolate());
54 if (UNLIKELY(info.Length() < 1)) { 54 if (UNLIKELY(info.Length() < 1)) {
55 throwArityTypeError(exceptionState, 1, info.Length()); 55 throwArityTypeError(exceptionState, 1, info.Length());
56 return; 56 return;
57 } 57 }
58 TestInterface2* impl = V8TestInterface2::toNative(info.Holder()); 58 TestInterface2* impl = V8TestInterface2::toNative(info.Holder());
59 V8TRYCATCH_EXCEPTION_VOID(unsigned, index, toUInt32(info[0], exceptionState) , exceptionState); 59 TONATIVE_VOID_EXCEPTIONSTATE(unsigned, index, toUInt32(info[0], exceptionSta te), exceptionState);
60 RefPtr<TestInterfaceEmpty> result = impl->item(index, exceptionState); 60 RefPtr<TestInterfaceEmpty> result = impl->item(index, exceptionState);
61 if (exceptionState.throwIfNeeded()) 61 if (exceptionState.throwIfNeeded())
62 return; 62 return;
63 v8SetReturnValue(info, result.release()); 63 v8SetReturnValue(info, result.release());
64 } 64 }
65 65
66 static void itemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) 66 static void itemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
67 { 67 {
68 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 68 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
69 TestInterface2V8Internal::itemMethod(info); 69 TestInterface2V8Internal::itemMethod(info);
70 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 70 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
71 } 71 }
72 72
73 static void setItemMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 73 static void setItemMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
74 { 74 {
75 ExceptionState exceptionState(ExceptionState::ExecutionContext, "setItem", " TestInterface2", info.Holder(), info.GetIsolate()); 75 ExceptionState exceptionState(ExceptionState::ExecutionContext, "setItem", " TestInterface2", info.Holder(), info.GetIsolate());
76 if (UNLIKELY(info.Length() < 2)) { 76 if (UNLIKELY(info.Length() < 2)) {
77 throwArityTypeError(exceptionState, 2, info.Length()); 77 throwArityTypeError(exceptionState, 2, info.Length());
78 return; 78 return;
79 } 79 }
80 TestInterface2* impl = V8TestInterface2::toNative(info.Holder()); 80 TestInterface2* impl = V8TestInterface2::toNative(info.Holder());
81 V8TRYCATCH_EXCEPTION_VOID(unsigned, index, toUInt32(info[0], exceptionState) , exceptionState); 81 TONATIVE_VOID_EXCEPTIONSTATE(unsigned, index, toUInt32(info[0], exceptionSta te), exceptionState);
82 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, value, info[1]); 82 TOSTRING_VOID(V8StringResource<>, value, info[1]);
83 String result = impl->setItem(index, value, exceptionState); 83 String result = impl->setItem(index, value, exceptionState);
84 if (exceptionState.throwIfNeeded()) 84 if (exceptionState.throwIfNeeded())
85 return; 85 return;
86 v8SetReturnValueString(info, result, info.GetIsolate()); 86 v8SetReturnValueString(info, result, info.GetIsolate());
87 } 87 }
88 88
89 static void setItemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf o) 89 static void setItemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf o)
90 { 90 {
91 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 91 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
92 TestInterface2V8Internal::setItemMethod(info); 92 TestInterface2V8Internal::setItemMethod(info);
93 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 93 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
94 } 94 }
95 95
96 static void deleteItemMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 96 static void deleteItemMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
97 { 97 {
98 ExceptionState exceptionState(ExceptionState::ExecutionContext, "deleteItem" , "TestInterface2", info.Holder(), info.GetIsolate()); 98 ExceptionState exceptionState(ExceptionState::ExecutionContext, "deleteItem" , "TestInterface2", info.Holder(), info.GetIsolate());
99 if (UNLIKELY(info.Length() < 1)) { 99 if (UNLIKELY(info.Length() < 1)) {
100 throwArityTypeError(exceptionState, 1, info.Length()); 100 throwArityTypeError(exceptionState, 1, info.Length());
101 return; 101 return;
102 } 102 }
103 TestInterface2* impl = V8TestInterface2::toNative(info.Holder()); 103 TestInterface2* impl = V8TestInterface2::toNative(info.Holder());
104 V8TRYCATCH_EXCEPTION_VOID(unsigned, index, toUInt32(info[0], exceptionState) , exceptionState); 104 TONATIVE_VOID_EXCEPTIONSTATE(unsigned, index, toUInt32(info[0], exceptionSta te), exceptionState);
105 bool result = impl->deleteItem(index, exceptionState); 105 bool result = impl->deleteItem(index, exceptionState);
106 if (exceptionState.throwIfNeeded()) 106 if (exceptionState.throwIfNeeded())
107 return; 107 return;
108 v8SetReturnValueBool(info, result); 108 v8SetReturnValueBool(info, result);
109 } 109 }
110 110
111 static void deleteItemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) 111 static void deleteItemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
112 { 112 {
113 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 113 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
114 TestInterface2V8Internal::deleteItemMethod(info); 114 TestInterface2V8Internal::deleteItemMethod(info);
115 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 115 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
116 } 116 }
117 117
118 static void namedItemMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 118 static void namedItemMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
119 { 119 {
120 ExceptionState exceptionState(ExceptionState::ExecutionContext, "namedItem", "TestInterface2", info.Holder(), info.GetIsolate()); 120 ExceptionState exceptionState(ExceptionState::ExecutionContext, "namedItem", "TestInterface2", info.Holder(), info.GetIsolate());
121 if (UNLIKELY(info.Length() < 1)) { 121 if (UNLIKELY(info.Length() < 1)) {
122 throwArityTypeError(exceptionState, 1, info.Length()); 122 throwArityTypeError(exceptionState, 1, info.Length());
123 return; 123 return;
124 } 124 }
125 TestInterface2* impl = V8TestInterface2::toNative(info.Holder()); 125 TestInterface2* impl = V8TestInterface2::toNative(info.Holder());
126 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, name, info[0]); 126 TOSTRING_VOID(V8StringResource<>, name, info[0]);
127 RefPtr<TestInterfaceEmpty> result = impl->namedItem(name, exceptionState); 127 RefPtr<TestInterfaceEmpty> result = impl->namedItem(name, exceptionState);
128 if (exceptionState.throwIfNeeded()) 128 if (exceptionState.throwIfNeeded())
129 return; 129 return;
130 v8SetReturnValue(info, result.release()); 130 v8SetReturnValue(info, result.release());
131 } 131 }
132 132
133 static void namedItemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& i nfo) 133 static void namedItemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& i nfo)
134 { 134 {
135 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 135 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
136 TestInterface2V8Internal::namedItemMethod(info); 136 TestInterface2V8Internal::namedItemMethod(info);
137 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 137 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
138 } 138 }
139 139
140 static void setNamedItemMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 140 static void setNamedItemMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
141 { 141 {
142 ExceptionState exceptionState(ExceptionState::ExecutionContext, "setNamedIte m", "TestInterface2", info.Holder(), info.GetIsolate()); 142 ExceptionState exceptionState(ExceptionState::ExecutionContext, "setNamedIte m", "TestInterface2", info.Holder(), info.GetIsolate());
143 if (UNLIKELY(info.Length() < 2)) { 143 if (UNLIKELY(info.Length() < 2)) {
144 throwArityTypeError(exceptionState, 2, info.Length()); 144 throwArityTypeError(exceptionState, 2, info.Length());
145 return; 145 return;
146 } 146 }
147 TestInterface2* impl = V8TestInterface2::toNative(info.Holder()); 147 TestInterface2* impl = V8TestInterface2::toNative(info.Holder());
148 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, name, info[0]); 148 TOSTRING_VOID(V8StringResource<>, name, info[0]);
149 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, value, info[1]); 149 TOSTRING_VOID(V8StringResource<>, value, info[1]);
150 String result = impl->setNamedItem(name, value, exceptionState); 150 String result = impl->setNamedItem(name, value, exceptionState);
151 if (exceptionState.throwIfNeeded()) 151 if (exceptionState.throwIfNeeded())
152 return; 152 return;
153 v8SetReturnValueString(info, result, info.GetIsolate()); 153 v8SetReturnValueString(info, result, info.GetIsolate());
154 } 154 }
155 155
156 static void setNamedItemMethodCallback(const v8::FunctionCallbackInfo<v8::Value> & info) 156 static void setNamedItemMethodCallback(const v8::FunctionCallbackInfo<v8::Value> & info)
157 { 157 {
158 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 158 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
159 TestInterface2V8Internal::setNamedItemMethod(info); 159 TestInterface2V8Internal::setNamedItemMethod(info);
160 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 160 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
161 } 161 }
162 162
163 static void deleteNamedItemMethod(const v8::FunctionCallbackInfo<v8::Value>& inf o) 163 static void deleteNamedItemMethod(const v8::FunctionCallbackInfo<v8::Value>& inf o)
164 { 164 {
165 ExceptionState exceptionState(ExceptionState::ExecutionContext, "deleteNamed Item", "TestInterface2", info.Holder(), info.GetIsolate()); 165 ExceptionState exceptionState(ExceptionState::ExecutionContext, "deleteNamed Item", "TestInterface2", info.Holder(), info.GetIsolate());
166 if (UNLIKELY(info.Length() < 1)) { 166 if (UNLIKELY(info.Length() < 1)) {
167 throwArityTypeError(exceptionState, 1, info.Length()); 167 throwArityTypeError(exceptionState, 1, info.Length());
168 return; 168 return;
169 } 169 }
170 TestInterface2* impl = V8TestInterface2::toNative(info.Holder()); 170 TestInterface2* impl = V8TestInterface2::toNative(info.Holder());
171 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, name, info[0]); 171 TOSTRING_VOID(V8StringResource<>, name, info[0]);
172 bool result = impl->deleteNamedItem(name, exceptionState); 172 bool result = impl->deleteNamedItem(name, exceptionState);
173 if (exceptionState.throwIfNeeded()) 173 if (exceptionState.throwIfNeeded())
174 return; 174 return;
175 v8SetReturnValueBool(info, result); 175 v8SetReturnValueBool(info, result);
176 } 176 }
177 177
178 static void deleteNamedItemMethodCallback(const v8::FunctionCallbackInfo<v8::Val ue>& info) 178 static void deleteNamedItemMethodCallback(const v8::FunctionCallbackInfo<v8::Val ue>& info)
179 { 179 {
180 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 180 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
181 TestInterface2V8Internal::deleteNamedItemMethod(info); 181 TestInterface2V8Internal::deleteNamedItemMethod(info);
(...skipping 24 matching lines...) Expand all
206 static void indexedPropertyGetterCallback(uint32_t index, const v8::PropertyCall backInfo<v8::Value>& info) 206 static void indexedPropertyGetterCallback(uint32_t index, const v8::PropertyCall backInfo<v8::Value>& info)
207 { 207 {
208 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMIndexedProperty"); 208 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMIndexedProperty");
209 TestInterface2V8Internal::indexedPropertyGetter(index, info); 209 TestInterface2V8Internal::indexedPropertyGetter(index, info);
210 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 210 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
211 } 211 }
212 212
213 static void indexedPropertySetter(uint32_t index, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<v8::Value>& info) 213 static void indexedPropertySetter(uint32_t index, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<v8::Value>& info)
214 { 214 {
215 TestInterface2* impl = V8TestInterface2::toNative(info.Holder()); 215 TestInterface2* impl = V8TestInterface2::toNative(info.Holder());
216 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, propertyValue, v8Va lue); 216 TOSTRING_VOID(V8StringResource<>, propertyValue, v8Value);
217 ExceptionState exceptionState(ExceptionState::IndexedSetterContext, "TestInt erface2", info.Holder(), info.GetIsolate()); 217 ExceptionState exceptionState(ExceptionState::IndexedSetterContext, "TestInt erface2", info.Holder(), info.GetIsolate());
218 bool result = impl->setItem(index, propertyValue, exceptionState); 218 bool result = impl->setItem(index, propertyValue, exceptionState);
219 if (exceptionState.throwIfNeeded()) 219 if (exceptionState.throwIfNeeded())
220 return; 220 return;
221 if (!result) 221 if (!result)
222 return; 222 return;
223 v8SetReturnValue(info, v8Value); 223 v8SetReturnValue(info, v8Value);
224 } 224 }
225 225
226 static void indexedPropertySetterCallback(uint32_t index, v8::Local<v8::Value> v 8Value, const v8::PropertyCallbackInfo<v8::Value>& info) 226 static void indexedPropertySetterCallback(uint32_t index, v8::Local<v8::Value> v 8Value, const v8::PropertyCallbackInfo<v8::Value>& info)
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 } 275 }
276 276
277 static void namedPropertySetter(v8::Local<v8::String> name, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<v8::Value>& info) 277 static void namedPropertySetter(v8::Local<v8::String> name, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<v8::Value>& info)
278 { 278 {
279 if (info.Holder()->HasRealNamedProperty(name)) 279 if (info.Holder()->HasRealNamedProperty(name))
280 return; 280 return;
281 if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(name).IsEmpty()) 281 if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(name).IsEmpty())
282 return; 282 return;
283 283
284 TestInterface2* impl = V8TestInterface2::toNative(info.Holder()); 284 TestInterface2* impl = V8TestInterface2::toNative(info.Holder());
285 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, propertyName, name) ; 285 TOSTRING_VOID(V8StringResource<>, propertyName, name);
286 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, propertyValue, v8Va lue); 286 TOSTRING_VOID(V8StringResource<>, propertyValue, v8Value);
287 v8::String::Utf8Value namedProperty(name); 287 v8::String::Utf8Value namedProperty(name);
288 ExceptionState exceptionState(ExceptionState::SetterContext, *namedProperty, "TestInterface2", info.Holder(), info.GetIsolate()); 288 ExceptionState exceptionState(ExceptionState::SetterContext, *namedProperty, "TestInterface2", info.Holder(), info.GetIsolate());
289 bool result = impl->setNamedItem(propertyName, propertyValue, exceptionState ); 289 bool result = impl->setNamedItem(propertyName, propertyValue, exceptionState );
290 if (exceptionState.throwIfNeeded()) 290 if (exceptionState.throwIfNeeded())
291 return; 291 return;
292 if (!result) 292 if (!result)
293 return; 293 return;
294 v8SetReturnValue(info, v8Value); 294 v8SetReturnValue(info, v8Value);
295 } 295 }
296 296
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 fromInternalPointer(object)->deref(); 489 fromInternalPointer(object)->deref();
490 } 490 }
491 491
492 template<> 492 template<>
493 v8::Handle<v8::Value> toV8NoInline(TestInterface2* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) 493 v8::Handle<v8::Value> toV8NoInline(TestInterface2* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
494 { 494 {
495 return toV8(impl, creationContext, isolate); 495 return toV8(impl, creationContext, isolate);
496 } 496 }
497 497
498 } // namespace WebCore 498 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8TestInterface.cpp ('k') | Source/bindings/tests/results/V8TestInterfaceCheckSecurity.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698