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