| 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 29 matching lines...) Expand all Loading... |
| 40 { | 40 { |
| 41 ExceptionState exceptionState(ExceptionState::ExecutionContext, "item", "Tes
tInterface2", info.Holder(), info.GetIsolate()); | 41 ExceptionState exceptionState(ExceptionState::ExecutionContext, "item", "Tes
tInterface2", info.Holder(), info.GetIsolate()); |
| 42 if (UNLIKELY(info.Length() < 1)) { | 42 if (UNLIKELY(info.Length() < 1)) { |
| 43 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 43 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| 44 exceptionState.throwIfNeeded(); | 44 exceptionState.throwIfNeeded(); |
| 45 return; | 45 return; |
| 46 } | 46 } |
| 47 TestInterface2* impl = V8TestInterface2::toImpl(info.Holder()); | 47 TestInterface2* impl = V8TestInterface2::toImpl(info.Holder()); |
| 48 unsigned index; | 48 unsigned index; |
| 49 { | 49 { |
| 50 v8::TryCatch block; | |
| 51 V8RethrowTryCatchScope rethrow(block); | |
| 52 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(index, toUInt32(info[0], exception
State), exceptionState); | 50 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(index, toUInt32(info[0], exception
State), exceptionState); |
| 53 } | 51 } |
| 54 RefPtr<TestInterfaceEmpty> result = impl->item(index, exceptionState); | 52 RefPtr<TestInterfaceEmpty> result = impl->item(index, exceptionState); |
| 55 if (exceptionState.hadException()) { | 53 if (exceptionState.hadException()) { |
| 56 exceptionState.throwIfNeeded(); | 54 exceptionState.throwIfNeeded(); |
| 57 return; | 55 return; |
| 58 } | 56 } |
| 59 v8SetReturnValue(info, result.release()); | 57 v8SetReturnValue(info, result.release()); |
| 60 } | 58 } |
| 61 | 59 |
| 62 static void itemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) | 60 static void itemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 63 { | 61 { |
| 64 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 62 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 65 TestInterface2V8Internal::itemMethod(info); | 63 TestInterface2V8Internal::itemMethod(info); |
| 66 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 64 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 67 } | 65 } |
| 68 | 66 |
| 69 static void setItemMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 67 static void setItemMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 70 { | 68 { |
| 71 ExceptionState exceptionState(ExceptionState::ExecutionContext, "setItem", "
TestInterface2", info.Holder(), info.GetIsolate()); | 69 ExceptionState exceptionState(ExceptionState::ExecutionContext, "setItem", "
TestInterface2", info.Holder(), info.GetIsolate()); |
| 72 if (UNLIKELY(info.Length() < 2)) { | 70 if (UNLIKELY(info.Length() < 2)) { |
| 73 setMinimumArityTypeError(exceptionState, 2, info.Length()); | 71 setMinimumArityTypeError(exceptionState, 2, info.Length()); |
| 74 exceptionState.throwIfNeeded(); | 72 exceptionState.throwIfNeeded(); |
| 75 return; | 73 return; |
| 76 } | 74 } |
| 77 TestInterface2* impl = V8TestInterface2::toImpl(info.Holder()); | 75 TestInterface2* impl = V8TestInterface2::toImpl(info.Holder()); |
| 78 unsigned index; | 76 unsigned index; |
| 79 V8StringResource<> value; | 77 V8StringResource<> value; |
| 80 { | 78 { |
| 81 v8::TryCatch block; | |
| 82 V8RethrowTryCatchScope rethrow(block); | |
| 83 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(index, toUInt32(info[0], exception
State), exceptionState); | 79 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(index, toUInt32(info[0], exception
State), exceptionState); |
| 84 TOSTRING_VOID_INTERNAL(value, info[1]); | 80 TOSTRING_VOID_INTERNAL(value, info[1]); |
| 85 } | 81 } |
| 86 String result = impl->setItem(index, value, exceptionState); | 82 String result = impl->setItem(index, value, exceptionState); |
| 87 if (exceptionState.hadException()) { | 83 if (exceptionState.hadException()) { |
| 88 exceptionState.throwIfNeeded(); | 84 exceptionState.throwIfNeeded(); |
| 89 return; | 85 return; |
| 90 } | 86 } |
| 91 v8SetReturnValueString(info, result, info.GetIsolate()); | 87 v8SetReturnValueString(info, result, info.GetIsolate()); |
| 92 } | 88 } |
| 93 | 89 |
| 94 static void setItemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf
o) | 90 static void setItemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf
o) |
| 95 { | 91 { |
| 96 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 92 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 97 TestInterface2V8Internal::setItemMethod(info); | 93 TestInterface2V8Internal::setItemMethod(info); |
| 98 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 94 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 99 } | 95 } |
| 100 | 96 |
| 101 static void deleteItemMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 97 static void deleteItemMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 102 { | 98 { |
| 103 ExceptionState exceptionState(ExceptionState::ExecutionContext, "deleteItem"
, "TestInterface2", info.Holder(), info.GetIsolate()); | 99 ExceptionState exceptionState(ExceptionState::ExecutionContext, "deleteItem"
, "TestInterface2", info.Holder(), info.GetIsolate()); |
| 104 if (UNLIKELY(info.Length() < 1)) { | 100 if (UNLIKELY(info.Length() < 1)) { |
| 105 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 101 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| 106 exceptionState.throwIfNeeded(); | 102 exceptionState.throwIfNeeded(); |
| 107 return; | 103 return; |
| 108 } | 104 } |
| 109 TestInterface2* impl = V8TestInterface2::toImpl(info.Holder()); | 105 TestInterface2* impl = V8TestInterface2::toImpl(info.Holder()); |
| 110 unsigned index; | 106 unsigned index; |
| 111 { | 107 { |
| 112 v8::TryCatch block; | |
| 113 V8RethrowTryCatchScope rethrow(block); | |
| 114 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(index, toUInt32(info[0], exception
State), exceptionState); | 108 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(index, toUInt32(info[0], exception
State), exceptionState); |
| 115 } | 109 } |
| 116 bool result = impl->deleteItem(index, exceptionState); | 110 bool result = impl->deleteItem(index, exceptionState); |
| 117 if (exceptionState.hadException()) { | 111 if (exceptionState.hadException()) { |
| 118 exceptionState.throwIfNeeded(); | 112 exceptionState.throwIfNeeded(); |
| 119 return; | 113 return; |
| 120 } | 114 } |
| 121 v8SetReturnValueBool(info, result); | 115 v8SetReturnValueBool(info, result); |
| 122 } | 116 } |
| 123 | 117 |
| (...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 523 return 0; | 517 return 0; |
| 524 } | 518 } |
| 525 | 519 |
| 526 template<> | 520 template<> |
| 527 v8::Handle<v8::Value> toV8NoInline(TestInterface2* impl, v8::Handle<v8::Object>
creationContext, v8::Isolate* isolate) | 521 v8::Handle<v8::Value> toV8NoInline(TestInterface2* impl, v8::Handle<v8::Object>
creationContext, v8::Isolate* isolate) |
| 528 { | 522 { |
| 529 return toV8(impl, creationContext, isolate); | 523 return toV8(impl, creationContext, isolate); |
| 530 } | 524 } |
| 531 | 525 |
| 532 } // namespace blink | 526 } // namespace blink |
| OLD | NEW |