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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 { | 51 { |
52 ExceptionState exceptionState(ExceptionState::ExecutionContext, "item", "Tes
tInterface2", info.Holder(), info.GetIsolate()); | 52 ExceptionState exceptionState(ExceptionState::ExecutionContext, "item", "Tes
tInterface2", info.Holder(), info.GetIsolate()); |
53 if (UNLIKELY(info.Length() < 1)) { | 53 if (UNLIKELY(info.Length() < 1)) { |
54 throwMinimumArityTypeError(exceptionState, 1, info.Length()); | 54 throwMinimumArityTypeError(exceptionState, 1, info.Length()); |
55 return; | 55 return; |
56 } | 56 } |
57 TestInterface2* impl = V8TestInterface2::toNative(info.Holder()); | 57 TestInterface2* impl = V8TestInterface2::toNative(info.Holder()); |
58 unsigned index; | 58 unsigned index; |
59 { | 59 { |
60 v8::TryCatch block; | 60 v8::TryCatch block; |
| 61 V8RethrowTryCatchScope rethrow(block); |
61 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(index, toUInt32(info[0], exception
State), exceptionState); | 62 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(index, toUInt32(info[0], exception
State), exceptionState); |
62 } | 63 } |
63 RefPtr<TestInterfaceEmpty> result = impl->item(index, exceptionState); | 64 RefPtr<TestInterfaceEmpty> result = impl->item(index, exceptionState); |
64 if (exceptionState.hadException()) { | 65 if (exceptionState.hadException()) { |
65 exceptionState.throwIfNeeded(); | 66 exceptionState.throwIfNeeded(); |
66 return; | 67 return; |
67 } | 68 } |
68 v8SetReturnValue(info, result.release()); | 69 v8SetReturnValue(info, result.release()); |
69 } | 70 } |
70 | 71 |
71 static void itemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) | 72 static void itemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
72 { | 73 { |
73 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 74 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
74 TestInterface2V8Internal::itemMethod(info); | 75 TestInterface2V8Internal::itemMethod(info); |
75 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 76 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
76 } | 77 } |
77 | 78 |
78 static void setItemMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 79 static void setItemMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
79 { | 80 { |
80 ExceptionState exceptionState(ExceptionState::ExecutionContext, "setItem", "
TestInterface2", info.Holder(), info.GetIsolate()); | 81 ExceptionState exceptionState(ExceptionState::ExecutionContext, "setItem", "
TestInterface2", info.Holder(), info.GetIsolate()); |
81 if (UNLIKELY(info.Length() < 2)) { | 82 if (UNLIKELY(info.Length() < 2)) { |
82 throwMinimumArityTypeError(exceptionState, 2, info.Length()); | 83 throwMinimumArityTypeError(exceptionState, 2, info.Length()); |
83 return; | 84 return; |
84 } | 85 } |
85 TestInterface2* impl = V8TestInterface2::toNative(info.Holder()); | 86 TestInterface2* impl = V8TestInterface2::toNative(info.Holder()); |
86 unsigned index; | 87 unsigned index; |
87 V8StringResource<> value; | 88 V8StringResource<> value; |
88 { | 89 { |
89 v8::TryCatch block; | 90 v8::TryCatch block; |
| 91 V8RethrowTryCatchScope rethrow(block); |
90 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(index, toUInt32(info[0], exception
State), exceptionState); | 92 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(index, toUInt32(info[0], exception
State), exceptionState); |
91 TOSTRING_VOID_INTERNAL(value, info[1]); | 93 TOSTRING_VOID_INTERNAL(value, info[1]); |
92 } | 94 } |
93 String result = impl->setItem(index, value, exceptionState); | 95 String result = impl->setItem(index, value, exceptionState); |
94 if (exceptionState.hadException()) { | 96 if (exceptionState.hadException()) { |
95 exceptionState.throwIfNeeded(); | 97 exceptionState.throwIfNeeded(); |
96 return; | 98 return; |
97 } | 99 } |
98 v8SetReturnValueString(info, result, info.GetIsolate()); | 100 v8SetReturnValueString(info, result, info.GetIsolate()); |
99 } | 101 } |
100 | 102 |
101 static void setItemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf
o) | 103 static void setItemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf
o) |
102 { | 104 { |
103 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 105 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
104 TestInterface2V8Internal::setItemMethod(info); | 106 TestInterface2V8Internal::setItemMethod(info); |
105 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 107 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
106 } | 108 } |
107 | 109 |
108 static void deleteItemMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 110 static void deleteItemMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
109 { | 111 { |
110 ExceptionState exceptionState(ExceptionState::ExecutionContext, "deleteItem"
, "TestInterface2", info.Holder(), info.GetIsolate()); | 112 ExceptionState exceptionState(ExceptionState::ExecutionContext, "deleteItem"
, "TestInterface2", info.Holder(), info.GetIsolate()); |
111 if (UNLIKELY(info.Length() < 1)) { | 113 if (UNLIKELY(info.Length() < 1)) { |
112 throwMinimumArityTypeError(exceptionState, 1, info.Length()); | 114 throwMinimumArityTypeError(exceptionState, 1, info.Length()); |
113 return; | 115 return; |
114 } | 116 } |
115 TestInterface2* impl = V8TestInterface2::toNative(info.Holder()); | 117 TestInterface2* impl = V8TestInterface2::toNative(info.Holder()); |
116 unsigned index; | 118 unsigned index; |
117 { | 119 { |
118 v8::TryCatch block; | 120 v8::TryCatch block; |
| 121 V8RethrowTryCatchScope rethrow(block); |
119 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(index, toUInt32(info[0], exception
State), exceptionState); | 122 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(index, toUInt32(info[0], exception
State), exceptionState); |
120 } | 123 } |
121 bool result = impl->deleteItem(index, exceptionState); | 124 bool result = impl->deleteItem(index, exceptionState); |
122 if (exceptionState.hadException()) { | 125 if (exceptionState.hadException()) { |
123 exceptionState.throwIfNeeded(); | 126 exceptionState.throwIfNeeded(); |
124 return; | 127 return; |
125 } | 128 } |
126 v8SetReturnValueBool(info, result); | 129 v8SetReturnValueBool(info, result); |
127 } | 130 } |
128 | 131 |
129 static void deleteItemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&
info) | 132 static void deleteItemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&
info) |
130 { | 133 { |
131 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 134 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
132 TestInterface2V8Internal::deleteItemMethod(info); | 135 TestInterface2V8Internal::deleteItemMethod(info); |
133 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 136 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
134 } | 137 } |
135 | 138 |
136 static void namedItemMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 139 static void namedItemMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
137 { | 140 { |
138 ExceptionState exceptionState(ExceptionState::ExecutionContext, "namedItem",
"TestInterface2", info.Holder(), info.GetIsolate()); | 141 ExceptionState exceptionState(ExceptionState::ExecutionContext, "namedItem",
"TestInterface2", info.Holder(), info.GetIsolate()); |
139 if (UNLIKELY(info.Length() < 1)) { | 142 if (UNLIKELY(info.Length() < 1)) { |
140 throwMinimumArityTypeError(exceptionState, 1, info.Length()); | 143 throwMinimumArityTypeError(exceptionState, 1, info.Length()); |
141 return; | 144 return; |
142 } | 145 } |
143 TestInterface2* impl = V8TestInterface2::toNative(info.Holder()); | 146 TestInterface2* impl = V8TestInterface2::toNative(info.Holder()); |
144 V8StringResource<> name; | 147 V8StringResource<> name; |
145 { | 148 { |
146 TOSTRING_VOID_INTERNAL_NOTRYCATCH(name, info[0]); | 149 TOSTRING_VOID_INTERNAL(name, info[0]); |
147 } | 150 } |
148 RefPtr<TestInterfaceEmpty> result = impl->namedItem(name, exceptionState); | 151 RefPtr<TestInterfaceEmpty> result = impl->namedItem(name, exceptionState); |
149 if (exceptionState.hadException()) { | 152 if (exceptionState.hadException()) { |
150 exceptionState.throwIfNeeded(); | 153 exceptionState.throwIfNeeded(); |
151 return; | 154 return; |
152 } | 155 } |
153 v8SetReturnValue(info, result.release()); | 156 v8SetReturnValue(info, result.release()); |
154 } | 157 } |
155 | 158 |
156 static void namedItemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | 159 static void namedItemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) |
157 { | 160 { |
158 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 161 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
159 TestInterface2V8Internal::namedItemMethod(info); | 162 TestInterface2V8Internal::namedItemMethod(info); |
160 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 163 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
161 } | 164 } |
162 | 165 |
163 static void setNamedItemMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 166 static void setNamedItemMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
164 { | 167 { |
165 ExceptionState exceptionState(ExceptionState::ExecutionContext, "setNamedIte
m", "TestInterface2", info.Holder(), info.GetIsolate()); | 168 ExceptionState exceptionState(ExceptionState::ExecutionContext, "setNamedIte
m", "TestInterface2", info.Holder(), info.GetIsolate()); |
166 if (UNLIKELY(info.Length() < 2)) { | 169 if (UNLIKELY(info.Length() < 2)) { |
167 throwMinimumArityTypeError(exceptionState, 2, info.Length()); | 170 throwMinimumArityTypeError(exceptionState, 2, info.Length()); |
168 return; | 171 return; |
169 } | 172 } |
170 TestInterface2* impl = V8TestInterface2::toNative(info.Holder()); | 173 TestInterface2* impl = V8TestInterface2::toNative(info.Holder()); |
171 V8StringResource<> name; | 174 V8StringResource<> name; |
172 V8StringResource<> value; | 175 V8StringResource<> value; |
173 { | 176 { |
174 TOSTRING_VOID_INTERNAL_NOTRYCATCH(name, info[0]); | 177 TOSTRING_VOID_INTERNAL(name, info[0]); |
175 TOSTRING_VOID_INTERNAL_NOTRYCATCH(value, info[1]); | 178 TOSTRING_VOID_INTERNAL(value, info[1]); |
176 } | 179 } |
177 String result = impl->setNamedItem(name, value, exceptionState); | 180 String result = impl->setNamedItem(name, value, exceptionState); |
178 if (exceptionState.hadException()) { | 181 if (exceptionState.hadException()) { |
179 exceptionState.throwIfNeeded(); | 182 exceptionState.throwIfNeeded(); |
180 return; | 183 return; |
181 } | 184 } |
182 v8SetReturnValueString(info, result, info.GetIsolate()); | 185 v8SetReturnValueString(info, result, info.GetIsolate()); |
183 } | 186 } |
184 | 187 |
185 static void setNamedItemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>
& info) | 188 static void setNamedItemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>
& info) |
186 { | 189 { |
187 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 190 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
188 TestInterface2V8Internal::setNamedItemMethod(info); | 191 TestInterface2V8Internal::setNamedItemMethod(info); |
189 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 192 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
190 } | 193 } |
191 | 194 |
192 static void deleteNamedItemMethod(const v8::FunctionCallbackInfo<v8::Value>& inf
o) | 195 static void deleteNamedItemMethod(const v8::FunctionCallbackInfo<v8::Value>& inf
o) |
193 { | 196 { |
194 ExceptionState exceptionState(ExceptionState::ExecutionContext, "deleteNamed
Item", "TestInterface2", info.Holder(), info.GetIsolate()); | 197 ExceptionState exceptionState(ExceptionState::ExecutionContext, "deleteNamed
Item", "TestInterface2", info.Holder(), info.GetIsolate()); |
195 if (UNLIKELY(info.Length() < 1)) { | 198 if (UNLIKELY(info.Length() < 1)) { |
196 throwMinimumArityTypeError(exceptionState, 1, info.Length()); | 199 throwMinimumArityTypeError(exceptionState, 1, info.Length()); |
197 return; | 200 return; |
198 } | 201 } |
199 TestInterface2* impl = V8TestInterface2::toNative(info.Holder()); | 202 TestInterface2* impl = V8TestInterface2::toNative(info.Holder()); |
200 V8StringResource<> name; | 203 V8StringResource<> name; |
201 { | 204 { |
202 TOSTRING_VOID_INTERNAL_NOTRYCATCH(name, info[0]); | 205 TOSTRING_VOID_INTERNAL(name, info[0]); |
203 } | 206 } |
204 bool result = impl->deleteNamedItem(name, exceptionState); | 207 bool result = impl->deleteNamedItem(name, exceptionState); |
205 if (exceptionState.hadException()) { | 208 if (exceptionState.hadException()) { |
206 exceptionState.throwIfNeeded(); | 209 exceptionState.throwIfNeeded(); |
207 return; | 210 return; |
208 } | 211 } |
209 v8SetReturnValueBool(info, result); | 212 v8SetReturnValueBool(info, result); |
210 } | 213 } |
211 | 214 |
212 static void deleteNamedItemMethodCallback(const v8::FunctionCallbackInfo<v8::Val
ue>& info) | 215 static void deleteNamedItemMethodCallback(const v8::FunctionCallbackInfo<v8::Val
ue>& info) |
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
523 fromInternalPointer(object)->deref(); | 526 fromInternalPointer(object)->deref(); |
524 } | 527 } |
525 | 528 |
526 template<> | 529 template<> |
527 v8::Handle<v8::Value> toV8NoInline(TestInterface2* impl, v8::Handle<v8::Object>
creationContext, v8::Isolate* isolate) | 530 v8::Handle<v8::Value> toV8NoInline(TestInterface2* impl, v8::Handle<v8::Object>
creationContext, v8::Isolate* isolate) |
528 { | 531 { |
529 return toV8(impl, creationContext, isolate); | 532 return toV8(impl, creationContext, isolate); |
530 } | 533 } |
531 | 534 |
532 } // namespace WebCore | 535 } // namespace WebCore |
OLD | NEW |