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 "V8TestObject.h" | 8 #include "V8TestObject.h" |
9 | 9 |
10 #include "HTMLNames.h" | 10 #include "HTMLNames.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 #include "core/css/MediaQueryListListener.h" | 50 #include "core/css/MediaQueryListListener.h" |
51 #include "core/dom/ContextFeatures.h" | 51 #include "core/dom/ContextFeatures.h" |
52 #include "core/dom/Document.h" | 52 #include "core/dom/Document.h" |
53 #include "core/dom/custom/CustomElementCallbackDispatcher.h" | 53 #include "core/dom/custom/CustomElementCallbackDispatcher.h" |
54 #include "core/frame/DOMWindow.h" | 54 #include "core/frame/DOMWindow.h" |
55 #include "core/frame/UseCounter.h" | 55 #include "core/frame/UseCounter.h" |
56 #include "core/inspector/ScriptArguments.h" | 56 #include "core/inspector/ScriptArguments.h" |
57 #include "platform/TraceEvent.h" | 57 #include "platform/TraceEvent.h" |
58 #include "wtf/GetPtr.h" | 58 #include "wtf/GetPtr.h" |
59 #include "wtf/RefPtr.h" | 59 #include "wtf/RefPtr.h" |
| 60 #include "wtf/dtoa/double.h" |
60 | 61 |
61 namespace WebCore { | 62 namespace WebCore { |
62 | 63 |
63 static void initializeScriptWrappableForInterface(TestObject* object) | 64 static void initializeScriptWrappableForInterface(TestObject* object) |
64 { | 65 { |
65 if (ScriptWrappable::wrapperCanBeStoredInObject(object)) | 66 if (ScriptWrappable::wrapperCanBeStoredInObject(object)) |
66 ScriptWrappable::fromObject(object)->setTypeInfo(&V8TestObject::wrapperT
ypeInfo); | 67 ScriptWrappable::fromObject(object)->setTypeInfo(&V8TestObject::wrapperT
ypeInfo); |
67 else | 68 else |
68 ASSERT_NOT_REACHED(); | 69 ASSERT_NOT_REACHED(); |
69 } | 70 } |
(...skipping 3970 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4040 impl->setSetterCallWithExecutionContextStringAttribute(scriptContext, cppVal
ue); | 4041 impl->setSetterCallWithExecutionContextStringAttribute(scriptContext, cppVal
ue); |
4041 } | 4042 } |
4042 | 4043 |
4043 static void setterCallWithExecutionContextStringAttributeAttributeSetterCallback
(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallback
Info<void>& info) | 4044 static void setterCallWithExecutionContextStringAttributeAttributeSetterCallback
(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallback
Info<void>& info) |
4044 { | 4045 { |
4045 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 4046 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
4046 TestObjectV8Internal::setterCallWithExecutionContextStringAttributeAttribute
Setter(v8Value, info); | 4047 TestObjectV8Internal::setterCallWithExecutionContextStringAttributeAttribute
Setter(v8Value, info); |
4047 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 4048 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
4048 } | 4049 } |
4049 | 4050 |
4050 static void strictTypeCheckingInterfaceNullableStringFloatAttributeAttributeGett
er(const v8::PropertyCallbackInfo<v8::Value>& info) | 4051 static void treatNullAsNullStringStringAttributeAttributeGetter(const v8::Proper
tyCallbackInfo<v8::Value>& info) |
4051 { | 4052 { |
4052 v8::Handle<v8::Object> holder = info.Holder(); | 4053 v8::Handle<v8::Object> holder = info.Holder(); |
4053 TestObject* impl = V8TestObject::toNative(holder); | 4054 TestObject* impl = V8TestObject::toNative(holder); |
4054 v8SetReturnValue(info, impl->strictTypeCheckingInterfaceNullableStringFloatA
ttribute()); | 4055 v8SetReturnValueString(info, impl->treatNullAsNullStringStringAttribute(), i
nfo.GetIsolate()); |
4055 } | 4056 } |
4056 | 4057 |
4057 static void strictTypeCheckingInterfaceNullableStringFloatAttributeAttributeGett
erCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& inf
o) | 4058 static void treatNullAsNullStringStringAttributeAttributeGetterCallback(v8::Loca
l<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
4058 { | 4059 { |
4059 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 4060 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
4060 TestObjectV8Internal::strictTypeCheckingInterfaceNullableStringFloatAttribut
eAttributeGetter(info); | 4061 TestObjectV8Internal::treatNullAsNullStringStringAttributeAttributeGetter(in
fo); |
4061 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 4062 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
4062 } | 4063 } |
4063 | 4064 |
4064 static void strictTypeCheckingInterfaceNullableStringFloatAttributeAttributeSett
er(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 4065 static void treatNullAsNullStringStringAttributeAttributeSetter(v8::Local<v8::Va
lue> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 4066 { |
| 4067 v8::Handle<v8::Object> holder = info.Holder(); |
| 4068 TestObject* impl = V8TestObject::toNative(holder); |
| 4069 TOSTRING_VOID(V8StringResource<WithNullCheck>, cppValue, v8Value); |
| 4070 impl->setTreatNullAsNullStringStringAttribute(cppValue); |
| 4071 } |
| 4072 |
| 4073 static void treatNullAsNullStringStringAttributeAttributeSetterCallback(v8::Loca
l<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void
>& info) |
| 4074 { |
| 4075 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 4076 TestObjectV8Internal::treatNullAsNullStringStringAttributeAttributeSetter(v8
Value, info); |
| 4077 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 4078 } |
| 4079 |
| 4080 static void treatReturnedNullStringAsNullStringAttributeAttributeGetter(const v8
::PropertyCallbackInfo<v8::Value>& info) |
| 4081 { |
| 4082 v8::Handle<v8::Object> holder = info.Holder(); |
| 4083 TestObject* impl = V8TestObject::toNative(holder); |
| 4084 v8SetReturnValueStringOrNull(info, impl->treatReturnedNullStringAsNullString
Attribute(), info.GetIsolate()); |
| 4085 } |
| 4086 |
| 4087 static void treatReturnedNullStringAsNullStringAttributeAttributeGetterCallback(
v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 4088 { |
| 4089 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 4090 TestObjectV8Internal::treatReturnedNullStringAsNullStringAttributeAttributeG
etter(info); |
| 4091 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 4092 } |
| 4093 |
| 4094 static void treatReturnedNullStringAsNullStringAttributeAttributeSetter(v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 4095 { |
| 4096 v8::Handle<v8::Object> holder = info.Holder(); |
| 4097 TestObject* impl = V8TestObject::toNative(holder); |
| 4098 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); |
| 4099 impl->setTreatReturnedNullStringAsNullStringAttribute(cppValue); |
| 4100 } |
| 4101 |
| 4102 static void treatReturnedNullStringAsNullStringAttributeAttributeSetterCallback(
v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackI
nfo<void>& info) |
| 4103 { |
| 4104 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 4105 TestObjectV8Internal::treatReturnedNullStringAsNullStringAttributeAttributeS
etter(v8Value, info); |
| 4106 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 4107 } |
| 4108 |
| 4109 static void treatReturnedNullStringAsUndefinedStringAttributeAttributeGetter(con
st v8::PropertyCallbackInfo<v8::Value>& info) |
| 4110 { |
| 4111 v8::Handle<v8::Object> holder = info.Holder(); |
| 4112 TestObject* impl = V8TestObject::toNative(holder); |
| 4113 v8SetReturnValueStringOrUndefined(info, impl->treatReturnedNullStringAsUndef
inedStringAttribute(), info.GetIsolate()); |
| 4114 } |
| 4115 |
| 4116 static void treatReturnedNullStringAsUndefinedStringAttributeAttributeGetterCall
back(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 4117 { |
| 4118 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 4119 TestObjectV8Internal::treatReturnedNullStringAsUndefinedStringAttributeAttri
buteGetter(info); |
| 4120 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 4121 } |
| 4122 |
| 4123 static void treatReturnedNullStringAsUndefinedStringAttributeAttributeSetter(v8:
:Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 4124 { |
| 4125 v8::Handle<v8::Object> holder = info.Holder(); |
| 4126 TestObject* impl = V8TestObject::toNative(holder); |
| 4127 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); |
| 4128 impl->setTreatReturnedNullStringAsUndefinedStringAttribute(cppValue); |
| 4129 } |
| 4130 |
| 4131 static void treatReturnedNullStringAsUndefinedStringAttributeAttributeSetterCall
back(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCall
backInfo<void>& info) |
| 4132 { |
| 4133 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 4134 TestObjectV8Internal::treatReturnedNullStringAsUndefinedStringAttributeAttri
buteSetter(v8Value, info); |
| 4135 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 4136 } |
| 4137 |
| 4138 static void typeCheckingInterfaceNullableStringFloatAttributeAttributeGetter(con
st v8::PropertyCallbackInfo<v8::Value>& info) |
| 4139 { |
| 4140 v8::Handle<v8::Object> holder = info.Holder(); |
| 4141 TestObject* impl = V8TestObject::toNative(holder); |
| 4142 v8SetReturnValue(info, impl->typeCheckingInterfaceNullableStringFloatAttribu
te()); |
| 4143 } |
| 4144 |
| 4145 static void typeCheckingInterfaceNullableStringFloatAttributeAttributeGetterCall
back(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 4146 { |
| 4147 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 4148 TestObjectV8Internal::typeCheckingInterfaceNullableStringFloatAttributeAttri
buteGetter(info); |
| 4149 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 4150 } |
| 4151 |
| 4152 static void typeCheckingInterfaceNullableStringFloatAttributeAttributeSetter(v8:
:Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
4065 { | 4153 { |
4066 v8::Handle<v8::Object> holder = info.Holder(); | 4154 v8::Handle<v8::Object> holder = info.Holder(); |
4067 TestObject* impl = V8TestObject::toNative(holder); | 4155 TestObject* impl = V8TestObject::toNative(holder); |
4068 TONATIVE_VOID(float, cppValue, static_cast<float>(v8Value->NumberValue())); | 4156 TONATIVE_VOID(float, cppValue, static_cast<float>(v8Value->NumberValue())); |
4069 impl->setStrictTypeCheckingInterfaceNullableStringFloatAttribute(cppValue); | 4157 impl->setTypeCheckingInterfaceNullableStringFloatAttribute(cppValue); |
4070 } | 4158 } |
4071 | 4159 |
4072 static void strictTypeCheckingInterfaceNullableStringFloatAttributeAttributeSett
erCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::Proper
tyCallbackInfo<void>& info) | 4160 static void typeCheckingInterfaceNullableStringFloatAttributeAttributeSetterCall
back(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCall
backInfo<void>& info) |
4073 { | 4161 { |
4074 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 4162 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
4075 TestObjectV8Internal::strictTypeCheckingInterfaceNullableStringFloatAttribut
eAttributeSetter(v8Value, info); | 4163 TestObjectV8Internal::typeCheckingInterfaceNullableStringFloatAttributeAttri
buteSetter(v8Value, info); |
4076 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 4164 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
4077 } | 4165 } |
4078 | 4166 |
4079 static void strictTypeCheckingInterfaceTestInterfaceAttributeAttributeGetter(con
st v8::PropertyCallbackInfo<v8::Value>& info) | 4167 static void typeCheckingInterfaceTestInterfaceAttributeAttributeGetter(const v8:
:PropertyCallbackInfo<v8::Value>& info) |
4080 { | 4168 { |
4081 v8::Handle<v8::Object> holder = info.Holder(); | 4169 v8::Handle<v8::Object> holder = info.Holder(); |
4082 TestObject* impl = V8TestObject::toNative(holder); | 4170 TestObject* impl = V8TestObject::toNative(holder); |
4083 v8SetReturnValueFast(info, WTF::getPtr(impl->strictTypeCheckingInterfaceTest
InterfaceAttribute()), impl); | 4171 v8SetReturnValueFast(info, WTF::getPtr(impl->typeCheckingInterfaceTestInterf
aceAttribute()), impl); |
4084 } | 4172 } |
4085 | 4173 |
4086 static void strictTypeCheckingInterfaceTestInterfaceAttributeAttributeGetterCall
back(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 4174 static void typeCheckingInterfaceTestInterfaceAttributeAttributeGetterCallback(v
8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
4087 { | 4175 { |
4088 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 4176 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
4089 TestObjectV8Internal::strictTypeCheckingInterfaceTestInterfaceAttributeAttri
buteGetter(info); | 4177 TestObjectV8Internal::typeCheckingInterfaceTestInterfaceAttributeAttributeGe
tter(info); |
4090 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 4178 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
4091 } | 4179 } |
4092 | 4180 |
4093 static void strictTypeCheckingInterfaceTestInterfaceAttributeAttributeSetter(v8:
:Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 4181 static void typeCheckingInterfaceTestInterfaceAttributeAttributeSetter(v8::Local
<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
4094 { | 4182 { |
4095 v8::Handle<v8::Object> holder = info.Holder(); | 4183 v8::Handle<v8::Object> holder = info.Holder(); |
4096 ExceptionState exceptionState(ExceptionState::SetterContext, "strictTypeChec
kingInterfaceTestInterfaceAttribute", "TestObject", holder, info.GetIsolate()); | 4184 ExceptionState exceptionState(ExceptionState::SetterContext, "typeCheckingIn
terfaceTestInterfaceAttribute", "TestObject", holder, info.GetIsolate()); |
4097 if (!V8TestInterface::hasInstance(v8Value, info.GetIsolate())) { | 4185 if (!V8TestInterface::hasInstance(v8Value, info.GetIsolate())) { |
4098 exceptionState.throwTypeError("The provided value is not of type 'TestIn
terface'."); | 4186 exceptionState.throwTypeError("The provided value is not of type 'TestIn
terface'."); |
4099 exceptionState.throwIfNeeded(); | 4187 exceptionState.throwIfNeeded(); |
4100 return; | 4188 return; |
4101 } | 4189 } |
4102 TestObject* impl = V8TestObject::toNative(holder); | 4190 TestObject* impl = V8TestObject::toNative(holder); |
4103 TONATIVE_VOID(TestInterfaceImplementation*, cppValue, V8TestInterface::toNat
iveWithTypeCheck(info.GetIsolate(), v8Value)); | 4191 TONATIVE_VOID(TestInterfaceImplementation*, cppValue, V8TestInterface::toNat
iveWithTypeCheck(info.GetIsolate(), v8Value)); |
4104 impl->setStrictTypeCheckingInterfaceTestInterfaceAttribute(WTF::getPtr(cppVa
lue)); | 4192 impl->setTypeCheckingInterfaceTestInterfaceAttribute(WTF::getPtr(cppValue)); |
4105 } | 4193 } |
4106 | 4194 |
4107 static void strictTypeCheckingInterfaceTestInterfaceAttributeAttributeSetterCall
back(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCall
backInfo<void>& info) | 4195 static void typeCheckingInterfaceTestInterfaceAttributeAttributeSetterCallback(v
8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackIn
fo<void>& info) |
4108 { | 4196 { |
4109 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 4197 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
4110 TestObjectV8Internal::strictTypeCheckingInterfaceTestInterfaceAttributeAttri
buteSetter(v8Value, info); | 4198 TestObjectV8Internal::typeCheckingInterfaceTestInterfaceAttributeAttributeSe
tter(v8Value, info); |
4111 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 4199 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
4112 } | 4200 } |
4113 | 4201 |
4114 static void strictTypeCheckingNullableTestInterfaceOrNullAttributeAttributeGette
r(const v8::PropertyCallbackInfo<v8::Value>& info) | 4202 static void typeCheckingNullableTestInterfaceOrNullAttributeAttributeGetter(cons
t v8::PropertyCallbackInfo<v8::Value>& info) |
4115 { | 4203 { |
4116 v8::Handle<v8::Object> holder = info.Holder(); | 4204 v8::Handle<v8::Object> holder = info.Holder(); |
4117 TestObject* impl = V8TestObject::toNative(holder); | 4205 TestObject* impl = V8TestObject::toNative(holder); |
4118 RefPtr<TestInterfaceImplementation> v8Value = impl->strictTypeCheckingNullab
leTestInterfaceOrNullAttribute(); | 4206 RefPtr<TestInterfaceImplementation> v8Value = impl->typeCheckingNullableTest
InterfaceOrNullAttribute(); |
4119 if (!v8Value) { | 4207 if (!v8Value) { |
4120 v8SetReturnValueNull(info); | 4208 v8SetReturnValueNull(info); |
4121 return; | 4209 return; |
4122 } | 4210 } |
4123 v8SetReturnValueFast(info, WTF::getPtr(v8Value.release()), impl); | 4211 v8SetReturnValueFast(info, WTF::getPtr(v8Value.release()), impl); |
4124 } | 4212 } |
4125 | 4213 |
4126 static void strictTypeCheckingNullableTestInterfaceOrNullAttributeAttributeGette
rCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info
) | 4214 static void typeCheckingNullableTestInterfaceOrNullAttributeAttributeGetterCallb
ack(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
4127 { | 4215 { |
4128 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 4216 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
4129 TestObjectV8Internal::strictTypeCheckingNullableTestInterfaceOrNullAttribute
AttributeGetter(info); | 4217 TestObjectV8Internal::typeCheckingNullableTestInterfaceOrNullAttributeAttrib
uteGetter(info); |
4130 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 4218 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
4131 } | 4219 } |
4132 | 4220 |
4133 static void strictTypeCheckingNullableTestInterfaceOrNullAttributeAttributeSette
r(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 4221 static void typeCheckingNullableTestInterfaceOrNullAttributeAttributeSetter(v8::
Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
4134 { | 4222 { |
4135 v8::Handle<v8::Object> holder = info.Holder(); | 4223 v8::Handle<v8::Object> holder = info.Holder(); |
4136 ExceptionState exceptionState(ExceptionState::SetterContext, "strictTypeChec
kingNullableTestInterfaceOrNullAttribute", "TestObject", holder, info.GetIsolate
()); | 4224 ExceptionState exceptionState(ExceptionState::SetterContext, "typeCheckingNu
llableTestInterfaceOrNullAttribute", "TestObject", holder, info.GetIsolate()); |
4137 TestObject* impl = V8TestObject::toNative(holder); | 4225 TestObject* impl = V8TestObject::toNative(holder); |
4138 TONATIVE_VOID(TestInterfaceImplementation*, cppValue, V8TestInterface::toNat
iveWithTypeCheck(info.GetIsolate(), v8Value)); | 4226 TONATIVE_VOID(TestInterfaceImplementation*, cppValue, V8TestInterface::toNat
iveWithTypeCheck(info.GetIsolate(), v8Value)); |
4139 impl->setStrictTypeCheckingNullableTestInterfaceOrNullAttribute(WTF::getPtr(
cppValue)); | 4227 impl->setTypeCheckingNullableTestInterfaceOrNullAttribute(WTF::getPtr(cppVal
ue)); |
4140 } | 4228 } |
4141 | 4229 |
4142 static void strictTypeCheckingNullableTestInterfaceOrNullAttributeAttributeSette
rCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::Propert
yCallbackInfo<void>& info) | 4230 static void typeCheckingNullableTestInterfaceOrNullAttributeAttributeSetterCallb
ack(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallb
ackInfo<void>& info) |
4143 { | 4231 { |
4144 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 4232 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
4145 TestObjectV8Internal::strictTypeCheckingNullableTestInterfaceOrNullAttribute
AttributeSetter(v8Value, info); | 4233 TestObjectV8Internal::typeCheckingNullableTestInterfaceOrNullAttributeAttrib
uteSetter(v8Value, info); |
4146 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 4234 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
4147 } | 4235 } |
4148 | 4236 |
4149 static void strictTypeCheckingInterfaceNullableTestInterfaceOrNullAttributeAttri
buteGetter(const v8::PropertyCallbackInfo<v8::Value>& info) | 4237 static void typeCheckingInterfaceNullableTestInterfaceOrNullAttributeAttributeGe
tter(const v8::PropertyCallbackInfo<v8::Value>& info) |
4150 { | 4238 { |
4151 v8::Handle<v8::Object> holder = info.Holder(); | 4239 v8::Handle<v8::Object> holder = info.Holder(); |
4152 TestObject* impl = V8TestObject::toNative(holder); | 4240 TestObject* impl = V8TestObject::toNative(holder); |
4153 RefPtr<TestInterfaceImplementation> v8Value = impl->strictTypeCheckingInterf
aceNullableTestInterfaceOrNullAttribute(); | 4241 RefPtr<TestInterfaceImplementation> v8Value = impl->typeCheckingInterfaceNul
lableTestInterfaceOrNullAttribute(); |
4154 if (!v8Value) { | 4242 if (!v8Value) { |
4155 v8SetReturnValueNull(info); | 4243 v8SetReturnValueNull(info); |
4156 return; | 4244 return; |
4157 } | 4245 } |
4158 v8SetReturnValueFast(info, WTF::getPtr(v8Value.release()), impl); | 4246 v8SetReturnValueFast(info, WTF::getPtr(v8Value.release()), impl); |
4159 } | 4247 } |
4160 | 4248 |
4161 static void strictTypeCheckingInterfaceNullableTestInterfaceOrNullAttributeAttri
buteGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Val
ue>& info) | 4249 static void typeCheckingInterfaceNullableTestInterfaceOrNullAttributeAttributeGe
tterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& i
nfo) |
4162 { | 4250 { |
4163 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 4251 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
4164 TestObjectV8Internal::strictTypeCheckingInterfaceNullableTestInterfaceOrNull
AttributeAttributeGetter(info); | 4252 TestObjectV8Internal::typeCheckingInterfaceNullableTestInterfaceOrNullAttrib
uteAttributeGetter(info); |
4165 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 4253 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
4166 } | 4254 } |
4167 | 4255 |
4168 static void strictTypeCheckingInterfaceNullableTestInterfaceOrNullAttributeAttri
buteSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& i
nfo) | 4256 static void typeCheckingInterfaceNullableTestInterfaceOrNullAttributeAttributeSe
tter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
4169 { | 4257 { |
4170 v8::Handle<v8::Object> holder = info.Holder(); | 4258 v8::Handle<v8::Object> holder = info.Holder(); |
4171 ExceptionState exceptionState(ExceptionState::SetterContext, "strictTypeChec
kingInterfaceNullableTestInterfaceOrNullAttribute", "TestObject", holder, info.G
etIsolate()); | 4259 ExceptionState exceptionState(ExceptionState::SetterContext, "typeCheckingIn
terfaceNullableTestInterfaceOrNullAttribute", "TestObject", holder, info.GetIsol
ate()); |
4172 if (!isUndefinedOrNull(v8Value) && !V8TestInterface::hasInstance(v8Value, in
fo.GetIsolate())) { | 4260 if (!isUndefinedOrNull(v8Value) && !V8TestInterface::hasInstance(v8Value, in
fo.GetIsolate())) { |
4173 exceptionState.throwTypeError("The provided value is not of type 'TestIn
terface'."); | 4261 exceptionState.throwTypeError("The provided value is not of type 'TestIn
terface'."); |
4174 exceptionState.throwIfNeeded(); | 4262 exceptionState.throwIfNeeded(); |
4175 return; | 4263 return; |
4176 } | 4264 } |
4177 TestObject* impl = V8TestObject::toNative(holder); | 4265 TestObject* impl = V8TestObject::toNative(holder); |
4178 TONATIVE_VOID(TestInterfaceImplementation*, cppValue, V8TestInterface::toNat
iveWithTypeCheck(info.GetIsolate(), v8Value)); | 4266 TONATIVE_VOID(TestInterfaceImplementation*, cppValue, V8TestInterface::toNat
iveWithTypeCheck(info.GetIsolate(), v8Value)); |
4179 impl->setStrictTypeCheckingInterfaceNullableTestInterfaceOrNullAttribute(WTF
::getPtr(cppValue)); | 4267 impl->setTypeCheckingInterfaceNullableTestInterfaceOrNullAttribute(WTF::getP
tr(cppValue)); |
4180 } | 4268 } |
4181 | 4269 |
4182 static void strictTypeCheckingInterfaceNullableTestInterfaceOrNullAttributeAttri
buteSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8
::PropertyCallbackInfo<void>& info) | 4270 static void typeCheckingInterfaceNullableTestInterfaceOrNullAttributeAttributeSe
tterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::Prop
ertyCallbackInfo<void>& info) |
4183 { | 4271 { |
4184 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 4272 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
4185 TestObjectV8Internal::strictTypeCheckingInterfaceNullableTestInterfaceOrNull
AttributeAttributeSetter(v8Value, info); | 4273 TestObjectV8Internal::typeCheckingInterfaceNullableTestInterfaceOrNullAttrib
uteAttributeSetter(v8Value, info); |
4186 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 4274 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
4187 } | 4275 } |
4188 | 4276 |
4189 static void treatNullAsNullStringStringAttributeAttributeGetter(const v8::Proper
tyCallbackInfo<v8::Value>& info) | |
4190 { | |
4191 v8::Handle<v8::Object> holder = info.Holder(); | |
4192 TestObject* impl = V8TestObject::toNative(holder); | |
4193 v8SetReturnValueString(info, impl->treatNullAsNullStringStringAttribute(), i
nfo.GetIsolate()); | |
4194 } | |
4195 | |
4196 static void treatNullAsNullStringStringAttributeAttributeGetterCallback(v8::Loca
l<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
4197 { | |
4198 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
4199 TestObjectV8Internal::treatNullAsNullStringStringAttributeAttributeGetter(in
fo); | |
4200 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
4201 } | |
4202 | |
4203 static void treatNullAsNullStringStringAttributeAttributeSetter(v8::Local<v8::Va
lue> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
4204 { | |
4205 v8::Handle<v8::Object> holder = info.Holder(); | |
4206 TestObject* impl = V8TestObject::toNative(holder); | |
4207 TOSTRING_VOID(V8StringResource<WithNullCheck>, cppValue, v8Value); | |
4208 impl->setTreatNullAsNullStringStringAttribute(cppValue); | |
4209 } | |
4210 | |
4211 static void treatNullAsNullStringStringAttributeAttributeSetterCallback(v8::Loca
l<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void
>& info) | |
4212 { | |
4213 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
4214 TestObjectV8Internal::treatNullAsNullStringStringAttributeAttributeSetter(v8
Value, info); | |
4215 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
4216 } | |
4217 | |
4218 static void treatReturnedNullStringAsNullStringAttributeAttributeGetter(const v8
::PropertyCallbackInfo<v8::Value>& info) | |
4219 { | |
4220 v8::Handle<v8::Object> holder = info.Holder(); | |
4221 TestObject* impl = V8TestObject::toNative(holder); | |
4222 v8SetReturnValueStringOrNull(info, impl->treatReturnedNullStringAsNullString
Attribute(), info.GetIsolate()); | |
4223 } | |
4224 | |
4225 static void treatReturnedNullStringAsNullStringAttributeAttributeGetterCallback(
v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
4226 { | |
4227 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
4228 TestObjectV8Internal::treatReturnedNullStringAsNullStringAttributeAttributeG
etter(info); | |
4229 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
4230 } | |
4231 | |
4232 static void treatReturnedNullStringAsNullStringAttributeAttributeSetter(v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
4233 { | |
4234 v8::Handle<v8::Object> holder = info.Holder(); | |
4235 TestObject* impl = V8TestObject::toNative(holder); | |
4236 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | |
4237 impl->setTreatReturnedNullStringAsNullStringAttribute(cppValue); | |
4238 } | |
4239 | |
4240 static void treatReturnedNullStringAsNullStringAttributeAttributeSetterCallback(
v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackI
nfo<void>& info) | |
4241 { | |
4242 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
4243 TestObjectV8Internal::treatReturnedNullStringAsNullStringAttributeAttributeS
etter(v8Value, info); | |
4244 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
4245 } | |
4246 | |
4247 static void treatReturnedNullStringAsUndefinedStringAttributeAttributeGetter(con
st v8::PropertyCallbackInfo<v8::Value>& info) | |
4248 { | |
4249 v8::Handle<v8::Object> holder = info.Holder(); | |
4250 TestObject* impl = V8TestObject::toNative(holder); | |
4251 v8SetReturnValueStringOrUndefined(info, impl->treatReturnedNullStringAsUndef
inedStringAttribute(), info.GetIsolate()); | |
4252 } | |
4253 | |
4254 static void treatReturnedNullStringAsUndefinedStringAttributeAttributeGetterCall
back(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
4255 { | |
4256 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
4257 TestObjectV8Internal::treatReturnedNullStringAsUndefinedStringAttributeAttri
buteGetter(info); | |
4258 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
4259 } | |
4260 | |
4261 static void treatReturnedNullStringAsUndefinedStringAttributeAttributeSetter(v8:
:Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
4262 { | |
4263 v8::Handle<v8::Object> holder = info.Holder(); | |
4264 TestObject* impl = V8TestObject::toNative(holder); | |
4265 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | |
4266 impl->setTreatReturnedNullStringAsUndefinedStringAttribute(cppValue); | |
4267 } | |
4268 | |
4269 static void treatReturnedNullStringAsUndefinedStringAttributeAttributeSetterCall
back(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCall
backInfo<void>& info) | |
4270 { | |
4271 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
4272 TestObjectV8Internal::treatReturnedNullStringAsUndefinedStringAttributeAttri
buteSetter(v8Value, info); | |
4273 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
4274 } | |
4275 | |
4276 static void urlStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8:
:Value>& info) | 4277 static void urlStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8:
:Value>& info) |
4277 { | 4278 { |
4278 v8::Handle<v8::Object> holder = info.Holder(); | 4279 v8::Handle<v8::Object> holder = info.Holder(); |
4279 TestObject* impl = V8TestObject::toNative(holder); | 4280 TestObject* impl = V8TestObject::toNative(holder); |
4280 v8SetReturnValueString(info, impl->getURLAttribute(HTMLNames::urlstringattri
buteAttr), info.GetIsolate()); | 4281 v8SetReturnValueString(info, impl->getURLAttribute(HTMLNames::urlstringattri
buteAttr), info.GetIsolate()); |
4281 } | 4282 } |
4282 | 4283 |
4283 static void urlStringAttributeAttributeGetterCallback(v8::Local<v8::String>, con
st v8::PropertyCallbackInfo<v8::Value>& info) | 4284 static void urlStringAttributeAttributeGetterCallback(v8::Local<v8::String>, con
st v8::PropertyCallbackInfo<v8::Value>& info) |
4284 { | 4285 { |
4285 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 4286 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
(...skipping 3514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7800 impl->perWorldBindingsRuntimeEnabledVoidMethod(); | 7801 impl->perWorldBindingsRuntimeEnabledVoidMethod(); |
7801 } | 7802 } |
7802 | 7803 |
7803 static void perWorldBindingsRuntimeEnabledVoidMethodMethodCallbackForMainWorld(c
onst v8::FunctionCallbackInfo<v8::Value>& info) | 7804 static void perWorldBindingsRuntimeEnabledVoidMethodMethodCallbackForMainWorld(c
onst v8::FunctionCallbackInfo<v8::Value>& info) |
7804 { | 7805 { |
7805 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 7806 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
7806 TestObjectV8Internal::perWorldBindingsRuntimeEnabledVoidMethodMethodForMainW
orld(info); | 7807 TestObjectV8Internal::perWorldBindingsRuntimeEnabledVoidMethodMethodForMainW
orld(info); |
7807 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 7808 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
7808 } | 7809 } |
7809 | 7810 |
7810 static void strictTypeCheckingInterfaceVoidMethodTestInterfaceEmptyArgMethod(con
st v8::FunctionCallbackInfo<v8::Value>& info) | |
7811 { | |
7812 if (UNLIKELY(info.Length() < 1)) { | |
7813 throwArityTypeErrorForMethod("strictTypeCheckingInterfaceVoidMethodTestI
nterfaceEmptyArg", "TestObject", 1, info.Length(), info.GetIsolate()); | |
7814 return; | |
7815 } | |
7816 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
7817 if (info.Length() > 0 && !V8TestInterfaceEmpty::hasInstance(info[0], info.Ge
tIsolate())) { | |
7818 throwTypeError(ExceptionMessages::failedToExecute("strictTypeCheckingInt
erfaceVoidMethodTestInterfaceEmptyArg", "TestObject", "parameter 1 is not of typ
e 'TestInterfaceEmpty'."), info.GetIsolate()); | |
7819 return; | |
7820 } | |
7821 TONATIVE_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceEmp
ty::toNativeWithTypeCheck(info.GetIsolate(), info[0])); | |
7822 impl->strictTypeCheckingInterfaceVoidMethodTestInterfaceEmptyArg(testInterfa
ceEmptyArg); | |
7823 } | |
7824 | |
7825 static void strictTypeCheckingInterfaceVoidMethodTestInterfaceEmptyArgMethodCall
back(const v8::FunctionCallbackInfo<v8::Value>& info) | |
7826 { | |
7827 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
7828 TestObjectV8Internal::strictTypeCheckingInterfaceVoidMethodTestInterfaceEmpt
yArgMethod(info); | |
7829 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
7830 } | |
7831 | |
7832 static void strictTypeCheckingNullableVoidMethodTestInterfaceEmptyOrNullArgMetho
d(const v8::FunctionCallbackInfo<v8::Value>& info) | |
7833 { | |
7834 if (UNLIKELY(info.Length() < 1)) { | |
7835 throwArityTypeErrorForMethod("strictTypeCheckingNullableVoidMethodTestIn
terfaceEmptyOrNullArg", "TestObject", 1, info.Length(), info.GetIsolate()); | |
7836 return; | |
7837 } | |
7838 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
7839 TONATIVE_VOID(TestInterfaceEmpty*, testInterfaceEmptyOrNullArg, V8TestInterf
aceEmpty::toNativeWithTypeCheck(info.GetIsolate(), info[0])); | |
7840 impl->strictTypeCheckingNullableVoidMethodTestInterfaceEmptyOrNullArg(testIn
terfaceEmptyOrNullArg); | |
7841 } | |
7842 | |
7843 static void strictTypeCheckingNullableVoidMethodTestInterfaceEmptyOrNullArgMetho
dCallback(const v8::FunctionCallbackInfo<v8::Value>& info) | |
7844 { | |
7845 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
7846 TestObjectV8Internal::strictTypeCheckingNullableVoidMethodTestInterfaceEmpty
OrNullArgMethod(info); | |
7847 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
7848 } | |
7849 | |
7850 static void strictTypeCheckingInterfaceNullableVoidMethodTestInterfaceEmptyOrNul
lArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | |
7851 { | |
7852 if (UNLIKELY(info.Length() < 1)) { | |
7853 throwArityTypeErrorForMethod("strictTypeCheckingInterfaceNullableVoidMet
hodTestInterfaceEmptyOrNullArg", "TestObject", 1, info.Length(), info.GetIsolate
()); | |
7854 return; | |
7855 } | |
7856 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
7857 if (info.Length() > 0 && !isUndefinedOrNull(info[0]) && !V8TestInterfaceEmpt
y::hasInstance(info[0], info.GetIsolate())) { | |
7858 throwTypeError(ExceptionMessages::failedToExecute("strictTypeCheckingInt
erfaceNullableVoidMethodTestInterfaceEmptyOrNullArg", "TestObject", "parameter 1
is not of type 'TestInterfaceEmpty'."), info.GetIsolate()); | |
7859 return; | |
7860 } | |
7861 TONATIVE_VOID(TestInterfaceEmpty*, testInterfaceEmptyOrNullArg, V8TestInterf
aceEmpty::toNativeWithTypeCheck(info.GetIsolate(), info[0])); | |
7862 impl->strictTypeCheckingInterfaceNullableVoidMethodTestInterfaceEmptyOrNullA
rg(testInterfaceEmptyOrNullArg); | |
7863 } | |
7864 | |
7865 static void strictTypeCheckingInterfaceNullableVoidMethodTestInterfaceEmptyOrNul
lArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) | |
7866 { | |
7867 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
7868 TestObjectV8Internal::strictTypeCheckingInterfaceNullableVoidMethodTestInter
faceEmptyOrNullArgMethod(info); | |
7869 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
7870 } | |
7871 | |
7872 static void treatReturnedNullStringAsNullStringMethodMethod(const v8::FunctionCa
llbackInfo<v8::Value>& info) | 7811 static void treatReturnedNullStringAsNullStringMethodMethod(const v8::FunctionCa
llbackInfo<v8::Value>& info) |
7873 { | 7812 { |
7874 TestObject* impl = V8TestObject::toNative(info.Holder()); | 7813 TestObject* impl = V8TestObject::toNative(info.Holder()); |
7875 v8SetReturnValueStringOrNull(info, impl->treatReturnedNullStringAsNullString
Method(), info.GetIsolate()); | 7814 v8SetReturnValueStringOrNull(info, impl->treatReturnedNullStringAsNullString
Method(), info.GetIsolate()); |
7876 } | 7815 } |
7877 | 7816 |
7878 static void treatReturnedNullStringAsNullStringMethodMethodCallback(const v8::Fu
nctionCallbackInfo<v8::Value>& info) | 7817 static void treatReturnedNullStringAsNullStringMethodMethodCallback(const v8::Fu
nctionCallbackInfo<v8::Value>& info) |
7879 { | 7818 { |
7880 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 7819 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
7881 TestObjectV8Internal::treatReturnedNullStringAsNullStringMethodMethod(info); | 7820 TestObjectV8Internal::treatReturnedNullStringAsNullStringMethodMethod(info); |
7882 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 7821 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
7883 } | 7822 } |
7884 | 7823 |
7885 static void treatReturnedNullStringAsUndefinedStringMethodMethod(const v8::Funct
ionCallbackInfo<v8::Value>& info) | 7824 static void treatReturnedNullStringAsUndefinedStringMethodMethod(const v8::Funct
ionCallbackInfo<v8::Value>& info) |
7886 { | 7825 { |
7887 TestObject* impl = V8TestObject::toNative(info.Holder()); | 7826 TestObject* impl = V8TestObject::toNative(info.Holder()); |
7888 v8SetReturnValueStringOrUndefined(info, impl->treatReturnedNullStringAsUndef
inedStringMethod(), info.GetIsolate()); | 7827 v8SetReturnValueStringOrUndefined(info, impl->treatReturnedNullStringAsUndef
inedStringMethod(), info.GetIsolate()); |
7889 } | 7828 } |
7890 | 7829 |
7891 static void treatReturnedNullStringAsUndefinedStringMethodMethodCallback(const v
8::FunctionCallbackInfo<v8::Value>& info) | 7830 static void treatReturnedNullStringAsUndefinedStringMethodMethodCallback(const v
8::FunctionCallbackInfo<v8::Value>& info) |
7892 { | 7831 { |
7893 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 7832 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
7894 TestObjectV8Internal::treatReturnedNullStringAsUndefinedStringMethodMethod(i
nfo); | 7833 TestObjectV8Internal::treatReturnedNullStringAsUndefinedStringMethodMethod(i
nfo); |
7895 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 7834 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
7896 } | 7835 } |
7897 | 7836 |
| 7837 static void typeCheckingInterfaceVoidMethodTestInterfaceEmptyArgMethod(const v8:
:FunctionCallbackInfo<v8::Value>& info) |
| 7838 { |
| 7839 if (UNLIKELY(info.Length() < 1)) { |
| 7840 throwArityTypeErrorForMethod("typeCheckingInterfaceVoidMethodTestInterfa
ceEmptyArg", "TestObject", 1, info.Length(), info.GetIsolate()); |
| 7841 return; |
| 7842 } |
| 7843 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 7844 if (info.Length() > 0 && !V8TestInterfaceEmpty::hasInstance(info[0], info.Ge
tIsolate())) { |
| 7845 throwTypeError(ExceptionMessages::failedToExecute("typeCheckingInterface
VoidMethodTestInterfaceEmptyArg", "TestObject", "parameter 1 is not of type 'Tes
tInterfaceEmpty'."), info.GetIsolate()); |
| 7846 return; |
| 7847 } |
| 7848 TONATIVE_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceEmp
ty::toNativeWithTypeCheck(info.GetIsolate(), info[0])); |
| 7849 impl->typeCheckingInterfaceVoidMethodTestInterfaceEmptyArg(testInterfaceEmpt
yArg); |
| 7850 } |
| 7851 |
| 7852 static void typeCheckingInterfaceVoidMethodTestInterfaceEmptyArgMethodCallback(c
onst v8::FunctionCallbackInfo<v8::Value>& info) |
| 7853 { |
| 7854 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 7855 TestObjectV8Internal::typeCheckingInterfaceVoidMethodTestInterfaceEmptyArgMe
thod(info); |
| 7856 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 7857 } |
| 7858 |
| 7859 static void typeCheckingNullableVoidMethodTestInterfaceEmptyOrNullArgMethod(cons
t v8::FunctionCallbackInfo<v8::Value>& info) |
| 7860 { |
| 7861 if (UNLIKELY(info.Length() < 1)) { |
| 7862 throwArityTypeErrorForMethod("typeCheckingNullableVoidMethodTestInterfac
eEmptyOrNullArg", "TestObject", 1, info.Length(), info.GetIsolate()); |
| 7863 return; |
| 7864 } |
| 7865 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 7866 TONATIVE_VOID(TestInterfaceEmpty*, testInterfaceEmptyOrNullArg, V8TestInterf
aceEmpty::toNativeWithTypeCheck(info.GetIsolate(), info[0])); |
| 7867 impl->typeCheckingNullableVoidMethodTestInterfaceEmptyOrNullArg(testInterfac
eEmptyOrNullArg); |
| 7868 } |
| 7869 |
| 7870 static void typeCheckingNullableVoidMethodTestInterfaceEmptyOrNullArgMethodCallb
ack(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 7871 { |
| 7872 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 7873 TestObjectV8Internal::typeCheckingNullableVoidMethodTestInterfaceEmptyOrNull
ArgMethod(info); |
| 7874 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 7875 } |
| 7876 |
| 7877 static void typeCheckingInterfaceNullableVoidMethodTestInterfaceEmptyOrNullArgMe
thod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 7878 { |
| 7879 if (UNLIKELY(info.Length() < 1)) { |
| 7880 throwArityTypeErrorForMethod("typeCheckingInterfaceNullableVoidMethodTes
tInterfaceEmptyOrNullArg", "TestObject", 1, info.Length(), info.GetIsolate()); |
| 7881 return; |
| 7882 } |
| 7883 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 7884 if (info.Length() > 0 && !isUndefinedOrNull(info[0]) && !V8TestInterfaceEmpt
y::hasInstance(info[0], info.GetIsolate())) { |
| 7885 throwTypeError(ExceptionMessages::failedToExecute("typeCheckingInterface
NullableVoidMethodTestInterfaceEmptyOrNullArg", "TestObject", "parameter 1 is no
t of type 'TestInterfaceEmpty'."), info.GetIsolate()); |
| 7886 return; |
| 7887 } |
| 7888 TONATIVE_VOID(TestInterfaceEmpty*, testInterfaceEmptyOrNullArg, V8TestInterf
aceEmpty::toNativeWithTypeCheck(info.GetIsolate(), info[0])); |
| 7889 impl->typeCheckingInterfaceNullableVoidMethodTestInterfaceEmptyOrNullArg(tes
tInterfaceEmptyOrNullArg); |
| 7890 } |
| 7891 |
| 7892 static void typeCheckingInterfaceNullableVoidMethodTestInterfaceEmptyOrNullArgMe
thodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 7893 { |
| 7894 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 7895 TestObjectV8Internal::typeCheckingInterfaceNullableVoidMethodTestInterfaceEm
ptyOrNullArgMethod(info); |
| 7896 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 7897 } |
| 7898 |
| 7899 static void typeCheckingUnrestrictedVoidMethodFloatArgDoubleArgMethod(const v8::
FunctionCallbackInfo<v8::Value>& info) |
| 7900 { |
| 7901 if (UNLIKELY(info.Length() < 2)) { |
| 7902 throwArityTypeErrorForMethod("typeCheckingUnrestrictedVoidMethodFloatArg
DoubleArg", "TestObject", 2, info.Length(), info.GetIsolate()); |
| 7903 return; |
| 7904 } |
| 7905 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 7906 if (info.Length() > 0 && WTF::double_conversion::Double(info[0]->NumberValue
()).IsSpecial()) { |
| 7907 throwTypeError(ExceptionMessages::failedToExecute("typeCheckingUnrestric
tedVoidMethodFloatArgDoubleArg", "TestObject", "float parameter 1 is non-finite.
"), info.GetIsolate()); |
| 7908 return; |
| 7909 } |
| 7910 TONATIVE_VOID(float, floatArg, static_cast<float>(info[0]->NumberValue())); |
| 7911 if (info.Length() > 1 && WTF::double_conversion::Double(info[1]->NumberValue
()).IsSpecial()) { |
| 7912 throwTypeError(ExceptionMessages::failedToExecute("typeCheckingUnrestric
tedVoidMethodFloatArgDoubleArg", "TestObject", "double parameter 2 is non-finite
."), info.GetIsolate()); |
| 7913 return; |
| 7914 } |
| 7915 TONATIVE_VOID(double, doubleArg, static_cast<double>(info[1]->NumberValue())
); |
| 7916 impl->typeCheckingUnrestrictedVoidMethodFloatArgDoubleArg(floatArg, doubleAr
g); |
| 7917 } |
| 7918 |
| 7919 static void typeCheckingUnrestrictedVoidMethodFloatArgDoubleArgMethodCallback(co
nst v8::FunctionCallbackInfo<v8::Value>& info) |
| 7920 { |
| 7921 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 7922 TestObjectV8Internal::typeCheckingUnrestrictedVoidMethodFloatArgDoubleArgMet
hod(info); |
| 7923 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 7924 } |
| 7925 |
7898 static void unforgeableVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value
>& info) | 7926 static void unforgeableVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value
>& info) |
7899 { | 7927 { |
7900 TestObject* impl = V8TestObject::toNative(info.Holder()); | 7928 TestObject* impl = V8TestObject::toNative(info.Holder()); |
7901 impl->unforgeableVoidMethod(); | 7929 impl->unforgeableVoidMethod(); |
7902 } | 7930 } |
7903 | 7931 |
7904 static void unforgeableVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) | 7932 static void unforgeableVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) |
7905 { | 7933 { |
7906 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 7934 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
7907 TestObjectV8Internal::unforgeableVoidMethodMethod(info); | 7935 TestObjectV8Internal::unforgeableVoidMethodMethod(info); |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8108 {"limitedToOnlyAttribute", TestObjectV8Internal::limitedToOnlyAttributeAttri
buteGetterCallback, TestObjectV8Internal::limitedToOnlyAttributeAttributeSetterC
allback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::P
ropertyAttribute>(v8::None), 0 /* on instance */}, | 8136 {"limitedToOnlyAttribute", TestObjectV8Internal::limitedToOnlyAttributeAttri
buteGetterCallback, TestObjectV8Internal::limitedToOnlyAttributeAttributeSetterC
allback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::P
ropertyAttribute>(v8::None), 0 /* on instance */}, |
8109 {"limitedToOnlyOtherAttribute", TestObjectV8Internal::limitedToOnlyOtherAttr
ibuteAttributeGetterCallback, TestObjectV8Internal::limitedToOnlyOtherAttributeA
ttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), st
atic_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | 8137 {"limitedToOnlyOtherAttribute", TestObjectV8Internal::limitedToOnlyOtherAttr
ibuteAttributeGetterCallback, TestObjectV8Internal::limitedToOnlyOtherAttributeA
ttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), st
atic_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
8110 {"limitedWithMissingDefaultAttribute", TestObjectV8Internal::limitedWithMiss
ingDefaultAttributeAttributeGetterCallback, TestObjectV8Internal::limitedWithMis
singDefaultAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessCont
rol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instanc
e */}, | 8138 {"limitedWithMissingDefaultAttribute", TestObjectV8Internal::limitedWithMiss
ingDefaultAttributeAttributeGetterCallback, TestObjectV8Internal::limitedWithMis
singDefaultAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessCont
rol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instanc
e */}, |
8111 {"limitedWithInvalidMissingDefaultAttribute", TestObjectV8Internal::limitedW
ithInvalidMissingDefaultAttributeAttributeGetterCallback, TestObjectV8Internal::
limitedWithInvalidMissingDefaultAttributeAttributeSetterCallback, 0, 0, 0, stati
c_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::N
one), 0 /* on instance */}, | 8139 {"limitedWithInvalidMissingDefaultAttribute", TestObjectV8Internal::limitedW
ithInvalidMissingDefaultAttributeAttributeGetterCallback, TestObjectV8Internal::
limitedWithInvalidMissingDefaultAttributeAttributeSetterCallback, 0, 0, 0, stati
c_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::N
one), 0 /* on instance */}, |
8112 {"corsSettingAttribute", TestObjectV8Internal::corsSettingAttributeAttribute
GetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_
cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | 8140 {"corsSettingAttribute", TestObjectV8Internal::corsSettingAttributeAttribute
GetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_
cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
8113 {"limitedWithEmptyMissingInvalidAttribute", TestObjectV8Internal::limitedWit
hEmptyMissingInvalidAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8
::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /
* on instance */}, | 8141 {"limitedWithEmptyMissingInvalidAttribute", TestObjectV8Internal::limitedWit
hEmptyMissingInvalidAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8
::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /
* on instance */}, |
8114 {"replaceableReadonlyLongAttribute", TestObjectV8Internal::replaceableReadon
lyLongAttributeAttributeGetterCallback, TestObjectV8Internal::TestObjectReplacea
bleAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT)
, static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | 8142 {"replaceableReadonlyLongAttribute", TestObjectV8Internal::replaceableReadon
lyLongAttributeAttributeGetterCallback, TestObjectV8Internal::TestObjectReplacea
bleAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT)
, static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
8115 {"locationReplaceable", TestObjectV8Internal::locationReplaceableAttributeGe
tterCallback, TestObjectV8Internal::locationReplaceableAttributeSetterCallback,
0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAt
tribute>(v8::None), 0 /* on instance */}, | 8143 {"locationReplaceable", TestObjectV8Internal::locationReplaceableAttributeGe
tterCallback, TestObjectV8Internal::locationReplaceableAttributeSetterCallback,
0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAt
tribute>(v8::None), 0 /* on instance */}, |
8116 {"setterCallWithActiveWindowAndFirstWindowStringAttribute", TestObjectV8Inte
rnal::setterCallWithActiveWindowAndFirstWindowStringAttributeAttributeGetterCall
back, TestObjectV8Internal::setterCallWithActiveWindowAndFirstWindowStringAttrib
uteAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT)
, static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | 8144 {"setterCallWithActiveWindowAndFirstWindowStringAttribute", TestObjectV8Inte
rnal::setterCallWithActiveWindowAndFirstWindowStringAttributeAttributeGetterCall
back, TestObjectV8Internal::setterCallWithActiveWindowAndFirstWindowStringAttrib
uteAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT)
, static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
8117 {"setterCallWithExecutionContextStringAttribute", TestObjectV8Internal::sett
erCallWithExecutionContextStringAttributeAttributeGetterCallback, TestObjectV8In
ternal::setterCallWithExecutionContextStringAttributeAttributeSetterCallback, 0,
0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttr
ibute>(v8::None), 0 /* on instance */}, | 8145 {"setterCallWithExecutionContextStringAttribute", TestObjectV8Internal::sett
erCallWithExecutionContextStringAttributeAttributeGetterCallback, TestObjectV8In
ternal::setterCallWithExecutionContextStringAttributeAttributeSetterCallback, 0,
0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttr
ibute>(v8::None), 0 /* on instance */}, |
8118 {"strictTypeCheckingInterfaceNullableStringFloatAttribute", TestObjectV8Inte
rnal::strictTypeCheckingInterfaceNullableStringFloatAttributeAttributeGetterCall
back, TestObjectV8Internal::strictTypeCheckingInterfaceNullableStringFloatAttrib
uteAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT)
, static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | |
8119 {"strictTypeCheckingInterfaceTestInterfaceAttribute", TestObjectV8Internal::
strictTypeCheckingInterfaceTestInterfaceAttributeAttributeGetterCallback, TestOb
jectV8Internal::strictTypeCheckingInterfaceTestInterfaceAttributeAttributeSetter
Callback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::
PropertyAttribute>(v8::None), 0 /* on instance */}, | |
8120 {"strictTypeCheckingNullableTestInterfaceOrNullAttribute", TestObjectV8Inter
nal::strictTypeCheckingNullableTestInterfaceOrNullAttributeAttributeGetterCallba
ck, TestObjectV8Internal::strictTypeCheckingNullableTestInterfaceOrNullAttribute
AttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), s
tatic_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | |
8121 {"strictTypeCheckingInterfaceNullableTestInterfaceOrNullAttribute", TestObje
ctV8Internal::strictTypeCheckingInterfaceNullableTestInterfaceOrNullAttributeAtt
ributeGetterCallback, TestObjectV8Internal::strictTypeCheckingInterfaceNullableT
estInterfaceOrNullAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::Acc
essControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on
instance */}, | |
8122 {"treatNullAsNullStringStringAttribute", TestObjectV8Internal::treatNullAsNu
llStringStringAttributeAttributeGetterCallback, TestObjectV8Internal::treatNullA
sNullStringStringAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::Acce
ssControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on i
nstance */}, | 8146 {"treatNullAsNullStringStringAttribute", TestObjectV8Internal::treatNullAsNu
llStringStringAttributeAttributeGetterCallback, TestObjectV8Internal::treatNullA
sNullStringStringAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::Acce
ssControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on i
nstance */}, |
8123 {"treatReturnedNullStringAsNullStringAttribute", TestObjectV8Internal::treat
ReturnedNullStringAsNullStringAttributeAttributeGetterCallback, TestObjectV8Inte
rnal::treatReturnedNullStringAsNullStringAttributeAttributeSetterCallback, 0, 0,
0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribu
te>(v8::None), 0 /* on instance */}, | 8147 {"treatReturnedNullStringAsNullStringAttribute", TestObjectV8Internal::treat
ReturnedNullStringAsNullStringAttributeAttributeGetterCallback, TestObjectV8Inte
rnal::treatReturnedNullStringAsNullStringAttributeAttributeSetterCallback, 0, 0,
0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribu
te>(v8::None), 0 /* on instance */}, |
8124 {"treatReturnedNullStringAsUndefinedStringAttribute", TestObjectV8Internal::
treatReturnedNullStringAsUndefinedStringAttributeAttributeGetterCallback, TestOb
jectV8Internal::treatReturnedNullStringAsUndefinedStringAttributeAttributeSetter
Callback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::
PropertyAttribute>(v8::None), 0 /* on instance */}, | 8148 {"treatReturnedNullStringAsUndefinedStringAttribute", TestObjectV8Internal::
treatReturnedNullStringAsUndefinedStringAttributeAttributeGetterCallback, TestOb
jectV8Internal::treatReturnedNullStringAsUndefinedStringAttributeAttributeSetter
Callback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::
PropertyAttribute>(v8::None), 0 /* on instance */}, |
| 8149 {"typeCheckingInterfaceNullableStringFloatAttribute", TestObjectV8Internal::
typeCheckingInterfaceNullableStringFloatAttributeAttributeGetterCallback, TestOb
jectV8Internal::typeCheckingInterfaceNullableStringFloatAttributeAttributeSetter
Callback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::
PropertyAttribute>(v8::None), 0 /* on instance */}, |
| 8150 {"typeCheckingInterfaceTestInterfaceAttribute", TestObjectV8Internal::typeCh
eckingInterfaceTestInterfaceAttributeAttributeGetterCallback, TestObjectV8Intern
al::typeCheckingInterfaceTestInterfaceAttributeAttributeSetterCallback, 0, 0, 0,
static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>
(v8::None), 0 /* on instance */}, |
| 8151 {"typeCheckingNullableTestInterfaceOrNullAttribute", TestObjectV8Internal::t
ypeCheckingNullableTestInterfaceOrNullAttributeAttributeGetterCallback, TestObje
ctV8Internal::typeCheckingNullableTestInterfaceOrNullAttributeAttributeSetterCal
lback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Pro
pertyAttribute>(v8::None), 0 /* on instance */}, |
| 8152 {"typeCheckingInterfaceNullableTestInterfaceOrNullAttribute", TestObjectV8In
ternal::typeCheckingInterfaceNullableTestInterfaceOrNullAttributeAttributeGetter
Callback, TestObjectV8Internal::typeCheckingInterfaceNullableTestInterfaceOrNull
AttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DE
FAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
8125 {"urlStringAttribute", TestObjectV8Internal::urlStringAttributeAttributeGett
erCallback, TestObjectV8Internal::urlStringAttributeAttributeSetterCallback, 0,
0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttri
bute>(v8::None), 0 /* on instance */}, | 8153 {"urlStringAttribute", TestObjectV8Internal::urlStringAttributeAttributeGett
erCallback, TestObjectV8Internal::urlStringAttributeAttributeSetterCallback, 0,
0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttri
bute>(v8::None), 0 /* on instance */}, |
8126 {"urlStringAttribute", TestObjectV8Internal::urlStringAttributeAttributeGett
erCallback, TestObjectV8Internal::urlStringAttributeAttributeSetterCallback, 0,
0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttri
bute>(v8::None), 0 /* on instance */}, | 8154 {"urlStringAttribute", TestObjectV8Internal::urlStringAttributeAttributeGett
erCallback, TestObjectV8Internal::urlStringAttributeAttributeSetterCallback, 0,
0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttri
bute>(v8::None), 0 /* on instance */}, |
8127 {"unforgeableLongAttribute", TestObjectV8Internal::unforgeableLongAttributeA
ttributeGetterCallback, TestObjectV8Internal::unforgeableLongAttributeAttributeS
etterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::PROHIBITS_OVERWRITING
), static_cast<v8::PropertyAttribute>(v8::DontDelete), 0 /* on instance */}, | 8155 {"unforgeableLongAttribute", TestObjectV8Internal::unforgeableLongAttributeA
ttributeGetterCallback, TestObjectV8Internal::unforgeableLongAttributeAttributeS
etterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::PROHIBITS_OVERWRITING
), static_cast<v8::PropertyAttribute>(v8::DontDelete), 0 /* on instance */}, |
8128 {"testInterfaceAttribute", TestObjectV8Internal::testInterfaceAttributeAttri
buteGetterCallback, TestObjectV8Internal::testInterfaceAttributeAttributeSetterC
allback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::P
ropertyAttribute>(v8::None), 0 /* on instance */}, | 8156 {"testInterfaceAttribute", TestObjectV8Internal::testInterfaceAttributeAttri
buteGetterCallback, TestObjectV8Internal::testInterfaceAttributeAttributeSetterC
allback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::P
ropertyAttribute>(v8::None), 0 /* on instance */}, |
8129 {"testInterfaceGarbageCollectedAttribute", TestObjectV8Internal::testInterfa
ceGarbageCollectedAttributeAttributeGetterCallback, TestObjectV8Internal::testIn
terfaceGarbageCollectedAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8
::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /
* on instance */}, | 8157 {"testInterfaceGarbageCollectedAttribute", TestObjectV8Internal::testInterfa
ceGarbageCollectedAttributeAttributeGetterCallback, TestObjectV8Internal::testIn
terfaceGarbageCollectedAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8
::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /
* on instance */}, |
8130 {"testInterfaceGarbageCollectedOrNullAttribute", TestObjectV8Internal::testI
nterfaceGarbageCollectedOrNullAttributeAttributeGetterCallback, TestObjectV8Inte
rnal::testInterfaceGarbageCollectedOrNullAttributeAttributeSetterCallback, 0, 0,
0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribu
te>(v8::None), 0 /* on instance */}, | 8158 {"testInterfaceGarbageCollectedOrNullAttribute", TestObjectV8Internal::testI
nterfaceGarbageCollectedOrNullAttributeAttributeGetterCallback, TestObjectV8Inte
rnal::testInterfaceGarbageCollectedOrNullAttributeAttributeSetterCallback, 0, 0,
0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribu
te>(v8::None), 0 /* on instance */}, |
8131 {"testInterfaceWillBeGarbageCollectedAttribute", TestObjectV8Internal::testI
nterfaceWillBeGarbageCollectedAttributeAttributeGetterCallback, TestObjectV8Inte
rnal::testInterfaceWillBeGarbageCollectedAttributeAttributeSetterCallback, 0, 0,
0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribu
te>(v8::None), 0 /* on instance */}, | 8159 {"testInterfaceWillBeGarbageCollectedAttribute", TestObjectV8Internal::testI
nterfaceWillBeGarbageCollectedAttributeAttributeGetterCallback, TestObjectV8Inte
rnal::testInterfaceWillBeGarbageCollectedAttributeAttributeSetterCallback, 0, 0,
0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribu
te>(v8::None), 0 /* on instance */}, |
8132 {"testInterfaceWillBeGarbageCollectedOrNullAttribute", TestObjectV8Internal:
:testInterfaceWillBeGarbageCollectedOrNullAttributeAttributeGetterCallback, Test
ObjectV8Internal::testInterfaceWillBeGarbageCollectedOrNullAttributeAttributeSet
terCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v
8::PropertyAttribute>(v8::None), 0 /* on instance */}, | 8160 {"testInterfaceWillBeGarbageCollectedOrNullAttribute", TestObjectV8Internal:
:testInterfaceWillBeGarbageCollectedOrNullAttributeAttributeGetterCallback, Test
ObjectV8Internal::testInterfaceWillBeGarbageCollectedOrNullAttributeAttributeSet
terCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v
8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
8133 }; | 8161 }; |
8134 | 8162 |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8291 {"perWorldBindingsVoidMethodTestInterfaceEmptyArg", TestObjectV8Internal::pe
rWorldBindingsVoidMethodTestInterfaceEmptyArgMethodCallback, TestObjectV8Interna
l::perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodCallbackForMainWorld, 1}
, | 8319 {"perWorldBindingsVoidMethodTestInterfaceEmptyArg", TestObjectV8Internal::pe
rWorldBindingsVoidMethodTestInterfaceEmptyArgMethodCallback, TestObjectV8Interna
l::perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodCallbackForMainWorld, 1}
, |
8292 {"activityLoggingForAllWorldsPerWorldBindingsVoidMethod", TestObjectV8Intern
al::activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodCallback, TestObj
ectV8Internal::activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodCallba
ckForMainWorld, 0}, | 8320 {"activityLoggingForAllWorldsPerWorldBindingsVoidMethod", TestObjectV8Intern
al::activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodCallback, TestObj
ectV8Internal::activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodCallba
ckForMainWorld, 0}, |
8293 {"activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethod", TestObjectV8I
nternal::activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethodCallbac
k, TestObjectV8Internal::activityLoggingForIsolatedWorldsPerWorldBindingsVoidMet
hodMethodCallbackForMainWorld, 0}, | 8321 {"activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethod", TestObjectV8I
nternal::activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethodCallbac
k, TestObjectV8Internal::activityLoggingForIsolatedWorldsPerWorldBindingsVoidMet
hodMethodCallbackForMainWorld, 0}, |
8294 {"raisesExceptionVoidMethod", TestObjectV8Internal::raisesExceptionVoidMetho
dMethodCallback, 0, 0}, | 8322 {"raisesExceptionVoidMethod", TestObjectV8Internal::raisesExceptionVoidMetho
dMethodCallback, 0, 0}, |
8295 {"raisesExceptionStringMethod", TestObjectV8Internal::raisesExceptionStringM
ethodMethodCallback, 0, 0}, | 8323 {"raisesExceptionStringMethod", TestObjectV8Internal::raisesExceptionStringM
ethodMethodCallback, 0, 0}, |
8296 {"raisesExceptionVoidMethodOptionalLongArg", TestObjectV8Internal::raisesExc
eptionVoidMethodOptionalLongArgMethodCallback, 0, 0}, | 8324 {"raisesExceptionVoidMethodOptionalLongArg", TestObjectV8Internal::raisesExc
eptionVoidMethodOptionalLongArgMethodCallback, 0, 0}, |
8297 {"raisesExceptionVoidMethodTestCallbackInterfaceArg", TestObjectV8Internal::
raisesExceptionVoidMethodTestCallbackInterfaceArgMethodCallback, 0, 1}, | 8325 {"raisesExceptionVoidMethodTestCallbackInterfaceArg", TestObjectV8Internal::
raisesExceptionVoidMethodTestCallbackInterfaceArgMethodCallback, 0, 1}, |
8298 {"raisesExceptionVoidMethodOptionalTestCallbackInterfaceArg", TestObjectV8In
ternal::raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethodCallback,
0, 0}, | 8326 {"raisesExceptionVoidMethodOptionalTestCallbackInterfaceArg", TestObjectV8In
ternal::raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethodCallback,
0, 0}, |
8299 {"raisesExceptionTestInterfaceEmptyVoidMethod", TestObjectV8Internal::raises
ExceptionTestInterfaceEmptyVoidMethodMethodCallback, 0, 0}, | 8327 {"raisesExceptionTestInterfaceEmptyVoidMethod", TestObjectV8Internal::raises
ExceptionTestInterfaceEmptyVoidMethodMethodCallback, 0, 0}, |
8300 {"callWithExecutionContextRaisesExceptionVoidMethodLongArg", TestObjectV8Int
ernal::callWithExecutionContextRaisesExceptionVoidMethodLongArgMethodCallback, 0
, 1}, | 8328 {"callWithExecutionContextRaisesExceptionVoidMethodLongArg", TestObjectV8Int
ernal::callWithExecutionContextRaisesExceptionVoidMethodLongArgMethodCallback, 0
, 1}, |
8301 {"strictTypeCheckingInterfaceVoidMethodTestInterfaceEmptyArg", TestObjectV8I
nternal::strictTypeCheckingInterfaceVoidMethodTestInterfaceEmptyArgMethodCallbac
k, 0, 1}, | |
8302 {"strictTypeCheckingNullableVoidMethodTestInterfaceEmptyOrNullArg", TestObje
ctV8Internal::strictTypeCheckingNullableVoidMethodTestInterfaceEmptyOrNullArgMet
hodCallback, 0, 1}, | |
8303 {"strictTypeCheckingInterfaceNullableVoidMethodTestInterfaceEmptyOrNullArg",
TestObjectV8Internal::strictTypeCheckingInterfaceNullableVoidMethodTestInterfac
eEmptyOrNullArgMethodCallback, 0, 1}, | |
8304 {"treatReturnedNullStringAsNullStringMethod", TestObjectV8Internal::treatRet
urnedNullStringAsNullStringMethodMethodCallback, 0, 0}, | 8329 {"treatReturnedNullStringAsNullStringMethod", TestObjectV8Internal::treatRet
urnedNullStringAsNullStringMethodMethodCallback, 0, 0}, |
8305 {"treatReturnedNullStringAsUndefinedStringMethod", TestObjectV8Internal::tre
atReturnedNullStringAsUndefinedStringMethodMethodCallback, 0, 0}, | 8330 {"treatReturnedNullStringAsUndefinedStringMethod", TestObjectV8Internal::tre
atReturnedNullStringAsUndefinedStringMethodMethodCallback, 0, 0}, |
| 8331 {"typeCheckingInterfaceVoidMethodTestInterfaceEmptyArg", TestObjectV8Interna
l::typeCheckingInterfaceVoidMethodTestInterfaceEmptyArgMethodCallback, 0, 1}, |
| 8332 {"typeCheckingNullableVoidMethodTestInterfaceEmptyOrNullArg", TestObjectV8In
ternal::typeCheckingNullableVoidMethodTestInterfaceEmptyOrNullArgMethodCallback,
0, 1}, |
| 8333 {"typeCheckingInterfaceNullableVoidMethodTestInterfaceEmptyOrNullArg", TestO
bjectV8Internal::typeCheckingInterfaceNullableVoidMethodTestInterfaceEmptyOrNull
ArgMethodCallback, 0, 1}, |
| 8334 {"typeCheckingUnrestrictedVoidMethodFloatArgDoubleArg", TestObjectV8Internal
::typeCheckingUnrestrictedVoidMethodFloatArgDoubleArgMethodCallback, 0, 2}, |
8306 {"voidMethodTestInterfaceGarbageCollectedSequenceArg", TestObjectV8Internal:
:voidMethodTestInterfaceGarbageCollectedSequenceArgMethodCallback, 0, 1}, | 8335 {"voidMethodTestInterfaceGarbageCollectedSequenceArg", TestObjectV8Internal:
:voidMethodTestInterfaceGarbageCollectedSequenceArgMethodCallback, 0, 1}, |
8307 {"voidMethodTestInterfaceGarbageCollectedArrayArg", TestObjectV8Internal::vo
idMethodTestInterfaceGarbageCollectedArrayArgMethodCallback, 0, 1}, | 8336 {"voidMethodTestInterfaceGarbageCollectedArrayArg", TestObjectV8Internal::vo
idMethodTestInterfaceGarbageCollectedArrayArgMethodCallback, 0, 1}, |
8308 {"voidMethodTestInterfaceWillBeGarbageCollectedSequenceArg", TestObjectV8Int
ernal::voidMethodTestInterfaceWillBeGarbageCollectedSequenceArgMethodCallback, 0
, 1}, | 8337 {"voidMethodTestInterfaceWillBeGarbageCollectedSequenceArg", TestObjectV8Int
ernal::voidMethodTestInterfaceWillBeGarbageCollectedSequenceArgMethodCallback, 0
, 1}, |
8309 {"voidMethodTestInterfaceWillBeGarbageCollectedArrayArg", TestObjectV8Intern
al::voidMethodTestInterfaceWillBeGarbageCollectedArrayArgMethodCallback, 0, 1}, | 8338 {"voidMethodTestInterfaceWillBeGarbageCollectedArrayArg", TestObjectV8Intern
al::voidMethodTestInterfaceWillBeGarbageCollectedArrayArgMethodCallback, 0, 1}, |
8310 }; | 8339 }; |
8311 | 8340 |
8312 static void configureV8TestObjectTemplate(v8::Handle<v8::FunctionTemplate> funct
ionTemplate, v8::Isolate* isolate) | 8341 static void configureV8TestObjectTemplate(v8::Handle<v8::FunctionTemplate> funct
ionTemplate, v8::Isolate* isolate) |
8313 { | 8342 { |
8314 functionTemplate->ReadOnlyPrototype(); | 8343 functionTemplate->ReadOnlyPrototype(); |
8315 | 8344 |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8479 fromInternalPointer(object)->deref(); | 8508 fromInternalPointer(object)->deref(); |
8480 } | 8509 } |
8481 | 8510 |
8482 template<> | 8511 template<> |
8483 v8::Handle<v8::Value> toV8NoInline(TestObject* impl, v8::Handle<v8::Object> crea
tionContext, v8::Isolate* isolate) | 8512 v8::Handle<v8::Value> toV8NoInline(TestObject* impl, v8::Handle<v8::Object> crea
tionContext, v8::Isolate* isolate) |
8484 { | 8513 { |
8485 return toV8(impl, creationContext, isolate); | 8514 return toV8(impl, creationContext, isolate); |
8486 } | 8515 } |
8487 | 8516 |
8488 } // namespace WebCore | 8517 } // namespace WebCore |
OLD | NEW |