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. | 5 // This file has been auto-generated by code_generator_v8.py. |
6 // DO NOT MODIFY! | 6 // DO NOT MODIFY! |
7 | 7 |
8 // This file has been generated from the Jinja2 template in | 8 // This file has been generated from the Jinja2 template in |
9 // third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl | 9 // third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl |
10 | 10 |
11 // clang-format off | 11 // clang-format off |
12 #include "V8TestInterface5.h" | 12 #include "V8TestInterface5.h" |
13 | 13 |
14 #include "bindings/core/v8/ExceptionState.h" | 14 #include "bindings/core/v8/ExceptionState.h" |
| 15 #include "bindings/core/v8/IDLTypes.h" |
| 16 #include "bindings/core/v8/NativeValueTraitsImpl.h" |
15 #include "bindings/core/v8/V8DOMConfiguration.h" | 17 #include "bindings/core/v8/V8DOMConfiguration.h" |
16 #include "bindings/core/v8/V8ObjectConstructor.h" | 18 #include "bindings/core/v8/V8ObjectConstructor.h" |
17 #include "bindings/core/v8/V8TestInterfaceEmpty.h" | 19 #include "bindings/core/v8/V8TestInterfaceEmpty.h" |
18 #include "bindings/modules/v8/BooleanOrString.h" | 20 #include "bindings/modules/v8/BooleanOrString.h" |
19 #include "bindings/modules/v8/DoubleOrString.h" | 21 #include "bindings/modules/v8/DoubleOrString.h" |
20 #include "bindings/modules/v8/V8TestInterface5.h" | 22 #include "bindings/modules/v8/V8TestInterface5.h" |
21 #include "bindings/modules/v8/VoidCallbackFunctionModules.h" | 23 #include "bindings/modules/v8/VoidCallbackFunctionModules.h" |
22 #include "core/dom/Document.h" | 24 #include "core/dom/Document.h" |
23 #include "platform/RuntimeEnabledFeatures.h" | 25 #include "platform/RuntimeEnabledFeatures.h" |
24 #include "wtf/GetPtr.h" | 26 #include "wtf/GetPtr.h" |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 v8SetReturnValue(info, impl->doubleAttribute()); | 93 v8SetReturnValue(info, impl->doubleAttribute()); |
92 } | 94 } |
93 | 95 |
94 static void doubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
8::FunctionCallbackInfo<v8::Value>& info) { | 96 static void doubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
8::FunctionCallbackInfo<v8::Value>& info) { |
95 v8::Local<v8::Object> holder = info.Holder(); | 97 v8::Local<v8::Object> holder = info.Holder(); |
96 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 98 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
97 | 99 |
98 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext
, "TestInterface5", "doubleAttribute"); | 100 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext
, "TestInterface5", "doubleAttribute"); |
99 | 101 |
100 // Prepare the value to be set. | 102 // Prepare the value to be set. |
101 double cppValue = toRestrictedDouble(info.GetIsolate(), v8Value, exceptionStat
e); | 103 double cppValue = NativeValueTraits<IDLDouble>::nativeValue(info.GetIsolate(),
v8Value, exceptionState); |
102 if (exceptionState.hadException()) | 104 if (exceptionState.hadException()) |
103 return; | 105 return; |
104 | 106 |
105 impl->setDoubleAttribute(cppValue); | 107 impl->setDoubleAttribute(cppValue); |
106 } | 108 } |
107 | 109 |
108 static void floatAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Val
ue>& info) { | 110 static void floatAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Val
ue>& info) { |
109 v8::Local<v8::Object> holder = info.Holder(); | 111 v8::Local<v8::Object> holder = info.Holder(); |
110 | 112 |
111 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 113 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
112 | 114 |
113 v8SetReturnValue(info, impl->floatAttribute()); | 115 v8SetReturnValue(info, impl->floatAttribute()); |
114 } | 116 } |
115 | 117 |
116 static void floatAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::FunctionCallbackInfo<v8::Value>& info) { | 118 static void floatAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::FunctionCallbackInfo<v8::Value>& info) { |
117 v8::Local<v8::Object> holder = info.Holder(); | 119 v8::Local<v8::Object> holder = info.Holder(); |
118 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 120 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
119 | 121 |
120 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext
, "TestInterface5", "floatAttribute"); | 122 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext
, "TestInterface5", "floatAttribute"); |
121 | 123 |
122 // Prepare the value to be set. | 124 // Prepare the value to be set. |
123 float cppValue = toRestrictedFloat(info.GetIsolate(), v8Value, exceptionState)
; | 125 float cppValue = NativeValueTraits<IDLFloat>::nativeValue(info.GetIsolate(), v
8Value, exceptionState); |
124 if (exceptionState.hadException()) | 126 if (exceptionState.hadException()) |
125 return; | 127 return; |
126 | 128 |
127 impl->setFloatAttribute(cppValue); | 129 impl->setFloatAttribute(cppValue); |
128 } | 130 } |
129 | 131 |
130 static void unrestrictedDoubleAttributeAttributeGetter(const v8::FunctionCallbac
kInfo<v8::Value>& info) { | 132 static void unrestrictedDoubleAttributeAttributeGetter(const v8::FunctionCallbac
kInfo<v8::Value>& info) { |
131 v8::Local<v8::Object> holder = info.Holder(); | 133 v8::Local<v8::Object> holder = info.Holder(); |
132 | 134 |
133 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 135 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
134 | 136 |
135 v8SetReturnValue(info, impl->unrestrictedDoubleAttribute()); | 137 v8SetReturnValue(info, impl->unrestrictedDoubleAttribute()); |
136 } | 138 } |
137 | 139 |
138 static void unrestrictedDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::FunctionCallbackInfo<v8::Value>& info) { | 140 static void unrestrictedDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::FunctionCallbackInfo<v8::Value>& info) { |
139 v8::Local<v8::Object> holder = info.Holder(); | 141 v8::Local<v8::Object> holder = info.Holder(); |
140 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 142 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
141 | 143 |
142 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext
, "TestInterface5", "unrestrictedDoubleAttribute"); | 144 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext
, "TestInterface5", "unrestrictedDoubleAttribute"); |
143 | 145 |
144 // Prepare the value to be set. | 146 // Prepare the value to be set. |
145 double cppValue = toDouble(info.GetIsolate(), v8Value, exceptionState); | 147 double cppValue = NativeValueTraits<IDLUnrestrictedDouble>::nativeValue(info.G
etIsolate(), v8Value, exceptionState); |
146 if (exceptionState.hadException()) | 148 if (exceptionState.hadException()) |
147 return; | 149 return; |
148 | 150 |
149 impl->setUnrestrictedDoubleAttribute(cppValue); | 151 impl->setUnrestrictedDoubleAttribute(cppValue); |
150 } | 152 } |
151 | 153 |
152 static void unrestrictedFloatAttributeAttributeGetter(const v8::FunctionCallback
Info<v8::Value>& info) { | 154 static void unrestrictedFloatAttributeAttributeGetter(const v8::FunctionCallback
Info<v8::Value>& info) { |
153 v8::Local<v8::Object> holder = info.Holder(); | 155 v8::Local<v8::Object> holder = info.Holder(); |
154 | 156 |
155 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 157 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
156 | 158 |
157 v8SetReturnValue(info, impl->unrestrictedFloatAttribute()); | 159 v8SetReturnValue(info, impl->unrestrictedFloatAttribute()); |
158 } | 160 } |
159 | 161 |
160 static void unrestrictedFloatAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::FunctionCallbackInfo<v8::Value>& info) { | 162 static void unrestrictedFloatAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::FunctionCallbackInfo<v8::Value>& info) { |
161 v8::Local<v8::Object> holder = info.Holder(); | 163 v8::Local<v8::Object> holder = info.Holder(); |
162 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 164 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
163 | 165 |
164 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext
, "TestInterface5", "unrestrictedFloatAttribute"); | 166 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext
, "TestInterface5", "unrestrictedFloatAttribute"); |
165 | 167 |
166 // Prepare the value to be set. | 168 // Prepare the value to be set. |
167 float cppValue = toFloat(info.GetIsolate(), v8Value, exceptionState); | 169 float cppValue = NativeValueTraits<IDLUnrestrictedFloat>::nativeValue(info.Get
Isolate(), v8Value, exceptionState); |
168 if (exceptionState.hadException()) | 170 if (exceptionState.hadException()) |
169 return; | 171 return; |
170 | 172 |
171 impl->setUnrestrictedFloatAttribute(cppValue); | 173 impl->setUnrestrictedFloatAttribute(cppValue); |
172 } | 174 } |
173 | 175 |
174 static void staticStringAttributeAttributeGetter(const v8::FunctionCallbackInfo<
v8::Value>& info) { | 176 static void staticStringAttributeAttributeGetter(const v8::FunctionCallbackInfo<
v8::Value>& info) { |
175 v8SetReturnValueString(info, TestInterface5Implementation::staticStringAttribu
te(), info.GetIsolate()); | 177 v8SetReturnValueString(info, TestInterface5Implementation::staticStringAttribu
te(), info.GetIsolate()); |
176 } | 178 } |
177 | 179 |
(...skipping 22 matching lines...) Expand all Loading... |
200 v8SetReturnValueInt(info, impl->alwaysExposedAttribute()); | 202 v8SetReturnValueInt(info, impl->alwaysExposedAttribute()); |
201 } | 203 } |
202 | 204 |
203 static void alwaysExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::FunctionCallbackInfo<v8::Value>& info) { | 205 static void alwaysExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::FunctionCallbackInfo<v8::Value>& info) { |
204 v8::Local<v8::Object> holder = info.Holder(); | 206 v8::Local<v8::Object> holder = info.Holder(); |
205 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 207 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
206 | 208 |
207 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext
, "TestInterface5", "alwaysExposedAttribute"); | 209 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext
, "TestInterface5", "alwaysExposedAttribute"); |
208 | 210 |
209 // Prepare the value to be set. | 211 // Prepare the value to be set. |
210 int32_t cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excep
tionState); | 212 int32_t cppValue = NativeValueTraits<IDLLong>::nativeValue(info.GetIsolate(),
v8Value, exceptionState, NormalConversion); |
211 if (exceptionState.hadException()) | 213 if (exceptionState.hadException()) |
212 return; | 214 return; |
213 | 215 |
214 impl->setAlwaysExposedAttribute(cppValue); | 216 impl->setAlwaysExposedAttribute(cppValue); |
215 } | 217 } |
216 | 218 |
217 static void workerExposedAttributeAttributeGetter(const v8::FunctionCallbackInfo
<v8::Value>& info) { | 219 static void workerExposedAttributeAttributeGetter(const v8::FunctionCallbackInfo
<v8::Value>& info) { |
218 v8::Local<v8::Object> holder = info.Holder(); | 220 v8::Local<v8::Object> holder = info.Holder(); |
219 | 221 |
220 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 222 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
221 | 223 |
222 v8SetReturnValueInt(info, impl->workerExposedAttribute()); | 224 v8SetReturnValueInt(info, impl->workerExposedAttribute()); |
223 } | 225 } |
224 | 226 |
225 static void workerExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::FunctionCallbackInfo<v8::Value>& info) { | 227 static void workerExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::FunctionCallbackInfo<v8::Value>& info) { |
226 v8::Local<v8::Object> holder = info.Holder(); | 228 v8::Local<v8::Object> holder = info.Holder(); |
227 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 229 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
228 | 230 |
229 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext
, "TestInterface5", "workerExposedAttribute"); | 231 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext
, "TestInterface5", "workerExposedAttribute"); |
230 | 232 |
231 // Prepare the value to be set. | 233 // Prepare the value to be set. |
232 int32_t cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excep
tionState); | 234 int32_t cppValue = NativeValueTraits<IDLLong>::nativeValue(info.GetIsolate(),
v8Value, exceptionState, NormalConversion); |
233 if (exceptionState.hadException()) | 235 if (exceptionState.hadException()) |
234 return; | 236 return; |
235 | 237 |
236 impl->setWorkerExposedAttribute(cppValue); | 238 impl->setWorkerExposedAttribute(cppValue); |
237 } | 239 } |
238 | 240 |
239 static void windowExposedAttributeAttributeGetter(const v8::FunctionCallbackInfo
<v8::Value>& info) { | 241 static void windowExposedAttributeAttributeGetter(const v8::FunctionCallbackInfo
<v8::Value>& info) { |
240 v8::Local<v8::Object> holder = info.Holder(); | 242 v8::Local<v8::Object> holder = info.Holder(); |
241 | 243 |
242 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 244 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
243 | 245 |
244 v8SetReturnValueInt(info, impl->windowExposedAttribute()); | 246 v8SetReturnValueInt(info, impl->windowExposedAttribute()); |
245 } | 247 } |
246 | 248 |
247 static void windowExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::FunctionCallbackInfo<v8::Value>& info) { | 249 static void windowExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::FunctionCallbackInfo<v8::Value>& info) { |
248 v8::Local<v8::Object> holder = info.Holder(); | 250 v8::Local<v8::Object> holder = info.Holder(); |
249 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 251 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
250 | 252 |
251 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext
, "TestInterface5", "windowExposedAttribute"); | 253 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext
, "TestInterface5", "windowExposedAttribute"); |
252 | 254 |
253 // Prepare the value to be set. | 255 // Prepare the value to be set. |
254 int32_t cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excep
tionState); | 256 int32_t cppValue = NativeValueTraits<IDLLong>::nativeValue(info.GetIsolate(),
v8Value, exceptionState, NormalConversion); |
255 if (exceptionState.hadException()) | 257 if (exceptionState.hadException()) |
256 return; | 258 return; |
257 | 259 |
258 impl->setWindowExposedAttribute(cppValue); | 260 impl->setWindowExposedAttribute(cppValue); |
259 } | 261 } |
260 | 262 |
261 static void voidMethodTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo
<v8::Value>& info) { | 263 static void voidMethodTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo
<v8::Value>& info) { |
262 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()); | 264 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()); |
263 | 265 |
264 if (UNLIKELY(info.Length() < 1)) { | 266 if (UNLIKELY(info.Length() < 1)) { |
(...skipping 17 matching lines...) Expand all Loading... |
282 | 284 |
283 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()); | 285 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()); |
284 | 286 |
285 if (UNLIKELY(info.Length() < 2)) { | 287 if (UNLIKELY(info.Length() < 2)) { |
286 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, info.
Length())); | 288 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, info.
Length())); |
287 return; | 289 return; |
288 } | 290 } |
289 | 291 |
290 double doubleArg; | 292 double doubleArg; |
291 float floatArg; | 293 float floatArg; |
292 doubleArg = toRestrictedDouble(info.GetIsolate(), info[0], exceptionState); | 294 doubleArg = NativeValueTraits<IDLDouble>::nativeValue(info.GetIsolate(), info[
0], exceptionState); |
293 if (exceptionState.hadException()) | 295 if (exceptionState.hadException()) |
294 return; | 296 return; |
295 | 297 |
296 floatArg = toRestrictedFloat(info.GetIsolate(), info[1], exceptionState); | 298 floatArg = NativeValueTraits<IDLFloat>::nativeValue(info.GetIsolate(), info[1]
, exceptionState); |
297 if (exceptionState.hadException()) | 299 if (exceptionState.hadException()) |
298 return; | 300 return; |
299 | 301 |
300 impl->voidMethodDoubleArgFloatArg(doubleArg, floatArg); | 302 impl->voidMethodDoubleArgFloatArg(doubleArg, floatArg); |
301 } | 303 } |
302 | 304 |
303 static void voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethod(const v8::
FunctionCallbackInfo<v8::Value>& info) { | 305 static void voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethod(const v8::
FunctionCallbackInfo<v8::Value>& info) { |
304 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCont
ext, "TestInterface5", "voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg"); | 306 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCont
ext, "TestInterface5", "voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg"); |
305 | 307 |
306 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()); | 308 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()); |
307 | 309 |
308 if (UNLIKELY(info.Length() < 2)) { | 310 if (UNLIKELY(info.Length() < 2)) { |
309 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, info.
Length())); | 311 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, info.
Length())); |
310 return; | 312 return; |
311 } | 313 } |
312 | 314 |
313 double unrestrictedDoubleArg; | 315 double unrestrictedDoubleArg; |
314 float unrestrictedFloatArg; | 316 float unrestrictedFloatArg; |
315 unrestrictedDoubleArg = toDouble(info.GetIsolate(), info[0], exceptionState); | 317 unrestrictedDoubleArg = NativeValueTraits<IDLUnrestrictedDouble>::nativeValue(
info.GetIsolate(), info[0], exceptionState); |
316 if (exceptionState.hadException()) | 318 if (exceptionState.hadException()) |
317 return; | 319 return; |
318 | 320 |
319 unrestrictedFloatArg = toFloat(info.GetIsolate(), info[1], exceptionState); | 321 unrestrictedFloatArg = NativeValueTraits<IDLUnrestrictedFloat>::nativeValue(in
fo.GetIsolate(), info[1], exceptionState); |
320 if (exceptionState.hadException()) | 322 if (exceptionState.hadException()) |
321 return; | 323 return; |
322 | 324 |
323 impl->voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg(unrestrictedDoubleAr
g, unrestrictedFloatArg); | 325 impl->voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg(unrestrictedDoubleAr
g, unrestrictedFloatArg); |
324 } | 326 } |
325 | 327 |
326 static void voidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) { | 328 static void voidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) { |
327 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()); | 329 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()); |
328 | 330 |
329 impl->voidMethod(); | 331 impl->voidMethod(); |
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
842 } | 844 } |
843 | 845 |
844 v8::Local<v8::Object> V8TestInterface5::findInstanceInPrototypeChain(v8::Local<v
8::Value> v8Value, v8::Isolate* isolate) { | 846 v8::Local<v8::Object> V8TestInterface5::findInstanceInPrototypeChain(v8::Local<v
8::Value> v8Value, v8::Isolate* isolate) { |
845 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrapperT
ypeInfo, v8Value); | 847 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrapperT
ypeInfo, v8Value); |
846 } | 848 } |
847 | 849 |
848 TestInterface5Implementation* V8TestInterface5::toImplWithTypeCheck(v8::Isolate*
isolate, v8::Local<v8::Value> value) { | 850 TestInterface5Implementation* V8TestInterface5::toImplWithTypeCheck(v8::Isolate*
isolate, v8::Local<v8::Value> value) { |
849 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(value)
) : nullptr; | 851 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(value)
) : nullptr; |
850 } | 852 } |
851 | 853 |
| 854 TestInterface5Implementation* NativeValueTraits<TestInterface5Implementation>::n
ativeValue(v8::Isolate* isolate, v8::Local<v8::Value> value, ExceptionState& exc
eptionState) { |
| 855 return V8TestInterface5::toImplWithTypeCheck(isolate, value); |
| 856 } |
| 857 |
852 void V8TestInterface5::preparePrototypeAndInterfaceObject(v8::Local<v8::Context>
context, const DOMWrapperWorld& world, v8::Local<v8::Object> prototypeObject, v
8::Local<v8::Function> interfaceObject, v8::Local<v8::FunctionTemplate> interfac
eTemplate) { | 858 void V8TestInterface5::preparePrototypeAndInterfaceObject(v8::Local<v8::Context>
context, const DOMWrapperWorld& world, v8::Local<v8::Object> prototypeObject, v
8::Local<v8::Function> interfaceObject, v8::Local<v8::FunctionTemplate> interfac
eTemplate) { |
853 v8::Isolate* isolate = context->GetIsolate(); | 859 v8::Isolate* isolate = context->GetIsolate(); |
854 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemp
late); | 860 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemp
late); |
855 ExecutionContext* executionContext = toExecutionContext(context); | 861 ExecutionContext* executionContext = toExecutionContext(context); |
856 DCHECK(executionContext); | 862 DCHECK(executionContext); |
857 | 863 |
858 if (executionContext && (executionContext->isWorkerGlobalScope())) { | 864 if (executionContext && (executionContext->isWorkerGlobalScope())) { |
859 const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"wo
rkerExposedAttribute", V8TestInterface5::workerExposedAttributeAttributeGetterCa
llback, V8TestInterface5::workerExposedAttributeAttributeSetterCallback, nullptr
, nullptr, nullptr, nullptr, static_cast<v8::PropertyAttribute>(v8::None), V8DOM
Configuration::OnPrototype, V8DOMConfiguration::CheckHolder}; | 865 const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"wo
rkerExposedAttribute", V8TestInterface5::workerExposedAttributeAttributeGetterCa
llback, V8TestInterface5::workerExposedAttributeAttributeSetterCallback, nullptr
, nullptr, nullptr, nullptr, static_cast<v8::PropertyAttribute>(v8::None), V8DOM
Configuration::OnPrototype, V8DOMConfiguration::CheckHolder}; |
860 V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object>(),
prototypeObject, interfaceObject, signature, accessorConfiguration); | 866 V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object>(),
prototypeObject, interfaceObject, signature, accessorConfiguration); |
861 } | 867 } |
(...skipping 17 matching lines...) Expand all Loading... |
879 const V8DOMConfiguration::MethodConfiguration windowExposedStaticMethodMetho
dConfiguration = {"windowExposedStaticMethod", V8TestInterface5::windowExposedSt
aticMethodMethodCallback, nullptr, 0, v8::None, V8DOMConfiguration::OnInterface,
V8DOMConfiguration::CheckHolder, V8DOMConfiguration::DoNotCheckAccess}; | 885 const V8DOMConfiguration::MethodConfiguration windowExposedStaticMethodMetho
dConfiguration = {"windowExposedStaticMethod", V8TestInterface5::windowExposedSt
aticMethodMethodCallback, nullptr, 0, v8::None, V8DOMConfiguration::OnInterface,
V8DOMConfiguration::CheckHolder, V8DOMConfiguration::DoNotCheckAccess}; |
880 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), p
rototypeObject, interfaceObject, signature, windowExposedStaticMethodMethodConfi
guration); | 886 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), p
rototypeObject, interfaceObject, signature, windowExposedStaticMethodMethodConfi
guration); |
881 } | 887 } |
882 if (executionContext && (executionContext->isDocument() || executionContext->i
sServiceWorkerGlobalScope())) { | 888 if (executionContext && (executionContext->isDocument() || executionContext->i
sServiceWorkerGlobalScope())) { |
883 const V8DOMConfiguration::MethodConfiguration windowAndServiceWorkerExposedM
ethodMethodConfiguration = {"windowAndServiceWorkerExposedMethod", V8TestInterfa
ce5::windowAndServiceWorkerExposedMethodMethodCallback, nullptr, 0, v8::None, V8
DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder, V8DOMConfigurati
on::DoNotCheckAccess}; | 889 const V8DOMConfiguration::MethodConfiguration windowAndServiceWorkerExposedM
ethodMethodConfiguration = {"windowAndServiceWorkerExposedMethod", V8TestInterfa
ce5::windowAndServiceWorkerExposedMethodMethodCallback, nullptr, 0, v8::None, V8
DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder, V8DOMConfigurati
on::DoNotCheckAccess}; |
884 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), p
rototypeObject, interfaceObject, signature, windowAndServiceWorkerExposedMethodM
ethodConfiguration); | 890 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), p
rototypeObject, interfaceObject, signature, windowAndServiceWorkerExposedMethodM
ethodConfiguration); |
885 } | 891 } |
886 } | 892 } |
887 | 893 |
888 } // namespace blink | 894 } // namespace blink |
OLD | NEW |