OLD | NEW |
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 "bindings/core/v8/ExceptionState.h" | 10 #include "bindings/core/v8/ExceptionState.h" |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 v8SetReturnValueString(info, impl->stringifierMethod(), info.GetIsolate()); | 213 v8SetReturnValueString(info, impl->stringifierMethod(), info.GetIsolate()); |
214 } | 214 } |
215 | 215 |
216 static void stringifierMethodMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 216 static void stringifierMethodMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
217 { | 217 { |
218 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 218 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
219 TestInterface2V8Internal::stringifierMethodMethod(info); | 219 TestInterface2V8Internal::stringifierMethodMethod(info); |
220 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 220 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
221 } | 221 } |
222 | 222 |
| 223 static void keysMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 224 { |
| 225 ExceptionState exceptionState(ExceptionState::ExecutionContext, "keys", "Tes
tInterface2", info.Holder(), info.GetIsolate()); |
| 226 TestInterface2* impl = V8TestInterface2::toImpl(info.Holder()); |
| 227 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| 228 RawPtr<Iterator> result = impl->keys(scriptState, exceptionState); |
| 229 if (exceptionState.hadException()) { |
| 230 exceptionState.throwIfNeeded(); |
| 231 return; |
| 232 } |
| 233 v8SetReturnValue(info, result.release()); |
| 234 } |
| 235 |
| 236 static void keysMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 237 { |
| 238 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 239 TestInterface2V8Internal::keysMethod(info); |
| 240 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 241 } |
| 242 |
| 243 static void valuesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 244 { |
| 245 ExceptionState exceptionState(ExceptionState::ExecutionContext, "values", "T
estInterface2", info.Holder(), info.GetIsolate()); |
| 246 TestInterface2* impl = V8TestInterface2::toImpl(info.Holder()); |
| 247 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| 248 RawPtr<Iterator> result = impl->values(scriptState, exceptionState); |
| 249 if (exceptionState.hadException()) { |
| 250 exceptionState.throwIfNeeded(); |
| 251 return; |
| 252 } |
| 253 v8SetReturnValue(info, result.release()); |
| 254 } |
| 255 |
| 256 static void valuesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info
) |
| 257 { |
| 258 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 259 TestInterface2V8Internal::valuesMethod(info); |
| 260 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 261 } |
| 262 |
| 263 static void entriesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 264 { |
| 265 ExceptionState exceptionState(ExceptionState::ExecutionContext, "entries", "
TestInterface2", info.Holder(), info.GetIsolate()); |
| 266 TestInterface2* impl = V8TestInterface2::toImpl(info.Holder()); |
| 267 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| 268 RawPtr<Iterator> result = impl->entries(scriptState, exceptionState); |
| 269 if (exceptionState.hadException()) { |
| 270 exceptionState.throwIfNeeded(); |
| 271 return; |
| 272 } |
| 273 v8SetReturnValue(info, result.release()); |
| 274 } |
| 275 |
| 276 static void entriesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf
o) |
| 277 { |
| 278 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 279 TestInterface2V8Internal::entriesMethod(info); |
| 280 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 281 } |
| 282 |
223 static void toStringMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 283 static void toStringMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
224 { | 284 { |
225 TestInterface2* impl = V8TestInterface2::toImpl(info.Holder()); | 285 TestInterface2* impl = V8TestInterface2::toImpl(info.Holder()); |
226 v8SetReturnValueString(info, impl->stringifierMethod(), info.GetIsolate()); | 286 v8SetReturnValueString(info, impl->stringifierMethod(), info.GetIsolate()); |
227 } | 287 } |
228 | 288 |
229 static void toStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in
fo) | 289 static void toStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in
fo) |
230 { | 290 { |
231 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 291 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
232 TestInterface2V8Internal::toStringMethod(info); | 292 TestInterface2V8Internal::toStringMethod(info); |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
458 } | 518 } |
459 | 519 |
460 static const V8DOMConfiguration::MethodConfiguration V8TestInterface2Methods[] =
{ | 520 static const V8DOMConfiguration::MethodConfiguration V8TestInterface2Methods[] =
{ |
461 {"item", TestInterface2V8Internal::itemMethodCallback, 0, 1, V8DOMConfigurat
ion::ExposedToAllScripts}, | 521 {"item", TestInterface2V8Internal::itemMethodCallback, 0, 1, V8DOMConfigurat
ion::ExposedToAllScripts}, |
462 {"setItem", TestInterface2V8Internal::setItemMethodCallback, 0, 2, V8DOMConf
iguration::ExposedToAllScripts}, | 522 {"setItem", TestInterface2V8Internal::setItemMethodCallback, 0, 2, V8DOMConf
iguration::ExposedToAllScripts}, |
463 {"deleteItem", TestInterface2V8Internal::deleteItemMethodCallback, 0, 1, V8D
OMConfiguration::ExposedToAllScripts}, | 523 {"deleteItem", TestInterface2V8Internal::deleteItemMethodCallback, 0, 1, V8D
OMConfiguration::ExposedToAllScripts}, |
464 {"namedItem", TestInterface2V8Internal::namedItemMethodCallback, 0, 1, V8DOM
Configuration::ExposedToAllScripts}, | 524 {"namedItem", TestInterface2V8Internal::namedItemMethodCallback, 0, 1, V8DOM
Configuration::ExposedToAllScripts}, |
465 {"setNamedItem", TestInterface2V8Internal::setNamedItemMethodCallback, 0, 2,
V8DOMConfiguration::ExposedToAllScripts}, | 525 {"setNamedItem", TestInterface2V8Internal::setNamedItemMethodCallback, 0, 2,
V8DOMConfiguration::ExposedToAllScripts}, |
466 {"deleteNamedItem", TestInterface2V8Internal::deleteNamedItemMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, | 526 {"deleteNamedItem", TestInterface2V8Internal::deleteNamedItemMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, |
467 {"stringifierMethod", TestInterface2V8Internal::stringifierMethodMethodCallb
ack, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | 527 {"stringifierMethod", TestInterface2V8Internal::stringifierMethodMethodCallb
ack, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, |
| 528 {"keys", TestInterface2V8Internal::keysMethodCallback, 0, 0, V8DOMConfigurat
ion::ExposedToAllScripts}, |
| 529 {"values", TestInterface2V8Internal::valuesMethodCallback, 0, 0, V8DOMConfig
uration::ExposedToAllScripts}, |
| 530 {"entries", TestInterface2V8Internal::entriesMethodCallback, 0, 0, V8DOMConf
iguration::ExposedToAllScripts}, |
468 {"toString", TestInterface2V8Internal::toStringMethodCallback, 0, 0, V8DOMCo
nfiguration::ExposedToAllScripts}, | 531 {"toString", TestInterface2V8Internal::toStringMethodCallback, 0, 0, V8DOMCo
nfiguration::ExposedToAllScripts}, |
469 }; | 532 }; |
470 | 533 |
471 void V8TestInterface2::constructorCallback(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | 534 void V8TestInterface2::constructorCallback(const v8::FunctionCallbackInfo<v8::Va
lue>& info) |
472 { | 535 { |
473 TRACE_EVENT_SCOPED_SAMPLING_STATE("blink", "DOMConstructor"); | 536 TRACE_EVENT_SCOPED_SAMPLING_STATE("blink", "DOMConstructor"); |
474 if (!info.IsConstructCall()) { | 537 if (!info.IsConstructCall()) { |
475 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::c
onstructorNotCallableAsFunction("TestInterface2")); | 538 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::c
onstructorNotCallableAsFunction("TestInterface2")); |
476 return; | 539 return; |
477 } | 540 } |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
537 { | 600 { |
538 scriptWrappable->toImpl<TestInterface2>()->ref(); | 601 scriptWrappable->toImpl<TestInterface2>()->ref(); |
539 } | 602 } |
540 | 603 |
541 void V8TestInterface2::derefObject(ScriptWrappable* scriptWrappable) | 604 void V8TestInterface2::derefObject(ScriptWrappable* scriptWrappable) |
542 { | 605 { |
543 scriptWrappable->toImpl<TestInterface2>()->deref(); | 606 scriptWrappable->toImpl<TestInterface2>()->deref(); |
544 } | 607 } |
545 | 608 |
546 } // namespace blink | 609 } // namespace blink |
OLD | NEW |