| 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 "RuntimeEnabledFeatures.h" | 10 #include "RuntimeEnabledFeatures.h" |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 TONATIVE_VOID_EXCEPTIONSTATE(unsigned, index, toUInt32(info[0], exceptionSta
te), exceptionState); | 59 unsigned index; |
| 60 { |
| 61 v8::TryCatch block; |
| 62 TONATIVE_VOID_EXCEPTIONSTATE_NO_DECL(index, toUInt32(info[0], exceptionS
tate), exceptionState); |
| 63 } |
| 60 RefPtr<TestInterfaceEmpty> result = impl->item(index, exceptionState); | 64 RefPtr<TestInterfaceEmpty> result = impl->item(index, exceptionState); |
| 61 if (exceptionState.throwIfNeeded()) | 65 if (exceptionState.throwIfNeeded()) |
| 62 return; | 66 return; |
| 63 v8SetReturnValue(info, result.release()); | 67 v8SetReturnValue(info, result.release()); |
| 64 } | 68 } |
| 65 | 69 |
| 66 static void itemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) | 70 static void itemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 67 { | 71 { |
| 68 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 72 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 69 TestInterface2V8Internal::itemMethod(info); | 73 TestInterface2V8Internal::itemMethod(info); |
| 70 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 74 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 71 } | 75 } |
| 72 | 76 |
| 73 static void setItemMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 77 static void setItemMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 74 { | 78 { |
| 75 ExceptionState exceptionState(ExceptionState::ExecutionContext, "setItem", "
TestInterface2", info.Holder(), info.GetIsolate()); | 79 ExceptionState exceptionState(ExceptionState::ExecutionContext, "setItem", "
TestInterface2", info.Holder(), info.GetIsolate()); |
| 76 if (UNLIKELY(info.Length() < 2)) { | 80 if (UNLIKELY(info.Length() < 2)) { |
| 77 throwArityTypeError(exceptionState, 2, info.Length()); | 81 throwArityTypeError(exceptionState, 2, info.Length()); |
| 78 return; | 82 return; |
| 79 } | 83 } |
| 80 TestInterface2* impl = V8TestInterface2::toNative(info.Holder()); | 84 TestInterface2* impl = V8TestInterface2::toNative(info.Holder()); |
| 81 TONATIVE_VOID_EXCEPTIONSTATE(unsigned, index, toUInt32(info[0], exceptionSta
te), exceptionState); | 85 unsigned index; |
| 82 TOSTRING_VOID(V8StringResource<>, value, info[1]); | 86 V8StringResource<> value; |
| 87 { |
| 88 v8::TryCatch block; |
| 89 TONATIVE_VOID_EXCEPTIONSTATE_NO_DECL(index, toUInt32(info[0], exceptionS
tate), exceptionState); |
| 90 TOSTRING_VOID_NO_DECL(value, info[1]); |
| 91 } |
| 83 String result = impl->setItem(index, value, exceptionState); | 92 String result = impl->setItem(index, value, exceptionState); |
| 84 if (exceptionState.throwIfNeeded()) | 93 if (exceptionState.throwIfNeeded()) |
| 85 return; | 94 return; |
| 86 v8SetReturnValueString(info, result, info.GetIsolate()); | 95 v8SetReturnValueString(info, result, info.GetIsolate()); |
| 87 } | 96 } |
| 88 | 97 |
| 89 static void setItemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf
o) | 98 static void setItemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf
o) |
| 90 { | 99 { |
| 91 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 100 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 92 TestInterface2V8Internal::setItemMethod(info); | 101 TestInterface2V8Internal::setItemMethod(info); |
| 93 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 102 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 94 } | 103 } |
| 95 | 104 |
| 96 static void deleteItemMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 105 static void deleteItemMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 97 { | 106 { |
| 98 ExceptionState exceptionState(ExceptionState::ExecutionContext, "deleteItem"
, "TestInterface2", info.Holder(), info.GetIsolate()); | 107 ExceptionState exceptionState(ExceptionState::ExecutionContext, "deleteItem"
, "TestInterface2", info.Holder(), info.GetIsolate()); |
| 99 if (UNLIKELY(info.Length() < 1)) { | 108 if (UNLIKELY(info.Length() < 1)) { |
| 100 throwArityTypeError(exceptionState, 1, info.Length()); | 109 throwArityTypeError(exceptionState, 1, info.Length()); |
| 101 return; | 110 return; |
| 102 } | 111 } |
| 103 TestInterface2* impl = V8TestInterface2::toNative(info.Holder()); | 112 TestInterface2* impl = V8TestInterface2::toNative(info.Holder()); |
| 104 TONATIVE_VOID_EXCEPTIONSTATE(unsigned, index, toUInt32(info[0], exceptionSta
te), exceptionState); | 113 unsigned index; |
| 114 { |
| 115 v8::TryCatch block; |
| 116 TONATIVE_VOID_EXCEPTIONSTATE_NO_DECL(index, toUInt32(info[0], exceptionS
tate), exceptionState); |
| 117 } |
| 105 bool result = impl->deleteItem(index, exceptionState); | 118 bool result = impl->deleteItem(index, exceptionState); |
| 106 if (exceptionState.throwIfNeeded()) | 119 if (exceptionState.throwIfNeeded()) |
| 107 return; | 120 return; |
| 108 v8SetReturnValueBool(info, result); | 121 v8SetReturnValueBool(info, result); |
| 109 } | 122 } |
| 110 | 123 |
| 111 static void deleteItemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&
info) | 124 static void deleteItemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&
info) |
| 112 { | 125 { |
| 113 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 126 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 114 TestInterface2V8Internal::deleteItemMethod(info); | 127 TestInterface2V8Internal::deleteItemMethod(info); |
| 115 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 128 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 116 } | 129 } |
| 117 | 130 |
| 118 static void namedItemMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 131 static void namedItemMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 119 { | 132 { |
| 120 ExceptionState exceptionState(ExceptionState::ExecutionContext, "namedItem",
"TestInterface2", info.Holder(), info.GetIsolate()); | 133 ExceptionState exceptionState(ExceptionState::ExecutionContext, "namedItem",
"TestInterface2", info.Holder(), info.GetIsolate()); |
| 121 if (UNLIKELY(info.Length() < 1)) { | 134 if (UNLIKELY(info.Length() < 1)) { |
| 122 throwArityTypeError(exceptionState, 1, info.Length()); | 135 throwArityTypeError(exceptionState, 1, info.Length()); |
| 123 return; | 136 return; |
| 124 } | 137 } |
| 125 TestInterface2* impl = V8TestInterface2::toNative(info.Holder()); | 138 TestInterface2* impl = V8TestInterface2::toNative(info.Holder()); |
| 126 TOSTRING_VOID(V8StringResource<>, name, info[0]); | 139 V8StringResource<> name; |
| 140 { |
| 141 v8::TryCatch block; |
| 142 TOSTRING_VOID_NO_DECL(name, info[0]); |
| 143 } |
| 127 RefPtr<TestInterfaceEmpty> result = impl->namedItem(name, exceptionState); | 144 RefPtr<TestInterfaceEmpty> result = impl->namedItem(name, exceptionState); |
| 128 if (exceptionState.throwIfNeeded()) | 145 if (exceptionState.throwIfNeeded()) |
| 129 return; | 146 return; |
| 130 v8SetReturnValue(info, result.release()); | 147 v8SetReturnValue(info, result.release()); |
| 131 } | 148 } |
| 132 | 149 |
| 133 static void namedItemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | 150 static void namedItemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) |
| 134 { | 151 { |
| 135 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 152 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 136 TestInterface2V8Internal::namedItemMethod(info); | 153 TestInterface2V8Internal::namedItemMethod(info); |
| 137 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 154 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 138 } | 155 } |
| 139 | 156 |
| 140 static void setNamedItemMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 157 static void setNamedItemMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 141 { | 158 { |
| 142 ExceptionState exceptionState(ExceptionState::ExecutionContext, "setNamedIte
m", "TestInterface2", info.Holder(), info.GetIsolate()); | 159 ExceptionState exceptionState(ExceptionState::ExecutionContext, "setNamedIte
m", "TestInterface2", info.Holder(), info.GetIsolate()); |
| 143 if (UNLIKELY(info.Length() < 2)) { | 160 if (UNLIKELY(info.Length() < 2)) { |
| 144 throwArityTypeError(exceptionState, 2, info.Length()); | 161 throwArityTypeError(exceptionState, 2, info.Length()); |
| 145 return; | 162 return; |
| 146 } | 163 } |
| 147 TestInterface2* impl = V8TestInterface2::toNative(info.Holder()); | 164 TestInterface2* impl = V8TestInterface2::toNative(info.Holder()); |
| 148 TOSTRING_VOID(V8StringResource<>, name, info[0]); | 165 V8StringResource<> name; |
| 149 TOSTRING_VOID(V8StringResource<>, value, info[1]); | 166 V8StringResource<> value; |
| 167 { |
| 168 v8::TryCatch block; |
| 169 TOSTRING_VOID_NO_DECL(name, info[0]); |
| 170 TOSTRING_VOID_NO_DECL(value, info[1]); |
| 171 } |
| 150 String result = impl->setNamedItem(name, value, exceptionState); | 172 String result = impl->setNamedItem(name, value, exceptionState); |
| 151 if (exceptionState.throwIfNeeded()) | 173 if (exceptionState.throwIfNeeded()) |
| 152 return; | 174 return; |
| 153 v8SetReturnValueString(info, result, info.GetIsolate()); | 175 v8SetReturnValueString(info, result, info.GetIsolate()); |
| 154 } | 176 } |
| 155 | 177 |
| 156 static void setNamedItemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>
& info) | 178 static void setNamedItemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>
& info) |
| 157 { | 179 { |
| 158 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 180 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 159 TestInterface2V8Internal::setNamedItemMethod(info); | 181 TestInterface2V8Internal::setNamedItemMethod(info); |
| 160 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 182 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 161 } | 183 } |
| 162 | 184 |
| 163 static void deleteNamedItemMethod(const v8::FunctionCallbackInfo<v8::Value>& inf
o) | 185 static void deleteNamedItemMethod(const v8::FunctionCallbackInfo<v8::Value>& inf
o) |
| 164 { | 186 { |
| 165 ExceptionState exceptionState(ExceptionState::ExecutionContext, "deleteNamed
Item", "TestInterface2", info.Holder(), info.GetIsolate()); | 187 ExceptionState exceptionState(ExceptionState::ExecutionContext, "deleteNamed
Item", "TestInterface2", info.Holder(), info.GetIsolate()); |
| 166 if (UNLIKELY(info.Length() < 1)) { | 188 if (UNLIKELY(info.Length() < 1)) { |
| 167 throwArityTypeError(exceptionState, 1, info.Length()); | 189 throwArityTypeError(exceptionState, 1, info.Length()); |
| 168 return; | 190 return; |
| 169 } | 191 } |
| 170 TestInterface2* impl = V8TestInterface2::toNative(info.Holder()); | 192 TestInterface2* impl = V8TestInterface2::toNative(info.Holder()); |
| 171 TOSTRING_VOID(V8StringResource<>, name, info[0]); | 193 V8StringResource<> name; |
| 194 { |
| 195 v8::TryCatch block; |
| 196 TOSTRING_VOID_NO_DECL(name, info[0]); |
| 197 } |
| 172 bool result = impl->deleteNamedItem(name, exceptionState); | 198 bool result = impl->deleteNamedItem(name, exceptionState); |
| 173 if (exceptionState.throwIfNeeded()) | 199 if (exceptionState.throwIfNeeded()) |
| 174 return; | 200 return; |
| 175 v8SetReturnValueBool(info, result); | 201 v8SetReturnValueBool(info, result); |
| 176 } | 202 } |
| 177 | 203 |
| 178 static void deleteNamedItemMethodCallback(const v8::FunctionCallbackInfo<v8::Val
ue>& info) | 204 static void deleteNamedItemMethodCallback(const v8::FunctionCallbackInfo<v8::Val
ue>& info) |
| 179 { | 205 { |
| 180 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 206 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 181 TestInterface2V8Internal::deleteNamedItemMethod(info); | 207 TestInterface2V8Internal::deleteNamedItemMethod(info); |
| (...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 489 fromInternalPointer(object)->deref(); | 515 fromInternalPointer(object)->deref(); |
| 490 } | 516 } |
| 491 | 517 |
| 492 template<> | 518 template<> |
| 493 v8::Handle<v8::Value> toV8NoInline(TestInterface2* impl, v8::Handle<v8::Object>
creationContext, v8::Isolate* isolate) | 519 v8::Handle<v8::Value> toV8NoInline(TestInterface2* impl, v8::Handle<v8::Object>
creationContext, v8::Isolate* isolate) |
| 494 { | 520 { |
| 495 return toV8(impl, creationContext, isolate); | 521 return toV8(impl, creationContext, isolate); |
| 496 } | 522 } |
| 497 | 523 |
| 498 } // namespace WebCore | 524 } // namespace WebCore |
| OLD | NEW |