| 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 "V8TestObject.h" | 7 #include "V8TestObject.h" |
| 8 | 8 |
| 9 #include "bindings/core/v8/BindingSecurity.h" | 9 #include "bindings/core/v8/BindingSecurity.h" |
| 10 #include "bindings/core/v8/Dictionary.h" | 10 #include "bindings/core/v8/Dictionary.h" |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 #include "wtf/RefPtr.h" | 75 #include "wtf/RefPtr.h" |
| 76 | 76 |
| 77 namespace blink { | 77 namespace blink { |
| 78 | 78 |
| 79 // Suppress warning: global constructors, because struct WrapperTypeInfo is triv
ial | 79 // Suppress warning: global constructors, because struct WrapperTypeInfo is triv
ial |
| 80 // and does not depend on another global objects. | 80 // and does not depend on another global objects. |
| 81 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) | 81 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) |
| 82 #pragma clang diagnostic push | 82 #pragma clang diagnostic push |
| 83 #pragma clang diagnostic ignored "-Wglobal-constructors" | 83 #pragma clang diagnostic ignored "-Wglobal-constructors" |
| 84 #endif | 84 #endif |
| 85 const WrapperTypeInfo V8TestObject::wrapperTypeInfo = { gin::kEmbedderBlink, V8T
estObject::domTemplate, V8TestObject::refObject, V8TestObject::derefObject, V8Te
stObject::trace, 0, 0, V8TestObject::preparePrototypeAndInterfaceObject, V8TestO
bject::installConditionallyEnabledProperties, "TestObject", 0, WrapperTypeInfo::
WrapperTypeObjectPrototype, WrapperTypeInfo::ObjectClassId, WrapperTypeInfo::Not
InheritFromEventTarget, WrapperTypeInfo::Independent, WrapperTypeInfo::RefCounte
dObject }; | 85 const WrapperTypeInfo V8TestObject::wrapperTypeInfo = { gin::kEmbedderBlink, V8T
estObject::domTemplate, V8TestObject::trace, 0, 0, V8TestObject::preparePrototyp
eAndInterfaceObject, V8TestObject::installConditionallyEnabledProperties, "TestO
bject", 0, WrapperTypeInfo::WrapperTypeObjectPrototype, WrapperTypeInfo::ObjectC
lassId, WrapperTypeInfo::NotInheritFromEventTarget, WrapperTypeInfo::Independent
}; |
| 86 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) | 86 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) |
| 87 #pragma clang diagnostic pop | 87 #pragma clang diagnostic pop |
| 88 #endif | 88 #endif |
| 89 | 89 |
| 90 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestObject.h
. | 90 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestObject.h
. |
| 91 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in | 91 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in |
| 92 // bindings/core/v8/ScriptWrappable.h. | 92 // bindings/core/v8/ScriptWrappable.h. |
| 93 const WrapperTypeInfo& TestObject::s_wrapperTypeInfo = V8TestObject::wrapperType
Info; | 93 const WrapperTypeInfo& TestObject::s_wrapperTypeInfo = V8TestObject::wrapperType
Info; |
| 94 | 94 |
| 95 namespace TestObjectV8Internal { | 95 namespace TestObjectV8Internal { |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 | 220 |
| 221 static void readonlyStringAttributeAttributeGetterCallback(const v8::FunctionCal
lbackInfo<v8::Value>& info) | 221 static void readonlyStringAttributeAttributeGetterCallback(const v8::FunctionCal
lbackInfo<v8::Value>& info) |
| 222 { | 222 { |
| 223 TestObjectV8Internal::readonlyStringAttributeAttributeGetter(info); | 223 TestObjectV8Internal::readonlyStringAttributeAttributeGetter(info); |
| 224 } | 224 } |
| 225 | 225 |
| 226 static void readonlyTestInterfaceEmptyAttributeAttributeGetter(const v8::Functio
nCallbackInfo<v8::Value>& info) | 226 static void readonlyTestInterfaceEmptyAttributeAttributeGetter(const v8::Functio
nCallbackInfo<v8::Value>& info) |
| 227 { | 227 { |
| 228 v8::Local<v8::Object> holder = info.Holder(); | 228 v8::Local<v8::Object> holder = info.Holder(); |
| 229 TestObject* impl = V8TestObject::toImpl(holder); | 229 TestObject* impl = V8TestObject::toImpl(holder); |
| 230 RefPtr<TestInterfaceEmpty> cppValue(impl->readonlyTestInterfaceEmptyAttribut
e()); | 230 TestInterfaceEmpty* cppValue(WTF::getPtr(impl->readonlyTestInterfaceEmptyAtt
ribute())); |
| 231 if (cppValue && DOMDataStore::setReturnValue(info.GetReturnValue(), cppValue
.get())) | 231 if (cppValue && DOMDataStore::setReturnValue(info.GetReturnValue(), cppValue
)) |
| 232 return; | 232 return; |
| 233 v8::Local<v8::Value> v8Value(toV8(cppValue.get(), holder, info.GetIsolate())
); | 233 v8::Local<v8::Value> v8Value(toV8(cppValue, holder, info.GetIsolate())); |
| 234 if (!v8Value.IsEmpty()) { | 234 if (!v8Value.IsEmpty()) { |
| 235 V8HiddenValue::setHiddenValue(ScriptState::current(info.GetIsolate()), h
older, v8AtomicString(info.GetIsolate(), "readonlyTestInterfaceEmptyAttribute"),
v8Value); | 235 V8HiddenValue::setHiddenValue(ScriptState::current(info.GetIsolate()), h
older, v8AtomicString(info.GetIsolate(), "readonlyTestInterfaceEmptyAttribute"),
v8Value); |
| 236 v8SetReturnValue(info, v8Value); | 236 v8SetReturnValue(info, v8Value); |
| 237 } | 237 } |
| 238 } | 238 } |
| 239 | 239 |
| 240 static void readonlyTestInterfaceEmptyAttributeAttributeGetterCallback(const v8:
:FunctionCallbackInfo<v8::Value>& info) | 240 static void readonlyTestInterfaceEmptyAttributeAttributeGetterCallback(const v8:
:FunctionCallbackInfo<v8::Value>& info) |
| 241 { | 241 { |
| 242 TestObjectV8Internal::readonlyTestInterfaceEmptyAttributeAttributeGetter(inf
o); | 242 TestObjectV8Internal::readonlyTestInterfaceEmptyAttributeAttributeGetter(inf
o); |
| 243 } | 243 } |
| (...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 788 { | 788 { |
| 789 v8::Local<v8::Object> holder = info.Holder(); | 789 v8::Local<v8::Object> holder = info.Holder(); |
| 790 ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceE
mptyAttribute", "TestObject", holder, info.GetIsolate()); | 790 ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceE
mptyAttribute", "TestObject", holder, info.GetIsolate()); |
| 791 TestObject* impl = V8TestObject::toImpl(holder); | 791 TestObject* impl = V8TestObject::toImpl(holder); |
| 792 TestInterfaceEmpty* cppValue = V8TestInterfaceEmpty::toImplWithTypeCheck(inf
o.GetIsolate(), v8Value); | 792 TestInterfaceEmpty* cppValue = V8TestInterfaceEmpty::toImplWithTypeCheck(inf
o.GetIsolate(), v8Value); |
| 793 if (!cppValue) { | 793 if (!cppValue) { |
| 794 exceptionState.throwTypeError("The provided value is not of type 'TestIn
terfaceEmpty'."); | 794 exceptionState.throwTypeError("The provided value is not of type 'TestIn
terfaceEmpty'."); |
| 795 exceptionState.throwIfNeeded(); | 795 exceptionState.throwIfNeeded(); |
| 796 return; | 796 return; |
| 797 } | 797 } |
| 798 impl->setTestInterfaceEmptyAttribute(WTF::getPtr(cppValue)); | 798 impl->setTestInterfaceEmptyAttribute(cppValue); |
| 799 } | 799 } |
| 800 | 800 |
| 801 static void testInterfaceEmptyAttributeAttributeSetterCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) | 801 static void testInterfaceEmptyAttributeAttributeSetterCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) |
| 802 { | 802 { |
| 803 v8::Local<v8::Value> v8Value = info[0]; | 803 v8::Local<v8::Value> v8Value = info[0]; |
| 804 TestObjectV8Internal::testInterfaceEmptyAttributeAttributeSetter(v8Value, in
fo); | 804 TestObjectV8Internal::testInterfaceEmptyAttributeAttributeSetter(v8Value, in
fo); |
| 805 } | 805 } |
| 806 | 806 |
| 807 static void testObjectAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8
::Value>& info) | 807 static void testObjectAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8
::Value>& info) |
| 808 { | 808 { |
| (...skipping 11 matching lines...) Expand all Loading... |
| 820 { | 820 { |
| 821 v8::Local<v8::Object> holder = info.Holder(); | 821 v8::Local<v8::Object> holder = info.Holder(); |
| 822 ExceptionState exceptionState(ExceptionState::SetterContext, "testObjectAttr
ibute", "TestObject", holder, info.GetIsolate()); | 822 ExceptionState exceptionState(ExceptionState::SetterContext, "testObjectAttr
ibute", "TestObject", holder, info.GetIsolate()); |
| 823 TestObject* impl = V8TestObject::toImpl(holder); | 823 TestObject* impl = V8TestObject::toImpl(holder); |
| 824 TestObject* cppValue = V8TestObject::toImplWithTypeCheck(info.GetIsolate(),
v8Value); | 824 TestObject* cppValue = V8TestObject::toImplWithTypeCheck(info.GetIsolate(),
v8Value); |
| 825 if (!cppValue) { | 825 if (!cppValue) { |
| 826 exceptionState.throwTypeError("The provided value is not of type 'TestOb
ject'."); | 826 exceptionState.throwTypeError("The provided value is not of type 'TestOb
ject'."); |
| 827 exceptionState.throwIfNeeded(); | 827 exceptionState.throwIfNeeded(); |
| 828 return; | 828 return; |
| 829 } | 829 } |
| 830 impl->setTestObjectAttribute(WTF::getPtr(cppValue)); | 830 impl->setTestObjectAttribute(cppValue); |
| 831 } | 831 } |
| 832 | 832 |
| 833 static void testObjectAttributeAttributeSetterCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) | 833 static void testObjectAttributeAttributeSetterCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) |
| 834 { | 834 { |
| 835 v8::Local<v8::Value> v8Value = info[0]; | 835 v8::Local<v8::Value> v8Value = info[0]; |
| 836 TestObjectV8Internal::testObjectAttributeAttributeSetter(v8Value, info); | 836 TestObjectV8Internal::testObjectAttributeAttributeSetter(v8Value, info); |
| 837 } | 837 } |
| 838 | 838 |
| 839 static void voidCallbackFunctionAttributeAttributeGetter(const v8::FunctionCallb
ackInfo<v8::Value>& info) | 839 static void voidCallbackFunctionAttributeAttributeGetter(const v8::FunctionCallb
ackInfo<v8::Value>& info) |
| 840 { | 840 { |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1013 | 1013 |
| 1014 static void nodeFilterAttributeAttributeGetterCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) | 1014 static void nodeFilterAttributeAttributeGetterCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) |
| 1015 { | 1015 { |
| 1016 TestObjectV8Internal::nodeFilterAttributeAttributeGetter(info); | 1016 TestObjectV8Internal::nodeFilterAttributeAttributeGetter(info); |
| 1017 } | 1017 } |
| 1018 | 1018 |
| 1019 static void nodeFilterAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::FunctionCallbackInfo<v8::Value>& info) | 1019 static void nodeFilterAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::FunctionCallbackInfo<v8::Value>& info) |
| 1020 { | 1020 { |
| 1021 v8::Local<v8::Object> holder = info.Holder(); | 1021 v8::Local<v8::Object> holder = info.Holder(); |
| 1022 TestObject* impl = V8TestObject::toImpl(holder); | 1022 TestObject* impl = V8TestObject::toImpl(holder); |
| 1023 RawPtr<NodeFilter> cppValue = toNodeFilter(v8Value, info.Holder(), ScriptSta
te::current(info.GetIsolate())); | 1023 NodeFilter* cppValue = toNodeFilter(v8Value, info.Holder(), ScriptState::cur
rent(info.GetIsolate())); |
| 1024 impl->setNodeFilterAttribute(WTF::getPtr(cppValue)); | 1024 impl->setNodeFilterAttribute(cppValue); |
| 1025 } | 1025 } |
| 1026 | 1026 |
| 1027 static void nodeFilterAttributeAttributeSetterCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) | 1027 static void nodeFilterAttributeAttributeSetterCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) |
| 1028 { | 1028 { |
| 1029 v8::Local<v8::Value> v8Value = info[0]; | 1029 v8::Local<v8::Value> v8Value = info[0]; |
| 1030 TestObjectV8Internal::nodeFilterAttributeAttributeSetter(v8Value, info); | 1030 TestObjectV8Internal::nodeFilterAttributeAttributeSetter(v8Value, info); |
| 1031 } | 1031 } |
| 1032 | 1032 |
| 1033 static void serializedScriptValueAttributeAttributeGetter(const v8::FunctionCall
backInfo<v8::Value>& info) | 1033 static void serializedScriptValueAttributeAttributeGetter(const v8::FunctionCall
backInfo<v8::Value>& info) |
| 1034 { | 1034 { |
| 1035 v8::Local<v8::Object> holder = info.Holder(); | 1035 v8::Local<v8::Object> holder = info.Holder(); |
| 1036 TestObject* impl = V8TestObject::toImpl(holder); | 1036 TestObject* impl = V8TestObject::toImpl(holder); |
| 1037 v8SetReturnValue(info, impl->serializedScriptValueAttribute() ? impl->serial
izedScriptValueAttribute()->deserialize() : v8::Local<v8::Value>(v8::Null(info.G
etIsolate()))); | 1037 v8SetReturnValue(info, WTF::getPtr(impl->serializedScriptValueAttribute()) ?
WTF::getPtr(impl->serializedScriptValueAttribute())->deserialize() : v8::Local<
v8::Value>(v8::Null(info.GetIsolate()))); |
| 1038 } | 1038 } |
| 1039 | 1039 |
| 1040 static void serializedScriptValueAttributeAttributeGetterCallback(const v8::Func
tionCallbackInfo<v8::Value>& info) | 1040 static void serializedScriptValueAttributeAttributeGetterCallback(const v8::Func
tionCallbackInfo<v8::Value>& info) |
| 1041 { | 1041 { |
| 1042 TestObjectV8Internal::serializedScriptValueAttributeAttributeGetter(info); | 1042 TestObjectV8Internal::serializedScriptValueAttributeAttributeGetter(info); |
| 1043 } | 1043 } |
| 1044 | 1044 |
| 1045 static void serializedScriptValueAttributeAttributeSetter(v8::Local<v8::Value> v
8Value, const v8::FunctionCallbackInfo<v8::Value>& info) | 1045 static void serializedScriptValueAttributeAttributeSetter(v8::Local<v8::Value> v
8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
| 1046 { | 1046 { |
| 1047 v8::Local<v8::Object> holder = info.Holder(); | 1047 v8::Local<v8::Object> holder = info.Holder(); |
| 1048 ExceptionState exceptionState(ExceptionState::SetterContext, "serializedScri
ptValueAttribute", "TestObject", holder, info.GetIsolate()); | 1048 ExceptionState exceptionState(ExceptionState::SetterContext, "serializedScri
ptValueAttribute", "TestObject", holder, info.GetIsolate()); |
| 1049 TestObject* impl = V8TestObject::toImpl(holder); | 1049 TestObject* impl = V8TestObject::toImpl(holder); |
| 1050 RefPtr<SerializedScriptValue> cppValue = SerializedScriptValueFactory::insta
nce().create(info.GetIsolate(), v8Value, nullptr, nullptr, nullptr, exceptionSta
te); | 1050 RefPtr<SerializedScriptValue> cppValue = SerializedScriptValueFactory::insta
nce().create(info.GetIsolate(), v8Value, nullptr, nullptr, nullptr, exceptionSta
te); |
| 1051 if (exceptionState.throwIfNeeded()) | 1051 if (exceptionState.throwIfNeeded()) |
| 1052 return; | 1052 return; |
| 1053 impl->setSerializedScriptValueAttribute(WTF::getPtr(cppValue)); | 1053 impl->setSerializedScriptValueAttribute(cppValue); |
| 1054 } | 1054 } |
| 1055 | 1055 |
| 1056 static void serializedScriptValueAttributeAttributeSetterCallback(const v8::Func
tionCallbackInfo<v8::Value>& info) | 1056 static void serializedScriptValueAttributeAttributeSetterCallback(const v8::Func
tionCallbackInfo<v8::Value>& info) |
| 1057 { | 1057 { |
| 1058 v8::Local<v8::Value> v8Value = info[0]; | 1058 v8::Local<v8::Value> v8Value = info[0]; |
| 1059 TestObjectV8Internal::serializedScriptValueAttributeAttributeSetter(v8Value,
info); | 1059 TestObjectV8Internal::serializedScriptValueAttributeAttributeSetter(v8Value,
info); |
| 1060 } | 1060 } |
| 1061 | 1061 |
| 1062 static void anyAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value
>& info) | 1062 static void anyAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value
>& info) |
| 1063 { | 1063 { |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1127 { | 1127 { |
| 1128 v8::Local<v8::Object> holder = info.Holder(); | 1128 v8::Local<v8::Object> holder = info.Holder(); |
| 1129 ExceptionState exceptionState(ExceptionState::SetterContext, "windowAttribut
e", "TestObject", holder, info.GetIsolate()); | 1129 ExceptionState exceptionState(ExceptionState::SetterContext, "windowAttribut
e", "TestObject", holder, info.GetIsolate()); |
| 1130 TestObject* impl = V8TestObject::toImpl(holder); | 1130 TestObject* impl = V8TestObject::toImpl(holder); |
| 1131 DOMWindow* cppValue = toDOMWindow(info.GetIsolate(), v8Value); | 1131 DOMWindow* cppValue = toDOMWindow(info.GetIsolate(), v8Value); |
| 1132 if (!cppValue) { | 1132 if (!cppValue) { |
| 1133 exceptionState.throwTypeError("The provided value is not of type 'Window
'."); | 1133 exceptionState.throwTypeError("The provided value is not of type 'Window
'."); |
| 1134 exceptionState.throwIfNeeded(); | 1134 exceptionState.throwIfNeeded(); |
| 1135 return; | 1135 return; |
| 1136 } | 1136 } |
| 1137 impl->setWindowAttribute(WTF::getPtr(cppValue)); | 1137 impl->setWindowAttribute(cppValue); |
| 1138 } | 1138 } |
| 1139 | 1139 |
| 1140 static void windowAttributeAttributeSetterCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) | 1140 static void windowAttributeAttributeSetterCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) |
| 1141 { | 1141 { |
| 1142 v8::Local<v8::Value> v8Value = info[0]; | 1142 v8::Local<v8::Value> v8Value = info[0]; |
| 1143 TestObjectV8Internal::windowAttributeAttributeSetter(v8Value, info); | 1143 TestObjectV8Internal::windowAttributeAttributeSetter(v8Value, info); |
| 1144 } | 1144 } |
| 1145 | 1145 |
| 1146 static void documentAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::
Value>& info) | 1146 static void documentAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::
Value>& info) |
| 1147 { | 1147 { |
| (...skipping 11 matching lines...) Expand all Loading... |
| 1159 { | 1159 { |
| 1160 v8::Local<v8::Object> holder = info.Holder(); | 1160 v8::Local<v8::Object> holder = info.Holder(); |
| 1161 ExceptionState exceptionState(ExceptionState::SetterContext, "documentAttrib
ute", "TestObject", holder, info.GetIsolate()); | 1161 ExceptionState exceptionState(ExceptionState::SetterContext, "documentAttrib
ute", "TestObject", holder, info.GetIsolate()); |
| 1162 TestObject* impl = V8TestObject::toImpl(holder); | 1162 TestObject* impl = V8TestObject::toImpl(holder); |
| 1163 Document* cppValue = V8Document::toImplWithTypeCheck(info.GetIsolate(), v8Va
lue); | 1163 Document* cppValue = V8Document::toImplWithTypeCheck(info.GetIsolate(), v8Va
lue); |
| 1164 if (!cppValue) { | 1164 if (!cppValue) { |
| 1165 exceptionState.throwTypeError("The provided value is not of type 'Docume
nt'."); | 1165 exceptionState.throwTypeError("The provided value is not of type 'Docume
nt'."); |
| 1166 exceptionState.throwIfNeeded(); | 1166 exceptionState.throwIfNeeded(); |
| 1167 return; | 1167 return; |
| 1168 } | 1168 } |
| 1169 impl->setDocumentAttribute(WTF::getPtr(cppValue)); | 1169 impl->setDocumentAttribute(cppValue); |
| 1170 } | 1170 } |
| 1171 | 1171 |
| 1172 static void documentAttributeAttributeSetterCallback(const v8::FunctionCallbackI
nfo<v8::Value>& info) | 1172 static void documentAttributeAttributeSetterCallback(const v8::FunctionCallbackI
nfo<v8::Value>& info) |
| 1173 { | 1173 { |
| 1174 v8::Local<v8::Value> v8Value = info[0]; | 1174 v8::Local<v8::Value> v8Value = info[0]; |
| 1175 TestObjectV8Internal::documentAttributeAttributeSetter(v8Value, info); | 1175 TestObjectV8Internal::documentAttributeAttributeSetter(v8Value, info); |
| 1176 } | 1176 } |
| 1177 | 1177 |
| 1178 static void documentFragmentAttributeAttributeGetter(const v8::FunctionCallbackI
nfo<v8::Value>& info) | 1178 static void documentFragmentAttributeAttributeGetter(const v8::FunctionCallbackI
nfo<v8::Value>& info) |
| 1179 { | 1179 { |
| (...skipping 11 matching lines...) Expand all Loading... |
| 1191 { | 1191 { |
| 1192 v8::Local<v8::Object> holder = info.Holder(); | 1192 v8::Local<v8::Object> holder = info.Holder(); |
| 1193 ExceptionState exceptionState(ExceptionState::SetterContext, "documentFragme
ntAttribute", "TestObject", holder, info.GetIsolate()); | 1193 ExceptionState exceptionState(ExceptionState::SetterContext, "documentFragme
ntAttribute", "TestObject", holder, info.GetIsolate()); |
| 1194 TestObject* impl = V8TestObject::toImpl(holder); | 1194 TestObject* impl = V8TestObject::toImpl(holder); |
| 1195 DocumentFragment* cppValue = V8DocumentFragment::toImplWithTypeCheck(info.Ge
tIsolate(), v8Value); | 1195 DocumentFragment* cppValue = V8DocumentFragment::toImplWithTypeCheck(info.Ge
tIsolate(), v8Value); |
| 1196 if (!cppValue) { | 1196 if (!cppValue) { |
| 1197 exceptionState.throwTypeError("The provided value is not of type 'Docume
ntFragment'."); | 1197 exceptionState.throwTypeError("The provided value is not of type 'Docume
ntFragment'."); |
| 1198 exceptionState.throwIfNeeded(); | 1198 exceptionState.throwIfNeeded(); |
| 1199 return; | 1199 return; |
| 1200 } | 1200 } |
| 1201 impl->setDocumentFragmentAttribute(WTF::getPtr(cppValue)); | 1201 impl->setDocumentFragmentAttribute(cppValue); |
| 1202 } | 1202 } |
| 1203 | 1203 |
| 1204 static void documentFragmentAttributeAttributeSetterCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) | 1204 static void documentFragmentAttributeAttributeSetterCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) |
| 1205 { | 1205 { |
| 1206 v8::Local<v8::Value> v8Value = info[0]; | 1206 v8::Local<v8::Value> v8Value = info[0]; |
| 1207 TestObjectV8Internal::documentFragmentAttributeAttributeSetter(v8Value, info
); | 1207 TestObjectV8Internal::documentFragmentAttributeAttributeSetter(v8Value, info
); |
| 1208 } | 1208 } |
| 1209 | 1209 |
| 1210 static void documentTypeAttributeAttributeGetter(const v8::FunctionCallbackInfo<
v8::Value>& info) | 1210 static void documentTypeAttributeAttributeGetter(const v8::FunctionCallbackInfo<
v8::Value>& info) |
| 1211 { | 1211 { |
| (...skipping 11 matching lines...) Expand all Loading... |
| 1223 { | 1223 { |
| 1224 v8::Local<v8::Object> holder = info.Holder(); | 1224 v8::Local<v8::Object> holder = info.Holder(); |
| 1225 ExceptionState exceptionState(ExceptionState::SetterContext, "documentTypeAt
tribute", "TestObject", holder, info.GetIsolate()); | 1225 ExceptionState exceptionState(ExceptionState::SetterContext, "documentTypeAt
tribute", "TestObject", holder, info.GetIsolate()); |
| 1226 TestObject* impl = V8TestObject::toImpl(holder); | 1226 TestObject* impl = V8TestObject::toImpl(holder); |
| 1227 DocumentType* cppValue = V8DocumentType::toImplWithTypeCheck(info.GetIsolate
(), v8Value); | 1227 DocumentType* cppValue = V8DocumentType::toImplWithTypeCheck(info.GetIsolate
(), v8Value); |
| 1228 if (!cppValue) { | 1228 if (!cppValue) { |
| 1229 exceptionState.throwTypeError("The provided value is not of type 'Docume
ntType'."); | 1229 exceptionState.throwTypeError("The provided value is not of type 'Docume
ntType'."); |
| 1230 exceptionState.throwIfNeeded(); | 1230 exceptionState.throwIfNeeded(); |
| 1231 return; | 1231 return; |
| 1232 } | 1232 } |
| 1233 impl->setDocumentTypeAttribute(WTF::getPtr(cppValue)); | 1233 impl->setDocumentTypeAttribute(cppValue); |
| 1234 } | 1234 } |
| 1235 | 1235 |
| 1236 static void documentTypeAttributeAttributeSetterCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) | 1236 static void documentTypeAttributeAttributeSetterCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) |
| 1237 { | 1237 { |
| 1238 v8::Local<v8::Value> v8Value = info[0]; | 1238 v8::Local<v8::Value> v8Value = info[0]; |
| 1239 TestObjectV8Internal::documentTypeAttributeAttributeSetter(v8Value, info); | 1239 TestObjectV8Internal::documentTypeAttributeAttributeSetter(v8Value, info); |
| 1240 } | 1240 } |
| 1241 | 1241 |
| 1242 static void elementAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 1242 static void elementAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
| 1243 { | 1243 { |
| (...skipping 11 matching lines...) Expand all Loading... |
| 1255 { | 1255 { |
| 1256 v8::Local<v8::Object> holder = info.Holder(); | 1256 v8::Local<v8::Object> holder = info.Holder(); |
| 1257 ExceptionState exceptionState(ExceptionState::SetterContext, "elementAttribu
te", "TestObject", holder, info.GetIsolate()); | 1257 ExceptionState exceptionState(ExceptionState::SetterContext, "elementAttribu
te", "TestObject", holder, info.GetIsolate()); |
| 1258 TestObject* impl = V8TestObject::toImpl(holder); | 1258 TestObject* impl = V8TestObject::toImpl(holder); |
| 1259 Element* cppValue = V8Element::toImplWithTypeCheck(info.GetIsolate(), v8Valu
e); | 1259 Element* cppValue = V8Element::toImplWithTypeCheck(info.GetIsolate(), v8Valu
e); |
| 1260 if (!cppValue) { | 1260 if (!cppValue) { |
| 1261 exceptionState.throwTypeError("The provided value is not of type 'Elemen
t'."); | 1261 exceptionState.throwTypeError("The provided value is not of type 'Elemen
t'."); |
| 1262 exceptionState.throwIfNeeded(); | 1262 exceptionState.throwIfNeeded(); |
| 1263 return; | 1263 return; |
| 1264 } | 1264 } |
| 1265 impl->setElementAttribute(WTF::getPtr(cppValue)); | 1265 impl->setElementAttribute(cppValue); |
| 1266 } | 1266 } |
| 1267 | 1267 |
| 1268 static void elementAttributeAttributeSetterCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) | 1268 static void elementAttributeAttributeSetterCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) |
| 1269 { | 1269 { |
| 1270 v8::Local<v8::Value> v8Value = info[0]; | 1270 v8::Local<v8::Value> v8Value = info[0]; |
| 1271 TestObjectV8Internal::elementAttributeAttributeSetter(v8Value, info); | 1271 TestObjectV8Internal::elementAttributeAttributeSetter(v8Value, info); |
| 1272 } | 1272 } |
| 1273 | 1273 |
| 1274 static void nodeAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Valu
e>& info) | 1274 static void nodeAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Valu
e>& info) |
| 1275 { | 1275 { |
| (...skipping 11 matching lines...) Expand all Loading... |
| 1287 { | 1287 { |
| 1288 v8::Local<v8::Object> holder = info.Holder(); | 1288 v8::Local<v8::Object> holder = info.Holder(); |
| 1289 ExceptionState exceptionState(ExceptionState::SetterContext, "nodeAttribute"
, "TestObject", holder, info.GetIsolate()); | 1289 ExceptionState exceptionState(ExceptionState::SetterContext, "nodeAttribute"
, "TestObject", holder, info.GetIsolate()); |
| 1290 TestObject* impl = V8TestObject::toImpl(holder); | 1290 TestObject* impl = V8TestObject::toImpl(holder); |
| 1291 Node* cppValue = V8Node::toImplWithTypeCheck(info.GetIsolate(), v8Value); | 1291 Node* cppValue = V8Node::toImplWithTypeCheck(info.GetIsolate(), v8Value); |
| 1292 if (!cppValue) { | 1292 if (!cppValue) { |
| 1293 exceptionState.throwTypeError("The provided value is not of type 'Node'.
"); | 1293 exceptionState.throwTypeError("The provided value is not of type 'Node'.
"); |
| 1294 exceptionState.throwIfNeeded(); | 1294 exceptionState.throwIfNeeded(); |
| 1295 return; | 1295 return; |
| 1296 } | 1296 } |
| 1297 impl->setNodeAttribute(WTF::getPtr(cppValue)); | 1297 impl->setNodeAttribute(cppValue); |
| 1298 } | 1298 } |
| 1299 | 1299 |
| 1300 static void nodeAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<
v8::Value>& info) | 1300 static void nodeAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<
v8::Value>& info) |
| 1301 { | 1301 { |
| 1302 v8::Local<v8::Value> v8Value = info[0]; | 1302 v8::Local<v8::Value> v8Value = info[0]; |
| 1303 TestObjectV8Internal::nodeAttributeAttributeSetter(v8Value, info); | 1303 TestObjectV8Internal::nodeAttributeAttributeSetter(v8Value, info); |
| 1304 } | 1304 } |
| 1305 | 1305 |
| 1306 static void shadowRootAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8
::Value>& info) | 1306 static void shadowRootAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8
::Value>& info) |
| 1307 { | 1307 { |
| (...skipping 11 matching lines...) Expand all Loading... |
| 1319 { | 1319 { |
| 1320 v8::Local<v8::Object> holder = info.Holder(); | 1320 v8::Local<v8::Object> holder = info.Holder(); |
| 1321 ExceptionState exceptionState(ExceptionState::SetterContext, "shadowRootAttr
ibute", "TestObject", holder, info.GetIsolate()); | 1321 ExceptionState exceptionState(ExceptionState::SetterContext, "shadowRootAttr
ibute", "TestObject", holder, info.GetIsolate()); |
| 1322 TestObject* impl = V8TestObject::toImpl(holder); | 1322 TestObject* impl = V8TestObject::toImpl(holder); |
| 1323 ShadowRoot* cppValue = V8ShadowRoot::toImplWithTypeCheck(info.GetIsolate(),
v8Value); | 1323 ShadowRoot* cppValue = V8ShadowRoot::toImplWithTypeCheck(info.GetIsolate(),
v8Value); |
| 1324 if (!cppValue) { | 1324 if (!cppValue) { |
| 1325 exceptionState.throwTypeError("The provided value is not of type 'Shadow
Root'."); | 1325 exceptionState.throwTypeError("The provided value is not of type 'Shadow
Root'."); |
| 1326 exceptionState.throwIfNeeded(); | 1326 exceptionState.throwIfNeeded(); |
| 1327 return; | 1327 return; |
| 1328 } | 1328 } |
| 1329 impl->setShadowRootAttribute(WTF::getPtr(cppValue)); | 1329 impl->setShadowRootAttribute(cppValue); |
| 1330 } | 1330 } |
| 1331 | 1331 |
| 1332 static void shadowRootAttributeAttributeSetterCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) | 1332 static void shadowRootAttributeAttributeSetterCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) |
| 1333 { | 1333 { |
| 1334 v8::Local<v8::Value> v8Value = info[0]; | 1334 v8::Local<v8::Value> v8Value = info[0]; |
| 1335 TestObjectV8Internal::shadowRootAttributeAttributeSetter(v8Value, info); | 1335 TestObjectV8Internal::shadowRootAttributeAttributeSetter(v8Value, info); |
| 1336 } | 1336 } |
| 1337 | 1337 |
| 1338 static void arrayBufferAttributeAttributeGetter(const v8::FunctionCallbackInfo<v
8::Value>& info) | 1338 static void arrayBufferAttributeAttributeGetter(const v8::FunctionCallbackInfo<v
8::Value>& info) |
| 1339 { | 1339 { |
| (...skipping 11 matching lines...) Expand all Loading... |
| 1351 { | 1351 { |
| 1352 v8::Local<v8::Object> holder = info.Holder(); | 1352 v8::Local<v8::Object> holder = info.Holder(); |
| 1353 ExceptionState exceptionState(ExceptionState::SetterContext, "arrayBufferAtt
ribute", "TestObject", holder, info.GetIsolate()); | 1353 ExceptionState exceptionState(ExceptionState::SetterContext, "arrayBufferAtt
ribute", "TestObject", holder, info.GetIsolate()); |
| 1354 TestObject* impl = V8TestObject::toImpl(holder); | 1354 TestObject* impl = V8TestObject::toImpl(holder); |
| 1355 TestArrayBuffer* cppValue = v8Value->IsArrayBuffer() ? V8ArrayBuffer::toImpl
(v8::Local<v8::ArrayBuffer>::Cast(v8Value)) : 0; | 1355 TestArrayBuffer* cppValue = v8Value->IsArrayBuffer() ? V8ArrayBuffer::toImpl
(v8::Local<v8::ArrayBuffer>::Cast(v8Value)) : 0; |
| 1356 if (!cppValue) { | 1356 if (!cppValue) { |
| 1357 exceptionState.throwTypeError("The provided value is not of type 'ArrayB
uffer'."); | 1357 exceptionState.throwTypeError("The provided value is not of type 'ArrayB
uffer'."); |
| 1358 exceptionState.throwIfNeeded(); | 1358 exceptionState.throwIfNeeded(); |
| 1359 return; | 1359 return; |
| 1360 } | 1360 } |
| 1361 impl->setArrayBufferAttribute(WTF::getPtr(cppValue)); | 1361 impl->setArrayBufferAttribute(cppValue); |
| 1362 } | 1362 } |
| 1363 | 1363 |
| 1364 static void arrayBufferAttributeAttributeSetterCallback(const v8::FunctionCallba
ckInfo<v8::Value>& info) | 1364 static void arrayBufferAttributeAttributeSetterCallback(const v8::FunctionCallba
ckInfo<v8::Value>& info) |
| 1365 { | 1365 { |
| 1366 v8::Local<v8::Value> v8Value = info[0]; | 1366 v8::Local<v8::Value> v8Value = info[0]; |
| 1367 TestObjectV8Internal::arrayBufferAttributeAttributeSetter(v8Value, info); | 1367 TestObjectV8Internal::arrayBufferAttributeAttributeSetter(v8Value, info); |
| 1368 } | 1368 } |
| 1369 | 1369 |
| 1370 static void float32ArrayAttributeAttributeGetter(const v8::FunctionCallbackInfo<
v8::Value>& info) | 1370 static void float32ArrayAttributeAttributeGetter(const v8::FunctionCallbackInfo<
v8::Value>& info) |
| 1371 { | 1371 { |
| (...skipping 11 matching lines...) Expand all Loading... |
| 1383 { | 1383 { |
| 1384 v8::Local<v8::Object> holder = info.Holder(); | 1384 v8::Local<v8::Object> holder = info.Holder(); |
| 1385 ExceptionState exceptionState(ExceptionState::SetterContext, "float32ArrayAt
tribute", "TestObject", holder, info.GetIsolate()); | 1385 ExceptionState exceptionState(ExceptionState::SetterContext, "float32ArrayAt
tribute", "TestObject", holder, info.GetIsolate()); |
| 1386 TestObject* impl = V8TestObject::toImpl(holder); | 1386 TestObject* impl = V8TestObject::toImpl(holder); |
| 1387 DOMFloat32Array* cppValue = v8Value->IsFloat32Array() ? V8Float32Array::toIm
pl(v8::Local<v8::Float32Array>::Cast(v8Value)) : 0; | 1387 DOMFloat32Array* cppValue = v8Value->IsFloat32Array() ? V8Float32Array::toIm
pl(v8::Local<v8::Float32Array>::Cast(v8Value)) : 0; |
| 1388 if (!cppValue) { | 1388 if (!cppValue) { |
| 1389 exceptionState.throwTypeError("The provided value is not of type 'Float3
2Array'."); | 1389 exceptionState.throwTypeError("The provided value is not of type 'Float3
2Array'."); |
| 1390 exceptionState.throwIfNeeded(); | 1390 exceptionState.throwIfNeeded(); |
| 1391 return; | 1391 return; |
| 1392 } | 1392 } |
| 1393 impl->setFloat32ArrayAttribute(WTF::getPtr(cppValue)); | 1393 impl->setFloat32ArrayAttribute(cppValue); |
| 1394 } | 1394 } |
| 1395 | 1395 |
| 1396 static void float32ArrayAttributeAttributeSetterCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) | 1396 static void float32ArrayAttributeAttributeSetterCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) |
| 1397 { | 1397 { |
| 1398 v8::Local<v8::Value> v8Value = info[0]; | 1398 v8::Local<v8::Value> v8Value = info[0]; |
| 1399 TestObjectV8Internal::float32ArrayAttributeAttributeSetter(v8Value, info); | 1399 TestObjectV8Internal::float32ArrayAttributeAttributeSetter(v8Value, info); |
| 1400 } | 1400 } |
| 1401 | 1401 |
| 1402 static void uint8ArrayAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8
::Value>& info) | 1402 static void uint8ArrayAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8
::Value>& info) |
| 1403 { | 1403 { |
| (...skipping 11 matching lines...) Expand all Loading... |
| 1415 { | 1415 { |
| 1416 v8::Local<v8::Object> holder = info.Holder(); | 1416 v8::Local<v8::Object> holder = info.Holder(); |
| 1417 ExceptionState exceptionState(ExceptionState::SetterContext, "uint8ArrayAttr
ibute", "TestObject", holder, info.GetIsolate()); | 1417 ExceptionState exceptionState(ExceptionState::SetterContext, "uint8ArrayAttr
ibute", "TestObject", holder, info.GetIsolate()); |
| 1418 TestObject* impl = V8TestObject::toImpl(holder); | 1418 TestObject* impl = V8TestObject::toImpl(holder); |
| 1419 DOMUint8Array* cppValue = v8Value->IsUint8Array() ? V8Uint8Array::toImpl(v8:
:Local<v8::Uint8Array>::Cast(v8Value)) : 0; | 1419 DOMUint8Array* cppValue = v8Value->IsUint8Array() ? V8Uint8Array::toImpl(v8:
:Local<v8::Uint8Array>::Cast(v8Value)) : 0; |
| 1420 if (!cppValue) { | 1420 if (!cppValue) { |
| 1421 exceptionState.throwTypeError("The provided value is not of type 'Uint8A
rray'."); | 1421 exceptionState.throwTypeError("The provided value is not of type 'Uint8A
rray'."); |
| 1422 exceptionState.throwIfNeeded(); | 1422 exceptionState.throwIfNeeded(); |
| 1423 return; | 1423 return; |
| 1424 } | 1424 } |
| 1425 impl->setUint8ArrayAttribute(WTF::getPtr(cppValue)); | 1425 impl->setUint8ArrayAttribute(cppValue); |
| 1426 } | 1426 } |
| 1427 | 1427 |
| 1428 static void uint8ArrayAttributeAttributeSetterCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) | 1428 static void uint8ArrayAttributeAttributeSetterCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) |
| 1429 { | 1429 { |
| 1430 v8::Local<v8::Value> v8Value = info[0]; | 1430 v8::Local<v8::Value> v8Value = info[0]; |
| 1431 TestObjectV8Internal::uint8ArrayAttributeAttributeSetter(v8Value, info); | 1431 TestObjectV8Internal::uint8ArrayAttributeAttributeSetter(v8Value, info); |
| 1432 } | 1432 } |
| 1433 | 1433 |
| 1434 static void selfAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) | 1434 static void selfAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 1435 { | 1435 { |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1542 static void testInterfaceEmptyArrayAttributeAttributeGetterCallback(const v8::Fu
nctionCallbackInfo<v8::Value>& info) | 1542 static void testInterfaceEmptyArrayAttributeAttributeGetterCallback(const v8::Fu
nctionCallbackInfo<v8::Value>& info) |
| 1543 { | 1543 { |
| 1544 TestObjectV8Internal::testInterfaceEmptyArrayAttributeAttributeGetter(info); | 1544 TestObjectV8Internal::testInterfaceEmptyArrayAttributeAttributeGetter(info); |
| 1545 } | 1545 } |
| 1546 | 1546 |
| 1547 static void testInterfaceEmptyArrayAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) | 1547 static void testInterfaceEmptyArrayAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
| 1548 { | 1548 { |
| 1549 v8::Local<v8::Object> holder = info.Holder(); | 1549 v8::Local<v8::Object> holder = info.Holder(); |
| 1550 ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceE
mptyArrayAttribute", "TestObject", holder, info.GetIsolate()); | 1550 ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceE
mptyArrayAttribute", "TestObject", holder, info.GetIsolate()); |
| 1551 TestObject* impl = V8TestObject::toImpl(holder); | 1551 TestObject* impl = V8TestObject::toImpl(holder); |
| 1552 Vector<RefPtr<TestInterfaceEmpty>> cppValue = (toRefPtrNativeArray<TestInter
faceEmpty, V8TestInterfaceEmpty>(v8Value, 0, info.GetIsolate(), exceptionState))
; | 1552 HeapVector<Member<TestInterfaceEmpty>> cppValue = (toMemberNativeArray<TestI
nterfaceEmpty, V8TestInterfaceEmpty>(v8Value, 0, info.GetIsolate(), exceptionSta
te)); |
| 1553 if (exceptionState.throwIfNeeded()) | 1553 if (exceptionState.throwIfNeeded()) |
| 1554 return; | 1554 return; |
| 1555 impl->setTestInterfaceEmptyArrayAttribute(cppValue); | 1555 impl->setTestInterfaceEmptyArrayAttribute(cppValue); |
| 1556 } | 1556 } |
| 1557 | 1557 |
| 1558 static void testInterfaceEmptyArrayAttributeAttributeSetterCallback(const v8::Fu
nctionCallbackInfo<v8::Value>& info) | 1558 static void testInterfaceEmptyArrayAttributeAttributeSetterCallback(const v8::Fu
nctionCallbackInfo<v8::Value>& info) |
| 1559 { | 1559 { |
| 1560 v8::Local<v8::Value> v8Value = info[0]; | 1560 v8::Local<v8::Value> v8Value = info[0]; |
| 1561 TestObjectV8Internal::testInterfaceEmptyArrayAttributeAttributeSetter(v8Valu
e, info); | 1561 TestObjectV8Internal::testInterfaceEmptyArrayAttributeAttributeSetter(v8Valu
e, info); |
| 1562 } | 1562 } |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1669 { | 1669 { |
| 1670 v8::Local<v8::Object> holder = info.Holder(); | 1670 v8::Local<v8::Object> holder = info.Holder(); |
| 1671 ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceO
rNullAttribute", "TestObject", holder, info.GetIsolate()); | 1671 ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceO
rNullAttribute", "TestObject", holder, info.GetIsolate()); |
| 1672 TestObject* impl = V8TestObject::toImpl(holder); | 1672 TestObject* impl = V8TestObject::toImpl(holder); |
| 1673 TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck
(info.GetIsolate(), v8Value); | 1673 TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck
(info.GetIsolate(), v8Value); |
| 1674 if (!cppValue && !isUndefinedOrNull(v8Value)) { | 1674 if (!cppValue && !isUndefinedOrNull(v8Value)) { |
| 1675 exceptionState.throwTypeError("The provided value is not of type 'TestIn
terface'."); | 1675 exceptionState.throwTypeError("The provided value is not of type 'TestIn
terface'."); |
| 1676 exceptionState.throwIfNeeded(); | 1676 exceptionState.throwIfNeeded(); |
| 1677 return; | 1677 return; |
| 1678 } | 1678 } |
| 1679 impl->setTestInterfaceOrNullAttribute(WTF::getPtr(cppValue)); | 1679 impl->setTestInterfaceOrNullAttribute(cppValue); |
| 1680 } | 1680 } |
| 1681 | 1681 |
| 1682 static void testInterfaceOrNullAttributeAttributeSetterCallback(const v8::Functi
onCallbackInfo<v8::Value>& info) | 1682 static void testInterfaceOrNullAttributeAttributeSetterCallback(const v8::Functi
onCallbackInfo<v8::Value>& info) |
| 1683 { | 1683 { |
| 1684 v8::Local<v8::Value> v8Value = info[0]; | 1684 v8::Local<v8::Value> v8Value = info[0]; |
| 1685 TestObjectV8Internal::testInterfaceOrNullAttributeAttributeSetter(v8Value, i
nfo); | 1685 TestObjectV8Internal::testInterfaceOrNullAttributeAttributeSetter(v8Value, i
nfo); |
| 1686 } | 1686 } |
| 1687 | 1687 |
| 1688 static void testEnumAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::
Value>& info) | 1688 static void testEnumAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::
Value>& info) |
| 1689 { | 1689 { |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1810 static void staticLongAttributeAttributeSetterCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) | 1810 static void staticLongAttributeAttributeSetterCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) |
| 1811 { | 1811 { |
| 1812 v8::Local<v8::Value> v8Value = info[0]; | 1812 v8::Local<v8::Value> v8Value = info[0]; |
| 1813 TestObjectV8Internal::staticLongAttributeAttributeSetter(v8Value, info); | 1813 TestObjectV8Internal::staticLongAttributeAttributeSetter(v8Value, info); |
| 1814 } | 1814 } |
| 1815 | 1815 |
| 1816 static void eventHandlerAttributeAttributeGetter(const v8::FunctionCallbackInfo<
v8::Value>& info) | 1816 static void eventHandlerAttributeAttributeGetter(const v8::FunctionCallbackInfo<
v8::Value>& info) |
| 1817 { | 1817 { |
| 1818 v8::Local<v8::Object> holder = info.Holder(); | 1818 v8::Local<v8::Object> holder = info.Holder(); |
| 1819 TestObject* impl = V8TestObject::toImpl(holder); | 1819 TestObject* impl = V8TestObject::toImpl(holder); |
| 1820 EventListener* cppValue(impl->eventHandlerAttribute()); | 1820 EventListener* cppValue(WTF::getPtr(impl->eventHandlerAttribute())); |
| 1821 v8SetReturnValue(info, cppValue ? v8::Local<v8::Value>(V8AbstractEventListen
er::cast(cppValue)->getListenerObject(impl->getExecutionContext())) : v8::Local<
v8::Value>(v8::Null(info.GetIsolate()))); | 1821 v8SetReturnValue(info, cppValue ? v8::Local<v8::Value>(V8AbstractEventListen
er::cast(cppValue)->getListenerObject(impl->getExecutionContext())) : v8::Local<
v8::Value>(v8::Null(info.GetIsolate()))); |
| 1822 } | 1822 } |
| 1823 | 1823 |
| 1824 static void eventHandlerAttributeAttributeGetterCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) | 1824 static void eventHandlerAttributeAttributeGetterCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) |
| 1825 { | 1825 { |
| 1826 TestObjectV8Internal::eventHandlerAttributeAttributeGetter(info); | 1826 TestObjectV8Internal::eventHandlerAttributeAttributeGetter(info); |
| 1827 } | 1827 } |
| 1828 | 1828 |
| 1829 static void eventHandlerAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::FunctionCallbackInfo<v8::Value>& info) | 1829 static void eventHandlerAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::FunctionCallbackInfo<v8::Value>& info) |
| 1830 { | 1830 { |
| (...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2340 { | 2340 { |
| 2341 v8::Local<v8::Value> v8Value = info[0]; | 2341 v8::Local<v8::Value> v8Value = info[0]; |
| 2342 TestObjectV8Internal::callWithExecutionContextAndScriptStateAnyAttributeAttr
ibuteSetter(v8Value, info); | 2342 TestObjectV8Internal::callWithExecutionContextAndScriptStateAnyAttributeAttr
ibuteSetter(v8Value, info); |
| 2343 } | 2343 } |
| 2344 | 2344 |
| 2345 static void checkSecurityForNodeReadonlyDocumentAttributeAttributeGetter(const v
8::FunctionCallbackInfo<v8::Value>& info) | 2345 static void checkSecurityForNodeReadonlyDocumentAttributeAttributeGetter(const v
8::FunctionCallbackInfo<v8::Value>& info) |
| 2346 { | 2346 { |
| 2347 v8::Local<v8::Object> holder = info.Holder(); | 2347 v8::Local<v8::Object> holder = info.Holder(); |
| 2348 TestObject* impl = V8TestObject::toImpl(holder); | 2348 TestObject* impl = V8TestObject::toImpl(holder); |
| 2349 ExceptionState exceptionState(ExceptionState::GetterContext, "checkSecurityF
orNodeReadonlyDocumentAttribute", "TestObject", holder, info.GetIsolate()); | 2349 ExceptionState exceptionState(ExceptionState::GetterContext, "checkSecurityF
orNodeReadonlyDocumentAttribute", "TestObject", holder, info.GetIsolate()); |
| 2350 if (!BindingSecurity::shouldAllowAccessTo(info.GetIsolate(), callingDOMWindo
w(info.GetIsolate()), impl->checkSecurityForNodeReadonlyDocumentAttribute(), exc
eptionState)) { | 2350 if (!BindingSecurity::shouldAllowAccessTo(info.GetIsolate(), callingDOMWindo
w(info.GetIsolate()), WTF::getPtr(impl->checkSecurityForNodeReadonlyDocumentAttr
ibute()), exceptionState)) { |
| 2351 v8SetReturnValueNull(info); | 2351 v8SetReturnValueNull(info); |
| 2352 exceptionState.throwIfNeeded(); | 2352 exceptionState.throwIfNeeded(); |
| 2353 return; | 2353 return; |
| 2354 } | 2354 } |
| 2355 v8SetReturnValueFast(info, WTF::getPtr(impl->checkSecurityForNodeReadonlyDoc
umentAttribute()), impl); | 2355 v8SetReturnValueFast(info, WTF::getPtr(impl->checkSecurityForNodeReadonlyDoc
umentAttribute()), impl); |
| 2356 } | 2356 } |
| 2357 | 2357 |
| 2358 static void checkSecurityForNodeReadonlyDocumentAttributeAttributeGetterCallback
(const v8::FunctionCallbackInfo<v8::Value>& info) | 2358 static void checkSecurityForNodeReadonlyDocumentAttributeAttributeGetterCallback
(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 2359 { | 2359 { |
| 2360 TestObjectV8Internal::checkSecurityForNodeReadonlyDocumentAttributeAttribute
Getter(info); | 2360 TestObjectV8Internal::checkSecurityForNodeReadonlyDocumentAttributeAttribute
Getter(info); |
| (...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2684 static void originTrialEnabledLongAttributeAttributeSetterCallback(const v8::Fun
ctionCallbackInfo<v8::Value>& info) | 2684 static void originTrialEnabledLongAttributeAttributeSetterCallback(const v8::Fun
ctionCallbackInfo<v8::Value>& info) |
| 2685 { | 2685 { |
| 2686 v8::Local<v8::Value> v8Value = info[0]; | 2686 v8::Local<v8::Value> v8Value = info[0]; |
| 2687 TestObjectV8Internal::originTrialEnabledLongAttributeAttributeSetter(v8Value
, info); | 2687 TestObjectV8Internal::originTrialEnabledLongAttributeAttributeSetter(v8Value
, info); |
| 2688 } | 2688 } |
| 2689 | 2689 |
| 2690 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetter(c
onst v8::FunctionCallbackInfo<v8::Value>& info) | 2690 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetter(c
onst v8::FunctionCallbackInfo<v8::Value>& info) |
| 2691 { | 2691 { |
| 2692 v8::Local<v8::Object> holder = info.Holder(); | 2692 v8::Local<v8::Object> holder = info.Holder(); |
| 2693 TestObject* impl = V8TestObject::toImpl(holder); | 2693 TestObject* impl = V8TestObject::toImpl(holder); |
| 2694 RefPtr<TestInterfaceEmpty> cppValue(impl->perWorldBindingsReadonlyTestInterf
aceEmptyAttribute()); | 2694 TestInterfaceEmpty* cppValue(WTF::getPtr(impl->perWorldBindingsReadonlyTestI
nterfaceEmptyAttribute())); |
| 2695 if (cppValue && DOMDataStore::setReturnValue(info.GetReturnValue(), cppValue
.get())) | 2695 if (cppValue && DOMDataStore::setReturnValue(info.GetReturnValue(), cppValue
)) |
| 2696 return; | 2696 return; |
| 2697 v8::Local<v8::Value> v8Value(toV8(cppValue.get(), holder, info.GetIsolate())
); | 2697 v8::Local<v8::Value> v8Value(toV8(cppValue, holder, info.GetIsolate())); |
| 2698 if (!v8Value.IsEmpty()) { | 2698 if (!v8Value.IsEmpty()) { |
| 2699 V8HiddenValue::setHiddenValue(ScriptState::current(info.GetIsolate()), h
older, v8AtomicString(info.GetIsolate(), "perWorldBindingsReadonlyTestInterfaceE
mptyAttribute"), v8Value); | 2699 V8HiddenValue::setHiddenValue(ScriptState::current(info.GetIsolate()), h
older, v8AtomicString(info.GetIsolate(), "perWorldBindingsReadonlyTestInterfaceE
mptyAttribute"), v8Value); |
| 2700 v8SetReturnValue(info, v8Value); | 2700 v8SetReturnValue(info, v8Value); |
| 2701 } | 2701 } |
| 2702 } | 2702 } |
| 2703 | 2703 |
| 2704 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCa
llback(const v8::FunctionCallbackInfo<v8::Value>& info) | 2704 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCa
llback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 2705 { | 2705 { |
| 2706 TestObjectV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttributeAtt
ributeGetter(info); | 2706 TestObjectV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttributeAtt
ributeGetter(info); |
| 2707 } | 2707 } |
| 2708 | 2708 |
| 2709 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterFo
rMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) | 2709 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterFo
rMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 2710 { | 2710 { |
| 2711 v8::Local<v8::Object> holder = info.Holder(); | 2711 v8::Local<v8::Object> holder = info.Holder(); |
| 2712 TestObject* impl = V8TestObject::toImpl(holder); | 2712 TestObject* impl = V8TestObject::toImpl(holder); |
| 2713 RefPtr<TestInterfaceEmpty> cppValue(impl->perWorldBindingsReadonlyTestInterf
aceEmptyAttribute()); | 2713 TestInterfaceEmpty* cppValue(WTF::getPtr(impl->perWorldBindingsReadonlyTestI
nterfaceEmptyAttribute())); |
| 2714 if (cppValue && DOMDataStore::setReturnValueForMainWorld(info.GetReturnValue
(), cppValue.get())) | 2714 if (cppValue && DOMDataStore::setReturnValueForMainWorld(info.GetReturnValue
(), cppValue)) |
| 2715 return; | 2715 return; |
| 2716 v8::Local<v8::Value> v8Value(toV8(cppValue.get(), holder, info.GetIsolate())
); | 2716 v8::Local<v8::Value> v8Value(toV8(cppValue, holder, info.GetIsolate())); |
| 2717 if (!v8Value.IsEmpty()) { | 2717 if (!v8Value.IsEmpty()) { |
| 2718 V8HiddenValue::setHiddenValue(ScriptState::current(info.GetIsolate()), h
older, v8AtomicString(info.GetIsolate(), "perWorldBindingsReadonlyTestInterfaceE
mptyAttribute"), v8Value); | 2718 V8HiddenValue::setHiddenValue(ScriptState::current(info.GetIsolate()), h
older, v8AtomicString(info.GetIsolate(), "perWorldBindingsReadonlyTestInterfaceE
mptyAttribute"), v8Value); |
| 2719 v8SetReturnValue(info, v8Value); | 2719 v8SetReturnValue(info, v8Value); |
| 2720 } | 2720 } |
| 2721 } | 2721 } |
| 2722 | 2722 |
| 2723 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCa
llbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) | 2723 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCa
llbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 2724 { | 2724 { |
| 2725 TestObjectV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttributeAtt
ributeGetterForMainWorld(info); | 2725 TestObjectV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttributeAtt
ributeGetterForMainWorld(info); |
| 2726 } | 2726 } |
| (...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3005 | 3005 |
| 3006 static void locationAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 3006 static void locationAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
| 3007 { | 3007 { |
| 3008 TestObjectV8Internal::locationAttributeGetter(info); | 3008 TestObjectV8Internal::locationAttributeGetter(info); |
| 3009 } | 3009 } |
| 3010 | 3010 |
| 3011 static void locationAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Func
tionCallbackInfo<v8::Value>& info) | 3011 static void locationAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Func
tionCallbackInfo<v8::Value>& info) |
| 3012 { | 3012 { |
| 3013 v8::Local<v8::Object> holder = info.Holder(); | 3013 v8::Local<v8::Object> holder = info.Holder(); |
| 3014 TestObject* proxyImpl = V8TestObject::toImpl(holder); | 3014 TestObject* proxyImpl = V8TestObject::toImpl(holder); |
| 3015 RawPtr<TestNode> impl = WTF::getPtr(proxyImpl->location()); | 3015 TestNode* impl = WTF::getPtr(proxyImpl->location()); |
| 3016 if (!impl) | 3016 if (!impl) |
| 3017 return; | 3017 return; |
| 3018 V8StringResource<> cppValue = v8Value; | 3018 V8StringResource<> cppValue = v8Value; |
| 3019 if (!cppValue.prepare()) | 3019 if (!cppValue.prepare()) |
| 3020 return; | 3020 return; |
| 3021 impl->setHref(cppValue); | 3021 impl->setHref(cppValue); |
| 3022 } | 3022 } |
| 3023 | 3023 |
| 3024 static void locationAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 3024 static void locationAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
| 3025 { | 3025 { |
| (...skipping 11 matching lines...) Expand all Loading... |
| 3037 static void locationWithExceptionAttributeGetterCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) | 3037 static void locationWithExceptionAttributeGetterCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) |
| 3038 { | 3038 { |
| 3039 TestObjectV8Internal::locationWithExceptionAttributeGetter(info); | 3039 TestObjectV8Internal::locationWithExceptionAttributeGetter(info); |
| 3040 } | 3040 } |
| 3041 | 3041 |
| 3042 static void locationWithExceptionAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::FunctionCallbackInfo<v8::Value>& info) | 3042 static void locationWithExceptionAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::FunctionCallbackInfo<v8::Value>& info) |
| 3043 { | 3043 { |
| 3044 v8::Local<v8::Object> holder = info.Holder(); | 3044 v8::Local<v8::Object> holder = info.Holder(); |
| 3045 ExceptionState exceptionState(ExceptionState::SetterContext, "locationWithEx
ception", "TestObject", holder, info.GetIsolate()); | 3045 ExceptionState exceptionState(ExceptionState::SetterContext, "locationWithEx
ception", "TestObject", holder, info.GetIsolate()); |
| 3046 TestObject* proxyImpl = V8TestObject::toImpl(holder); | 3046 TestObject* proxyImpl = V8TestObject::toImpl(holder); |
| 3047 RawPtr<TestNode> impl = WTF::getPtr(proxyImpl->locationWithException()); | 3047 TestNode* impl = WTF::getPtr(proxyImpl->locationWithException()); |
| 3048 if (!impl) | 3048 if (!impl) |
| 3049 return; | 3049 return; |
| 3050 V8StringResource<> cppValue = v8Value; | 3050 V8StringResource<> cppValue = v8Value; |
| 3051 if (!cppValue.prepare()) | 3051 if (!cppValue.prepare()) |
| 3052 return; | 3052 return; |
| 3053 impl->setHrefThrows(cppValue, exceptionState); | 3053 impl->setHrefThrows(cppValue, exceptionState); |
| 3054 exceptionState.throwIfNeeded(); | 3054 exceptionState.throwIfNeeded(); |
| 3055 } | 3055 } |
| 3056 | 3056 |
| 3057 static void locationWithExceptionAttributeSetterCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) | 3057 static void locationWithExceptionAttributeSetterCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) |
| (...skipping 11 matching lines...) Expand all Loading... |
| 3069 | 3069 |
| 3070 static void locationWithCallWithAttributeGetterCallback(const v8::FunctionCallba
ckInfo<v8::Value>& info) | 3070 static void locationWithCallWithAttributeGetterCallback(const v8::FunctionCallba
ckInfo<v8::Value>& info) |
| 3071 { | 3071 { |
| 3072 TestObjectV8Internal::locationWithCallWithAttributeGetter(info); | 3072 TestObjectV8Internal::locationWithCallWithAttributeGetter(info); |
| 3073 } | 3073 } |
| 3074 | 3074 |
| 3075 static void locationWithCallWithAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::FunctionCallbackInfo<v8::Value>& info) | 3075 static void locationWithCallWithAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::FunctionCallbackInfo<v8::Value>& info) |
| 3076 { | 3076 { |
| 3077 v8::Local<v8::Object> holder = info.Holder(); | 3077 v8::Local<v8::Object> holder = info.Holder(); |
| 3078 TestObject* proxyImpl = V8TestObject::toImpl(holder); | 3078 TestObject* proxyImpl = V8TestObject::toImpl(holder); |
| 3079 RawPtr<TestNode> impl = WTF::getPtr(proxyImpl->locationWithCallWith()); | 3079 TestNode* impl = WTF::getPtr(proxyImpl->locationWithCallWith()); |
| 3080 if (!impl) | 3080 if (!impl) |
| 3081 return; | 3081 return; |
| 3082 V8StringResource<> cppValue = v8Value; | 3082 V8StringResource<> cppValue = v8Value; |
| 3083 if (!cppValue.prepare()) | 3083 if (!cppValue.prepare()) |
| 3084 return; | 3084 return; |
| 3085 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); | 3085 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); |
| 3086 impl->setHrefCallWith(executionContext, currentDOMWindow(info.GetIsolate()),
enteredDOMWindow(info.GetIsolate()), cppValue); | 3086 impl->setHrefCallWith(executionContext, currentDOMWindow(info.GetIsolate()),
enteredDOMWindow(info.GetIsolate()), cppValue); |
| 3087 } | 3087 } |
| 3088 | 3088 |
| 3089 static void locationWithCallWithAttributeSetterCallback(const v8::FunctionCallba
ckInfo<v8::Value>& info) | 3089 static void locationWithCallWithAttributeSetterCallback(const v8::FunctionCallba
ckInfo<v8::Value>& info) |
| (...skipping 12 matching lines...) Expand all Loading... |
| 3102 static void locationByteStringAttributeGetterCallback(const v8::FunctionCallback
Info<v8::Value>& info) | 3102 static void locationByteStringAttributeGetterCallback(const v8::FunctionCallback
Info<v8::Value>& info) |
| 3103 { | 3103 { |
| 3104 TestObjectV8Internal::locationByteStringAttributeGetter(info); | 3104 TestObjectV8Internal::locationByteStringAttributeGetter(info); |
| 3105 } | 3105 } |
| 3106 | 3106 |
| 3107 static void locationByteStringAttributeSetter(v8::Local<v8::Value> v8Value, cons
t v8::FunctionCallbackInfo<v8::Value>& info) | 3107 static void locationByteStringAttributeSetter(v8::Local<v8::Value> v8Value, cons
t v8::FunctionCallbackInfo<v8::Value>& info) |
| 3108 { | 3108 { |
| 3109 v8::Local<v8::Object> holder = info.Holder(); | 3109 v8::Local<v8::Object> holder = info.Holder(); |
| 3110 ExceptionState exceptionState(ExceptionState::SetterContext, "locationByteSt
ring", "TestObject", holder, info.GetIsolate()); | 3110 ExceptionState exceptionState(ExceptionState::SetterContext, "locationByteSt
ring", "TestObject", holder, info.GetIsolate()); |
| 3111 TestObject* proxyImpl = V8TestObject::toImpl(holder); | 3111 TestObject* proxyImpl = V8TestObject::toImpl(holder); |
| 3112 RawPtr<TestNode> impl = WTF::getPtr(proxyImpl->locationByteString()); | 3112 TestNode* impl = WTF::getPtr(proxyImpl->locationByteString()); |
| 3113 if (!impl) | 3113 if (!impl) |
| 3114 return; | 3114 return; |
| 3115 V8StringResource<> cppValue = toByteString(info.GetIsolate(), v8Value, excep
tionState); | 3115 V8StringResource<> cppValue = toByteString(info.GetIsolate(), v8Value, excep
tionState); |
| 3116 if (exceptionState.throwIfNeeded()) | 3116 if (exceptionState.throwIfNeeded()) |
| 3117 return; | 3117 return; |
| 3118 impl->setHrefByteString(cppValue); | 3118 impl->setHrefByteString(cppValue); |
| 3119 } | 3119 } |
| 3120 | 3120 |
| 3121 static void locationByteStringAttributeSetterCallback(const v8::FunctionCallback
Info<v8::Value>& info) | 3121 static void locationByteStringAttributeSetterCallback(const v8::FunctionCallback
Info<v8::Value>& info) |
| 3122 { | 3122 { |
| (...skipping 10 matching lines...) Expand all Loading... |
| 3133 | 3133 |
| 3134 static void locationWithPerWorldBindingsAttributeGetterCallback(const v8::Functi
onCallbackInfo<v8::Value>& info) | 3134 static void locationWithPerWorldBindingsAttributeGetterCallback(const v8::Functi
onCallbackInfo<v8::Value>& info) |
| 3135 { | 3135 { |
| 3136 TestObjectV8Internal::locationWithPerWorldBindingsAttributeGetter(info); | 3136 TestObjectV8Internal::locationWithPerWorldBindingsAttributeGetter(info); |
| 3137 } | 3137 } |
| 3138 | 3138 |
| 3139 static void locationWithPerWorldBindingsAttributeSetter(v8::Local<v8::Value> v8V
alue, const v8::FunctionCallbackInfo<v8::Value>& info) | 3139 static void locationWithPerWorldBindingsAttributeSetter(v8::Local<v8::Value> v8V
alue, const v8::FunctionCallbackInfo<v8::Value>& info) |
| 3140 { | 3140 { |
| 3141 v8::Local<v8::Object> holder = info.Holder(); | 3141 v8::Local<v8::Object> holder = info.Holder(); |
| 3142 TestObject* proxyImpl = V8TestObject::toImpl(holder); | 3142 TestObject* proxyImpl = V8TestObject::toImpl(holder); |
| 3143 RawPtr<TestNode> impl = WTF::getPtr(proxyImpl->locationWithPerWorldBindings(
)); | 3143 TestNode* impl = WTF::getPtr(proxyImpl->locationWithPerWorldBindings()); |
| 3144 if (!impl) | 3144 if (!impl) |
| 3145 return; | 3145 return; |
| 3146 V8StringResource<> cppValue = v8Value; | 3146 V8StringResource<> cppValue = v8Value; |
| 3147 if (!cppValue.prepare()) | 3147 if (!cppValue.prepare()) |
| 3148 return; | 3148 return; |
| 3149 impl->setHref(cppValue); | 3149 impl->setHref(cppValue); |
| 3150 } | 3150 } |
| 3151 | 3151 |
| 3152 static void locationWithPerWorldBindingsAttributeSetterCallback(const v8::Functi
onCallbackInfo<v8::Value>& info) | 3152 static void locationWithPerWorldBindingsAttributeSetterCallback(const v8::Functi
onCallbackInfo<v8::Value>& info) |
| 3153 { | 3153 { |
| (...skipping 10 matching lines...) Expand all Loading... |
| 3164 | 3164 |
| 3165 static void locationWithPerWorldBindingsAttributeGetterCallbackForMainWorld(cons
t v8::FunctionCallbackInfo<v8::Value>& info) | 3165 static void locationWithPerWorldBindingsAttributeGetterCallbackForMainWorld(cons
t v8::FunctionCallbackInfo<v8::Value>& info) |
| 3166 { | 3166 { |
| 3167 TestObjectV8Internal::locationWithPerWorldBindingsAttributeGetterForMainWorl
d(info); | 3167 TestObjectV8Internal::locationWithPerWorldBindingsAttributeGetterForMainWorl
d(info); |
| 3168 } | 3168 } |
| 3169 | 3169 |
| 3170 static void locationWithPerWorldBindingsAttributeSetterForMainWorld(v8::Local<v8
::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) | 3170 static void locationWithPerWorldBindingsAttributeSetterForMainWorld(v8::Local<v8
::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
| 3171 { | 3171 { |
| 3172 v8::Local<v8::Object> holder = info.Holder(); | 3172 v8::Local<v8::Object> holder = info.Holder(); |
| 3173 TestObject* proxyImpl = V8TestObject::toImpl(holder); | 3173 TestObject* proxyImpl = V8TestObject::toImpl(holder); |
| 3174 RawPtr<TestNode> impl = WTF::getPtr(proxyImpl->locationWithPerWorldBindings(
)); | 3174 TestNode* impl = WTF::getPtr(proxyImpl->locationWithPerWorldBindings()); |
| 3175 if (!impl) | 3175 if (!impl) |
| 3176 return; | 3176 return; |
| 3177 V8StringResource<> cppValue = v8Value; | 3177 V8StringResource<> cppValue = v8Value; |
| 3178 if (!cppValue.prepare()) | 3178 if (!cppValue.prepare()) |
| 3179 return; | 3179 return; |
| 3180 impl->setHref(cppValue); | 3180 impl->setHref(cppValue); |
| 3181 } | 3181 } |
| 3182 | 3182 |
| 3183 static void locationWithPerWorldBindingsAttributeSetterCallbackForMainWorld(cons
t v8::FunctionCallbackInfo<v8::Value>& info) | 3183 static void locationWithPerWorldBindingsAttributeSetterCallbackForMainWorld(cons
t v8::FunctionCallbackInfo<v8::Value>& info) |
| 3184 { | 3184 { |
| (...skipping 10 matching lines...) Expand all Loading... |
| 3195 | 3195 |
| 3196 static void locationLegacyInterfaceTypeCheckingAttributeGetterCallback(const v8:
:FunctionCallbackInfo<v8::Value>& info) | 3196 static void locationLegacyInterfaceTypeCheckingAttributeGetterCallback(const v8:
:FunctionCallbackInfo<v8::Value>& info) |
| 3197 { | 3197 { |
| 3198 TestObjectV8Internal::locationLegacyInterfaceTypeCheckingAttributeGetter(inf
o); | 3198 TestObjectV8Internal::locationLegacyInterfaceTypeCheckingAttributeGetter(inf
o); |
| 3199 } | 3199 } |
| 3200 | 3200 |
| 3201 static void locationLegacyInterfaceTypeCheckingAttributeSetter(v8::Local<v8::Val
ue> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) | 3201 static void locationLegacyInterfaceTypeCheckingAttributeSetter(v8::Local<v8::Val
ue> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
| 3202 { | 3202 { |
| 3203 v8::Local<v8::Object> holder = info.Holder(); | 3203 v8::Local<v8::Object> holder = info.Holder(); |
| 3204 TestObject* proxyImpl = V8TestObject::toImpl(holder); | 3204 TestObject* proxyImpl = V8TestObject::toImpl(holder); |
| 3205 RawPtr<TestNode> impl = WTF::getPtr(proxyImpl->locationLegacyInterfaceTypeCh
ecking()); | 3205 TestNode* impl = WTF::getPtr(proxyImpl->locationLegacyInterfaceTypeChecking(
)); |
| 3206 if (!impl) | 3206 if (!impl) |
| 3207 return; | 3207 return; |
| 3208 V8StringResource<> cppValue = v8Value; | 3208 V8StringResource<> cppValue = v8Value; |
| 3209 if (!cppValue.prepare()) | 3209 if (!cppValue.prepare()) |
| 3210 return; | 3210 return; |
| 3211 impl->setHref(cppValue); | 3211 impl->setHref(cppValue); |
| 3212 } | 3212 } |
| 3213 | 3213 |
| 3214 static void locationLegacyInterfaceTypeCheckingAttributeSetterCallback(const v8:
:FunctionCallbackInfo<v8::Value>& info) | 3214 static void locationLegacyInterfaceTypeCheckingAttributeSetterCallback(const v8:
:FunctionCallbackInfo<v8::Value>& info) |
| 3215 { | 3215 { |
| 3216 v8::Local<v8::Value> v8Value = info[0]; | 3216 v8::Local<v8::Value> v8Value = info[0]; |
| 3217 TestObjectV8Internal::locationLegacyInterfaceTypeCheckingAttributeSetter(v8V
alue, info); | 3217 TestObjectV8Internal::locationLegacyInterfaceTypeCheckingAttributeSetter(v8V
alue, info); |
| 3218 } | 3218 } |
| 3219 | 3219 |
| 3220 static void locationGarbageCollectedAttributeGetter(const v8::FunctionCallbackIn
fo<v8::Value>& info) | 3220 static void locationGarbageCollectedAttributeGetter(const v8::FunctionCallbackIn
fo<v8::Value>& info) |
| 3221 { | 3221 { |
| 3222 v8::Local<v8::Object> holder = info.Holder(); | 3222 v8::Local<v8::Object> holder = info.Holder(); |
| 3223 TestObject* impl = V8TestObject::toImpl(holder); | 3223 TestObject* impl = V8TestObject::toImpl(holder); |
| 3224 RawPtr<TestInterfaceGarbageCollected> cppValue(impl->locationGarbageCollecte
d()); | 3224 TestInterfaceGarbageCollected* cppValue(WTF::getPtr(impl->locationGarbageCol
lected())); |
| 3225 if (cppValue && DOMDataStore::setReturnValue(info.GetReturnValue(), cppValue
.get())) | 3225 if (cppValue && DOMDataStore::setReturnValue(info.GetReturnValue(), cppValue
)) |
| 3226 return; | 3226 return; |
| 3227 v8::Local<v8::Value> v8Value(toV8(cppValue.get(), holder, info.GetIsolate())
); | 3227 v8::Local<v8::Value> v8Value(toV8(cppValue, holder, info.GetIsolate())); |
| 3228 if (!v8Value.IsEmpty()) { | 3228 if (!v8Value.IsEmpty()) { |
| 3229 V8HiddenValue::setHiddenValue(ScriptState::current(info.GetIsolate()), h
older, v8AtomicString(info.GetIsolate(), "locationGarbageCollected"), v8Value); | 3229 V8HiddenValue::setHiddenValue(ScriptState::current(info.GetIsolate()), h
older, v8AtomicString(info.GetIsolate(), "locationGarbageCollected"), v8Value); |
| 3230 v8SetReturnValue(info, v8Value); | 3230 v8SetReturnValue(info, v8Value); |
| 3231 } | 3231 } |
| 3232 } | 3232 } |
| 3233 | 3233 |
| 3234 static void locationGarbageCollectedAttributeGetterCallback(const v8::FunctionCa
llbackInfo<v8::Value>& info) | 3234 static void locationGarbageCollectedAttributeGetterCallback(const v8::FunctionCa
llbackInfo<v8::Value>& info) |
| 3235 { | 3235 { |
| 3236 TestObjectV8Internal::locationGarbageCollectedAttributeGetter(info); | 3236 TestObjectV8Internal::locationGarbageCollectedAttributeGetter(info); |
| 3237 } | 3237 } |
| 3238 | 3238 |
| 3239 static void locationGarbageCollectedAttributeSetter(v8::Local<v8::Value> v8Value
, const v8::FunctionCallbackInfo<v8::Value>& info) | 3239 static void locationGarbageCollectedAttributeSetter(v8::Local<v8::Value> v8Value
, const v8::FunctionCallbackInfo<v8::Value>& info) |
| 3240 { | 3240 { |
| 3241 v8::Local<v8::Object> holder = info.Holder(); | 3241 v8::Local<v8::Object> holder = info.Holder(); |
| 3242 ExceptionState exceptionState(ExceptionState::SetterContext, "locationGarbag
eCollected", "TestObject", holder, info.GetIsolate()); | 3242 ExceptionState exceptionState(ExceptionState::SetterContext, "locationGarbag
eCollected", "TestObject", holder, info.GetIsolate()); |
| 3243 TestObject* proxyImpl = V8TestObject::toImpl(holder); | 3243 TestObject* proxyImpl = V8TestObject::toImpl(holder); |
| 3244 RawPtr<TestInterfaceGarbageCollected> impl = WTF::getPtr(proxyImpl->location
GarbageCollected()); | 3244 TestInterfaceGarbageCollected* impl = WTF::getPtr(proxyImpl->locationGarbage
Collected()); |
| 3245 if (!impl) | 3245 if (!impl) |
| 3246 return; | 3246 return; |
| 3247 TestInterfaceGarbageCollected* cppValue = V8TestInterfaceGarbageCollected::t
oImplWithTypeCheck(info.GetIsolate(), v8Value); | 3247 TestInterfaceGarbageCollected* cppValue = V8TestInterfaceGarbageCollected::t
oImplWithTypeCheck(info.GetIsolate(), v8Value); |
| 3248 if (!cppValue) { | 3248 if (!cppValue) { |
| 3249 exceptionState.throwTypeError("The provided value is not of type 'TestIn
terfaceGarbageCollected'."); | 3249 exceptionState.throwTypeError("The provided value is not of type 'TestIn
terfaceGarbageCollected'."); |
| 3250 exceptionState.throwIfNeeded(); | 3250 exceptionState.throwIfNeeded(); |
| 3251 return; | 3251 return; |
| 3252 } | 3252 } |
| 3253 impl->setAttr1(WTF::getPtr(cppValue)); | 3253 impl->setAttr1(cppValue); |
| 3254 } | 3254 } |
| 3255 | 3255 |
| 3256 static void locationGarbageCollectedAttributeSetterCallback(const v8::FunctionCa
llbackInfo<v8::Value>& info) | 3256 static void locationGarbageCollectedAttributeSetterCallback(const v8::FunctionCa
llbackInfo<v8::Value>& info) |
| 3257 { | 3257 { |
| 3258 v8::Local<v8::Value> v8Value = info[0]; | 3258 v8::Local<v8::Value> v8Value = info[0]; |
| 3259 TestObjectV8Internal::locationGarbageCollectedAttributeSetter(v8Value, info)
; | 3259 TestObjectV8Internal::locationGarbageCollectedAttributeSetter(v8Value, info)
; |
| 3260 } | 3260 } |
| 3261 | 3261 |
| 3262 static void raisesExceptionLongAttributeAttributeGetter(const v8::FunctionCallba
ckInfo<v8::Value>& info) | 3262 static void raisesExceptionLongAttributeAttributeGetter(const v8::FunctionCallba
ckInfo<v8::Value>& info) |
| 3263 { | 3263 { |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3354 { | 3354 { |
| 3355 v8::Local<v8::Value> v8Value = info[0]; | 3355 v8::Local<v8::Value> v8Value = info[0]; |
| 3356 TestObjectV8Internal::setterRaisesExceptionLongAttributeAttributeSetter(v8Va
lue, info); | 3356 TestObjectV8Internal::setterRaisesExceptionLongAttributeAttributeSetter(v8Va
lue, info); |
| 3357 } | 3357 } |
| 3358 | 3358 |
| 3359 static void raisesExceptionTestInterfaceEmptyAttributeAttributeGetter(const v8::
FunctionCallbackInfo<v8::Value>& info) | 3359 static void raisesExceptionTestInterfaceEmptyAttributeAttributeGetter(const v8::
FunctionCallbackInfo<v8::Value>& info) |
| 3360 { | 3360 { |
| 3361 v8::Local<v8::Object> holder = info.Holder(); | 3361 v8::Local<v8::Object> holder = info.Holder(); |
| 3362 TestObject* impl = V8TestObject::toImpl(holder); | 3362 TestObject* impl = V8TestObject::toImpl(holder); |
| 3363 ExceptionState exceptionState(ExceptionState::GetterContext, "raisesExceptio
nTestInterfaceEmptyAttribute", "TestObject", holder, info.GetIsolate()); | 3363 ExceptionState exceptionState(ExceptionState::GetterContext, "raisesExceptio
nTestInterfaceEmptyAttribute", "TestObject", holder, info.GetIsolate()); |
| 3364 RefPtr<TestInterfaceEmpty> cppValue(impl->raisesExceptionTestInterfaceEmptyA
ttribute(exceptionState)); | 3364 TestInterfaceEmpty* cppValue(impl->raisesExceptionTestInterfaceEmptyAttribut
e(exceptionState)); |
| 3365 if (UNLIKELY(exceptionState.throwIfNeeded())) | 3365 if (UNLIKELY(exceptionState.throwIfNeeded())) |
| 3366 return; | 3366 return; |
| 3367 v8SetReturnValueFast(info, WTF::getPtr(cppValue.release()), impl); | 3367 v8SetReturnValueFast(info, cppValue, impl); |
| 3368 } | 3368 } |
| 3369 | 3369 |
| 3370 static void raisesExceptionTestInterfaceEmptyAttributeAttributeGetterCallback(co
nst v8::FunctionCallbackInfo<v8::Value>& info) | 3370 static void raisesExceptionTestInterfaceEmptyAttributeAttributeGetterCallback(co
nst v8::FunctionCallbackInfo<v8::Value>& info) |
| 3371 { | 3371 { |
| 3372 TestObjectV8Internal::raisesExceptionTestInterfaceEmptyAttributeAttributeGet
ter(info); | 3372 TestObjectV8Internal::raisesExceptionTestInterfaceEmptyAttributeAttributeGet
ter(info); |
| 3373 } | 3373 } |
| 3374 | 3374 |
| 3375 static void raisesExceptionTestInterfaceEmptyAttributeAttributeSetter(v8::Local<
v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) | 3375 static void raisesExceptionTestInterfaceEmptyAttributeAttributeSetter(v8::Local<
v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
| 3376 { | 3376 { |
| 3377 v8::Local<v8::Object> holder = info.Holder(); | 3377 v8::Local<v8::Object> holder = info.Holder(); |
| 3378 ExceptionState exceptionState(ExceptionState::SetterContext, "raisesExceptio
nTestInterfaceEmptyAttribute", "TestObject", holder, info.GetIsolate()); | 3378 ExceptionState exceptionState(ExceptionState::SetterContext, "raisesExceptio
nTestInterfaceEmptyAttribute", "TestObject", holder, info.GetIsolate()); |
| 3379 TestObject* impl = V8TestObject::toImpl(holder); | 3379 TestObject* impl = V8TestObject::toImpl(holder); |
| 3380 TestInterfaceEmpty* cppValue = V8TestInterfaceEmpty::toImplWithTypeCheck(inf
o.GetIsolate(), v8Value); | 3380 TestInterfaceEmpty* cppValue = V8TestInterfaceEmpty::toImplWithTypeCheck(inf
o.GetIsolate(), v8Value); |
| 3381 if (!cppValue) { | 3381 if (!cppValue) { |
| 3382 exceptionState.throwTypeError("The provided value is not of type 'TestIn
terfaceEmpty'."); | 3382 exceptionState.throwTypeError("The provided value is not of type 'TestIn
terfaceEmpty'."); |
| 3383 exceptionState.throwIfNeeded(); | 3383 exceptionState.throwIfNeeded(); |
| 3384 return; | 3384 return; |
| 3385 } | 3385 } |
| 3386 impl->setRaisesExceptionTestInterfaceEmptyAttribute(WTF::getPtr(cppValue), e
xceptionState); | 3386 impl->setRaisesExceptionTestInterfaceEmptyAttribute(cppValue, exceptionState
); |
| 3387 exceptionState.throwIfNeeded(); | 3387 exceptionState.throwIfNeeded(); |
| 3388 } | 3388 } |
| 3389 | 3389 |
| 3390 static void raisesExceptionTestInterfaceEmptyAttributeAttributeSetterCallback(co
nst v8::FunctionCallbackInfo<v8::Value>& info) | 3390 static void raisesExceptionTestInterfaceEmptyAttributeAttributeSetterCallback(co
nst v8::FunctionCallbackInfo<v8::Value>& info) |
| 3391 { | 3391 { |
| 3392 v8::Local<v8::Value> v8Value = info[0]; | 3392 v8::Local<v8::Value> v8Value = info[0]; |
| 3393 TestObjectV8Internal::raisesExceptionTestInterfaceEmptyAttributeAttributeSet
ter(v8Value, info); | 3393 TestObjectV8Internal::raisesExceptionTestInterfaceEmptyAttributeAttributeSet
ter(v8Value, info); |
| 3394 } | 3394 } |
| 3395 | 3395 |
| 3396 static void cachedAttributeRaisesExceptionGetterAnyAttributeAttributeGetter(cons
t v8::FunctionCallbackInfo<v8::Value>& info) | 3396 static void cachedAttributeRaisesExceptionGetterAnyAttributeAttributeGetter(cons
t v8::FunctionCallbackInfo<v8::Value>& info) |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3433 static void cachedAttributeRaisesExceptionGetterAnyAttributeAttributeSetterCallb
ack(const v8::FunctionCallbackInfo<v8::Value>& info) | 3433 static void cachedAttributeRaisesExceptionGetterAnyAttributeAttributeSetterCallb
ack(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 3434 { | 3434 { |
| 3435 v8::Local<v8::Value> v8Value = info[0]; | 3435 v8::Local<v8::Value> v8Value = info[0]; |
| 3436 TestObjectV8Internal::cachedAttributeRaisesExceptionGetterAnyAttributeAttrib
uteSetter(v8Value, info); | 3436 TestObjectV8Internal::cachedAttributeRaisesExceptionGetterAnyAttributeAttrib
uteSetter(v8Value, info); |
| 3437 } | 3437 } |
| 3438 | 3438 |
| 3439 static void reflectTestInterfaceAttributeAttributeGetter(const v8::FunctionCallb
ackInfo<v8::Value>& info) | 3439 static void reflectTestInterfaceAttributeAttributeGetter(const v8::FunctionCallb
ackInfo<v8::Value>& info) |
| 3440 { | 3440 { |
| 3441 v8::Local<v8::Object> holder = info.Holder(); | 3441 v8::Local<v8::Object> holder = info.Holder(); |
| 3442 TestObject* impl = V8TestObject::toImpl(holder); | 3442 TestObject* impl = V8TestObject::toImpl(holder); |
| 3443 v8SetReturnValueFast(info, WTF::getPtr(impl->fastGetAttribute(HTMLNames::ref
lecttestinterfaceattributeAttr)), impl); | 3443 v8SetReturnValueFast(info, impl->fastGetAttribute(HTMLNames::reflecttestinte
rfaceattributeAttr), impl); |
| 3444 } | 3444 } |
| 3445 | 3445 |
| 3446 static void reflectTestInterfaceAttributeAttributeGetterCallback(const v8::Funct
ionCallbackInfo<v8::Value>& info) | 3446 static void reflectTestInterfaceAttributeAttributeGetterCallback(const v8::Funct
ionCallbackInfo<v8::Value>& info) |
| 3447 { | 3447 { |
| 3448 TestObjectV8Internal::reflectTestInterfaceAttributeAttributeGetter(info); | 3448 TestObjectV8Internal::reflectTestInterfaceAttributeAttributeGetter(info); |
| 3449 } | 3449 } |
| 3450 | 3450 |
| 3451 static void reflectTestInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8
Value, const v8::FunctionCallbackInfo<v8::Value>& info) | 3451 static void reflectTestInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8
Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
| 3452 { | 3452 { |
| 3453 v8::Local<v8::Object> holder = info.Holder(); | 3453 v8::Local<v8::Object> holder = info.Holder(); |
| 3454 ExceptionState exceptionState(ExceptionState::SetterContext, "reflectTestInt
erfaceAttribute", "TestObject", holder, info.GetIsolate()); | 3454 ExceptionState exceptionState(ExceptionState::SetterContext, "reflectTestInt
erfaceAttribute", "TestObject", holder, info.GetIsolate()); |
| 3455 TestObject* impl = V8TestObject::toImpl(holder); | 3455 TestObject* impl = V8TestObject::toImpl(holder); |
| 3456 TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck
(info.GetIsolate(), v8Value); | 3456 TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck
(info.GetIsolate(), v8Value); |
| 3457 if (!cppValue) { | 3457 if (!cppValue) { |
| 3458 exceptionState.throwTypeError("The provided value is not of type 'TestIn
terface'."); | 3458 exceptionState.throwTypeError("The provided value is not of type 'TestIn
terface'."); |
| 3459 exceptionState.throwIfNeeded(); | 3459 exceptionState.throwIfNeeded(); |
| 3460 return; | 3460 return; |
| 3461 } | 3461 } |
| 3462 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3462 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 3463 impl->setAttribute(HTMLNames::reflecttestinterfaceattributeAttr, WTF::getPtr
(cppValue)); | 3463 impl->setAttribute(HTMLNames::reflecttestinterfaceattributeAttr, cppValue); |
| 3464 } | 3464 } |
| 3465 | 3465 |
| 3466 static void reflectTestInterfaceAttributeAttributeSetterCallback(const v8::Funct
ionCallbackInfo<v8::Value>& info) | 3466 static void reflectTestInterfaceAttributeAttributeSetterCallback(const v8::Funct
ionCallbackInfo<v8::Value>& info) |
| 3467 { | 3467 { |
| 3468 v8::Local<v8::Value> v8Value = info[0]; | 3468 v8::Local<v8::Value> v8Value = info[0]; |
| 3469 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3469 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 3470 TestObjectV8Internal::reflectTestInterfaceAttributeAttributeSetter(v8Value,
info); | 3470 TestObjectV8Internal::reflectTestInterfaceAttributeAttributeSetter(v8Value,
info); |
| 3471 } | 3471 } |
| 3472 | 3472 |
| 3473 static void reflectReflectedNameAttributeTestAttributeAttributeGetter(const v8::
FunctionCallbackInfo<v8::Value>& info) | 3473 static void reflectReflectedNameAttributeTestAttributeAttributeGetter(const v8::
FunctionCallbackInfo<v8::Value>& info) |
| 3474 { | 3474 { |
| 3475 v8::Local<v8::Object> holder = info.Holder(); | 3475 v8::Local<v8::Object> holder = info.Holder(); |
| 3476 TestObject* impl = V8TestObject::toImpl(holder); | 3476 TestObject* impl = V8TestObject::toImpl(holder); |
| 3477 v8SetReturnValueFast(info, WTF::getPtr(impl->fastGetAttribute(HTMLNames::ref
lectedNameAttributeAttr)), impl); | 3477 v8SetReturnValueFast(info, impl->fastGetAttribute(HTMLNames::reflectedNameAt
tributeAttr), impl); |
| 3478 } | 3478 } |
| 3479 | 3479 |
| 3480 static void reflectReflectedNameAttributeTestAttributeAttributeGetterCallback(co
nst v8::FunctionCallbackInfo<v8::Value>& info) | 3480 static void reflectReflectedNameAttributeTestAttributeAttributeGetterCallback(co
nst v8::FunctionCallbackInfo<v8::Value>& info) |
| 3481 { | 3481 { |
| 3482 TestObjectV8Internal::reflectReflectedNameAttributeTestAttributeAttributeGet
ter(info); | 3482 TestObjectV8Internal::reflectReflectedNameAttributeTestAttributeAttributeGet
ter(info); |
| 3483 } | 3483 } |
| 3484 | 3484 |
| 3485 static void reflectReflectedNameAttributeTestAttributeAttributeSetter(v8::Local<
v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) | 3485 static void reflectReflectedNameAttributeTestAttributeAttributeSetter(v8::Local<
v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
| 3486 { | 3486 { |
| 3487 v8::Local<v8::Object> holder = info.Holder(); | 3487 v8::Local<v8::Object> holder = info.Holder(); |
| 3488 ExceptionState exceptionState(ExceptionState::SetterContext, "reflectReflect
edNameAttributeTestAttribute", "TestObject", holder, info.GetIsolate()); | 3488 ExceptionState exceptionState(ExceptionState::SetterContext, "reflectReflect
edNameAttributeTestAttribute", "TestObject", holder, info.GetIsolate()); |
| 3489 TestObject* impl = V8TestObject::toImpl(holder); | 3489 TestObject* impl = V8TestObject::toImpl(holder); |
| 3490 TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck
(info.GetIsolate(), v8Value); | 3490 TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck
(info.GetIsolate(), v8Value); |
| 3491 if (!cppValue) { | 3491 if (!cppValue) { |
| 3492 exceptionState.throwTypeError("The provided value is not of type 'TestIn
terface'."); | 3492 exceptionState.throwTypeError("The provided value is not of type 'TestIn
terface'."); |
| 3493 exceptionState.throwIfNeeded(); | 3493 exceptionState.throwIfNeeded(); |
| 3494 return; | 3494 return; |
| 3495 } | 3495 } |
| 3496 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3496 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 3497 impl->setAttribute(HTMLNames::reflectedNameAttributeAttr, WTF::getPtr(cppVal
ue)); | 3497 impl->setAttribute(HTMLNames::reflectedNameAttributeAttr, cppValue); |
| 3498 } | 3498 } |
| 3499 | 3499 |
| 3500 static void reflectReflectedNameAttributeTestAttributeAttributeSetterCallback(co
nst v8::FunctionCallbackInfo<v8::Value>& info) | 3500 static void reflectReflectedNameAttributeTestAttributeAttributeSetterCallback(co
nst v8::FunctionCallbackInfo<v8::Value>& info) |
| 3501 { | 3501 { |
| 3502 v8::Local<v8::Value> v8Value = info[0]; | 3502 v8::Local<v8::Value> v8Value = info[0]; |
| 3503 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3503 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 3504 TestObjectV8Internal::reflectReflectedNameAttributeTestAttributeAttributeSet
ter(v8Value, info); | 3504 TestObjectV8Internal::reflectReflectedNameAttributeTestAttributeAttributeSet
ter(v8Value, info); |
| 3505 } | 3505 } |
| 3506 | 3506 |
| 3507 static void reflectBooleanAttributeAttributeGetter(const v8::FunctionCallbackInf
o<v8::Value>& info) | 3507 static void reflectBooleanAttributeAttributeGetter(const v8::FunctionCallbackInf
o<v8::Value>& info) |
| (...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4095 | 4095 |
| 4096 static void locationPutForwardsAttributeGetterCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) | 4096 static void locationPutForwardsAttributeGetterCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) |
| 4097 { | 4097 { |
| 4098 TestObjectV8Internal::locationPutForwardsAttributeGetter(info); | 4098 TestObjectV8Internal::locationPutForwardsAttributeGetter(info); |
| 4099 } | 4099 } |
| 4100 | 4100 |
| 4101 static void locationPutForwardsAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::FunctionCallbackInfo<v8::Value>& info) | 4101 static void locationPutForwardsAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::FunctionCallbackInfo<v8::Value>& info) |
| 4102 { | 4102 { |
| 4103 v8::Local<v8::Object> holder = info.Holder(); | 4103 v8::Local<v8::Object> holder = info.Holder(); |
| 4104 TestObject* proxyImpl = V8TestObject::toImpl(holder); | 4104 TestObject* proxyImpl = V8TestObject::toImpl(holder); |
| 4105 RawPtr<TestNode> impl = WTF::getPtr(proxyImpl->locationPutForwards()); | 4105 TestNode* impl = WTF::getPtr(proxyImpl->locationPutForwards()); |
| 4106 if (!impl) | 4106 if (!impl) |
| 4107 return; | 4107 return; |
| 4108 V8StringResource<> cppValue = v8Value; | 4108 V8StringResource<> cppValue = v8Value; |
| 4109 if (!cppValue.prepare()) | 4109 if (!cppValue.prepare()) |
| 4110 return; | 4110 return; |
| 4111 impl->setHref(cppValue); | 4111 impl->setHref(cppValue); |
| 4112 } | 4112 } |
| 4113 | 4113 |
| 4114 static void locationPutForwardsAttributeSetterCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) | 4114 static void locationPutForwardsAttributeSetterCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) |
| 4115 { | 4115 { |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4298 static void legacyInterfaceTypeCheckingTestInterfaceAttributeAttributeGetterCall
back(const v8::FunctionCallbackInfo<v8::Value>& info) | 4298 static void legacyInterfaceTypeCheckingTestInterfaceAttributeAttributeGetterCall
back(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 4299 { | 4299 { |
| 4300 TestObjectV8Internal::legacyInterfaceTypeCheckingTestInterfaceAttributeAttri
buteGetter(info); | 4300 TestObjectV8Internal::legacyInterfaceTypeCheckingTestInterfaceAttributeAttri
buteGetter(info); |
| 4301 } | 4301 } |
| 4302 | 4302 |
| 4303 static void legacyInterfaceTypeCheckingTestInterfaceAttributeAttributeSetter(v8:
:Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) | 4303 static void legacyInterfaceTypeCheckingTestInterfaceAttributeAttributeSetter(v8:
:Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
| 4304 { | 4304 { |
| 4305 v8::Local<v8::Object> holder = info.Holder(); | 4305 v8::Local<v8::Object> holder = info.Holder(); |
| 4306 TestObject* impl = V8TestObject::toImpl(holder); | 4306 TestObject* impl = V8TestObject::toImpl(holder); |
| 4307 TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck
(info.GetIsolate(), v8Value); | 4307 TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck
(info.GetIsolate(), v8Value); |
| 4308 impl->setLegacyInterfaceTypeCheckingTestInterfaceAttribute(WTF::getPtr(cppVa
lue)); | 4308 impl->setLegacyInterfaceTypeCheckingTestInterfaceAttribute(cppValue); |
| 4309 } | 4309 } |
| 4310 | 4310 |
| 4311 static void legacyInterfaceTypeCheckingTestInterfaceAttributeAttributeSetterCall
back(const v8::FunctionCallbackInfo<v8::Value>& info) | 4311 static void legacyInterfaceTypeCheckingTestInterfaceAttributeAttributeSetterCall
back(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 4312 { | 4312 { |
| 4313 v8::Local<v8::Value> v8Value = info[0]; | 4313 v8::Local<v8::Value> v8Value = info[0]; |
| 4314 TestObjectV8Internal::legacyInterfaceTypeCheckingTestInterfaceAttributeAttri
buteSetter(v8Value, info); | 4314 TestObjectV8Internal::legacyInterfaceTypeCheckingTestInterfaceAttributeAttri
buteSetter(v8Value, info); |
| 4315 } | 4315 } |
| 4316 | 4316 |
| 4317 static void legacyInterfaceTypeCheckingTestInterfaceOrNullAttributeAttributeGett
er(const v8::FunctionCallbackInfo<v8::Value>& info) | 4317 static void legacyInterfaceTypeCheckingTestInterfaceOrNullAttributeAttributeGett
er(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 4318 { | 4318 { |
| 4319 v8::Local<v8::Object> holder = info.Holder(); | 4319 v8::Local<v8::Object> holder = info.Holder(); |
| 4320 TestObject* impl = V8TestObject::toImpl(holder); | 4320 TestObject* impl = V8TestObject::toImpl(holder); |
| 4321 v8SetReturnValueFast(info, WTF::getPtr(impl->legacyInterfaceTypeCheckingTest
InterfaceOrNullAttribute()), impl); | 4321 v8SetReturnValueFast(info, WTF::getPtr(impl->legacyInterfaceTypeCheckingTest
InterfaceOrNullAttribute()), impl); |
| 4322 } | 4322 } |
| 4323 | 4323 |
| 4324 static void legacyInterfaceTypeCheckingTestInterfaceOrNullAttributeAttributeGett
erCallback(const v8::FunctionCallbackInfo<v8::Value>& info) | 4324 static void legacyInterfaceTypeCheckingTestInterfaceOrNullAttributeAttributeGett
erCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 4325 { | 4325 { |
| 4326 TestObjectV8Internal::legacyInterfaceTypeCheckingTestInterfaceOrNullAttribut
eAttributeGetter(info); | 4326 TestObjectV8Internal::legacyInterfaceTypeCheckingTestInterfaceOrNullAttribut
eAttributeGetter(info); |
| 4327 } | 4327 } |
| 4328 | 4328 |
| 4329 static void legacyInterfaceTypeCheckingTestInterfaceOrNullAttributeAttributeSett
er(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info
) | 4329 static void legacyInterfaceTypeCheckingTestInterfaceOrNullAttributeAttributeSett
er(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info
) |
| 4330 { | 4330 { |
| 4331 v8::Local<v8::Object> holder = info.Holder(); | 4331 v8::Local<v8::Object> holder = info.Holder(); |
| 4332 TestObject* impl = V8TestObject::toImpl(holder); | 4332 TestObject* impl = V8TestObject::toImpl(holder); |
| 4333 TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck
(info.GetIsolate(), v8Value); | 4333 TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck
(info.GetIsolate(), v8Value); |
| 4334 impl->setLegacyInterfaceTypeCheckingTestInterfaceOrNullAttribute(WTF::getPtr
(cppValue)); | 4334 impl->setLegacyInterfaceTypeCheckingTestInterfaceOrNullAttribute(cppValue); |
| 4335 } | 4335 } |
| 4336 | 4336 |
| 4337 static void legacyInterfaceTypeCheckingTestInterfaceOrNullAttributeAttributeSett
erCallback(const v8::FunctionCallbackInfo<v8::Value>& info) | 4337 static void legacyInterfaceTypeCheckingTestInterfaceOrNullAttributeAttributeSett
erCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 4338 { | 4338 { |
| 4339 v8::Local<v8::Value> v8Value = info[0]; | 4339 v8::Local<v8::Value> v8Value = info[0]; |
| 4340 TestObjectV8Internal::legacyInterfaceTypeCheckingTestInterfaceOrNullAttribut
eAttributeSetter(v8Value, info); | 4340 TestObjectV8Internal::legacyInterfaceTypeCheckingTestInterfaceOrNullAttribut
eAttributeSetter(v8Value, info); |
| 4341 } | 4341 } |
| 4342 | 4342 |
| 4343 static void urlStringAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8:
:Value>& info) | 4343 static void urlStringAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
| 4344 { | 4344 { |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4476 { | 4476 { |
| 4477 v8::Local<v8::Object> holder = info.Holder(); | 4477 v8::Local<v8::Object> holder = info.Holder(); |
| 4478 ExceptionState exceptionState(ExceptionState::SetterContext, "sameObjectAttr
ibute", "TestObject", holder, info.GetIsolate()); | 4478 ExceptionState exceptionState(ExceptionState::SetterContext, "sameObjectAttr
ibute", "TestObject", holder, info.GetIsolate()); |
| 4479 TestObject* impl = V8TestObject::toImpl(holder); | 4479 TestObject* impl = V8TestObject::toImpl(holder); |
| 4480 TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck
(info.GetIsolate(), v8Value); | 4480 TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck
(info.GetIsolate(), v8Value); |
| 4481 if (!cppValue) { | 4481 if (!cppValue) { |
| 4482 exceptionState.throwTypeError("The provided value is not of type 'TestIn
terface'."); | 4482 exceptionState.throwTypeError("The provided value is not of type 'TestIn
terface'."); |
| 4483 exceptionState.throwIfNeeded(); | 4483 exceptionState.throwIfNeeded(); |
| 4484 return; | 4484 return; |
| 4485 } | 4485 } |
| 4486 impl->setSameObjectAttribute(WTF::getPtr(cppValue)); | 4486 impl->setSameObjectAttribute(cppValue); |
| 4487 } | 4487 } |
| 4488 | 4488 |
| 4489 static void sameObjectAttributeAttributeSetterCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) | 4489 static void sameObjectAttributeAttributeSetterCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) |
| 4490 { | 4490 { |
| 4491 v8::Local<v8::Value> v8Value = info[0]; | 4491 v8::Local<v8::Value> v8Value = info[0]; |
| 4492 TestObjectV8Internal::sameObjectAttributeAttributeSetter(v8Value, info); | 4492 TestObjectV8Internal::sameObjectAttributeAttributeSetter(v8Value, info); |
| 4493 } | 4493 } |
| 4494 | 4494 |
| 4495 static void unscopeableLongAttributeAttributeGetter(const v8::FunctionCallbackIn
fo<v8::Value>& info) | 4495 static void unscopeableLongAttributeAttributeGetter(const v8::FunctionCallbackIn
fo<v8::Value>& info) |
| 4496 { | 4496 { |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4613 { | 4613 { |
| 4614 v8::Local<v8::Object> holder = info.Holder(); | 4614 v8::Local<v8::Object> holder = info.Holder(); |
| 4615 ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceA
ttribute", "TestObject", holder, info.GetIsolate()); | 4615 ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceA
ttribute", "TestObject", holder, info.GetIsolate()); |
| 4616 TestObject* impl = V8TestObject::toImpl(holder); | 4616 TestObject* impl = V8TestObject::toImpl(holder); |
| 4617 TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck
(info.GetIsolate(), v8Value); | 4617 TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck
(info.GetIsolate(), v8Value); |
| 4618 if (!cppValue) { | 4618 if (!cppValue) { |
| 4619 exceptionState.throwTypeError("The provided value is not of type 'TestIn
terface'."); | 4619 exceptionState.throwTypeError("The provided value is not of type 'TestIn
terface'."); |
| 4620 exceptionState.throwIfNeeded(); | 4620 exceptionState.throwIfNeeded(); |
| 4621 return; | 4621 return; |
| 4622 } | 4622 } |
| 4623 impl->setTestInterfaceAttribute(WTF::getPtr(cppValue)); | 4623 impl->setTestInterfaceAttribute(cppValue); |
| 4624 } | 4624 } |
| 4625 | 4625 |
| 4626 static void testInterfaceAttributeAttributeSetterCallback(const v8::FunctionCall
backInfo<v8::Value>& info) | 4626 static void testInterfaceAttributeAttributeSetterCallback(const v8::FunctionCall
backInfo<v8::Value>& info) |
| 4627 { | 4627 { |
| 4628 v8::Local<v8::Value> v8Value = info[0]; | 4628 v8::Local<v8::Value> v8Value = info[0]; |
| 4629 TestObjectV8Internal::testInterfaceAttributeAttributeSetter(v8Value, info); | 4629 TestObjectV8Internal::testInterfaceAttributeAttributeSetter(v8Value, info); |
| 4630 } | 4630 } |
| 4631 | 4631 |
| 4632 static void testInterfaceGarbageCollectedAttributeAttributeGetter(const v8::Func
tionCallbackInfo<v8::Value>& info) | 4632 static void testInterfaceGarbageCollectedAttributeAttributeGetter(const v8::Func
tionCallbackInfo<v8::Value>& info) |
| 4633 { | 4633 { |
| (...skipping 11 matching lines...) Expand all Loading... |
| 4645 { | 4645 { |
| 4646 v8::Local<v8::Object> holder = info.Holder(); | 4646 v8::Local<v8::Object> holder = info.Holder(); |
| 4647 ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceG
arbageCollectedAttribute", "TestObject", holder, info.GetIsolate()); | 4647 ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceG
arbageCollectedAttribute", "TestObject", holder, info.GetIsolate()); |
| 4648 TestObject* impl = V8TestObject::toImpl(holder); | 4648 TestObject* impl = V8TestObject::toImpl(holder); |
| 4649 TestInterfaceGarbageCollected* cppValue = V8TestInterfaceGarbageCollected::t
oImplWithTypeCheck(info.GetIsolate(), v8Value); | 4649 TestInterfaceGarbageCollected* cppValue = V8TestInterfaceGarbageCollected::t
oImplWithTypeCheck(info.GetIsolate(), v8Value); |
| 4650 if (!cppValue) { | 4650 if (!cppValue) { |
| 4651 exceptionState.throwTypeError("The provided value is not of type 'TestIn
terfaceGarbageCollected'."); | 4651 exceptionState.throwTypeError("The provided value is not of type 'TestIn
terfaceGarbageCollected'."); |
| 4652 exceptionState.throwIfNeeded(); | 4652 exceptionState.throwIfNeeded(); |
| 4653 return; | 4653 return; |
| 4654 } | 4654 } |
| 4655 impl->setTestInterfaceGarbageCollectedAttribute(WTF::getPtr(cppValue)); | 4655 impl->setTestInterfaceGarbageCollectedAttribute(cppValue); |
| 4656 } | 4656 } |
| 4657 | 4657 |
| 4658 static void testInterfaceGarbageCollectedAttributeAttributeSetterCallback(const
v8::FunctionCallbackInfo<v8::Value>& info) | 4658 static void testInterfaceGarbageCollectedAttributeAttributeSetterCallback(const
v8::FunctionCallbackInfo<v8::Value>& info) |
| 4659 { | 4659 { |
| 4660 v8::Local<v8::Value> v8Value = info[0]; | 4660 v8::Local<v8::Value> v8Value = info[0]; |
| 4661 TestObjectV8Internal::testInterfaceGarbageCollectedAttributeAttributeSetter(
v8Value, info); | 4661 TestObjectV8Internal::testInterfaceGarbageCollectedAttributeAttributeSetter(
v8Value, info); |
| 4662 } | 4662 } |
| 4663 | 4663 |
| 4664 static void testInterfaceGarbageCollectedOrNullAttributeAttributeGetter(const v8
::FunctionCallbackInfo<v8::Value>& info) | 4664 static void testInterfaceGarbageCollectedOrNullAttributeAttributeGetter(const v8
::FunctionCallbackInfo<v8::Value>& info) |
| 4665 { | 4665 { |
| (...skipping 11 matching lines...) Expand all Loading... |
| 4677 { | 4677 { |
| 4678 v8::Local<v8::Object> holder = info.Holder(); | 4678 v8::Local<v8::Object> holder = info.Holder(); |
| 4679 ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceG
arbageCollectedOrNullAttribute", "TestObject", holder, info.GetIsolate()); | 4679 ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceG
arbageCollectedOrNullAttribute", "TestObject", holder, info.GetIsolate()); |
| 4680 TestObject* impl = V8TestObject::toImpl(holder); | 4680 TestObject* impl = V8TestObject::toImpl(holder); |
| 4681 TestInterfaceGarbageCollected* cppValue = V8TestInterfaceGarbageCollected::t
oImplWithTypeCheck(info.GetIsolate(), v8Value); | 4681 TestInterfaceGarbageCollected* cppValue = V8TestInterfaceGarbageCollected::t
oImplWithTypeCheck(info.GetIsolate(), v8Value); |
| 4682 if (!cppValue && !isUndefinedOrNull(v8Value)) { | 4682 if (!cppValue && !isUndefinedOrNull(v8Value)) { |
| 4683 exceptionState.throwTypeError("The provided value is not of type 'TestIn
terfaceGarbageCollected'."); | 4683 exceptionState.throwTypeError("The provided value is not of type 'TestIn
terfaceGarbageCollected'."); |
| 4684 exceptionState.throwIfNeeded(); | 4684 exceptionState.throwIfNeeded(); |
| 4685 return; | 4685 return; |
| 4686 } | 4686 } |
| 4687 impl->setTestInterfaceGarbageCollectedOrNullAttribute(WTF::getPtr(cppValue))
; | 4687 impl->setTestInterfaceGarbageCollectedOrNullAttribute(cppValue); |
| 4688 } | 4688 } |
| 4689 | 4689 |
| 4690 static void testInterfaceGarbageCollectedOrNullAttributeAttributeSetterCallback(
const v8::FunctionCallbackInfo<v8::Value>& info) | 4690 static void testInterfaceGarbageCollectedOrNullAttributeAttributeSetterCallback(
const v8::FunctionCallbackInfo<v8::Value>& info) |
| 4691 { | 4691 { |
| 4692 v8::Local<v8::Value> v8Value = info[0]; | 4692 v8::Local<v8::Value> v8Value = info[0]; |
| 4693 TestObjectV8Internal::testInterfaceGarbageCollectedOrNullAttributeAttributeS
etter(v8Value, info); | 4693 TestObjectV8Internal::testInterfaceGarbageCollectedOrNullAttributeAttributeS
etter(v8Value, info); |
| 4694 } | 4694 } |
| 4695 | 4695 |
| 4696 static void readonlyShortAttributeAttributeGetter(const v8::FunctionCallbackInfo
<v8::Value>& info) | 4696 static void readonlyShortAttributeAttributeGetter(const v8::FunctionCallbackInfo
<v8::Value>& info) |
| 4697 { | 4697 { |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4768 static void stringAttributeAttributeSetterCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) | 4768 static void stringAttributeAttributeSetterCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) |
| 4769 { | 4769 { |
| 4770 v8::Local<v8::Value> v8Value = info[0]; | 4770 v8::Local<v8::Value> v8Value = info[0]; |
| 4771 TestObjectV8Internal::stringAttributeAttributeSetter(v8Value, info); | 4771 TestObjectV8Internal::stringAttributeAttributeSetter(v8Value, info); |
| 4772 } | 4772 } |
| 4773 | 4773 |
| 4774 static void nodeAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Valu
e>& info) | 4774 static void nodeAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Valu
e>& info) |
| 4775 { | 4775 { |
| 4776 v8::Local<v8::Object> holder = info.Holder(); | 4776 v8::Local<v8::Object> holder = info.Holder(); |
| 4777 TestObject* impl = V8TestObject::toImpl(holder); | 4777 TestObject* impl = V8TestObject::toImpl(holder); |
| 4778 RawPtr<Node> result = nullptr; | 4778 Node* result = nullptr; |
| 4779 if (!V8TestObject::PrivateScript::nodeAttributeAttributeGetter(toLocalFrame(
toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, &result)) | 4779 if (!V8TestObject::PrivateScript::nodeAttributeAttributeGetter(toLocalFrame(
toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, &result)) |
| 4780 return; | 4780 return; |
| 4781 v8SetReturnValueFast(info, WTF::getPtr(result.release()), impl); | 4781 v8SetReturnValueFast(info, result, impl); |
| 4782 } | 4782 } |
| 4783 | 4783 |
| 4784 static void nodeAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<
v8::Value>& info) | 4784 static void nodeAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<
v8::Value>& info) |
| 4785 { | 4785 { |
| 4786 TestObjectV8Internal::nodeAttributeAttributeGetter(info); | 4786 TestObjectV8Internal::nodeAttributeAttributeGetter(info); |
| 4787 } | 4787 } |
| 4788 | 4788 |
| 4789 static void nodeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8:
:FunctionCallbackInfo<v8::Value>& info) | 4789 static void nodeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8:
:FunctionCallbackInfo<v8::Value>& info) |
| 4790 { | 4790 { |
| 4791 v8::Local<v8::Object> holder = info.Holder(); | 4791 v8::Local<v8::Object> holder = info.Holder(); |
| (...skipping 1337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6129 | 6129 |
| 6130 static void voidMethodArrayTestInterfaceEmptyArgMethod(const v8::FunctionCallbac
kInfo<v8::Value>& info) | 6130 static void voidMethodArrayTestInterfaceEmptyArgMethod(const v8::FunctionCallbac
kInfo<v8::Value>& info) |
| 6131 { | 6131 { |
| 6132 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodA
rrayTestInterfaceEmptyArg", "TestObject", info.Holder(), info.GetIsolate()); | 6132 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodA
rrayTestInterfaceEmptyArg", "TestObject", info.Holder(), info.GetIsolate()); |
| 6133 if (UNLIKELY(info.Length() < 1)) { | 6133 if (UNLIKELY(info.Length() < 1)) { |
| 6134 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 6134 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| 6135 exceptionState.throwIfNeeded(); | 6135 exceptionState.throwIfNeeded(); |
| 6136 return; | 6136 return; |
| 6137 } | 6137 } |
| 6138 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 6138 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 6139 Vector<RefPtr<TestInterfaceEmpty>> arrayTestInterfaceEmptyArg; | 6139 HeapVector<Member<TestInterfaceEmpty>> arrayTestInterfaceEmptyArg; |
| 6140 { | 6140 { |
| 6141 arrayTestInterfaceEmptyArg = (toRefPtrNativeArray<TestInterfaceEmpty, V8
TestInterfaceEmpty>(info[0], 1, info.GetIsolate(), exceptionState)); | 6141 arrayTestInterfaceEmptyArg = (toMemberNativeArray<TestInterfaceEmpty, V8
TestInterfaceEmpty>(info[0], 1, info.GetIsolate(), exceptionState)); |
| 6142 if (exceptionState.throwIfNeeded()) | 6142 if (exceptionState.throwIfNeeded()) |
| 6143 return; | 6143 return; |
| 6144 } | 6144 } |
| 6145 impl->voidMethodArrayTestInterfaceEmptyArg(arrayTestInterfaceEmptyArg); | 6145 impl->voidMethodArrayTestInterfaceEmptyArg(arrayTestInterfaceEmptyArg); |
| 6146 } | 6146 } |
| 6147 | 6147 |
| 6148 static void voidMethodArrayTestInterfaceEmptyArgMethodCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) | 6148 static void voidMethodArrayTestInterfaceEmptyArgMethodCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) |
| 6149 { | 6149 { |
| 6150 TestObjectV8Internal::voidMethodArrayTestInterfaceEmptyArgMethod(info); | 6150 TestObjectV8Internal::voidMethodArrayTestInterfaceEmptyArgMethod(info); |
| 6151 } | 6151 } |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6256 | 6256 |
| 6257 static void voidMethodSequenceTestInterfaceEmptyArgMethod(const v8::FunctionCall
backInfo<v8::Value>& info) | 6257 static void voidMethodSequenceTestInterfaceEmptyArgMethod(const v8::FunctionCall
backInfo<v8::Value>& info) |
| 6258 { | 6258 { |
| 6259 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodS
equenceTestInterfaceEmptyArg", "TestObject", info.Holder(), info.GetIsolate()); | 6259 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodS
equenceTestInterfaceEmptyArg", "TestObject", info.Holder(), info.GetIsolate()); |
| 6260 if (UNLIKELY(info.Length() < 1)) { | 6260 if (UNLIKELY(info.Length() < 1)) { |
| 6261 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 6261 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| 6262 exceptionState.throwIfNeeded(); | 6262 exceptionState.throwIfNeeded(); |
| 6263 return; | 6263 return; |
| 6264 } | 6264 } |
| 6265 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 6265 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 6266 Vector<RefPtr<TestInterfaceEmpty>> testInterfaceEmptySequenceArg; | 6266 HeapVector<Member<TestInterfaceEmpty>> testInterfaceEmptySequenceArg; |
| 6267 { | 6267 { |
| 6268 testInterfaceEmptySequenceArg = (toRefPtrNativeArray<TestInterfaceEmpty,
V8TestInterfaceEmpty>(info[0], 1, info.GetIsolate(), exceptionState)); | 6268 testInterfaceEmptySequenceArg = (toMemberNativeArray<TestInterfaceEmpty,
V8TestInterfaceEmpty>(info[0], 1, info.GetIsolate(), exceptionState)); |
| 6269 if (exceptionState.throwIfNeeded()) | 6269 if (exceptionState.throwIfNeeded()) |
| 6270 return; | 6270 return; |
| 6271 } | 6271 } |
| 6272 impl->voidMethodSequenceTestInterfaceEmptyArg(testInterfaceEmptySequenceArg)
; | 6272 impl->voidMethodSequenceTestInterfaceEmptyArg(testInterfaceEmptySequenceArg)
; |
| 6273 } | 6273 } |
| 6274 | 6274 |
| 6275 static void voidMethodSequenceTestInterfaceEmptyArgMethodCallback(const v8::Func
tionCallbackInfo<v8::Value>& info) | 6275 static void voidMethodSequenceTestInterfaceEmptyArgMethodCallback(const v8::Func
tionCallbackInfo<v8::Value>& info) |
| 6276 { | 6276 { |
| 6277 TestObjectV8Internal::voidMethodSequenceTestInterfaceEmptyArgMethod(info); | 6277 TestObjectV8Internal::voidMethodSequenceTestInterfaceEmptyArgMethod(info); |
| 6278 } | 6278 } |
| (...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6882 TestObjectV8Internal::voidMethodDictionaryArgMethod(info); | 6882 TestObjectV8Internal::voidMethodDictionaryArgMethod(info); |
| 6883 } | 6883 } |
| 6884 | 6884 |
| 6885 static void voidMethodNodeFilterArgMethod(const v8::FunctionCallbackInfo<v8::Val
ue>& info) | 6885 static void voidMethodNodeFilterArgMethod(const v8::FunctionCallbackInfo<v8::Val
ue>& info) |
| 6886 { | 6886 { |
| 6887 if (UNLIKELY(info.Length() < 1)) { | 6887 if (UNLIKELY(info.Length() < 1)) { |
| 6888 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(in
fo.GetIsolate(), "voidMethodNodeFilterArg", "TestObject", 1, info.Length()), inf
o.GetIsolate()); | 6888 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(in
fo.GetIsolate(), "voidMethodNodeFilterArg", "TestObject", 1, info.Length()), inf
o.GetIsolate()); |
| 6889 return; | 6889 return; |
| 6890 } | 6890 } |
| 6891 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 6891 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 6892 RawPtr<NodeFilter> nodeFilterArg; | 6892 NodeFilter* nodeFilterArg; |
| 6893 { | 6893 { |
| 6894 nodeFilterArg = toNodeFilter(info[0], info.Holder(), ScriptState::curren
t(info.GetIsolate())); | 6894 nodeFilterArg = toNodeFilter(info[0], info.Holder(), ScriptState::curren
t(info.GetIsolate())); |
| 6895 } | 6895 } |
| 6896 impl->voidMethodNodeFilterArg(nodeFilterArg.release()); | 6896 impl->voidMethodNodeFilterArg(nodeFilterArg); |
| 6897 } | 6897 } |
| 6898 | 6898 |
| 6899 static void voidMethodNodeFilterArgMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) | 6899 static void voidMethodNodeFilterArgMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) |
| 6900 { | 6900 { |
| 6901 TestObjectV8Internal::voidMethodNodeFilterArgMethod(info); | 6901 TestObjectV8Internal::voidMethodNodeFilterArgMethod(info); |
| 6902 } | 6902 } |
| 6903 | 6903 |
| 6904 static void voidMethodPromiseArgMethod(const v8::FunctionCallbackInfo<v8::Value>
& info) | 6904 static void voidMethodPromiseArgMethod(const v8::FunctionCallbackInfo<v8::Value>
& info) |
| 6905 { | 6905 { |
| 6906 if (UNLIKELY(info.Length() < 1)) { | 6906 if (UNLIKELY(info.Length() < 1)) { |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6947 TestObjectV8Internal::voidMethodSerializedScriptValueArgMethod(info); | 6947 TestObjectV8Internal::voidMethodSerializedScriptValueArgMethod(info); |
| 6948 } | 6948 } |
| 6949 | 6949 |
| 6950 static void voidMethodXPathNSResolverArgMethod(const v8::FunctionCallbackInfo<v8
::Value>& info) | 6950 static void voidMethodXPathNSResolverArgMethod(const v8::FunctionCallbackInfo<v8
::Value>& info) |
| 6951 { | 6951 { |
| 6952 if (UNLIKELY(info.Length() < 1)) { | 6952 if (UNLIKELY(info.Length() < 1)) { |
| 6953 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(in
fo.GetIsolate(), "voidMethodXPathNSResolverArg", "TestObject", 1, info.Length())
, info.GetIsolate()); | 6953 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(in
fo.GetIsolate(), "voidMethodXPathNSResolverArg", "TestObject", 1, info.Length())
, info.GetIsolate()); |
| 6954 return; | 6954 return; |
| 6955 } | 6955 } |
| 6956 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 6956 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 6957 RawPtr<XPathNSResolver> xPathNSResolverArg; | 6957 XPathNSResolver* xPathNSResolverArg; |
| 6958 { | 6958 { |
| 6959 xPathNSResolverArg = toXPathNSResolver(ScriptState::current(info.GetIsol
ate()), info[0]); | 6959 xPathNSResolverArg = toXPathNSResolver(ScriptState::current(info.GetIsol
ate()), info[0]); |
| 6960 if (!xPathNSResolverArg) { | 6960 if (!xPathNSResolverArg) { |
| 6961 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage
s::failedToExecute("voidMethodXPathNSResolverArg", "TestObject", "parameter 1 is
not of type 'XPathNSResolver'.")); | 6961 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage
s::failedToExecute("voidMethodXPathNSResolverArg", "TestObject", "parameter 1 is
not of type 'XPathNSResolver'.")); |
| 6962 return; | 6962 return; |
| 6963 } | 6963 } |
| 6964 } | 6964 } |
| 6965 impl->voidMethodXPathNSResolverArg(xPathNSResolverArg.release()); | 6965 impl->voidMethodXPathNSResolverArg(xPathNSResolverArg); |
| 6966 } | 6966 } |
| 6967 | 6967 |
| 6968 static void voidMethodXPathNSResolverArgMethodCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) | 6968 static void voidMethodXPathNSResolverArgMethodCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) |
| 6969 { | 6969 { |
| 6970 TestObjectV8Internal::voidMethodXPathNSResolverArgMethod(info); | 6970 TestObjectV8Internal::voidMethodXPathNSResolverArgMethod(info); |
| 6971 } | 6971 } |
| 6972 | 6972 |
| 6973 static void voidMethodDictionarySequenceArgMethod(const v8::FunctionCallbackInfo
<v8::Value>& info) | 6973 static void voidMethodDictionarySequenceArgMethod(const v8::FunctionCallbackInfo
<v8::Value>& info) |
| 6974 { | 6974 { |
| 6975 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
ictionarySequenceArg", "TestObject", info.Holder(), info.GetIsolate()); | 6975 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
ictionarySequenceArg", "TestObject", info.Holder(), info.GetIsolate()); |
| (...skipping 712 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7688 | 7688 |
| 7689 static void voidMethodStringArgVariadicStringArgMethodCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) | 7689 static void voidMethodStringArgVariadicStringArgMethodCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) |
| 7690 { | 7690 { |
| 7691 TestObjectV8Internal::voidMethodStringArgVariadicStringArgMethod(info); | 7691 TestObjectV8Internal::voidMethodStringArgVariadicStringArgMethod(info); |
| 7692 } | 7692 } |
| 7693 | 7693 |
| 7694 static void voidMethodVariadicTestInterfaceEmptyArgMethod(const v8::FunctionCall
backInfo<v8::Value>& info) | 7694 static void voidMethodVariadicTestInterfaceEmptyArgMethod(const v8::FunctionCall
backInfo<v8::Value>& info) |
| 7695 { | 7695 { |
| 7696 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodV
ariadicTestInterfaceEmptyArg", "TestObject", info.Holder(), info.GetIsolate()); | 7696 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodV
ariadicTestInterfaceEmptyArg", "TestObject", info.Holder(), info.GetIsolate()); |
| 7697 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 7697 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 7698 Vector<RefPtr<TestInterfaceEmpty>> variadicTestInterfaceEmptyArgs; | 7698 HeapVector<Member<TestInterfaceEmpty>> variadicTestInterfaceEmptyArgs; |
| 7699 { | 7699 { |
| 7700 for (int i = 0; i < info.Length(); ++i) { | 7700 for (int i = 0; i < info.Length(); ++i) { |
| 7701 if (!V8TestInterfaceEmpty::hasInstance(info[i], info.GetIsolate()))
{ | 7701 if (!V8TestInterfaceEmpty::hasInstance(info[i], info.GetIsolate()))
{ |
| 7702 exceptionState.throwTypeError("parameter 1 is not of type 'TestI
nterfaceEmpty'."); | 7702 exceptionState.throwTypeError("parameter 1 is not of type 'TestI
nterfaceEmpty'."); |
| 7703 exceptionState.throwIfNeeded(); | 7703 exceptionState.throwIfNeeded(); |
| 7704 return; | 7704 return; |
| 7705 } | 7705 } |
| 7706 variadicTestInterfaceEmptyArgs.append(V8TestInterfaceEmpty::toImpl(v
8::Local<v8::Object>::Cast(info[i]))); | 7706 variadicTestInterfaceEmptyArgs.append(V8TestInterfaceEmpty::toImpl(v
8::Local<v8::Object>::Cast(info[i]))); |
| 7707 } | 7707 } |
| 7708 } | 7708 } |
| 7709 impl->voidMethodVariadicTestInterfaceEmptyArg(variadicTestInterfaceEmptyArgs
); | 7709 impl->voidMethodVariadicTestInterfaceEmptyArg(variadicTestInterfaceEmptyArgs
); |
| 7710 } | 7710 } |
| 7711 | 7711 |
| 7712 static void voidMethodVariadicTestInterfaceEmptyArgMethodCallback(const v8::Func
tionCallbackInfo<v8::Value>& info) | 7712 static void voidMethodVariadicTestInterfaceEmptyArgMethodCallback(const v8::Func
tionCallbackInfo<v8::Value>& info) |
| 7713 { | 7713 { |
| 7714 TestObjectV8Internal::voidMethodVariadicTestInterfaceEmptyArgMethod(info); | 7714 TestObjectV8Internal::voidMethodVariadicTestInterfaceEmptyArgMethod(info); |
| 7715 } | 7715 } |
| 7716 | 7716 |
| 7717 static void voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArgMethod(c
onst v8::FunctionCallbackInfo<v8::Value>& info) | 7717 static void voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArgMethod(c
onst v8::FunctionCallbackInfo<v8::Value>& info) |
| 7718 { | 7718 { |
| 7719 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodT
estInterfaceEmptyArgVariadicTestInterfaceEmptyArg", "TestObject", info.Holder(),
info.GetIsolate()); | 7719 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodT
estInterfaceEmptyArgVariadicTestInterfaceEmptyArg", "TestObject", info.Holder(),
info.GetIsolate()); |
| 7720 if (UNLIKELY(info.Length() < 1)) { | 7720 if (UNLIKELY(info.Length() < 1)) { |
| 7721 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 7721 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| 7722 exceptionState.throwIfNeeded(); | 7722 exceptionState.throwIfNeeded(); |
| 7723 return; | 7723 return; |
| 7724 } | 7724 } |
| 7725 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 7725 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 7726 TestInterfaceEmpty* testInterfaceEmptyArg; | 7726 TestInterfaceEmpty* testInterfaceEmptyArg; |
| 7727 Vector<RefPtr<TestInterfaceEmpty>> variadicTestInterfaceEmptyArgs; | 7727 HeapVector<Member<TestInterfaceEmpty>> variadicTestInterfaceEmptyArgs; |
| 7728 { | 7728 { |
| 7729 testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.G
etIsolate(), info[0]); | 7729 testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.G
etIsolate(), info[0]); |
| 7730 if (!testInterfaceEmptyArg) { | 7730 if (!testInterfaceEmptyArg) { |
| 7731 exceptionState.throwTypeError("parameter 1 is not of type 'TestInter
faceEmpty'."); | 7731 exceptionState.throwTypeError("parameter 1 is not of type 'TestInter
faceEmpty'."); |
| 7732 exceptionState.throwIfNeeded(); | 7732 exceptionState.throwIfNeeded(); |
| 7733 return; | 7733 return; |
| 7734 } | 7734 } |
| 7735 for (int i = 1; i < info.Length(); ++i) { | 7735 for (int i = 1; i < info.Length(); ++i) { |
| 7736 if (!V8TestInterfaceEmpty::hasInstance(info[i], info.GetIsolate()))
{ | 7736 if (!V8TestInterfaceEmpty::hasInstance(info[i], info.GetIsolate()))
{ |
| 7737 exceptionState.throwTypeError("parameter 2 is not of type 'TestI
nterfaceEmpty'."); | 7737 exceptionState.throwTypeError("parameter 2 is not of type 'TestI
nterfaceEmpty'."); |
| (...skipping 1392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9130 | 9130 |
| 9131 static void callWithScriptStateExecutionContextVoidMethodMethodCallback(const v8
::FunctionCallbackInfo<v8::Value>& info) | 9131 static void callWithScriptStateExecutionContextVoidMethodMethodCallback(const v8
::FunctionCallbackInfo<v8::Value>& info) |
| 9132 { | 9132 { |
| 9133 TestObjectV8Internal::callWithScriptStateExecutionContextVoidMethodMethod(in
fo); | 9133 TestObjectV8Internal::callWithScriptStateExecutionContextVoidMethodMethod(in
fo); |
| 9134 } | 9134 } |
| 9135 | 9135 |
| 9136 static void callWithScriptStateScriptArgumentsVoidMethodMethod(const v8::Functio
nCallbackInfo<v8::Value>& info) | 9136 static void callWithScriptStateScriptArgumentsVoidMethodMethod(const v8::Functio
nCallbackInfo<v8::Value>& info) |
| 9137 { | 9137 { |
| 9138 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 9138 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 9139 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | 9139 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| 9140 RawPtr<ScriptArguments> scriptArguments(ScriptArguments::create(scriptState,
info, 0)); | 9140 ScriptArguments* scriptArguments(ScriptArguments::create(scriptState, info,
0)); |
| 9141 impl->callWithScriptStateScriptArgumentsVoidMethod(scriptState, scriptArgume
nts.release()); | 9141 impl->callWithScriptStateScriptArgumentsVoidMethod(scriptState, scriptArgume
nts); |
| 9142 } | 9142 } |
| 9143 | 9143 |
| 9144 static void callWithScriptStateScriptArgumentsVoidMethodMethodCallback(const v8:
:FunctionCallbackInfo<v8::Value>& info) | 9144 static void callWithScriptStateScriptArgumentsVoidMethodMethodCallback(const v8:
:FunctionCallbackInfo<v8::Value>& info) |
| 9145 { | 9145 { |
| 9146 TestObjectV8Internal::callWithScriptStateScriptArgumentsVoidMethodMethod(inf
o); | 9146 TestObjectV8Internal::callWithScriptStateScriptArgumentsVoidMethodMethod(inf
o); |
| 9147 } | 9147 } |
| 9148 | 9148 |
| 9149 static void callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArgMethod
(const v8::FunctionCallbackInfo<v8::Value>& info) | 9149 static void callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArgMethod
(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 9150 { | 9150 { |
| 9151 ExceptionState exceptionState(ExceptionState::ExecutionContext, "callWithScr
iptStateScriptArgumentsVoidMethodOptionalBooleanArg", "TestObject", info.Holder(
), info.GetIsolate()); | 9151 ExceptionState exceptionState(ExceptionState::ExecutionContext, "callWithScr
iptStateScriptArgumentsVoidMethodOptionalBooleanArg", "TestObject", info.Holder(
), info.GetIsolate()); |
| 9152 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 9152 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 9153 bool optionalBooleanArg; | 9153 bool optionalBooleanArg; |
| 9154 { | 9154 { |
| 9155 int numArgsPassed = info.Length(); | 9155 int numArgsPassed = info.Length(); |
| 9156 while (numArgsPassed > 0) { | 9156 while (numArgsPassed > 0) { |
| 9157 if (!info[numArgsPassed - 1]->IsUndefined()) | 9157 if (!info[numArgsPassed - 1]->IsUndefined()) |
| 9158 break; | 9158 break; |
| 9159 --numArgsPassed; | 9159 --numArgsPassed; |
| 9160 } | 9160 } |
| 9161 if (UNLIKELY(numArgsPassed <= 0)) { | 9161 if (UNLIKELY(numArgsPassed <= 0)) { |
| 9162 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | 9162 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| 9163 RawPtr<ScriptArguments> scriptArguments(ScriptArguments::create(scri
ptState, info, 1)); | 9163 ScriptArguments* scriptArguments(ScriptArguments::create(scriptState
, info, 1)); |
| 9164 impl->callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArg
(scriptState, scriptArguments.release()); | 9164 impl->callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArg
(scriptState, scriptArguments); |
| 9165 return; | 9165 return; |
| 9166 } | 9166 } |
| 9167 optionalBooleanArg = toBoolean(info.GetIsolate(), info[0], exceptionStat
e); | 9167 optionalBooleanArg = toBoolean(info.GetIsolate(), info[0], exceptionStat
e); |
| 9168 if (exceptionState.throwIfNeeded()) | 9168 if (exceptionState.throwIfNeeded()) |
| 9169 return; | 9169 return; |
| 9170 } | 9170 } |
| 9171 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | 9171 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| 9172 RawPtr<ScriptArguments> scriptArguments(ScriptArguments::create(scriptState,
info, 1)); | 9172 ScriptArguments* scriptArguments(ScriptArguments::create(scriptState, info,
1)); |
| 9173 impl->callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArg(scriptS
tate, scriptArguments.release(), optionalBooleanArg); | 9173 impl->callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArg(scriptS
tate, scriptArguments, optionalBooleanArg); |
| 9174 } | 9174 } |
| 9175 | 9175 |
| 9176 static void callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArgMethod
Callback(const v8::FunctionCallbackInfo<v8::Value>& info) | 9176 static void callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArgMethod
Callback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 9177 { | 9177 { |
| 9178 TestObjectV8Internal::callWithScriptStateScriptArgumentsVoidMethodOptionalBo
oleanArgMethod(info); | 9178 TestObjectV8Internal::callWithScriptStateScriptArgumentsVoidMethodOptionalBo
oleanArgMethod(info); |
| 9179 } | 9179 } |
| 9180 | 9180 |
| 9181 static void callWithCurrentWindowMethod(const v8::FunctionCallbackInfo<v8::Value
>& info) | 9181 static void callWithCurrentWindowMethod(const v8::FunctionCallbackInfo<v8::Value
>& info) |
| 9182 { | 9182 { |
| 9183 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 9183 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| (...skipping 847 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10031 } | 10031 } |
| 10032 | 10032 |
| 10033 void postMessageImpl(const char* interfaceName, TestObject* instance, const v8::
FunctionCallbackInfo<v8::Value>& info) | 10033 void postMessageImpl(const char* interfaceName, TestObject* instance, const v8::
FunctionCallbackInfo<v8::Value>& info) |
| 10034 { | 10034 { |
| 10035 ExceptionState exceptionState(ExceptionState::ExecutionContext, "postMessage
", interfaceName, info.Holder(), info.GetIsolate()); | 10035 ExceptionState exceptionState(ExceptionState::ExecutionContext, "postMessage
", interfaceName, info.Holder(), info.GetIsolate()); |
| 10036 if (UNLIKELY(info.Length() < 1)) { | 10036 if (UNLIKELY(info.Length() < 1)) { |
| 10037 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 10037 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| 10038 exceptionState.throwIfNeeded(); | 10038 exceptionState.throwIfNeeded(); |
| 10039 return; | 10039 return; |
| 10040 } | 10040 } |
| 10041 RawPtr<MessagePortArray> ports = new MessagePortArray; | 10041 MessagePortArray* ports = new MessagePortArray; |
| 10042 ArrayBufferArray arrayBuffers; | 10042 ArrayBufferArray arrayBuffers; |
| 10043 ImageBitmapArray imageBitmaps; | 10043 ImageBitmapArray imageBitmaps; |
| 10044 if (info.Length() > 1) { | 10044 if (info.Length() > 1) { |
| 10045 const int transferablesArgIndex = 1; | 10045 const int transferablesArgIndex = 1; |
| 10046 if (!SerializedScriptValue::extractTransferables(info.GetIsolate(), info
[transferablesArgIndex], transferablesArgIndex, *ports, arrayBuffers, imageBitma
ps, exceptionState)) { | 10046 if (!SerializedScriptValue::extractTransferables(info.GetIsolate(), info
[transferablesArgIndex], transferablesArgIndex, *ports, arrayBuffers, imageBitma
ps, exceptionState)) { |
| 10047 exceptionState.throwIfNeeded(); | 10047 exceptionState.throwIfNeeded(); |
| 10048 return; | 10048 return; |
| 10049 } | 10049 } |
| 10050 } | 10050 } |
| 10051 RefPtr<SerializedScriptValue> message = SerializedScriptValueFactory::instan
ce().create(info.GetIsolate(), info[0], ports.get(), &arrayBuffers, &imageBitmap
s, exceptionState); | 10051 RefPtr<SerializedScriptValue> message = SerializedScriptValueFactory::instan
ce().create(info.GetIsolate(), info[0], ports, &arrayBuffers, &imageBitmaps, exc
eptionState); |
| 10052 if (exceptionState.throwIfNeeded()) | 10052 if (exceptionState.throwIfNeeded()) |
| 10053 return; | 10053 return; |
| 10054 // FIXME: Only pass context/exceptionState if instance really requires it. | 10054 // FIXME: Only pass context/exceptionState if instance really requires it. |
| 10055 ExecutionContext* context = currentExecutionContext(info.GetIsolate()); | 10055 ExecutionContext* context = currentExecutionContext(info.GetIsolate()); |
| 10056 instance->postMessage(context, message.release(), ports.get(), exceptionStat
e); | 10056 instance->postMessage(context, message.release(), ports, exceptionState); |
| 10057 exceptionState.throwIfNeeded(); | 10057 exceptionState.throwIfNeeded(); |
| 10058 } | 10058 } |
| 10059 | 10059 |
| 10060 static void postMessageMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&
info) | 10060 static void postMessageMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&
info) |
| 10061 { | 10061 { |
| 10062 postMessageImpl("TestObject", V8TestObject::toImpl(info.Holder()), info); | 10062 postMessageImpl("TestObject", V8TestObject::toImpl(info.Holder()), info); |
| 10063 } | 10063 } |
| 10064 | 10064 |
| 10065 static void activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethod(const v8
::FunctionCallbackInfo<v8::Value>& info) | 10065 static void activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethod(const v8
::FunctionCallbackInfo<v8::Value>& info) |
| 10066 { | 10066 { |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10252 | 10252 |
| 10253 static void raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethodCallb
ack(const v8::FunctionCallbackInfo<v8::Value>& info) | 10253 static void raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethodCallb
ack(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 10254 { | 10254 { |
| 10255 TestObjectV8Internal::raisesExceptionVoidMethodOptionalTestCallbackInterface
ArgMethod(info); | 10255 TestObjectV8Internal::raisesExceptionVoidMethodOptionalTestCallbackInterface
ArgMethod(info); |
| 10256 } | 10256 } |
| 10257 | 10257 |
| 10258 static void raisesExceptionTestInterfaceEmptyVoidMethodMethod(const v8::Function
CallbackInfo<v8::Value>& info) | 10258 static void raisesExceptionTestInterfaceEmptyVoidMethodMethod(const v8::Function
CallbackInfo<v8::Value>& info) |
| 10259 { | 10259 { |
| 10260 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionTestInterfaceEmptyVoidMethod", "TestObject", info.Holder(), info.GetIsolate(
)); | 10260 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionTestInterfaceEmptyVoidMethod", "TestObject", info.Holder(), info.GetIsolate(
)); |
| 10261 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 10261 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 10262 RefPtr<TestInterfaceEmpty> result = impl->raisesExceptionTestInterfaceEmptyV
oidMethod(exceptionState); | 10262 TestInterfaceEmpty* result = impl->raisesExceptionTestInterfaceEmptyVoidMeth
od(exceptionState); |
| 10263 if (exceptionState.hadException()) { | 10263 if (exceptionState.hadException()) { |
| 10264 exceptionState.throwIfNeeded(); | 10264 exceptionState.throwIfNeeded(); |
| 10265 return; | 10265 return; |
| 10266 } | 10266 } |
| 10267 v8SetReturnValue(info, result.release()); | 10267 v8SetReturnValue(info, result); |
| 10268 } | 10268 } |
| 10269 | 10269 |
| 10270 static void raisesExceptionTestInterfaceEmptyVoidMethodMethodCallback(const v8::
FunctionCallbackInfo<v8::Value>& info) | 10270 static void raisesExceptionTestInterfaceEmptyVoidMethodMethodCallback(const v8::
FunctionCallbackInfo<v8::Value>& info) |
| 10271 { | 10271 { |
| 10272 TestObjectV8Internal::raisesExceptionTestInterfaceEmptyVoidMethodMethod(info
); | 10272 TestObjectV8Internal::raisesExceptionTestInterfaceEmptyVoidMethodMethod(info
); |
| 10273 } | 10273 } |
| 10274 | 10274 |
| 10275 static void raisesExceptionXPathNSResolverVoidMethodMethod(const v8::FunctionCal
lbackInfo<v8::Value>& info) | 10275 static void raisesExceptionXPathNSResolverVoidMethodMethod(const v8::FunctionCal
lbackInfo<v8::Value>& info) |
| 10276 { | 10276 { |
| 10277 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionXPathNSResolverVoidMethod", "TestObject", info.Holder(), info.GetIsolate()); | 10277 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionXPathNSResolverVoidMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| 10278 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 10278 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 10279 RawPtr<XPathNSResolver> result = impl->raisesExceptionXPathNSResolverVoidMet
hod(exceptionState); | 10279 XPathNSResolver* result = impl->raisesExceptionXPathNSResolverVoidMethod(exc
eptionState); |
| 10280 if (exceptionState.hadException()) { | 10280 if (exceptionState.hadException()) { |
| 10281 exceptionState.throwIfNeeded(); | 10281 exceptionState.throwIfNeeded(); |
| 10282 return; | 10282 return; |
| 10283 } | 10283 } |
| 10284 v8SetReturnValue(info, result.release()); | 10284 v8SetReturnValue(info, result); |
| 10285 } | 10285 } |
| 10286 | 10286 |
| 10287 static void raisesExceptionXPathNSResolverVoidMethodMethodCallback(const v8::Fun
ctionCallbackInfo<v8::Value>& info) | 10287 static void raisesExceptionXPathNSResolverVoidMethodMethodCallback(const v8::Fun
ctionCallbackInfo<v8::Value>& info) |
| 10288 { | 10288 { |
| 10289 TestObjectV8Internal::raisesExceptionXPathNSResolverVoidMethodMethod(info); | 10289 TestObjectV8Internal::raisesExceptionXPathNSResolverVoidMethodMethod(info); |
| 10290 } | 10290 } |
| 10291 | 10291 |
| 10292 static void callWithExecutionContextRaisesExceptionVoidMethodLongArgMethod(const
v8::FunctionCallbackInfo<v8::Value>& info) | 10292 static void callWithExecutionContextRaisesExceptionVoidMethodLongArgMethod(const
v8::FunctionCallbackInfo<v8::Value>& info) |
| 10293 { | 10293 { |
| 10294 ExceptionState exceptionState(ExceptionState::ExecutionContext, "callWithExe
cutionContextRaisesExceptionVoidMethodLongArg", "TestObject", info.Holder(), inf
o.GetIsolate()); | 10294 ExceptionState exceptionState(ExceptionState::ExecutionContext, "callWithExe
cutionContextRaisesExceptionVoidMethodLongArg", "TestObject", info.Holder(), inf
o.GetIsolate()); |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10563 | 10563 |
| 10564 static void legacyInterfaceTypeCheckingVoidMethodTestInterfaceEmptyArgMethodCall
back(const v8::FunctionCallbackInfo<v8::Value>& info) | 10564 static void legacyInterfaceTypeCheckingVoidMethodTestInterfaceEmptyArgMethodCall
back(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 10565 { | 10565 { |
| 10566 TestObjectV8Internal::legacyInterfaceTypeCheckingVoidMethodTestInterfaceEmpt
yArgMethod(info); | 10566 TestObjectV8Internal::legacyInterfaceTypeCheckingVoidMethodTestInterfaceEmpt
yArgMethod(info); |
| 10567 } | 10567 } |
| 10568 | 10568 |
| 10569 static void legacyInterfaceTypeCheckingVoidMethodTestInterfaceEmptyVariadicArgMe
thod(const v8::FunctionCallbackInfo<v8::Value>& info) | 10569 static void legacyInterfaceTypeCheckingVoidMethodTestInterfaceEmptyVariadicArgMe
thod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 10570 { | 10570 { |
| 10571 ExceptionState exceptionState(ExceptionState::ExecutionContext, "legacyInter
faceTypeCheckingVoidMethodTestInterfaceEmptyVariadicArg", "TestObject", info.Hol
der(), info.GetIsolate()); | 10571 ExceptionState exceptionState(ExceptionState::ExecutionContext, "legacyInter
faceTypeCheckingVoidMethodTestInterfaceEmptyVariadicArg", "TestObject", info.Hol
der(), info.GetIsolate()); |
| 10572 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 10572 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 10573 Vector<RefPtr<TestInterfaceEmpty>> testInterfaceEmptyArg; | 10573 HeapVector<Member<TestInterfaceEmpty>> testInterfaceEmptyArg; |
| 10574 { | 10574 { |
| 10575 for (int i = 0; i < info.Length(); ++i) { | 10575 for (int i = 0; i < info.Length(); ++i) { |
| 10576 if (!V8TestInterfaceEmpty::hasInstance(info[i], info.GetIsolate()))
{ | 10576 if (!V8TestInterfaceEmpty::hasInstance(info[i], info.GetIsolate()))
{ |
| 10577 exceptionState.throwTypeError("parameter 1 is not of type 'TestI
nterfaceEmpty'."); | 10577 exceptionState.throwTypeError("parameter 1 is not of type 'TestI
nterfaceEmpty'."); |
| 10578 exceptionState.throwIfNeeded(); | 10578 exceptionState.throwIfNeeded(); |
| 10579 return; | 10579 return; |
| 10580 } | 10580 } |
| 10581 testInterfaceEmptyArg.append(V8TestInterfaceEmpty::toImpl(v8::Local<
v8::Object>::Cast(info[i]))); | 10581 testInterfaceEmptyArg.append(V8TestInterfaceEmpty::toImpl(v8::Local<
v8::Object>::Cast(info[i]))); |
| 10582 } | 10582 } |
| 10583 } | 10583 } |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10848 } | 10848 } |
| 10849 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 10849 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 10850 Node* value; | 10850 Node* value; |
| 10851 { | 10851 { |
| 10852 value = V8Node::toImplWithTypeCheck(info.GetIsolate(), info[0]); | 10852 value = V8Node::toImplWithTypeCheck(info.GetIsolate(), info[0]); |
| 10853 if (!value) { | 10853 if (!value) { |
| 10854 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage
s::failedToExecute("nodeMethodWithNodeArgumentImplementedInPrivateScript", "Test
Object", "parameter 1 is not of type 'Node'.")); | 10854 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage
s::failedToExecute("nodeMethodWithNodeArgumentImplementedInPrivateScript", "Test
Object", "parameter 1 is not of type 'Node'.")); |
| 10855 return; | 10855 return; |
| 10856 } | 10856 } |
| 10857 } | 10857 } |
| 10858 RawPtr<Node> result = nullptr; | 10858 Node* result = nullptr; |
| 10859 if (!V8TestObject::PrivateScript::nodeMethodWithNodeArgumentImplementedInPri
vateScriptMethod(toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCurrent
Context())), impl, value, &result)) | 10859 if (!V8TestObject::PrivateScript::nodeMethodWithNodeArgumentImplementedInPri
vateScriptMethod(toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCurrent
Context())), impl, value, &result)) |
| 10860 return; | 10860 return; |
| 10861 v8SetReturnValue(info, result.release()); | 10861 v8SetReturnValue(info, result); |
| 10862 } | 10862 } |
| 10863 | 10863 |
| 10864 static void nodeMethodWithNodeArgumentImplementedInPrivateScriptMethodCallback(c
onst v8::FunctionCallbackInfo<v8::Value>& info) | 10864 static void nodeMethodWithNodeArgumentImplementedInPrivateScriptMethodCallback(c
onst v8::FunctionCallbackInfo<v8::Value>& info) |
| 10865 { | 10865 { |
| 10866 TestObjectV8Internal::nodeMethodWithNodeArgumentImplementedInPrivateScriptMe
thod(info); | 10866 TestObjectV8Internal::nodeMethodWithNodeArgumentImplementedInPrivateScriptMe
thod(info); |
| 10867 } | 10867 } |
| 10868 | 10868 |
| 10869 static void nodeMethodWithVariousArgumentsImplementedInPrivateScriptMethod(const
v8::FunctionCallbackInfo<v8::Value>& info) | 10869 static void nodeMethodWithVariousArgumentsImplementedInPrivateScriptMethod(const
v8::FunctionCallbackInfo<v8::Value>& info) |
| 10870 { | 10870 { |
| 10871 ExceptionState exceptionState(ExceptionState::ExecutionContext, "nodeMethodW
ithVariousArgumentsImplementedInPrivateScript", "TestObject", info.Holder(), inf
o.GetIsolate()); | 10871 ExceptionState exceptionState(ExceptionState::ExecutionContext, "nodeMethodW
ithVariousArgumentsImplementedInPrivateScript", "TestObject", info.Holder(), inf
o.GetIsolate()); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 10896 value1 = toInt16(info.GetIsolate(), info[2], NormalConversion, exception
State); | 10896 value1 = toInt16(info.GetIsolate(), info[2], NormalConversion, exception
State); |
| 10897 if (exceptionState.throwIfNeeded()) | 10897 if (exceptionState.throwIfNeeded()) |
| 10898 return; | 10898 return; |
| 10899 value2 = toRestrictedDouble(info.GetIsolate(), info[3], exceptionState); | 10899 value2 = toRestrictedDouble(info.GetIsolate(), info[3], exceptionState); |
| 10900 if (exceptionState.throwIfNeeded()) | 10900 if (exceptionState.throwIfNeeded()) |
| 10901 return; | 10901 return; |
| 10902 string = info[4]; | 10902 string = info[4]; |
| 10903 if (!string.prepare()) | 10903 if (!string.prepare()) |
| 10904 return; | 10904 return; |
| 10905 } | 10905 } |
| 10906 RawPtr<Node> result = nullptr; | 10906 Node* result = nullptr; |
| 10907 if (!V8TestObject::PrivateScript::nodeMethodWithVariousArgumentsImplementedI
nPrivateScriptMethod(toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCur
rentContext())), impl, document, node, value1, value2, string, &result)) | 10907 if (!V8TestObject::PrivateScript::nodeMethodWithVariousArgumentsImplementedI
nPrivateScriptMethod(toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCur
rentContext())), impl, document, node, value1, value2, string, &result)) |
| 10908 return; | 10908 return; |
| 10909 v8SetReturnValue(info, result.release()); | 10909 v8SetReturnValue(info, result); |
| 10910 } | 10910 } |
| 10911 | 10911 |
| 10912 static void nodeMethodWithVariousArgumentsImplementedInPrivateScriptMethodCallba
ck(const v8::FunctionCallbackInfo<v8::Value>& info) | 10912 static void nodeMethodWithVariousArgumentsImplementedInPrivateScriptMethodCallba
ck(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 10913 { | 10913 { |
| 10914 TestObjectV8Internal::nodeMethodWithVariousArgumentsImplementedInPrivateScri
ptMethod(info); | 10914 TestObjectV8Internal::nodeMethodWithVariousArgumentsImplementedInPrivateScri
ptMethod(info); |
| 10915 } | 10915 } |
| 10916 | 10916 |
| 10917 static void methodImplementedInCPPForPrivateScriptOnlyMethod(const v8::FunctionC
allbackInfo<v8::Value>& info) | 10917 static void methodImplementedInCPPForPrivateScriptOnlyMethod(const v8::FunctionC
allbackInfo<v8::Value>& info) |
| 10918 { | 10918 { |
| 10919 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodImple
mentedInCPPForPrivateScriptOnly", "TestObject", info.Holder(), info.GetIsolate()
); | 10919 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodImple
mentedInCPPForPrivateScriptOnly", "TestObject", info.Holder(), info.GetIsolate()
); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 10939 static void methodImplementedInCPPForPrivateScriptOnlyMethodCallback(const v8::F
unctionCallbackInfo<v8::Value>& info) | 10939 static void methodImplementedInCPPForPrivateScriptOnlyMethodCallback(const v8::F
unctionCallbackInfo<v8::Value>& info) |
| 10940 { | 10940 { |
| 10941 TestObjectV8Internal::methodImplementedInCPPForPrivateScriptOnlyMethod(info)
; | 10941 TestObjectV8Internal::methodImplementedInCPPForPrivateScriptOnlyMethod(info)
; |
| 10942 } | 10942 } |
| 10943 | 10943 |
| 10944 static void keysMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 10944 static void keysMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 10945 { | 10945 { |
| 10946 ExceptionState exceptionState(ExceptionState::ExecutionContext, "keys", "Tes
tObject", info.Holder(), info.GetIsolate()); | 10946 ExceptionState exceptionState(ExceptionState::ExecutionContext, "keys", "Tes
tObject", info.Holder(), info.GetIsolate()); |
| 10947 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 10947 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 10948 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | 10948 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| 10949 RawPtr<Iterator> result = impl->keysForBinding(scriptState, exceptionState); | 10949 Iterator* result = impl->keysForBinding(scriptState, exceptionState); |
| 10950 if (exceptionState.hadException()) { | 10950 if (exceptionState.hadException()) { |
| 10951 exceptionState.throwIfNeeded(); | 10951 exceptionState.throwIfNeeded(); |
| 10952 return; | 10952 return; |
| 10953 } | 10953 } |
| 10954 v8SetReturnValue(info, result.release()); | 10954 v8SetReturnValue(info, result); |
| 10955 } | 10955 } |
| 10956 | 10956 |
| 10957 static void keysMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) | 10957 static void keysMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 10958 { | 10958 { |
| 10959 TestObjectV8Internal::keysMethod(info); | 10959 TestObjectV8Internal::keysMethod(info); |
| 10960 } | 10960 } |
| 10961 | 10961 |
| 10962 static void valuesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 10962 static void valuesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 10963 { | 10963 { |
| 10964 ExceptionState exceptionState(ExceptionState::ExecutionContext, "values", "T
estObject", info.Holder(), info.GetIsolate()); | 10964 ExceptionState exceptionState(ExceptionState::ExecutionContext, "values", "T
estObject", info.Holder(), info.GetIsolate()); |
| 10965 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 10965 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 10966 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | 10966 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| 10967 RawPtr<Iterator> result = impl->valuesForBinding(scriptState, exceptionState
); | 10967 Iterator* result = impl->valuesForBinding(scriptState, exceptionState); |
| 10968 if (exceptionState.hadException()) { | 10968 if (exceptionState.hadException()) { |
| 10969 exceptionState.throwIfNeeded(); | 10969 exceptionState.throwIfNeeded(); |
| 10970 return; | 10970 return; |
| 10971 } | 10971 } |
| 10972 v8SetReturnValue(info, result.release()); | 10972 v8SetReturnValue(info, result); |
| 10973 } | 10973 } |
| 10974 | 10974 |
| 10975 static void valuesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info
) | 10975 static void valuesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info
) |
| 10976 { | 10976 { |
| 10977 TestObjectV8Internal::valuesMethod(info); | 10977 TestObjectV8Internal::valuesMethod(info); |
| 10978 } | 10978 } |
| 10979 | 10979 |
| 10980 static void entriesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 10980 static void entriesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 10981 { | 10981 { |
| 10982 ExceptionState exceptionState(ExceptionState::ExecutionContext, "entries", "
TestObject", info.Holder(), info.GetIsolate()); | 10982 ExceptionState exceptionState(ExceptionState::ExecutionContext, "entries", "
TestObject", info.Holder(), info.GetIsolate()); |
| 10983 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 10983 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 10984 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | 10984 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| 10985 RawPtr<Iterator> result = impl->entriesForBinding(scriptState, exceptionStat
e); | 10985 Iterator* result = impl->entriesForBinding(scriptState, exceptionState); |
| 10986 if (exceptionState.hadException()) { | 10986 if (exceptionState.hadException()) { |
| 10987 exceptionState.throwIfNeeded(); | 10987 exceptionState.throwIfNeeded(); |
| 10988 return; | 10988 return; |
| 10989 } | 10989 } |
| 10990 v8SetReturnValue(info, result.release()); | 10990 v8SetReturnValue(info, result); |
| 10991 } | 10991 } |
| 10992 | 10992 |
| 10993 static void entriesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf
o) | 10993 static void entriesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf
o) |
| 10994 { | 10994 { |
| 10995 TestObjectV8Internal::entriesMethod(info); | 10995 TestObjectV8Internal::entriesMethod(info); |
| 10996 } | 10996 } |
| 10997 | 10997 |
| 10998 static void forEachMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 10998 static void forEachMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 10999 { | 10999 { |
| 11000 ExceptionState exceptionState(ExceptionState::ExecutionContext, "forEach", "
TestObject", info.Holder(), info.GetIsolate()); | 11000 ExceptionState exceptionState(ExceptionState::ExecutionContext, "forEach", "
TestObject", info.Holder(), info.GetIsolate()); |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11145 StringOrDouble value; | 11145 StringOrDouble value; |
| 11146 { | 11146 { |
| 11147 key = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionSta
te); | 11147 key = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionSta
te); |
| 11148 if (exceptionState.throwIfNeeded()) | 11148 if (exceptionState.throwIfNeeded()) |
| 11149 return; | 11149 return; |
| 11150 V8StringOrDouble::toImpl(info.GetIsolate(), info[1], value, UnionTypeCon
versionMode::NotNullable, exceptionState); | 11150 V8StringOrDouble::toImpl(info.GetIsolate(), info[1], value, UnionTypeCon
versionMode::NotNullable, exceptionState); |
| 11151 if (exceptionState.throwIfNeeded()) | 11151 if (exceptionState.throwIfNeeded()) |
| 11152 return; | 11152 return; |
| 11153 } | 11153 } |
| 11154 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | 11154 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| 11155 RefPtr<TestObject> result = impl->setForBinding(scriptState, key, value, exc
eptionState); | 11155 TestObject* result = impl->setForBinding(scriptState, key, value, exceptionS
tate); |
| 11156 if (exceptionState.hadException()) { | 11156 if (exceptionState.hadException()) { |
| 11157 exceptionState.throwIfNeeded(); | 11157 exceptionState.throwIfNeeded(); |
| 11158 return; | 11158 return; |
| 11159 } | 11159 } |
| 11160 v8SetReturnValue(info, result.release()); | 11160 v8SetReturnValue(info, result); |
| 11161 } | 11161 } |
| 11162 | 11162 |
| 11163 static void setMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) | 11163 static void setMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 11164 { | 11164 { |
| 11165 TestObjectV8Internal::setMethod(info); | 11165 TestObjectV8Internal::setMethod(info); |
| 11166 } | 11166 } |
| 11167 | 11167 |
| 11168 static void toJSONMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 11168 static void toJSONMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 11169 { | 11169 { |
| 11170 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 11170 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 11185 static void toStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in
fo) | 11185 static void toStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in
fo) |
| 11186 { | 11186 { |
| 11187 TestObjectV8Internal::toStringMethod(info); | 11187 TestObjectV8Internal::toStringMethod(info); |
| 11188 } | 11188 } |
| 11189 | 11189 |
| 11190 static void iteratorMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 11190 static void iteratorMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 11191 { | 11191 { |
| 11192 ExceptionState exceptionState(ExceptionState::ExecutionContext, "iterator",
"TestObject", info.Holder(), info.GetIsolate()); | 11192 ExceptionState exceptionState(ExceptionState::ExecutionContext, "iterator",
"TestObject", info.Holder(), info.GetIsolate()); |
| 11193 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 11193 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 11194 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | 11194 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| 11195 RawPtr<Iterator> result = impl->iterator(scriptState, exceptionState); | 11195 Iterator* result = impl->iterator(scriptState, exceptionState); |
| 11196 if (exceptionState.hadException()) { | 11196 if (exceptionState.hadException()) { |
| 11197 exceptionState.throwIfNeeded(); | 11197 exceptionState.throwIfNeeded(); |
| 11198 return; | 11198 return; |
| 11199 } | 11199 } |
| 11200 v8SetReturnValue(info, result.release()); | 11200 v8SetReturnValue(info, result); |
| 11201 } | 11201 } |
| 11202 | 11202 |
| 11203 static void iteratorMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in
fo) | 11203 static void iteratorMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in
fo) |
| 11204 { | 11204 { |
| 11205 TestObjectV8Internal::iteratorMethod(info); | 11205 TestObjectV8Internal::iteratorMethod(info); |
| 11206 } | 11206 } |
| 11207 | 11207 |
| 11208 static void indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo
<v8::Value>& info) | 11208 static void indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo
<v8::Value>& info) |
| 11209 { | 11209 { |
| 11210 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 11210 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| (...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11931 if (RuntimeEnabledFeatures::featureNameEnabled()) { | 11931 if (RuntimeEnabledFeatures::featureNameEnabled()) { |
| 11932 unscopeables->CreateDataProperty(context, v8AtomicString(isolate, "unsco
peableRuntimeEnabledLongAttribute"), v8::True(isolate)).FromJust(); | 11932 unscopeables->CreateDataProperty(context, v8AtomicString(isolate, "unsco
peableRuntimeEnabledLongAttribute"), v8::True(isolate)).FromJust(); |
| 11933 } | 11933 } |
| 11934 if (RuntimeEnabledFeatures::featureNameEnabled()) { | 11934 if (RuntimeEnabledFeatures::featureNameEnabled()) { |
| 11935 unscopeables->CreateDataProperty(context, v8AtomicString(isolate, "unsco
peableRuntimeEnabledVoidMethod"), v8::True(isolate)).FromJust(); | 11935 unscopeables->CreateDataProperty(context, v8AtomicString(isolate, "unsco
peableRuntimeEnabledVoidMethod"), v8::True(isolate)).FromJust(); |
| 11936 } | 11936 } |
| 11937 unscopeables->CreateDataProperty(context, v8AtomicString(isolate, "unscopeab
leVoidMethod"), v8::True(isolate)).FromJust(); | 11937 unscopeables->CreateDataProperty(context, v8AtomicString(isolate, "unscopeab
leVoidMethod"), v8::True(isolate)).FromJust(); |
| 11938 prototypeObject->CreateDataProperty(context, unscopablesSymbol, unscopeables
).FromJust(); | 11938 prototypeObject->CreateDataProperty(context, unscopablesSymbol, unscopeables
).FromJust(); |
| 11939 } | 11939 } |
| 11940 | 11940 |
| 11941 void V8TestObject::refObject(ScriptWrappable* scriptWrappable) | |
| 11942 { | |
| 11943 scriptWrappable->toImpl<TestObject>()->ref(); | |
| 11944 } | |
| 11945 | |
| 11946 void V8TestObject::derefObject(ScriptWrappable* scriptWrappable) | |
| 11947 { | |
| 11948 scriptWrappable->toImpl<TestObject>()->deref(); | |
| 11949 } | |
| 11950 | |
| 11951 bool V8TestObject::PrivateScript::voidMethodImplementedInPrivateScriptMethod(Loc
alFrame* frame, TestObject* holderImpl) | 11941 bool V8TestObject::PrivateScript::voidMethodImplementedInPrivateScriptMethod(Loc
alFrame* frame, TestObject* holderImpl) |
| 11952 { | 11942 { |
| 11953 if (!frame) | 11943 if (!frame) |
| 11954 return false; | 11944 return false; |
| 11955 v8::HandleScope handleScope(toIsolate(frame)); | 11945 v8::HandleScope handleScope(toIsolate(frame)); |
| 11956 ScriptForbiddenScope::AllowUserAgentScript script; | 11946 ScriptForbiddenScope::AllowUserAgentScript script; |
| 11957 ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::pri
vateScriptIsolatedWorld()); | 11947 ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::pri
vateScriptIsolatedWorld()); |
| 11958 if (!scriptState) | 11948 if (!scriptState) |
| 11959 return false; | 11949 return false; |
| 11960 ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame); | 11950 ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame); |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12063 if (v8Value.IsEmpty()) | 12053 if (v8Value.IsEmpty()) |
| 12064 return false; | 12054 return false; |
| 12065 V8StringResource<> cppValue = v8Value; | 12055 V8StringResource<> cppValue = v8Value; |
| 12066 if (!cppValue.prepare()) | 12056 if (!cppValue.prepare()) |
| 12067 return false; | 12057 return false; |
| 12068 *result = cppValue; | 12058 *result = cppValue; |
| 12069 RELEASE_ASSERT(!exceptionState.hadException()); | 12059 RELEASE_ASSERT(!exceptionState.hadException()); |
| 12070 return true; | 12060 return true; |
| 12071 } | 12061 } |
| 12072 | 12062 |
| 12073 bool V8TestObject::PrivateScript::nodeMethodWithNodeArgumentImplementedInPrivate
ScriptMethod(LocalFrame* frame, TestObject* holderImpl, Node* value, RawPtr<Node
>* result) | 12063 bool V8TestObject::PrivateScript::nodeMethodWithNodeArgumentImplementedInPrivate
ScriptMethod(LocalFrame* frame, TestObject* holderImpl, Node* value, Node** resu
lt) |
| 12074 { | 12064 { |
| 12075 if (!frame) | 12065 if (!frame) |
| 12076 return false; | 12066 return false; |
| 12077 v8::HandleScope handleScope(toIsolate(frame)); | 12067 v8::HandleScope handleScope(toIsolate(frame)); |
| 12078 ScriptForbiddenScope::AllowUserAgentScript script; | 12068 ScriptForbiddenScope::AllowUserAgentScript script; |
| 12079 ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::pri
vateScriptIsolatedWorld()); | 12069 ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::pri
vateScriptIsolatedWorld()); |
| 12080 if (!scriptState) | 12070 if (!scriptState) |
| 12081 return false; | 12071 return false; |
| 12082 ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame); | 12072 ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame); |
| 12083 if (!scriptStateInUserScript) | 12073 if (!scriptStateInUserScript) |
| 12084 return false; | 12074 return false; |
| 12085 | 12075 |
| 12086 ScriptState::Scope scope(scriptState); | 12076 ScriptState::Scope scope(scriptState); |
| 12087 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa
l(), scriptState->isolate()); | 12077 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa
l(), scriptState->isolate()); |
| 12088 if (holder.IsEmpty()) | 12078 if (holder.IsEmpty()) |
| 12089 return false; | 12079 return false; |
| 12090 | 12080 |
| 12091 v8::Local<v8::Value> valueHandle = toV8(value, scriptState->context()->Globa
l(), scriptState->isolate()); | 12081 v8::Local<v8::Value> valueHandle = toV8(value, scriptState->context()->Globa
l(), scriptState->isolate()); |
| 12092 v8::Local<v8::Value> argv[] = { valueHandle }; | 12082 v8::Local<v8::Value> argv[] = { valueHandle }; |
| 12093 ExceptionState exceptionState(ExceptionState::ExecutionContext, "nodeMethodW
ithNodeArgumentImplementedInPrivateScript", "TestObject", scriptState->context()
->Global(), scriptState->isolate()); | 12083 ExceptionState exceptionState(ExceptionState::ExecutionContext, "nodeMethodW
ithNodeArgumentImplementedInPrivateScript", "TestObject", scriptState->context()
->Global(), scriptState->isolate()); |
| 12094 v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptState
, scriptStateInUserScript, "TestObject", "nodeMethodWithNodeArgumentImplementedI
nPrivateScript", holder, 1, argv); | 12084 v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptState
, scriptStateInUserScript, "TestObject", "nodeMethodWithNodeArgumentImplementedI
nPrivateScript", holder, 1, argv); |
| 12095 if (v8Value.IsEmpty()) | 12085 if (v8Value.IsEmpty()) |
| 12096 return false; | 12086 return false; |
| 12097 Node* cppValue = V8Node::toImplWithTypeCheck(scriptState->isolate(), v8Value
); | 12087 Node* cppValue = V8Node::toImplWithTypeCheck(scriptState->isolate(), v8Value
); |
| 12098 *result = cppValue; | 12088 *result = cppValue; |
| 12099 RELEASE_ASSERT(!exceptionState.hadException()); | 12089 RELEASE_ASSERT(!exceptionState.hadException()); |
| 12100 return true; | 12090 return true; |
| 12101 } | 12091 } |
| 12102 | 12092 |
| 12103 bool V8TestObject::PrivateScript::nodeMethodWithVariousArgumentsImplementedInPri
vateScriptMethod(LocalFrame* frame, TestObject* holderImpl, Document* document,
Node* node, int value1, double value2, String string, RawPtr<Node>* result) | 12093 bool V8TestObject::PrivateScript::nodeMethodWithVariousArgumentsImplementedInPri
vateScriptMethod(LocalFrame* frame, TestObject* holderImpl, Document* document,
Node* node, int value1, double value2, String string, Node** result) |
| 12104 { | 12094 { |
| 12105 if (!frame) | 12095 if (!frame) |
| 12106 return false; | 12096 return false; |
| 12107 v8::HandleScope handleScope(toIsolate(frame)); | 12097 v8::HandleScope handleScope(toIsolate(frame)); |
| 12108 ScriptForbiddenScope::AllowUserAgentScript script; | 12098 ScriptForbiddenScope::AllowUserAgentScript script; |
| 12109 ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::pri
vateScriptIsolatedWorld()); | 12099 ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::pri
vateScriptIsolatedWorld()); |
| 12110 if (!scriptState) | 12100 if (!scriptState) |
| 12111 return false; | 12101 return false; |
| 12112 ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame); | 12102 ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame); |
| 12113 if (!scriptStateInUserScript) | 12103 if (!scriptStateInUserScript) |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12297 | 12287 |
| 12298 ScriptState::Scope scope(scriptState); | 12288 ScriptState::Scope scope(scriptState); |
| 12299 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa
l(), scriptState->isolate()); | 12289 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa
l(), scriptState->isolate()); |
| 12300 if (holder.IsEmpty()) | 12290 if (holder.IsEmpty()) |
| 12301 return false; | 12291 return false; |
| 12302 | 12292 |
| 12303 ExceptionState exceptionState(ExceptionState::SetterContext, "stringAttribut
e", "TestObject", scriptState->context()->Global(), scriptState->isolate()); | 12293 ExceptionState exceptionState(ExceptionState::SetterContext, "stringAttribut
e", "TestObject", scriptState->context()->Global(), scriptState->isolate()); |
| 12304 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn
UserScript, "TestObject", "stringAttribute", holder, v8String(scriptState->isola
te(), cppValue)); | 12294 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn
UserScript, "TestObject", "stringAttribute", holder, v8String(scriptState->isola
te(), cppValue)); |
| 12305 } | 12295 } |
| 12306 | 12296 |
| 12307 bool V8TestObject::PrivateScript::nodeAttributeAttributeGetter(LocalFrame* frame
, TestObject* holderImpl, RawPtr<Node>* result) | 12297 bool V8TestObject::PrivateScript::nodeAttributeAttributeGetter(LocalFrame* frame
, TestObject* holderImpl, Node** result) |
| 12308 { | 12298 { |
| 12309 if (!frame) | 12299 if (!frame) |
| 12310 return false; | 12300 return false; |
| 12311 v8::HandleScope handleScope(toIsolate(frame)); | 12301 v8::HandleScope handleScope(toIsolate(frame)); |
| 12312 ScriptForbiddenScope::AllowUserAgentScript script; | 12302 ScriptForbiddenScope::AllowUserAgentScript script; |
| 12313 ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::pri
vateScriptIsolatedWorld()); | 12303 ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::pri
vateScriptIsolatedWorld()); |
| 12314 if (!scriptState) | 12304 if (!scriptState) |
| 12315 return false; | 12305 return false; |
| 12316 ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame); | 12306 ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame); |
| 12317 if (!scriptStateInUserScript) | 12307 if (!scriptStateInUserScript) |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12455 ScriptState::Scope scope(scriptState); | 12445 ScriptState::Scope scope(scriptState); |
| 12456 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa
l(), scriptState->isolate()); | 12446 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa
l(), scriptState->isolate()); |
| 12457 if (holder.IsEmpty()) | 12447 if (holder.IsEmpty()) |
| 12458 return false; | 12448 return false; |
| 12459 | 12449 |
| 12460 ExceptionState exceptionState(ExceptionState::SetterContext, "enumForPrivate
Script", "TestObject", scriptState->context()->Global(), scriptState->isolate())
; | 12450 ExceptionState exceptionState(ExceptionState::SetterContext, "enumForPrivate
Script", "TestObject", scriptState->context()->Global(), scriptState->isolate())
; |
| 12461 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn
UserScript, "TestObject", "enumForPrivateScript", holder, v8String(scriptState->
isolate(), cppValue)); | 12451 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn
UserScript, "TestObject", "enumForPrivateScript", holder, v8String(scriptState->
isolate(), cppValue)); |
| 12462 } | 12452 } |
| 12463 | 12453 |
| 12464 } // namespace blink | 12454 } // namespace blink |
| OLD | NEW |