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

Side by Side Diff: third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface5.cpp

Issue 1678003002: Remove sampling trace events from the binding layer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
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 "V8TestInterface5.h" 7 #include "V8TestInterface5.h"
8 8
9 #include "bindings/core/v8/ExceptionState.h" 9 #include "bindings/core/v8/ExceptionState.h"
10 #include "bindings/core/v8/ScriptState.h" 10 #include "bindings/core/v8/ScriptState.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 51
52 static void testInterfaceAttributeAttributeGetter(const v8::FunctionCallbackInfo <v8::Value>& info) 52 static void testInterfaceAttributeAttributeGetter(const v8::FunctionCallbackInfo <v8::Value>& info)
53 { 53 {
54 v8::Local<v8::Object> holder = info.Holder(); 54 v8::Local<v8::Object> holder = info.Holder();
55 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); 55 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
56 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceAttribute()), impl ); 56 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceAttribute()), impl );
57 } 57 }
58 58
59 static void testInterfaceAttributeAttributeGetterCallback(const v8::FunctionCall backInfo<v8::Value>& info) 59 static void testInterfaceAttributeAttributeGetterCallback(const v8::FunctionCall backInfo<v8::Value>& info)
60 { 60 {
61 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
62 TestInterface5ImplementationV8Internal::testInterfaceAttributeAttributeGette r(info); 61 TestInterface5ImplementationV8Internal::testInterfaceAttributeAttributeGette r(info);
63 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
64 } 62 }
65 63
66 static void testInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) 64 static void testInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
67 { 65 {
68 v8::Local<v8::Object> holder = info.Holder(); 66 v8::Local<v8::Object> holder = info.Holder();
69 ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceA ttribute", "TestInterface5", holder, info.GetIsolate()); 67 ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceA ttribute", "TestInterface5", holder, info.GetIsolate());
70 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); 68 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
71 TestInterface5Implementation* cppValue = V8TestInterface5::toImplWithTypeChe ck(info.GetIsolate(), v8Value); 69 TestInterface5Implementation* cppValue = V8TestInterface5::toImplWithTypeChe ck(info.GetIsolate(), v8Value);
72 if (!cppValue) { 70 if (!cppValue) {
73 exceptionState.throwTypeError("The provided value is not of type 'TestIn terface5'."); 71 exceptionState.throwTypeError("The provided value is not of type 'TestIn terface5'.");
74 exceptionState.throwIfNeeded(); 72 exceptionState.throwIfNeeded();
75 return; 73 return;
76 } 74 }
77 impl->setTestInterfaceAttribute(WTF::getPtr(cppValue)); 75 impl->setTestInterfaceAttribute(WTF::getPtr(cppValue));
78 } 76 }
79 77
80 static void testInterfaceAttributeAttributeSetterCallback(const v8::FunctionCall backInfo<v8::Value>& info) 78 static void testInterfaceAttributeAttributeSetterCallback(const v8::FunctionCall backInfo<v8::Value>& info)
81 { 79 {
82 v8::Local<v8::Value> v8Value = info[0]; 80 v8::Local<v8::Value> v8Value = info[0];
83 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
84 TestInterface5ImplementationV8Internal::testInterfaceAttributeAttributeSette r(v8Value, info); 81 TestInterface5ImplementationV8Internal::testInterfaceAttributeAttributeSette r(v8Value, info);
85 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
86 } 82 }
87 83
88 static void testInterfaceConstructorAttributeAttributeSetter(v8::Local<v8::Value > v8Value, const v8::PropertyCallbackInfo<void>& info) 84 static void testInterfaceConstructorAttributeAttributeSetter(v8::Local<v8::Value > v8Value, const v8::PropertyCallbackInfo<void>& info)
89 { 85 {
90 v8::Local<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "test InterfaceConstructorAttribute"); 86 v8::Local<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "test InterfaceConstructorAttribute");
91 TestInterface5ImplementationCreateDataProperty(propertyName, v8Value, info); 87 TestInterface5ImplementationCreateDataProperty(propertyName, v8Value, info);
92 } 88 }
93 89
94 static void testInterfaceConstructorAttributeAttributeSetterCallback(v8::Local<v 8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& in fo) 90 static void testInterfaceConstructorAttributeAttributeSetterCallback(v8::Local<v 8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& in fo)
95 { 91 {
96 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
97 TestInterface5ImplementationV8Internal::testInterfaceConstructorAttributeAtt ributeSetter(v8Value, info); 92 TestInterface5ImplementationV8Internal::testInterfaceConstructorAttributeAtt ributeSetter(v8Value, info);
98 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
99 } 93 }
100 94
101 static void doubleAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Va lue>& info) 95 static void doubleAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Va lue>& info)
102 { 96 {
103 v8::Local<v8::Object> holder = info.Holder(); 97 v8::Local<v8::Object> holder = info.Holder();
104 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); 98 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
105 v8SetReturnValue(info, impl->doubleAttribute()); 99 v8SetReturnValue(info, impl->doubleAttribute());
106 } 100 }
107 101
108 static void doubleAttributeAttributeGetterCallback(const v8::FunctionCallbackInf o<v8::Value>& info) 102 static void doubleAttributeAttributeGetterCallback(const v8::FunctionCallbackInf o<v8::Value>& info)
109 { 103 {
110 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
111 TestInterface5ImplementationV8Internal::doubleAttributeAttributeGetter(info) ; 104 TestInterface5ImplementationV8Internal::doubleAttributeAttributeGetter(info) ;
112 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
113 } 105 }
114 106
115 static void doubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v 8::FunctionCallbackInfo<v8::Value>& info) 107 static void doubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v 8::FunctionCallbackInfo<v8::Value>& info)
116 { 108 {
117 v8::Local<v8::Object> holder = info.Holder(); 109 v8::Local<v8::Object> holder = info.Holder();
118 ExceptionState exceptionState(ExceptionState::SetterContext, "doubleAttribut e", "TestInterface5", holder, info.GetIsolate()); 110 ExceptionState exceptionState(ExceptionState::SetterContext, "doubleAttribut e", "TestInterface5", holder, info.GetIsolate());
119 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); 111 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
120 double cppValue = toRestrictedDouble(info.GetIsolate(), v8Value, exceptionSt ate); 112 double cppValue = toRestrictedDouble(info.GetIsolate(), v8Value, exceptionSt ate);
121 if (exceptionState.throwIfNeeded()) 113 if (exceptionState.throwIfNeeded())
122 return; 114 return;
123 impl->setDoubleAttribute(cppValue); 115 impl->setDoubleAttribute(cppValue);
124 } 116 }
125 117
126 static void doubleAttributeAttributeSetterCallback(const v8::FunctionCallbackInf o<v8::Value>& info) 118 static void doubleAttributeAttributeSetterCallback(const v8::FunctionCallbackInf o<v8::Value>& info)
127 { 119 {
128 v8::Local<v8::Value> v8Value = info[0]; 120 v8::Local<v8::Value> v8Value = info[0];
129 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
130 TestInterface5ImplementationV8Internal::doubleAttributeAttributeSetter(v8Val ue, info); 121 TestInterface5ImplementationV8Internal::doubleAttributeAttributeSetter(v8Val ue, info);
131 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
132 } 122 }
133 123
134 static void floatAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Val ue>& info) 124 static void floatAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Val ue>& info)
135 { 125 {
136 v8::Local<v8::Object> holder = info.Holder(); 126 v8::Local<v8::Object> holder = info.Holder();
137 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); 127 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
138 v8SetReturnValue(info, impl->floatAttribute()); 128 v8SetReturnValue(info, impl->floatAttribute());
139 } 129 }
140 130
141 static void floatAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo <v8::Value>& info) 131 static void floatAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo <v8::Value>& info)
142 { 132 {
143 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
144 TestInterface5ImplementationV8Internal::floatAttributeAttributeGetter(info); 133 TestInterface5ImplementationV8Internal::floatAttributeAttributeGetter(info);
145 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
146 } 134 }
147 135
148 static void floatAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8 ::FunctionCallbackInfo<v8::Value>& info) 136 static void floatAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8 ::FunctionCallbackInfo<v8::Value>& info)
149 { 137 {
150 v8::Local<v8::Object> holder = info.Holder(); 138 v8::Local<v8::Object> holder = info.Holder();
151 ExceptionState exceptionState(ExceptionState::SetterContext, "floatAttribute ", "TestInterface5", holder, info.GetIsolate()); 139 ExceptionState exceptionState(ExceptionState::SetterContext, "floatAttribute ", "TestInterface5", holder, info.GetIsolate());
152 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); 140 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
153 float cppValue = toRestrictedFloat(info.GetIsolate(), v8Value, exceptionStat e); 141 float cppValue = toRestrictedFloat(info.GetIsolate(), v8Value, exceptionStat e);
154 if (exceptionState.throwIfNeeded()) 142 if (exceptionState.throwIfNeeded())
155 return; 143 return;
156 impl->setFloatAttribute(cppValue); 144 impl->setFloatAttribute(cppValue);
157 } 145 }
158 146
159 static void floatAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo <v8::Value>& info) 147 static void floatAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo <v8::Value>& info)
160 { 148 {
161 v8::Local<v8::Value> v8Value = info[0]; 149 v8::Local<v8::Value> v8Value = info[0];
162 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
163 TestInterface5ImplementationV8Internal::floatAttributeAttributeSetter(v8Valu e, info); 150 TestInterface5ImplementationV8Internal::floatAttributeAttributeSetter(v8Valu e, info);
164 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
165 } 151 }
166 152
167 static void unrestrictedDoubleAttributeAttributeGetter(const v8::FunctionCallbac kInfo<v8::Value>& info) 153 static void unrestrictedDoubleAttributeAttributeGetter(const v8::FunctionCallbac kInfo<v8::Value>& info)
168 { 154 {
169 v8::Local<v8::Object> holder = info.Holder(); 155 v8::Local<v8::Object> holder = info.Holder();
170 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); 156 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
171 v8SetReturnValue(info, impl->unrestrictedDoubleAttribute()); 157 v8SetReturnValue(info, impl->unrestrictedDoubleAttribute());
172 } 158 }
173 159
174 static void unrestrictedDoubleAttributeAttributeGetterCallback(const v8::Functio nCallbackInfo<v8::Value>& info) 160 static void unrestrictedDoubleAttributeAttributeGetterCallback(const v8::Functio nCallbackInfo<v8::Value>& info)
175 { 161 {
176 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
177 TestInterface5ImplementationV8Internal::unrestrictedDoubleAttributeAttribute Getter(info); 162 TestInterface5ImplementationV8Internal::unrestrictedDoubleAttributeAttribute Getter(info);
178 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
179 } 163 }
180 164
181 static void unrestrictedDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Va lue, const v8::FunctionCallbackInfo<v8::Value>& info) 165 static void unrestrictedDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Va lue, const v8::FunctionCallbackInfo<v8::Value>& info)
182 { 166 {
183 v8::Local<v8::Object> holder = info.Holder(); 167 v8::Local<v8::Object> holder = info.Holder();
184 ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedDo ubleAttribute", "TestInterface5", holder, info.GetIsolate()); 168 ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedDo ubleAttribute", "TestInterface5", holder, info.GetIsolate());
185 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); 169 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
186 double cppValue = toDouble(info.GetIsolate(), v8Value, exceptionState); 170 double cppValue = toDouble(info.GetIsolate(), v8Value, exceptionState);
187 if (exceptionState.throwIfNeeded()) 171 if (exceptionState.throwIfNeeded())
188 return; 172 return;
189 impl->setUnrestrictedDoubleAttribute(cppValue); 173 impl->setUnrestrictedDoubleAttribute(cppValue);
190 } 174 }
191 175
192 static void unrestrictedDoubleAttributeAttributeSetterCallback(const v8::Functio nCallbackInfo<v8::Value>& info) 176 static void unrestrictedDoubleAttributeAttributeSetterCallback(const v8::Functio nCallbackInfo<v8::Value>& info)
193 { 177 {
194 v8::Local<v8::Value> v8Value = info[0]; 178 v8::Local<v8::Value> v8Value = info[0];
195 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
196 TestInterface5ImplementationV8Internal::unrestrictedDoubleAttributeAttribute Setter(v8Value, info); 179 TestInterface5ImplementationV8Internal::unrestrictedDoubleAttributeAttribute Setter(v8Value, info);
197 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
198 } 180 }
199 181
200 static void unrestrictedFloatAttributeAttributeGetter(const v8::FunctionCallback Info<v8::Value>& info) 182 static void unrestrictedFloatAttributeAttributeGetter(const v8::FunctionCallback Info<v8::Value>& info)
201 { 183 {
202 v8::Local<v8::Object> holder = info.Holder(); 184 v8::Local<v8::Object> holder = info.Holder();
203 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); 185 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
204 v8SetReturnValue(info, impl->unrestrictedFloatAttribute()); 186 v8SetReturnValue(info, impl->unrestrictedFloatAttribute());
205 } 187 }
206 188
207 static void unrestrictedFloatAttributeAttributeGetterCallback(const v8::Function CallbackInfo<v8::Value>& info) 189 static void unrestrictedFloatAttributeAttributeGetterCallback(const v8::Function CallbackInfo<v8::Value>& info)
208 { 190 {
209 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
210 TestInterface5ImplementationV8Internal::unrestrictedFloatAttributeAttributeG etter(info); 191 TestInterface5ImplementationV8Internal::unrestrictedFloatAttributeAttributeG etter(info);
211 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
212 } 192 }
213 193
214 static void unrestrictedFloatAttributeAttributeSetter(v8::Local<v8::Value> v8Val ue, const v8::FunctionCallbackInfo<v8::Value>& info) 194 static void unrestrictedFloatAttributeAttributeSetter(v8::Local<v8::Value> v8Val ue, const v8::FunctionCallbackInfo<v8::Value>& info)
215 { 195 {
216 v8::Local<v8::Object> holder = info.Holder(); 196 v8::Local<v8::Object> holder = info.Holder();
217 ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedFl oatAttribute", "TestInterface5", holder, info.GetIsolate()); 197 ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedFl oatAttribute", "TestInterface5", holder, info.GetIsolate());
218 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); 198 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
219 float cppValue = toFloat(info.GetIsolate(), v8Value, exceptionState); 199 float cppValue = toFloat(info.GetIsolate(), v8Value, exceptionState);
220 if (exceptionState.throwIfNeeded()) 200 if (exceptionState.throwIfNeeded())
221 return; 201 return;
222 impl->setUnrestrictedFloatAttribute(cppValue); 202 impl->setUnrestrictedFloatAttribute(cppValue);
223 } 203 }
224 204
225 static void unrestrictedFloatAttributeAttributeSetterCallback(const v8::Function CallbackInfo<v8::Value>& info) 205 static void unrestrictedFloatAttributeAttributeSetterCallback(const v8::Function CallbackInfo<v8::Value>& info)
226 { 206 {
227 v8::Local<v8::Value> v8Value = info[0]; 207 v8::Local<v8::Value> v8Value = info[0];
228 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
229 TestInterface5ImplementationV8Internal::unrestrictedFloatAttributeAttributeS etter(v8Value, info); 208 TestInterface5ImplementationV8Internal::unrestrictedFloatAttributeAttributeS etter(v8Value, info);
230 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
231 } 209 }
232 210
233 static void staticStringAttributeAttributeGetter(const v8::FunctionCallbackInfo< v8::Value>& info) 211 static void staticStringAttributeAttributeGetter(const v8::FunctionCallbackInfo< v8::Value>& info)
234 { 212 {
235 v8SetReturnValueString(info, TestInterface5Implementation::staticStringAttri bute(), info.GetIsolate()); 213 v8SetReturnValueString(info, TestInterface5Implementation::staticStringAttri bute(), info.GetIsolate());
236 } 214 }
237 215
238 static void staticStringAttributeAttributeGetterCallback(const v8::FunctionCallb ackInfo<v8::Value>& info) 216 static void staticStringAttributeAttributeGetterCallback(const v8::FunctionCallb ackInfo<v8::Value>& info)
239 { 217 {
240 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
241 TestInterface5ImplementationV8Internal::staticStringAttributeAttributeGetter (info); 218 TestInterface5ImplementationV8Internal::staticStringAttributeAttributeGetter (info);
242 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
243 } 219 }
244 220
245 static void staticStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c onst v8::FunctionCallbackInfo<v8::Value>& info) 221 static void staticStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c onst v8::FunctionCallbackInfo<v8::Value>& info)
246 { 222 {
247 V8StringResource<> cppValue = v8Value; 223 V8StringResource<> cppValue = v8Value;
248 if (!cppValue.prepare()) 224 if (!cppValue.prepare())
249 return; 225 return;
250 TestInterface5Implementation::setStaticStringAttribute(cppValue); 226 TestInterface5Implementation::setStaticStringAttribute(cppValue);
251 } 227 }
252 228
253 static void staticStringAttributeAttributeSetterCallback(const v8::FunctionCallb ackInfo<v8::Value>& info) 229 static void staticStringAttributeAttributeSetterCallback(const v8::FunctionCallb ackInfo<v8::Value>& info)
254 { 230 {
255 v8::Local<v8::Value> v8Value = info[0]; 231 v8::Local<v8::Value> v8Value = info[0];
256 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
257 TestInterface5ImplementationV8Internal::staticStringAttributeAttributeSetter (v8Value, info); 232 TestInterface5ImplementationV8Internal::staticStringAttributeAttributeSetter (v8Value, info);
258 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
259 } 233 }
260 234
261 static void alwaysExposedAttributeAttributeGetter(const v8::FunctionCallbackInfo <v8::Value>& info) 235 static void alwaysExposedAttributeAttributeGetter(const v8::FunctionCallbackInfo <v8::Value>& info)
262 { 236 {
263 v8::Local<v8::Object> holder = info.Holder(); 237 v8::Local<v8::Object> holder = info.Holder();
264 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); 238 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
265 v8SetReturnValueInt(info, impl->alwaysExposedAttribute()); 239 v8SetReturnValueInt(info, impl->alwaysExposedAttribute());
266 } 240 }
267 241
268 static void alwaysExposedAttributeAttributeGetterCallback(const v8::FunctionCall backInfo<v8::Value>& info) 242 static void alwaysExposedAttributeAttributeGetterCallback(const v8::FunctionCall backInfo<v8::Value>& info)
269 { 243 {
270 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
271 TestInterface5ImplementationV8Internal::alwaysExposedAttributeAttributeGette r(info); 244 TestInterface5ImplementationV8Internal::alwaysExposedAttributeAttributeGette r(info);
272 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
273 } 245 }
274 246
275 static void alwaysExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) 247 static void alwaysExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
276 { 248 {
277 v8::Local<v8::Object> holder = info.Holder(); 249 v8::Local<v8::Object> holder = info.Holder();
278 ExceptionState exceptionState(ExceptionState::SetterContext, "alwaysExposedA ttribute", "TestInterface5", holder, info.GetIsolate()); 250 ExceptionState exceptionState(ExceptionState::SetterContext, "alwaysExposedA ttribute", "TestInterface5", holder, info.GetIsolate());
279 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); 251 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
280 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti onState); 252 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti onState);
281 if (exceptionState.throwIfNeeded()) 253 if (exceptionState.throwIfNeeded())
282 return; 254 return;
283 impl->setAlwaysExposedAttribute(cppValue); 255 impl->setAlwaysExposedAttribute(cppValue);
284 } 256 }
285 257
286 static void alwaysExposedAttributeAttributeSetterCallback(const v8::FunctionCall backInfo<v8::Value>& info) 258 static void alwaysExposedAttributeAttributeSetterCallback(const v8::FunctionCall backInfo<v8::Value>& info)
287 { 259 {
288 v8::Local<v8::Value> v8Value = info[0]; 260 v8::Local<v8::Value> v8Value = info[0];
289 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
290 TestInterface5ImplementationV8Internal::alwaysExposedAttributeAttributeSette r(v8Value, info); 261 TestInterface5ImplementationV8Internal::alwaysExposedAttributeAttributeSette r(v8Value, info);
291 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
292 } 262 }
293 263
294 static void workerExposedAttributeAttributeGetter(const v8::FunctionCallbackInfo <v8::Value>& info) 264 static void workerExposedAttributeAttributeGetter(const v8::FunctionCallbackInfo <v8::Value>& info)
295 { 265 {
296 v8::Local<v8::Object> holder = info.Holder(); 266 v8::Local<v8::Object> holder = info.Holder();
297 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); 267 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
298 v8SetReturnValueInt(info, impl->workerExposedAttribute()); 268 v8SetReturnValueInt(info, impl->workerExposedAttribute());
299 } 269 }
300 270
301 static void workerExposedAttributeAttributeGetterCallback(const v8::FunctionCall backInfo<v8::Value>& info) 271 static void workerExposedAttributeAttributeGetterCallback(const v8::FunctionCall backInfo<v8::Value>& info)
302 { 272 {
303 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
304 TestInterface5ImplementationV8Internal::workerExposedAttributeAttributeGette r(info); 273 TestInterface5ImplementationV8Internal::workerExposedAttributeAttributeGette r(info);
305 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
306 } 274 }
307 275
308 static void workerExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) 276 static void workerExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
309 { 277 {
310 v8::Local<v8::Object> holder = info.Holder(); 278 v8::Local<v8::Object> holder = info.Holder();
311 ExceptionState exceptionState(ExceptionState::SetterContext, "workerExposedA ttribute", "TestInterface5", holder, info.GetIsolate()); 279 ExceptionState exceptionState(ExceptionState::SetterContext, "workerExposedA ttribute", "TestInterface5", holder, info.GetIsolate());
312 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); 280 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
313 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti onState); 281 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti onState);
314 if (exceptionState.throwIfNeeded()) 282 if (exceptionState.throwIfNeeded())
315 return; 283 return;
316 impl->setWorkerExposedAttribute(cppValue); 284 impl->setWorkerExposedAttribute(cppValue);
317 } 285 }
318 286
319 static void workerExposedAttributeAttributeSetterCallback(const v8::FunctionCall backInfo<v8::Value>& info) 287 static void workerExposedAttributeAttributeSetterCallback(const v8::FunctionCall backInfo<v8::Value>& info)
320 { 288 {
321 v8::Local<v8::Value> v8Value = info[0]; 289 v8::Local<v8::Value> v8Value = info[0];
322 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
323 TestInterface5ImplementationV8Internal::workerExposedAttributeAttributeSette r(v8Value, info); 290 TestInterface5ImplementationV8Internal::workerExposedAttributeAttributeSette r(v8Value, info);
324 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
325 } 291 }
326 292
327 static void windowExposedAttributeAttributeGetter(const v8::FunctionCallbackInfo <v8::Value>& info) 293 static void windowExposedAttributeAttributeGetter(const v8::FunctionCallbackInfo <v8::Value>& info)
328 { 294 {
329 v8::Local<v8::Object> holder = info.Holder(); 295 v8::Local<v8::Object> holder = info.Holder();
330 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); 296 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
331 v8SetReturnValueInt(info, impl->windowExposedAttribute()); 297 v8SetReturnValueInt(info, impl->windowExposedAttribute());
332 } 298 }
333 299
334 static void windowExposedAttributeAttributeGetterCallback(const v8::FunctionCall backInfo<v8::Value>& info) 300 static void windowExposedAttributeAttributeGetterCallback(const v8::FunctionCall backInfo<v8::Value>& info)
335 { 301 {
336 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
337 TestInterface5ImplementationV8Internal::windowExposedAttributeAttributeGette r(info); 302 TestInterface5ImplementationV8Internal::windowExposedAttributeAttributeGette r(info);
338 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
339 } 303 }
340 304
341 static void windowExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) 305 static void windowExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
342 { 306 {
343 v8::Local<v8::Object> holder = info.Holder(); 307 v8::Local<v8::Object> holder = info.Holder();
344 ExceptionState exceptionState(ExceptionState::SetterContext, "windowExposedA ttribute", "TestInterface5", holder, info.GetIsolate()); 308 ExceptionState exceptionState(ExceptionState::SetterContext, "windowExposedA ttribute", "TestInterface5", holder, info.GetIsolate());
345 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); 309 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
346 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti onState); 310 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti onState);
347 if (exceptionState.throwIfNeeded()) 311 if (exceptionState.throwIfNeeded())
348 return; 312 return;
349 impl->setWindowExposedAttribute(cppValue); 313 impl->setWindowExposedAttribute(cppValue);
350 } 314 }
351 315
352 static void windowExposedAttributeAttributeSetterCallback(const v8::FunctionCall backInfo<v8::Value>& info) 316 static void windowExposedAttributeAttributeSetterCallback(const v8::FunctionCall backInfo<v8::Value>& info)
353 { 317 {
354 v8::Local<v8::Value> v8Value = info[0]; 318 v8::Local<v8::Value> v8Value = info[0];
355 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
356 TestInterface5ImplementationV8Internal::windowExposedAttributeAttributeSette r(v8Value, info); 319 TestInterface5ImplementationV8Internal::windowExposedAttributeAttributeSette r(v8Value, info);
357 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
358 } 320 }
359 321
360 static void voidMethodTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo <v8::Value>& info) 322 static void voidMethodTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo <v8::Value>& info)
361 { 323 {
362 if (UNLIKELY(info.Length() < 1)) { 324 if (UNLIKELY(info.Length() < 1)) {
363 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(in fo.GetIsolate(), "voidMethodTestInterfaceEmptyArg", "TestInterface5", 1, info.Le ngth()), info.GetIsolate()); 325 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(in fo.GetIsolate(), "voidMethodTestInterfaceEmptyArg", "TestInterface5", 1, info.Le ngth()), info.GetIsolate());
364 return; 326 return;
365 } 327 }
366 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ; 328 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ;
367 TestInterfaceEmpty* testInterfaceEmptyArg; 329 TestInterfaceEmpty* testInterfaceEmptyArg;
368 { 330 {
369 testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.G etIsolate(), info[0]); 331 testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.G etIsolate(), info[0]);
370 if (!testInterfaceEmptyArg) { 332 if (!testInterfaceEmptyArg) {
371 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("voidMethodTestInterfaceEmptyArg", "TestInterface5", "paramet er 1 is not of type 'TestInterfaceEmpty'.")); 333 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("voidMethodTestInterfaceEmptyArg", "TestInterface5", "paramet er 1 is not of type 'TestInterfaceEmpty'."));
372 return; 334 return;
373 } 335 }
374 } 336 }
375 impl->voidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg); 337 impl->voidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg);
376 } 338 }
377 339
378 static void voidMethodTestInterfaceEmptyArgMethodCallback(const v8::FunctionCall backInfo<v8::Value>& info) 340 static void voidMethodTestInterfaceEmptyArgMethodCallback(const v8::FunctionCall backInfo<v8::Value>& info)
379 { 341 {
380 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
381 TestInterface5ImplementationV8Internal::voidMethodTestInterfaceEmptyArgMetho d(info); 342 TestInterface5ImplementationV8Internal::voidMethodTestInterfaceEmptyArgMetho d(info);
382 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
383 } 343 }
384 344
385 static void voidMethodDoubleArgFloatArgMethod(const v8::FunctionCallbackInfo<v8: :Value>& info) 345 static void voidMethodDoubleArgFloatArgMethod(const v8::FunctionCallbackInfo<v8: :Value>& info)
386 { 346 {
387 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD oubleArgFloatArg", "TestInterface5", info.Holder(), info.GetIsolate()); 347 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD oubleArgFloatArg", "TestInterface5", info.Holder(), info.GetIsolate());
388 if (UNLIKELY(info.Length() < 2)) { 348 if (UNLIKELY(info.Length() < 2)) {
389 setMinimumArityTypeError(exceptionState, 2, info.Length()); 349 setMinimumArityTypeError(exceptionState, 2, info.Length());
390 exceptionState.throwIfNeeded(); 350 exceptionState.throwIfNeeded();
391 return; 351 return;
392 } 352 }
393 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ; 353 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ;
394 double doubleArg; 354 double doubleArg;
395 float floatArg; 355 float floatArg;
396 { 356 {
397 doubleArg = toRestrictedDouble(info.GetIsolate(), info[0], exceptionStat e); 357 doubleArg = toRestrictedDouble(info.GetIsolate(), info[0], exceptionStat e);
398 if (exceptionState.throwIfNeeded()) 358 if (exceptionState.throwIfNeeded())
399 return; 359 return;
400 floatArg = toRestrictedFloat(info.GetIsolate(), info[1], exceptionState) ; 360 floatArg = toRestrictedFloat(info.GetIsolate(), info[1], exceptionState) ;
401 if (exceptionState.throwIfNeeded()) 361 if (exceptionState.throwIfNeeded())
402 return; 362 return;
403 } 363 }
404 impl->voidMethodDoubleArgFloatArg(doubleArg, floatArg); 364 impl->voidMethodDoubleArgFloatArg(doubleArg, floatArg);
405 } 365 }
406 366
407 static void voidMethodDoubleArgFloatArgMethodCallback(const v8::FunctionCallback Info<v8::Value>& info) 367 static void voidMethodDoubleArgFloatArgMethodCallback(const v8::FunctionCallback Info<v8::Value>& info)
408 { 368 {
409 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
410 TestInterface5ImplementationV8Internal::voidMethodDoubleArgFloatArgMethod(in fo); 369 TestInterface5ImplementationV8Internal::voidMethodDoubleArgFloatArgMethod(in fo);
411 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
412 } 370 }
413 371
414 static void voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethod(const v8:: FunctionCallbackInfo<v8::Value>& info) 372 static void voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethod(const v8:: FunctionCallbackInfo<v8::Value>& info)
415 { 373 {
416 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodU nrestrictedDoubleArgUnrestrictedFloatArg", "TestInterface5", info.Holder(), info .GetIsolate()); 374 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodU nrestrictedDoubleArgUnrestrictedFloatArg", "TestInterface5", info.Holder(), info .GetIsolate());
417 if (UNLIKELY(info.Length() < 2)) { 375 if (UNLIKELY(info.Length() < 2)) {
418 setMinimumArityTypeError(exceptionState, 2, info.Length()); 376 setMinimumArityTypeError(exceptionState, 2, info.Length());
419 exceptionState.throwIfNeeded(); 377 exceptionState.throwIfNeeded();
420 return; 378 return;
421 } 379 }
422 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ; 380 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ;
423 double unrestrictedDoubleArg; 381 double unrestrictedDoubleArg;
424 float unrestrictedFloatArg; 382 float unrestrictedFloatArg;
425 { 383 {
426 unrestrictedDoubleArg = toDouble(info.GetIsolate(), info[0], exceptionSt ate); 384 unrestrictedDoubleArg = toDouble(info.GetIsolate(), info[0], exceptionSt ate);
427 if (exceptionState.throwIfNeeded()) 385 if (exceptionState.throwIfNeeded())
428 return; 386 return;
429 unrestrictedFloatArg = toFloat(info.GetIsolate(), info[1], exceptionStat e); 387 unrestrictedFloatArg = toFloat(info.GetIsolate(), info[1], exceptionStat e);
430 if (exceptionState.throwIfNeeded()) 388 if (exceptionState.throwIfNeeded())
431 return; 389 return;
432 } 390 }
433 impl->voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg(unrestrictedDouble Arg, unrestrictedFloatArg); 391 impl->voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg(unrestrictedDouble Arg, unrestrictedFloatArg);
434 } 392 }
435 393
436 static void voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethodCallback(co nst v8::FunctionCallbackInfo<v8::Value>& info) 394 static void voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethodCallback(co nst v8::FunctionCallbackInfo<v8::Value>& info)
437 { 395 {
438 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
439 TestInterface5ImplementationV8Internal::voidMethodUnrestrictedDoubleArgUnres trictedFloatArgMethod(info); 396 TestInterface5ImplementationV8Internal::voidMethodUnrestrictedDoubleArgUnres trictedFloatArgMethod(info);
440 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
441 } 397 }
442 398
443 static void voidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 399 static void voidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
444 { 400 {
445 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ; 401 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ;
446 impl->voidMethod(); 402 impl->voidMethod();
447 } 403 }
448 404
449 static void voidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) 405 static void voidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
450 { 406 {
451 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
452 TestInterface5ImplementationV8Internal::voidMethodMethod(info); 407 TestInterface5ImplementationV8Internal::voidMethodMethod(info);
453 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
454 } 408 }
455 409
456 static void voidMethodMethodForMainWorld(const v8::FunctionCallbackInfo<v8::Valu e>& info) 410 static void voidMethodMethodForMainWorld(const v8::FunctionCallbackInfo<v8::Valu e>& info)
457 { 411 {
458 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ; 412 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ;
459 impl->voidMethod(); 413 impl->voidMethod();
460 } 414 }
461 415
462 static void voidMethodMethodCallbackForMainWorld(const v8::FunctionCallbackInfo< v8::Value>& info) 416 static void voidMethodMethodCallbackForMainWorld(const v8::FunctionCallbackInfo< v8::Value>& info)
463 { 417 {
464 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
465 TestInterface5ImplementationV8Internal::voidMethodMethodForMainWorld(info); 418 TestInterface5ImplementationV8Internal::voidMethodMethodForMainWorld(info);
466 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
467 } 419 }
468 420
469 static void alwaysExposedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 421 static void alwaysExposedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
470 { 422 {
471 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ; 423 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ;
472 impl->alwaysExposedMethod(); 424 impl->alwaysExposedMethod();
473 } 425 }
474 426
475 static void alwaysExposedMethodMethodCallback(const v8::FunctionCallbackInfo<v8: :Value>& info) 427 static void alwaysExposedMethodMethodCallback(const v8::FunctionCallbackInfo<v8: :Value>& info)
476 { 428 {
477 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
478 TestInterface5ImplementationV8Internal::alwaysExposedMethodMethod(info); 429 TestInterface5ImplementationV8Internal::alwaysExposedMethodMethod(info);
479 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
480 } 430 }
481 431
482 static void workerExposedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 432 static void workerExposedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
483 { 433 {
484 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ; 434 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ;
485 impl->workerExposedMethod(); 435 impl->workerExposedMethod();
486 } 436 }
487 437
488 static void workerExposedMethodMethodCallback(const v8::FunctionCallbackInfo<v8: :Value>& info) 438 static void workerExposedMethodMethodCallback(const v8::FunctionCallbackInfo<v8: :Value>& info)
489 { 439 {
490 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
491 TestInterface5ImplementationV8Internal::workerExposedMethodMethod(info); 440 TestInterface5ImplementationV8Internal::workerExposedMethodMethod(info);
492 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
493 } 441 }
494 442
495 static void windowExposedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 443 static void windowExposedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
496 { 444 {
497 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ; 445 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ;
498 impl->windowExposedMethod(); 446 impl->windowExposedMethod();
499 } 447 }
500 448
501 static void windowExposedMethodMethodCallback(const v8::FunctionCallbackInfo<v8: :Value>& info) 449 static void windowExposedMethodMethodCallback(const v8::FunctionCallbackInfo<v8: :Value>& info)
502 { 450 {
503 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
504 TestInterface5ImplementationV8Internal::windowExposedMethodMethod(info); 451 TestInterface5ImplementationV8Internal::windowExposedMethodMethod(info);
505 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
506 } 452 }
507 453
508 static void alwaysExposedStaticMethodMethod(const v8::FunctionCallbackInfo<v8::V alue>& info) 454 static void alwaysExposedStaticMethodMethod(const v8::FunctionCallbackInfo<v8::V alue>& info)
509 { 455 {
510 TestInterface5Implementation::alwaysExposedStaticMethod(); 456 TestInterface5Implementation::alwaysExposedStaticMethod();
511 } 457 }
512 458
513 static void alwaysExposedStaticMethodMethodCallback(const v8::FunctionCallbackIn fo<v8::Value>& info) 459 static void alwaysExposedStaticMethodMethodCallback(const v8::FunctionCallbackIn fo<v8::Value>& info)
514 { 460 {
515 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
516 TestInterface5ImplementationV8Internal::alwaysExposedStaticMethodMethod(info ); 461 TestInterface5ImplementationV8Internal::alwaysExposedStaticMethodMethod(info );
517 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
518 } 462 }
519 463
520 static void workerExposedStaticMethodMethod(const v8::FunctionCallbackInfo<v8::V alue>& info) 464 static void workerExposedStaticMethodMethod(const v8::FunctionCallbackInfo<v8::V alue>& info)
521 { 465 {
522 TestInterface5Implementation::workerExposedStaticMethod(); 466 TestInterface5Implementation::workerExposedStaticMethod();
523 } 467 }
524 468
525 static void workerExposedStaticMethodMethodCallback(const v8::FunctionCallbackIn fo<v8::Value>& info) 469 static void workerExposedStaticMethodMethodCallback(const v8::FunctionCallbackIn fo<v8::Value>& info)
526 { 470 {
527 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
528 TestInterface5ImplementationV8Internal::workerExposedStaticMethodMethod(info ); 471 TestInterface5ImplementationV8Internal::workerExposedStaticMethodMethod(info );
529 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
530 } 472 }
531 473
532 static void windowExposedStaticMethodMethod(const v8::FunctionCallbackInfo<v8::V alue>& info) 474 static void windowExposedStaticMethodMethod(const v8::FunctionCallbackInfo<v8::V alue>& info)
533 { 475 {
534 TestInterface5Implementation::windowExposedStaticMethod(); 476 TestInterface5Implementation::windowExposedStaticMethod();
535 } 477 }
536 478
537 static void windowExposedStaticMethodMethodCallback(const v8::FunctionCallbackIn fo<v8::Value>& info) 479 static void windowExposedStaticMethodMethodCallback(const v8::FunctionCallbackIn fo<v8::Value>& info)
538 { 480 {
539 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
540 TestInterface5ImplementationV8Internal::windowExposedStaticMethodMethod(info ); 481 TestInterface5ImplementationV8Internal::windowExposedStaticMethodMethod(info );
541 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
542 } 482 }
543 483
544 static void windowAndServiceWorkerExposedMethodMethod(const v8::FunctionCallback Info<v8::Value>& info) 484 static void windowAndServiceWorkerExposedMethodMethod(const v8::FunctionCallback Info<v8::Value>& info)
545 { 485 {
546 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ; 486 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ;
547 impl->windowAndServiceWorkerExposedMethod(); 487 impl->windowAndServiceWorkerExposedMethod();
548 } 488 }
549 489
550 static void windowAndServiceWorkerExposedMethodMethodCallback(const v8::Function CallbackInfo<v8::Value>& info) 490 static void windowAndServiceWorkerExposedMethodMethodCallback(const v8::Function CallbackInfo<v8::Value>& info)
551 { 491 {
552 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
553 TestInterface5ImplementationV8Internal::windowAndServiceWorkerExposedMethodM ethod(info); 492 TestInterface5ImplementationV8Internal::windowAndServiceWorkerExposedMethodM ethod(info);
554 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
555 } 493 }
556 494
557 static void voidMethodBooleanOrDOMStringArgMethod(const v8::FunctionCallbackInfo <v8::Value>& info) 495 static void voidMethodBooleanOrDOMStringArgMethod(const v8::FunctionCallbackInfo <v8::Value>& info)
558 { 496 {
559 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodB ooleanOrDOMStringArg", "TestInterface5", info.Holder(), info.GetIsolate()); 497 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodB ooleanOrDOMStringArg", "TestInterface5", info.Holder(), info.GetIsolate());
560 if (UNLIKELY(info.Length() < 1)) { 498 if (UNLIKELY(info.Length() < 1)) {
561 setMinimumArityTypeError(exceptionState, 1, info.Length()); 499 setMinimumArityTypeError(exceptionState, 1, info.Length());
562 exceptionState.throwIfNeeded(); 500 exceptionState.throwIfNeeded();
563 return; 501 return;
564 } 502 }
565 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ; 503 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ;
566 BooleanOrString arg; 504 BooleanOrString arg;
567 { 505 {
568 V8BooleanOrString::toImpl(info.GetIsolate(), info[0], arg, UnionTypeConv ersionMode::NotNullable, exceptionState); 506 V8BooleanOrString::toImpl(info.GetIsolate(), info[0], arg, UnionTypeConv ersionMode::NotNullable, exceptionState);
569 if (exceptionState.throwIfNeeded()) 507 if (exceptionState.throwIfNeeded())
570 return; 508 return;
571 } 509 }
572 impl->voidMethodBooleanOrDOMStringArg(arg); 510 impl->voidMethodBooleanOrDOMStringArg(arg);
573 } 511 }
574 512
575 static void voidMethodBooleanOrDOMStringArgMethodCallback(const v8::FunctionCall backInfo<v8::Value>& info) 513 static void voidMethodBooleanOrDOMStringArgMethodCallback(const v8::FunctionCall backInfo<v8::Value>& info)
576 { 514 {
577 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
578 TestInterface5ImplementationV8Internal::voidMethodBooleanOrDOMStringArgMetho d(info); 515 TestInterface5ImplementationV8Internal::voidMethodBooleanOrDOMStringArgMetho d(info);
579 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
580 } 516 }
581 517
582 static void voidMethodDoubleOrDOMStringArgMethod(const v8::FunctionCallbackInfo< v8::Value>& info) 518 static void voidMethodDoubleOrDOMStringArgMethod(const v8::FunctionCallbackInfo< v8::Value>& info)
583 { 519 {
584 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD oubleOrDOMStringArg", "TestInterface5", info.Holder(), info.GetIsolate()); 520 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD oubleOrDOMStringArg", "TestInterface5", info.Holder(), info.GetIsolate());
585 if (UNLIKELY(info.Length() < 1)) { 521 if (UNLIKELY(info.Length() < 1)) {
586 setMinimumArityTypeError(exceptionState, 1, info.Length()); 522 setMinimumArityTypeError(exceptionState, 1, info.Length());
587 exceptionState.throwIfNeeded(); 523 exceptionState.throwIfNeeded();
588 return; 524 return;
589 } 525 }
590 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ; 526 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ;
591 DoubleOrString arg; 527 DoubleOrString arg;
592 { 528 {
593 V8DoubleOrString::toImpl(info.GetIsolate(), info[0], arg, UnionTypeConve rsionMode::NotNullable, exceptionState); 529 V8DoubleOrString::toImpl(info.GetIsolate(), info[0], arg, UnionTypeConve rsionMode::NotNullable, exceptionState);
594 if (exceptionState.throwIfNeeded()) 530 if (exceptionState.throwIfNeeded())
595 return; 531 return;
596 } 532 }
597 impl->voidMethodDoubleOrDOMStringArg(arg); 533 impl->voidMethodDoubleOrDOMStringArg(arg);
598 } 534 }
599 535
600 static void voidMethodDoubleOrDOMStringArgMethodCallback(const v8::FunctionCallb ackInfo<v8::Value>& info) 536 static void voidMethodDoubleOrDOMStringArgMethodCallback(const v8::FunctionCallb ackInfo<v8::Value>& info)
601 { 537 {
602 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
603 TestInterface5ImplementationV8Internal::voidMethodDoubleOrDOMStringArgMethod (info); 538 TestInterface5ImplementationV8Internal::voidMethodDoubleOrDOMStringArgMethod (info);
604 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
605 } 539 }
606 540
607 static void keysMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 541 static void keysMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
608 { 542 {
609 ExceptionState exceptionState(ExceptionState::ExecutionContext, "keys", "Tes tInterface5", info.Holder(), info.GetIsolate()); 543 ExceptionState exceptionState(ExceptionState::ExecutionContext, "keys", "Tes tInterface5", info.Holder(), info.GetIsolate());
610 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ; 544 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ;
611 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); 545 ScriptState* scriptState = ScriptState::current(info.GetIsolate());
612 RawPtr<Iterator> result = impl->keysForBinding(scriptState, exceptionState); 546 RawPtr<Iterator> result = impl->keysForBinding(scriptState, exceptionState);
613 if (exceptionState.hadException()) { 547 if (exceptionState.hadException()) {
614 exceptionState.throwIfNeeded(); 548 exceptionState.throwIfNeeded();
615 return; 549 return;
616 } 550 }
617 v8SetReturnValue(info, result.release()); 551 v8SetReturnValue(info, result.release());
618 } 552 }
619 553
620 static void keysMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) 554 static void keysMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
621 { 555 {
622 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
623 TestInterface5ImplementationV8Internal::keysMethod(info); 556 TestInterface5ImplementationV8Internal::keysMethod(info);
624 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
625 } 557 }
626 558
627 static void valuesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 559 static void valuesMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
628 { 560 {
629 ExceptionState exceptionState(ExceptionState::ExecutionContext, "values", "T estInterface5", info.Holder(), info.GetIsolate()); 561 ExceptionState exceptionState(ExceptionState::ExecutionContext, "values", "T estInterface5", info.Holder(), info.GetIsolate());
630 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ; 562 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ;
631 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); 563 ScriptState* scriptState = ScriptState::current(info.GetIsolate());
632 RawPtr<Iterator> result = impl->valuesForBinding(scriptState, exceptionState ); 564 RawPtr<Iterator> result = impl->valuesForBinding(scriptState, exceptionState );
633 if (exceptionState.hadException()) { 565 if (exceptionState.hadException()) {
634 exceptionState.throwIfNeeded(); 566 exceptionState.throwIfNeeded();
635 return; 567 return;
636 } 568 }
637 v8SetReturnValue(info, result.release()); 569 v8SetReturnValue(info, result.release());
638 } 570 }
639 571
640 static void valuesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info ) 572 static void valuesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info )
641 { 573 {
642 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
643 TestInterface5ImplementationV8Internal::valuesMethod(info); 574 TestInterface5ImplementationV8Internal::valuesMethod(info);
644 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
645 } 575 }
646 576
647 static void entriesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 577 static void entriesMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
648 { 578 {
649 ExceptionState exceptionState(ExceptionState::ExecutionContext, "entries", " TestInterface5", info.Holder(), info.GetIsolate()); 579 ExceptionState exceptionState(ExceptionState::ExecutionContext, "entries", " TestInterface5", info.Holder(), info.GetIsolate());
650 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ; 580 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ;
651 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); 581 ScriptState* scriptState = ScriptState::current(info.GetIsolate());
652 RawPtr<Iterator> result = impl->entriesForBinding(scriptState, exceptionStat e); 582 RawPtr<Iterator> result = impl->entriesForBinding(scriptState, exceptionStat e);
653 if (exceptionState.hadException()) { 583 if (exceptionState.hadException()) {
654 exceptionState.throwIfNeeded(); 584 exceptionState.throwIfNeeded();
655 return; 585 return;
656 } 586 }
657 v8SetReturnValue(info, result.release()); 587 v8SetReturnValue(info, result.release());
658 } 588 }
659 589
660 static void entriesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf o) 590 static void entriesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf o)
661 { 591 {
662 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
663 TestInterface5ImplementationV8Internal::entriesMethod(info); 592 TestInterface5ImplementationV8Internal::entriesMethod(info);
664 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
665 } 593 }
666 594
667 static void forEachMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 595 static void forEachMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
668 { 596 {
669 ExceptionState exceptionState(ExceptionState::ExecutionContext, "forEach", " TestInterface5", info.Holder(), info.GetIsolate()); 597 ExceptionState exceptionState(ExceptionState::ExecutionContext, "forEach", " TestInterface5", info.Holder(), info.GetIsolate());
670 if (UNLIKELY(info.Length() < 1)) { 598 if (UNLIKELY(info.Length() < 1)) {
671 setMinimumArityTypeError(exceptionState, 1, info.Length()); 599 setMinimumArityTypeError(exceptionState, 1, info.Length());
672 exceptionState.throwIfNeeded(); 600 exceptionState.throwIfNeeded();
673 return; 601 return;
674 } 602 }
(...skipping 12 matching lines...) Expand all
687 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); 615 ScriptState* scriptState = ScriptState::current(info.GetIsolate());
688 impl->forEachForBinding(scriptState, ScriptValue(scriptState, info.This()), callback, thisArg, exceptionState); 616 impl->forEachForBinding(scriptState, ScriptValue(scriptState, info.This()), callback, thisArg, exceptionState);
689 if (exceptionState.hadException()) { 617 if (exceptionState.hadException()) {
690 exceptionState.throwIfNeeded(); 618 exceptionState.throwIfNeeded();
691 return; 619 return;
692 } 620 }
693 } 621 }
694 622
695 static void forEachMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf o) 623 static void forEachMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf o)
696 { 624 {
697 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
698 TestInterface5ImplementationV8Internal::forEachMethod(info); 625 TestInterface5ImplementationV8Internal::forEachMethod(info);
699 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
700 } 626 }
701 627
702 static void toStringMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 628 static void toStringMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
703 { 629 {
704 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ; 630 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ;
705 v8SetReturnValueString(info, impl->toString(), info.GetIsolate()); 631 v8SetReturnValueString(info, impl->toString(), info.GetIsolate());
706 } 632 }
707 633
708 static void toStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in fo) 634 static void toStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in fo)
709 { 635 {
710 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
711 TestInterface5ImplementationV8Internal::toStringMethod(info); 636 TestInterface5ImplementationV8Internal::toStringMethod(info);
712 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
713 } 637 }
714 638
715 static void iteratorMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 639 static void iteratorMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
716 { 640 {
717 ExceptionState exceptionState(ExceptionState::ExecutionContext, "iterator", "TestInterface5", info.Holder(), info.GetIsolate()); 641 ExceptionState exceptionState(ExceptionState::ExecutionContext, "iterator", "TestInterface5", info.Holder(), info.GetIsolate());
718 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ; 642 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ;
719 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); 643 ScriptState* scriptState = ScriptState::current(info.GetIsolate());
720 RawPtr<Iterator> result = impl->iterator(scriptState, exceptionState); 644 RawPtr<Iterator> result = impl->iterator(scriptState, exceptionState);
721 if (exceptionState.hadException()) { 645 if (exceptionState.hadException()) {
722 exceptionState.throwIfNeeded(); 646 exceptionState.throwIfNeeded();
723 return; 647 return;
724 } 648 }
725 v8SetReturnValue(info, result.release()); 649 v8SetReturnValue(info, result.release());
726 } 650 }
727 651
728 static void iteratorMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in fo) 652 static void iteratorMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in fo)
729 { 653 {
730 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
731 TestInterface5ImplementationV8Internal::iteratorMethod(info); 654 TestInterface5ImplementationV8Internal::iteratorMethod(info);
732 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
733 } 655 }
734 656
735 static void indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo <v8::Value>& info) 657 static void indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo <v8::Value>& info)
736 { 658 {
737 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ; 659 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ;
738 String result = impl->anonymousIndexedGetter(index); 660 String result = impl->anonymousIndexedGetter(index);
739 if (result.isNull()) 661 if (result.isNull())
740 return; 662 return;
741 v8SetReturnValueString(info, result, info.GetIsolate()); 663 v8SetReturnValueString(info, result, info.GetIsolate());
742 } 664 }
743 665
744 static void indexedPropertyGetterCallback(uint32_t index, const v8::PropertyCall backInfo<v8::Value>& info) 666 static void indexedPropertyGetterCallback(uint32_t index, const v8::PropertyCall backInfo<v8::Value>& info)
745 { 667 {
746 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMIndexedProperty");
747 TestInterface5ImplementationV8Internal::indexedPropertyGetter(index, info); 668 TestInterface5ImplementationV8Internal::indexedPropertyGetter(index, info);
748 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
749 } 669 }
750 670
751 static void indexedPropertySetter(uint32_t index, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<v8::Value>& info) 671 static void indexedPropertySetter(uint32_t index, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<v8::Value>& info)
752 { 672 {
753 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ; 673 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ;
754 V8StringResource<> propertyValue = v8Value; 674 V8StringResource<> propertyValue = v8Value;
755 if (!propertyValue.prepare()) 675 if (!propertyValue.prepare())
756 return; 676 return;
757 bool result = impl->anonymousIndexedSetter(index, propertyValue); 677 bool result = impl->anonymousIndexedSetter(index, propertyValue);
758 if (!result) 678 if (!result)
759 return; 679 return;
760 v8SetReturnValue(info, v8Value); 680 v8SetReturnValue(info, v8Value);
761 } 681 }
762 682
763 static void indexedPropertySetterCallback(uint32_t index, v8::Local<v8::Value> v 8Value, const v8::PropertyCallbackInfo<v8::Value>& info) 683 static void indexedPropertySetterCallback(uint32_t index, v8::Local<v8::Value> v 8Value, const v8::PropertyCallbackInfo<v8::Value>& info)
764 { 684 {
765 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMIndexedProperty");
766 TestInterface5ImplementationV8Internal::indexedPropertySetter(index, v8Value , info); 685 TestInterface5ImplementationV8Internal::indexedPropertySetter(index, v8Value , info);
767 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
768 } 686 }
769 687
770 static void indexedPropertyDeleter(uint32_t index, const v8::PropertyCallbackInf o<v8::Boolean>& info) 688 static void indexedPropertyDeleter(uint32_t index, const v8::PropertyCallbackInf o<v8::Boolean>& info)
771 { 689 {
772 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ; 690 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ;
773 DeleteResult result = impl->anonymousIndexedDeleter(index); 691 DeleteResult result = impl->anonymousIndexedDeleter(index);
774 if (result != DeleteUnknownProperty) 692 if (result != DeleteUnknownProperty)
775 return v8SetReturnValueBool(info, result == DeleteSuccess); 693 return v8SetReturnValueBool(info, result == DeleteSuccess);
776 } 694 }
777 695
778 static void indexedPropertyDeleterCallback(uint32_t index, const v8::PropertyCal lbackInfo<v8::Boolean>& info) 696 static void indexedPropertyDeleterCallback(uint32_t index, const v8::PropertyCal lbackInfo<v8::Boolean>& info)
779 { 697 {
780 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMIndexedProperty");
781 TestInterface5ImplementationV8Internal::indexedPropertyDeleter(index, info); 698 TestInterface5ImplementationV8Internal::indexedPropertyDeleter(index, info);
782 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
783 } 699 }
784 700
785 static void namedPropertyGetter(v8::Local<v8::Name> name, const v8::PropertyCall backInfo<v8::Value>& info) 701 static void namedPropertyGetter(v8::Local<v8::Name> name, const v8::PropertyCall backInfo<v8::Value>& info)
786 { 702 {
787 auto nameString = name.As<v8::String>(); 703 auto nameString = name.As<v8::String>();
788 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ; 704 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ;
789 AtomicString propertyName = toCoreAtomicString(nameString); 705 AtomicString propertyName = toCoreAtomicString(nameString);
790 String result = impl->anonymousNamedGetter(propertyName); 706 String result = impl->anonymousNamedGetter(propertyName);
791 if (result.isNull()) 707 if (result.isNull())
792 return; 708 return;
793 v8SetReturnValueString(info, result, info.GetIsolate()); 709 v8SetReturnValueString(info, result, info.GetIsolate());
794 } 710 }
795 711
796 static void namedPropertyGetterCallback(v8::Local<v8::Name> name, const v8::Prop ertyCallbackInfo<v8::Value>& info) 712 static void namedPropertyGetterCallback(v8::Local<v8::Name> name, const v8::Prop ertyCallbackInfo<v8::Value>& info)
797 { 713 {
798 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMNamedProperty");
799 TestInterface5ImplementationV8Internal::namedPropertyGetter(name, info); 714 TestInterface5ImplementationV8Internal::namedPropertyGetter(name, info);
800 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
801 } 715 }
802 716
803 static void namedPropertySetter(v8::Local<v8::Name> name, v8::Local<v8::Value> v 8Value, const v8::PropertyCallbackInfo<v8::Value>& info) 717 static void namedPropertySetter(v8::Local<v8::Name> name, v8::Local<v8::Value> v 8Value, const v8::PropertyCallbackInfo<v8::Value>& info)
804 { 718 {
805 auto nameString = name.As<v8::String>(); 719 auto nameString = name.As<v8::String>();
806 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ; 720 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ;
807 V8StringResource<> propertyName(nameString); 721 V8StringResource<> propertyName(nameString);
808 if (!propertyName.prepare()) 722 if (!propertyName.prepare())
809 return; 723 return;
810 V8StringResource<> propertyValue = v8Value; 724 V8StringResource<> propertyValue = v8Value;
811 if (!propertyValue.prepare()) 725 if (!propertyValue.prepare())
812 return; 726 return;
813 bool result = impl->anonymousNamedSetter(propertyName, propertyValue); 727 bool result = impl->anonymousNamedSetter(propertyName, propertyValue);
814 if (!result) 728 if (!result)
815 return; 729 return;
816 v8SetReturnValue(info, v8Value); 730 v8SetReturnValue(info, v8Value);
817 } 731 }
818 732
819 static void namedPropertySetterCallback(v8::Local<v8::Name> name, v8::Local<v8:: Value> v8Value, const v8::PropertyCallbackInfo<v8::Value>& info) 733 static void namedPropertySetterCallback(v8::Local<v8::Name> name, v8::Local<v8:: Value> v8Value, const v8::PropertyCallbackInfo<v8::Value>& info)
820 { 734 {
821 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMNamedProperty");
822 TestInterface5ImplementationV8Internal::namedPropertySetter(name, v8Value, i nfo); 735 TestInterface5ImplementationV8Internal::namedPropertySetter(name, v8Value, i nfo);
823 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
824 } 736 }
825 737
826 static void namedPropertyQuery(v8::Local<v8::Name> name, const v8::PropertyCallb ackInfo<v8::Integer>& info) 738 static void namedPropertyQuery(v8::Local<v8::Name> name, const v8::PropertyCallb ackInfo<v8::Integer>& info)
827 { 739 {
828 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ; 740 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ;
829 AtomicString propertyName = toCoreAtomicString(name.As<v8::String>()); 741 AtomicString propertyName = toCoreAtomicString(name.As<v8::String>());
830 v8::String::Utf8Value namedProperty(name); 742 v8::String::Utf8Value namedProperty(name);
831 ExceptionState exceptionState(ExceptionState::GetterContext, *namedProperty, "TestInterface5", info.Holder(), info.GetIsolate()); 743 ExceptionState exceptionState(ExceptionState::GetterContext, *namedProperty, "TestInterface5", info.Holder(), info.GetIsolate());
832 bool result = impl->namedPropertyQuery(propertyName, exceptionState); 744 bool result = impl->namedPropertyQuery(propertyName, exceptionState);
833 if (exceptionState.throwIfNeeded()) 745 if (exceptionState.throwIfNeeded())
834 return; 746 return;
835 if (!result) 747 if (!result)
836 return; 748 return;
837 v8SetReturnValueInt(info, v8::None); 749 v8SetReturnValueInt(info, v8::None);
838 } 750 }
839 751
840 static void namedPropertyQueryCallback(v8::Local<v8::Name> name, const v8::Prope rtyCallbackInfo<v8::Integer>& info) 752 static void namedPropertyQueryCallback(v8::Local<v8::Name> name, const v8::Prope rtyCallbackInfo<v8::Integer>& info)
841 { 753 {
842 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMNamedProperty");
843 TestInterface5ImplementationV8Internal::namedPropertyQuery(name, info); 754 TestInterface5ImplementationV8Internal::namedPropertyQuery(name, info);
844 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
845 } 755 }
846 756
847 static void namedPropertyDeleter(v8::Local<v8::Name> name, const v8::PropertyCal lbackInfo<v8::Boolean>& info) 757 static void namedPropertyDeleter(v8::Local<v8::Name> name, const v8::PropertyCal lbackInfo<v8::Boolean>& info)
848 { 758 {
849 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ; 759 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ;
850 AtomicString propertyName = toCoreAtomicString(name.As<v8::String>()); 760 AtomicString propertyName = toCoreAtomicString(name.As<v8::String>());
851 DeleteResult result = impl->anonymousNamedDeleter(propertyName); 761 DeleteResult result = impl->anonymousNamedDeleter(propertyName);
852 if (result != DeleteUnknownProperty) 762 if (result != DeleteUnknownProperty)
853 return v8SetReturnValueBool(info, result == DeleteSuccess); 763 return v8SetReturnValueBool(info, result == DeleteSuccess);
854 } 764 }
855 765
856 static void namedPropertyDeleterCallback(v8::Local<v8::Name> name, const v8::Pro pertyCallbackInfo<v8::Boolean>& info) 766 static void namedPropertyDeleterCallback(v8::Local<v8::Name> name, const v8::Pro pertyCallbackInfo<v8::Boolean>& info)
857 { 767 {
858 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMNamedProperty");
859 TestInterface5ImplementationV8Internal::namedPropertyDeleter(name, info); 768 TestInterface5ImplementationV8Internal::namedPropertyDeleter(name, info);
860 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
861 } 769 }
862 770
863 static void namedPropertyEnumerator(const v8::PropertyCallbackInfo<v8::Array>& i nfo) 771 static void namedPropertyEnumerator(const v8::PropertyCallbackInfo<v8::Array>& i nfo)
864 { 772 {
865 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ; 773 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ;
866 Vector<String> names; 774 Vector<String> names;
867 ExceptionState exceptionState(ExceptionState::EnumerationContext, "TestInter face5", info.Holder(), info.GetIsolate()); 775 ExceptionState exceptionState(ExceptionState::EnumerationContext, "TestInter face5", info.Holder(), info.GetIsolate());
868 impl->namedPropertyEnumerator(names, exceptionState); 776 impl->namedPropertyEnumerator(names, exceptionState);
869 if (exceptionState.throwIfNeeded()) 777 if (exceptionState.throwIfNeeded())
870 return; 778 return;
871 v8::Local<v8::Array> v8names = v8::Array::New(info.GetIsolate(), names.size( )); 779 v8::Local<v8::Array> v8names = v8::Array::New(info.GetIsolate(), names.size( ));
872 for (size_t i = 0; i < names.size(); ++i) { 780 for (size_t i = 0; i < names.size(); ++i) {
873 if (!v8CallBoolean(v8names->Set(info.GetIsolate()->GetCurrentContext(), v8::Integer::New(info.GetIsolate(), i), v8String(info.GetIsolate(), names[i])))) 781 if (!v8CallBoolean(v8names->Set(info.GetIsolate()->GetCurrentContext(), v8::Integer::New(info.GetIsolate(), i), v8String(info.GetIsolate(), names[i]))))
874 return; 782 return;
875 } 783 }
876 v8SetReturnValue(info, v8names); 784 v8SetReturnValue(info, v8names);
877 } 785 }
878 786
879 static void namedPropertyEnumeratorCallback(const v8::PropertyCallbackInfo<v8::A rray>& info) 787 static void namedPropertyEnumeratorCallback(const v8::PropertyCallbackInfo<v8::A rray>& info)
880 { 788 {
881 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMNamedProperty");
882 TestInterface5ImplementationV8Internal::namedPropertyEnumerator(info); 789 TestInterface5ImplementationV8Internal::namedPropertyEnumerator(info);
883 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
884 } 790 }
885 791
886 } // namespace TestInterface5ImplementationV8Internal 792 } // namespace TestInterface5ImplementationV8Internal
887 793
888 void V8TestInterface5::visitDOMWrapper(v8::Isolate* isolate, ScriptWrappable* sc riptWrappable, const v8::Persistent<v8::Object>& wrapper) 794 void V8TestInterface5::visitDOMWrapper(v8::Isolate* isolate, ScriptWrappable* sc riptWrappable, const v8::Persistent<v8::Object>& wrapper)
889 { 795 {
890 TestInterface5Implementation* impl = scriptWrappable->toImpl<TestInterface5I mplementation>(); 796 TestInterface5Implementation* impl = scriptWrappable->toImpl<TestInterface5I mplementation>();
891 v8::Local<v8::Object> context = v8::Local<v8::Object>::New(isolate, wrapper) ; 797 v8::Local<v8::Object> context = v8::Local<v8::Object>::New(isolate, wrapper) ;
892 v8::Context::Scope scope(context->CreationContext()); 798 v8::Context::Scope scope(context->CreationContext());
893 TestInterface5Implementation* referencedName = impl->referencedName(); 799 TestInterface5Implementation* referencedName = impl->referencedName();
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
1033 { 939 {
1034 scriptWrappable->toImpl<TestInterface5Implementation>()->ref(); 940 scriptWrappable->toImpl<TestInterface5Implementation>()->ref();
1035 } 941 }
1036 942
1037 void V8TestInterface5::derefObject(ScriptWrappable* scriptWrappable) 943 void V8TestInterface5::derefObject(ScriptWrappable* scriptWrappable)
1038 { 944 {
1039 scriptWrappable->toImpl<TestInterface5Implementation>()->deref(); 945 scriptWrappable->toImpl<TestInterface5Implementation>()->deref();
1040 } 946 }
1041 947
1042 } // namespace blink 948 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698