| OLD | NEW |
| 1 /* | 1 /* |
| 2 This file is part of the Blink open source project. | 2 This file is part of the Blink open source project. |
| 3 This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY! | 3 This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY! |
| 4 | 4 |
| 5 This library is free software; you can redistribute it and/or | 5 This library is free software; you can redistribute it and/or |
| 6 modify it under the terms of the GNU Library General Public | 6 modify it under the terms of the GNU Library General Public |
| 7 License as published by the Free Software Foundation; either | 7 License as published by the Free Software Foundation; either |
| 8 version 2 of the License, or (at your option) any later version. | 8 version 2 of the License, or (at your option) any later version. |
| 9 | 9 |
| 10 This library is distributed in the hope that it will be useful, | 10 This library is distributed in the hope that it will be useful, |
| 11 but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 Library General Public License for more details. | 13 Library General Public License for more details. |
| 14 | 14 |
| 15 You should have received a copy of the GNU Library General Public License | 15 You should have received a copy of the GNU Library General Public License |
| 16 along with this library; see the file COPYING.LIB. If not, write to | 16 along with this library; see the file COPYING.LIB. If not, write to |
| 17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
| 18 Boston, MA 02111-1307, USA. | 18 Boston, MA 02111-1307, USA. |
| 19 */ | 19 */ |
| 20 | 20 |
| 21 #include "config.h" | 21 #include "config.h" |
| 22 #include "V8TestObj.h" | 22 #include "V8TestObject.h" |
| 23 | 23 |
| 24 #include "HTMLNames.h" | 24 #include "HTMLNames.h" |
| 25 #include "RuntimeEnabledFeatures.h" | 25 #include "RuntimeEnabledFeatures.h" |
| 26 #include "ScriptProfile.h" | 26 #include "ScriptProfile.h" |
| 27 #include "V8DOMStringList.h" | 27 #include "V8DOMStringList.h" |
| 28 #include "V8Document.h" | 28 #include "V8Document.h" |
| 29 #include "V8Float32Array.h" | 29 #include "V8Float32Array.h" |
| 30 #include "V8Node.h" | 30 #include "V8Node.h" |
| 31 #include "V8SVGDocument.h" | 31 #include "V8SVGDocument.h" |
| 32 #include "V8SVGPoint.h" | 32 #include "V8SVGPoint.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 57 #include "core/svg/properties/SVGPropertyTearOff.h" | 57 #include "core/svg/properties/SVGPropertyTearOff.h" |
| 58 #include "core/svg/properties/SVGStaticPropertyTearOff.h" | 58 #include "core/svg/properties/SVGStaticPropertyTearOff.h" |
| 59 #include "wtf/Float32Array.h" | 59 #include "wtf/Float32Array.h" |
| 60 #include "wtf/GetPtr.h" | 60 #include "wtf/GetPtr.h" |
| 61 #include "wtf/RefCounted.h" | 61 #include "wtf/RefCounted.h" |
| 62 #include "wtf/RefPtr.h" | 62 #include "wtf/RefPtr.h" |
| 63 #include "wtf/UnusedParam.h" | 63 #include "wtf/UnusedParam.h" |
| 64 #include "wtf/Vector.h" | 64 #include "wtf/Vector.h" |
| 65 | 65 |
| 66 #if ENABLE(Condition1) | 66 #if ENABLE(Condition1) |
| 67 #include "V8TestObjectA.h" | 67 #include "V8TestObjectectA.h" |
| 68 #endif | 68 #endif |
| 69 | 69 |
| 70 #if ENABLE(Condition1) && ENABLE(Condition2) | 70 #if ENABLE(Condition1) && ENABLE(Condition2) |
| 71 #include "V8TestObjectB.h" | 71 #include "V8TestObjectectB.h" |
| 72 #endif | 72 #endif |
| 73 | 73 |
| 74 #if ENABLE(Condition1) || ENABLE(Condition2) | 74 #if ENABLE(Condition1) || ENABLE(Condition2) |
| 75 #include "V8TestObjectC.h" | 75 #include "V8TestObjectectC.h" |
| 76 #endif | 76 #endif |
| 77 | 77 |
| 78 #if ENABLE(BINDING_INTEGRITY) | 78 #if ENABLE(BINDING_INTEGRITY) |
| 79 #if defined(OS_WIN) | 79 #if defined(OS_WIN) |
| 80 #pragma warning(disable: 4483) | 80 #pragma warning(disable: 4483) |
| 81 extern "C" { extern void (*const __identifier("??_7TestObj@WebCore@@6B@")[])();
} | 81 extern "C" { extern void (*const __identifier("??_7TestObj@WebCore@@6B@")[])();
} |
| 82 #else | 82 #else |
| 83 extern "C" { extern void* _ZTVN7WebCore7TestObjE[]; } | 83 extern "C" { extern void* _ZTVN7WebCore7TestObjE[]; } |
| 84 #endif | 84 #endif |
| 85 #endif // ENABLE(BINDING_INTEGRITY) | 85 #endif // ENABLE(BINDING_INTEGRITY) |
| (...skipping 21 matching lines...) Expand all Loading... |
| 107 if (actualVTablePointer != expectedVTablePointer) | 107 if (actualVTablePointer != expectedVTablePointer) |
| 108 CRASH(); | 108 CRASH(); |
| 109 } | 109 } |
| 110 #endif // ENABLE(BINDING_INTEGRITY) | 110 #endif // ENABLE(BINDING_INTEGRITY) |
| 111 | 111 |
| 112 #if defined(OS_WIN) | 112 #if defined(OS_WIN) |
| 113 // In ScriptWrappable, the use of extern function prototypes inside templated st
atic methods has an issue on windows. | 113 // In ScriptWrappable, the use of extern function prototypes inside templated st
atic methods has an issue on windows. |
| 114 // These prototypes do not pick up the surrounding namespace, so drop out of Web
Core as a workaround. | 114 // These prototypes do not pick up the surrounding namespace, so drop out of Web
Core as a workaround. |
| 115 } // namespace WebCore | 115 } // namespace WebCore |
| 116 using WebCore::ScriptWrappable; | 116 using WebCore::ScriptWrappable; |
| 117 using WebCore::V8TestObj; | 117 using WebCore::V8TestObject; |
| 118 using WebCore::TestObj; | 118 using WebCore::TestObj; |
| 119 #endif | 119 #endif |
| 120 void initializeScriptWrappableForInterface(TestObj* object) | 120 void initializeScriptWrappableForInterface(TestObj* object) |
| 121 { | 121 { |
| 122 if (ScriptWrappable::wrapperCanBeStoredInObject(object)) | 122 if (ScriptWrappable::wrapperCanBeStoredInObject(object)) |
| 123 ScriptWrappable::setTypeInfoInObject(object, &V8TestObj::info); | 123 ScriptWrappable::setTypeInfoInObject(object, &V8TestObject::info); |
| 124 } | 124 } |
| 125 #if defined(OS_WIN) | 125 #if defined(OS_WIN) |
| 126 namespace WebCore { | 126 namespace WebCore { |
| 127 #endif | 127 #endif |
| 128 WrapperTypeInfo V8TestObj::info = { V8TestObj::GetTemplate, V8TestObj::derefObje
ct, 0, 0, 0, V8TestObj::installPerContextPrototypeProperties, 0, WrapperTypeObje
ctPrototype }; | 128 WrapperTypeInfo V8TestObject::info = { V8TestObject::GetTemplate, V8TestObject::
derefObject, 0, 0, 0, V8TestObject::installPerContextPrototypeProperties, 0, Wra
pperTypeObjectPrototype }; |
| 129 | 129 |
| 130 namespace TestObjV8Internal { | 130 namespace TestObjV8Internal { |
| 131 | 131 |
| 132 template <typename T> void V8_USE(T) { } | 132 template <typename T> void V8_USE(T) { } |
| 133 | 133 |
| 134 static v8::Handle<v8::Value> readOnlyLongAttrAttrGetter(v8::Local<v8::String> na
me, const v8::AccessorInfo& info) | 134 static v8::Handle<v8::Value> readOnlyLongAttrAttrGetter(v8::Local<v8::String> na
me, const v8::AccessorInfo& info) |
| 135 { | 135 { |
| 136 TestObj* imp = V8TestObj::toNative(info.Holder()); | 136 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 137 return v8Integer(imp->readOnlyLongAttr(), info.GetIsolate()); | 137 return v8Integer(imp->readOnlyLongAttr(), info.GetIsolate()); |
| 138 } | 138 } |
| 139 | 139 |
| 140 static v8::Handle<v8::Value> readOnlyLongAttrAttrGetterCallback(v8::Local<v8::St
ring> name, const v8::AccessorInfo& info) | 140 static v8::Handle<v8::Value> readOnlyLongAttrAttrGetterCallback(v8::Local<v8::St
ring> name, const v8::AccessorInfo& info) |
| 141 { | 141 { |
| 142 return TestObjV8Internal::readOnlyLongAttrAttrGetter(name, info); | 142 return TestObjV8Internal::readOnlyLongAttrAttrGetter(name, info); |
| 143 } | 143 } |
| 144 | 144 |
| 145 static v8::Handle<v8::Value> readOnlyStringAttrAttrGetter(v8::Local<v8::String>
name, const v8::AccessorInfo& info) | 145 static v8::Handle<v8::Value> readOnlyStringAttrAttrGetter(v8::Local<v8::String>
name, const v8::AccessorInfo& info) |
| 146 { | 146 { |
| 147 TestObj* imp = V8TestObj::toNative(info.Holder()); | 147 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 148 return v8String(imp->readOnlyStringAttr(), info.GetIsolate(), ReturnUnsafeHa
ndle); | 148 return v8String(imp->readOnlyStringAttr(), info.GetIsolate(), ReturnUnsafeHa
ndle); |
| 149 } | 149 } |
| 150 | 150 |
| 151 static v8::Handle<v8::Value> readOnlyStringAttrAttrGetterCallback(v8::Local<v8::
String> name, const v8::AccessorInfo& info) | 151 static v8::Handle<v8::Value> readOnlyStringAttrAttrGetterCallback(v8::Local<v8::
String> name, const v8::AccessorInfo& info) |
| 152 { | 152 { |
| 153 return TestObjV8Internal::readOnlyStringAttrAttrGetter(name, info); | 153 return TestObjV8Internal::readOnlyStringAttrAttrGetter(name, info); |
| 154 } | 154 } |
| 155 | 155 |
| 156 static v8::Handle<v8::Value> readOnlyTestObjAttrAttrGetter(v8::Local<v8::String>
name, const v8::AccessorInfo& info) | 156 static v8::Handle<v8::Value> readOnlyTestObjectAttrAttrGetter(v8::Local<v8::Stri
ng> name, const v8::AccessorInfo& info) |
| 157 { | 157 { |
| 158 TestObj* imp = V8TestObj::toNative(info.Holder()); | 158 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 159 RefPtr<TestObj> result = imp->readOnlyTestObjAttr(); | 159 RefPtr<TestObj> result = imp->readOnlyTestObjectAttr(); |
| 160 v8::Handle<v8::Value> wrapper = result.get() ? v8::Handle<v8::Value>(DOMData
Store::getWrapper(result.get(), info.GetIsolate())) : v8Undefined(); | 160 v8::Handle<v8::Value> wrapper = result.get() ? v8::Handle<v8::Value>(DOMData
Store::getWrapper(result.get(), info.GetIsolate())) : v8Undefined(); |
| 161 if (wrapper.IsEmpty()) { | 161 if (wrapper.IsEmpty()) { |
| 162 wrapper = toV8(result.get(), info.Holder(), info.GetIsolate()); | 162 wrapper = toV8(result.get(), info.Holder(), info.GetIsolate()); |
| 163 if (!wrapper.IsEmpty()) | 163 if (!wrapper.IsEmpty()) |
| 164 V8HiddenPropertyName::setNamedHiddenReference(info.Holder(), "readOn
lyTestObjAttr", wrapper); | 164 V8HiddenPropertyName::setNamedHiddenReference(info.Holder(), "readOn
lyTestObjectAttr", wrapper); |
| 165 } | 165 } |
| 166 return wrapper; | 166 return wrapper; |
| 167 } | 167 } |
| 168 | 168 |
| 169 static v8::Handle<v8::Value> readOnlyTestObjAttrAttrGetterCallback(v8::Local<v8:
:String> name, const v8::AccessorInfo& info) | 169 static v8::Handle<v8::Value> readOnlyTestObjectAttrAttrGetterCallback(v8::Local<
v8::String> name, const v8::AccessorInfo& info) |
| 170 { | 170 { |
| 171 return TestObjV8Internal::readOnlyTestObjAttrAttrGetter(name, info); | 171 return TestObjV8Internal::readOnlyTestObjectAttrAttrGetter(name, info); |
| 172 } | 172 } |
| 173 | 173 |
| 174 static v8::Handle<v8::Value> staticReadOnlyLongAttrAttrGetter(v8::Local<v8::Stri
ng> name, const v8::AccessorInfo& info) | 174 static v8::Handle<v8::Value> staticReadOnlyLongAttrAttrGetter(v8::Local<v8::Stri
ng> name, const v8::AccessorInfo& info) |
| 175 { | 175 { |
| 176 return v8Integer(TestObj::staticReadOnlyLongAttr(), info.GetIsolate()); | 176 return v8Integer(TestObj::staticReadOnlyLongAttr(), info.GetIsolate()); |
| 177 } | 177 } |
| 178 | 178 |
| 179 static v8::Handle<v8::Value> staticReadOnlyLongAttrAttrGetterCallback(v8::Local<
v8::String> name, const v8::AccessorInfo& info) | 179 static v8::Handle<v8::Value> staticReadOnlyLongAttrAttrGetterCallback(v8::Local<
v8::String> name, const v8::AccessorInfo& info) |
| 180 { | 180 { |
| 181 return TestObjV8Internal::staticReadOnlyLongAttrAttrGetter(name, info); | 181 return TestObjV8Internal::staticReadOnlyLongAttrAttrGetter(name, info); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 198 return; | 198 return; |
| 199 } | 199 } |
| 200 | 200 |
| 201 static void staticStringAttrAttrSetterCallback(v8::Local<v8::String> name, v8::L
ocal<v8::Value> value, const v8::AccessorInfo& info) | 201 static void staticStringAttrAttrSetterCallback(v8::Local<v8::String> name, v8::L
ocal<v8::Value> value, const v8::AccessorInfo& info) |
| 202 { | 202 { |
| 203 TestObjV8Internal::staticStringAttrAttrSetter(name, value, info); | 203 TestObjV8Internal::staticStringAttrAttrSetter(name, value, info); |
| 204 } | 204 } |
| 205 | 205 |
| 206 static v8::Handle<v8::Value> enumAttrAttrGetter(v8::Local<v8::String> name, cons
t v8::AccessorInfo& info) | 206 static v8::Handle<v8::Value> enumAttrAttrGetter(v8::Local<v8::String> name, cons
t v8::AccessorInfo& info) |
| 207 { | 207 { |
| 208 TestObj* imp = V8TestObj::toNative(info.Holder()); | 208 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 209 return v8String(imp->enumAttr(), info.GetIsolate(), ReturnUnsafeHandle); | 209 return v8String(imp->enumAttr(), info.GetIsolate(), ReturnUnsafeHandle); |
| 210 } | 210 } |
| 211 | 211 |
| 212 static v8::Handle<v8::Value> enumAttrAttrGetterCallback(v8::Local<v8::String> na
me, const v8::AccessorInfo& info) | 212 static v8::Handle<v8::Value> enumAttrAttrGetterCallback(v8::Local<v8::String> na
me, const v8::AccessorInfo& info) |
| 213 { | 213 { |
| 214 return TestObjV8Internal::enumAttrAttrGetter(name, info); | 214 return TestObjV8Internal::enumAttrAttrGetter(name, info); |
| 215 } | 215 } |
| 216 | 216 |
| 217 static void enumAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value>
value, const v8::AccessorInfo& info) | 217 static void enumAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value>
value, const v8::AccessorInfo& info) |
| 218 { | 218 { |
| 219 TestObj* imp = V8TestObj::toNative(info.Holder()); | 219 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 220 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, v, value); | 220 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, v, value); |
| 221 String string = v; | 221 String string = v; |
| 222 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" || st
ring == "EnumValue3")) | 222 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" || st
ring == "EnumValue3")) |
| 223 return; | 223 return; |
| 224 imp->setEnumAttr(v); | 224 imp->setEnumAttr(v); |
| 225 return; | 225 return; |
| 226 } | 226 } |
| 227 | 227 |
| 228 static void enumAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8:
:Value> value, const v8::AccessorInfo& info) | 228 static void enumAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8:
:Value> value, const v8::AccessorInfo& info) |
| 229 { | 229 { |
| 230 TestObjV8Internal::enumAttrAttrSetter(name, value, info); | 230 TestObjV8Internal::enumAttrAttrSetter(name, value, info); |
| 231 } | 231 } |
| 232 | 232 |
| 233 static v8::Handle<v8::Value> readOnlyEnumAttrAttrGetter(v8::Local<v8::String> na
me, const v8::AccessorInfo& info) | 233 static v8::Handle<v8::Value> readOnlyEnumAttrAttrGetter(v8::Local<v8::String> na
me, const v8::AccessorInfo& info) |
| 234 { | 234 { |
| 235 TestObj* imp = V8TestObj::toNative(info.Holder()); | 235 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 236 return v8String(imp->readOnlyEnumAttr(), info.GetIsolate(), ReturnUnsafeHand
le); | 236 return v8String(imp->readOnlyEnumAttr(), info.GetIsolate(), ReturnUnsafeHand
le); |
| 237 } | 237 } |
| 238 | 238 |
| 239 static v8::Handle<v8::Value> readOnlyEnumAttrAttrGetterCallback(v8::Local<v8::St
ring> name, const v8::AccessorInfo& info) | 239 static v8::Handle<v8::Value> readOnlyEnumAttrAttrGetterCallback(v8::Local<v8::St
ring> name, const v8::AccessorInfo& info) |
| 240 { | 240 { |
| 241 return TestObjV8Internal::readOnlyEnumAttrAttrGetter(name, info); | 241 return TestObjV8Internal::readOnlyEnumAttrAttrGetter(name, info); |
| 242 } | 242 } |
| 243 | 243 |
| 244 static v8::Handle<v8::Value> shortAttrAttrGetter(v8::Local<v8::String> name, con
st v8::AccessorInfo& info) | 244 static v8::Handle<v8::Value> shortAttrAttrGetter(v8::Local<v8::String> name, con
st v8::AccessorInfo& info) |
| 245 { | 245 { |
| 246 TestObj* imp = V8TestObj::toNative(info.Holder()); | 246 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 247 return v8Integer(imp->shortAttr(), info.GetIsolate()); | 247 return v8Integer(imp->shortAttr(), info.GetIsolate()); |
| 248 } | 248 } |
| 249 | 249 |
| 250 static v8::Handle<v8::Value> shortAttrAttrGetterCallback(v8::Local<v8::String> n
ame, const v8::AccessorInfo& info) | 250 static v8::Handle<v8::Value> shortAttrAttrGetterCallback(v8::Local<v8::String> n
ame, const v8::AccessorInfo& info) |
| 251 { | 251 { |
| 252 return TestObjV8Internal::shortAttrAttrGetter(name, info); | 252 return TestObjV8Internal::shortAttrAttrGetter(name, info); |
| 253 } | 253 } |
| 254 | 254 |
| 255 static void shortAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value>
value, const v8::AccessorInfo& info) | 255 static void shortAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value>
value, const v8::AccessorInfo& info) |
| 256 { | 256 { |
| 257 TestObj* imp = V8TestObj::toNative(info.Holder()); | 257 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 258 V8TRYCATCH_VOID(int, v, toInt32(value)); | 258 V8TRYCATCH_VOID(int, v, toInt32(value)); |
| 259 imp->setShortAttr(v); | 259 imp->setShortAttr(v); |
| 260 return; | 260 return; |
| 261 } | 261 } |
| 262 | 262 |
| 263 static void shortAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8
::Value> value, const v8::AccessorInfo& info) | 263 static void shortAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8
::Value> value, const v8::AccessorInfo& info) |
| 264 { | 264 { |
| 265 TestObjV8Internal::shortAttrAttrSetter(name, value, info); | 265 TestObjV8Internal::shortAttrAttrSetter(name, value, info); |
| 266 } | 266 } |
| 267 | 267 |
| 268 static v8::Handle<v8::Value> unsignedShortAttrAttrGetter(v8::Local<v8::String> n
ame, const v8::AccessorInfo& info) | 268 static v8::Handle<v8::Value> unsignedShortAttrAttrGetter(v8::Local<v8::String> n
ame, const v8::AccessorInfo& info) |
| 269 { | 269 { |
| 270 TestObj* imp = V8TestObj::toNative(info.Holder()); | 270 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 271 return v8Integer(imp->unsignedShortAttr(), info.GetIsolate()); | 271 return v8Integer(imp->unsignedShortAttr(), info.GetIsolate()); |
| 272 } | 272 } |
| 273 | 273 |
| 274 static v8::Handle<v8::Value> unsignedShortAttrAttrGetterCallback(v8::Local<v8::S
tring> name, const v8::AccessorInfo& info) | 274 static v8::Handle<v8::Value> unsignedShortAttrAttrGetterCallback(v8::Local<v8::S
tring> name, const v8::AccessorInfo& info) |
| 275 { | 275 { |
| 276 return TestObjV8Internal::unsignedShortAttrAttrGetter(name, info); | 276 return TestObjV8Internal::unsignedShortAttrAttrGetter(name, info); |
| 277 } | 277 } |
| 278 | 278 |
| 279 static void unsignedShortAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8
::Value> value, const v8::AccessorInfo& info) | 279 static void unsignedShortAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8
::Value> value, const v8::AccessorInfo& info) |
| 280 { | 280 { |
| 281 TestObj* imp = V8TestObj::toNative(info.Holder()); | 281 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 282 V8TRYCATCH_VOID(int, v, toUInt32(value)); | 282 V8TRYCATCH_VOID(int, v, toUInt32(value)); |
| 283 imp->setUnsignedShortAttr(v); | 283 imp->setUnsignedShortAttr(v); |
| 284 return; | 284 return; |
| 285 } | 285 } |
| 286 | 286 |
| 287 static void unsignedShortAttrAttrSetterCallback(v8::Local<v8::String> name, v8::
Local<v8::Value> value, const v8::AccessorInfo& info) | 287 static void unsignedShortAttrAttrSetterCallback(v8::Local<v8::String> name, v8::
Local<v8::Value> value, const v8::AccessorInfo& info) |
| 288 { | 288 { |
| 289 TestObjV8Internal::unsignedShortAttrAttrSetter(name, value, info); | 289 TestObjV8Internal::unsignedShortAttrAttrSetter(name, value, info); |
| 290 } | 290 } |
| 291 | 291 |
| 292 static v8::Handle<v8::Value> longAttrAttrGetter(v8::Local<v8::String> name, cons
t v8::AccessorInfo& info) | 292 static v8::Handle<v8::Value> longAttrAttrGetter(v8::Local<v8::String> name, cons
t v8::AccessorInfo& info) |
| 293 { | 293 { |
| 294 TestObj* imp = V8TestObj::toNative(info.Holder()); | 294 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 295 return v8Integer(imp->longAttr(), info.GetIsolate()); | 295 return v8Integer(imp->longAttr(), info.GetIsolate()); |
| 296 } | 296 } |
| 297 | 297 |
| 298 static v8::Handle<v8::Value> longAttrAttrGetterCallback(v8::Local<v8::String> na
me, const v8::AccessorInfo& info) | 298 static v8::Handle<v8::Value> longAttrAttrGetterCallback(v8::Local<v8::String> na
me, const v8::AccessorInfo& info) |
| 299 { | 299 { |
| 300 return TestObjV8Internal::longAttrAttrGetter(name, info); | 300 return TestObjV8Internal::longAttrAttrGetter(name, info); |
| 301 } | 301 } |
| 302 | 302 |
| 303 static void longAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value>
value, const v8::AccessorInfo& info) | 303 static void longAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value>
value, const v8::AccessorInfo& info) |
| 304 { | 304 { |
| 305 TestObj* imp = V8TestObj::toNative(info.Holder()); | 305 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 306 V8TRYCATCH_VOID(int, v, toInt32(value)); | 306 V8TRYCATCH_VOID(int, v, toInt32(value)); |
| 307 imp->setLongAttr(v); | 307 imp->setLongAttr(v); |
| 308 return; | 308 return; |
| 309 } | 309 } |
| 310 | 310 |
| 311 static void longAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8:
:Value> value, const v8::AccessorInfo& info) | 311 static void longAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8:
:Value> value, const v8::AccessorInfo& info) |
| 312 { | 312 { |
| 313 TestObjV8Internal::longAttrAttrSetter(name, value, info); | 313 TestObjV8Internal::longAttrAttrSetter(name, value, info); |
| 314 } | 314 } |
| 315 | 315 |
| 316 static v8::Handle<v8::Value> longLongAttrAttrGetter(v8::Local<v8::String> name,
const v8::AccessorInfo& info) | 316 static v8::Handle<v8::Value> longLongAttrAttrGetter(v8::Local<v8::String> name,
const v8::AccessorInfo& info) |
| 317 { | 317 { |
| 318 TestObj* imp = V8TestObj::toNative(info.Holder()); | 318 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 319 return v8::Number::New(static_cast<double>(imp->longLongAttr())); | 319 return v8::Number::New(static_cast<double>(imp->longLongAttr())); |
| 320 } | 320 } |
| 321 | 321 |
| 322 static v8::Handle<v8::Value> longLongAttrAttrGetterCallback(v8::Local<v8::String
> name, const v8::AccessorInfo& info) | 322 static v8::Handle<v8::Value> longLongAttrAttrGetterCallback(v8::Local<v8::String
> name, const v8::AccessorInfo& info) |
| 323 { | 323 { |
| 324 return TestObjV8Internal::longLongAttrAttrGetter(name, info); | 324 return TestObjV8Internal::longLongAttrAttrGetter(name, info); |
| 325 } | 325 } |
| 326 | 326 |
| 327 static void longLongAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Val
ue> value, const v8::AccessorInfo& info) | 327 static void longLongAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Val
ue> value, const v8::AccessorInfo& info) |
| 328 { | 328 { |
| 329 TestObj* imp = V8TestObj::toNative(info.Holder()); | 329 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 330 V8TRYCATCH_VOID(long long, v, toInt64(value)); | 330 V8TRYCATCH_VOID(long long, v, toInt64(value)); |
| 331 imp->setLongLongAttr(v); | 331 imp->setLongLongAttr(v); |
| 332 return; | 332 return; |
| 333 } | 333 } |
| 334 | 334 |
| 335 static void longLongAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local
<v8::Value> value, const v8::AccessorInfo& info) | 335 static void longLongAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local
<v8::Value> value, const v8::AccessorInfo& info) |
| 336 { | 336 { |
| 337 TestObjV8Internal::longLongAttrAttrSetter(name, value, info); | 337 TestObjV8Internal::longLongAttrAttrSetter(name, value, info); |
| 338 } | 338 } |
| 339 | 339 |
| 340 static v8::Handle<v8::Value> unsignedLongLongAttrAttrGetter(v8::Local<v8::String
> name, const v8::AccessorInfo& info) | 340 static v8::Handle<v8::Value> unsignedLongLongAttrAttrGetter(v8::Local<v8::String
> name, const v8::AccessorInfo& info) |
| 341 { | 341 { |
| 342 TestObj* imp = V8TestObj::toNative(info.Holder()); | 342 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 343 return v8::Number::New(static_cast<double>(imp->unsignedLongLongAttr())); | 343 return v8::Number::New(static_cast<double>(imp->unsignedLongLongAttr())); |
| 344 } | 344 } |
| 345 | 345 |
| 346 static v8::Handle<v8::Value> unsignedLongLongAttrAttrGetterCallback(v8::Local<v8
::String> name, const v8::AccessorInfo& info) | 346 static v8::Handle<v8::Value> unsignedLongLongAttrAttrGetterCallback(v8::Local<v8
::String> name, const v8::AccessorInfo& info) |
| 347 { | 347 { |
| 348 return TestObjV8Internal::unsignedLongLongAttrAttrGetter(name, info); | 348 return TestObjV8Internal::unsignedLongLongAttrAttrGetter(name, info); |
| 349 } | 349 } |
| 350 | 350 |
| 351 static void unsignedLongLongAttrAttrSetter(v8::Local<v8::String> name, v8::Local
<v8::Value> value, const v8::AccessorInfo& info) | 351 static void unsignedLongLongAttrAttrSetter(v8::Local<v8::String> name, v8::Local
<v8::Value> value, const v8::AccessorInfo& info) |
| 352 { | 352 { |
| 353 TestObj* imp = V8TestObj::toNative(info.Holder()); | 353 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 354 V8TRYCATCH_VOID(unsigned long long, v, toUInt64(value)); | 354 V8TRYCATCH_VOID(unsigned long long, v, toUInt64(value)); |
| 355 imp->setUnsignedLongLongAttr(v); | 355 imp->setUnsignedLongLongAttr(v); |
| 356 return; | 356 return; |
| 357 } | 357 } |
| 358 | 358 |
| 359 static void unsignedLongLongAttrAttrSetterCallback(v8::Local<v8::String> name, v
8::Local<v8::Value> value, const v8::AccessorInfo& info) | 359 static void unsignedLongLongAttrAttrSetterCallback(v8::Local<v8::String> name, v
8::Local<v8::Value> value, const v8::AccessorInfo& info) |
| 360 { | 360 { |
| 361 TestObjV8Internal::unsignedLongLongAttrAttrSetter(name, value, info); | 361 TestObjV8Internal::unsignedLongLongAttrAttrSetter(name, value, info); |
| 362 } | 362 } |
| 363 | 363 |
| 364 static v8::Handle<v8::Value> stringAttrAttrGetter(v8::Local<v8::String> name, co
nst v8::AccessorInfo& info) | 364 static v8::Handle<v8::Value> stringAttrAttrGetter(v8::Local<v8::String> name, co
nst v8::AccessorInfo& info) |
| 365 { | 365 { |
| 366 TestObj* imp = V8TestObj::toNative(info.Holder()); | 366 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 367 return v8String(imp->stringAttr(), info.GetIsolate(), ReturnUnsafeHandle); | 367 return v8String(imp->stringAttr(), info.GetIsolate(), ReturnUnsafeHandle); |
| 368 } | 368 } |
| 369 | 369 |
| 370 static v8::Handle<v8::Value> stringAttrAttrGetterCallback(v8::Local<v8::String>
name, const v8::AccessorInfo& info) | 370 static v8::Handle<v8::Value> stringAttrAttrGetterCallback(v8::Local<v8::String>
name, const v8::AccessorInfo& info) |
| 371 { | 371 { |
| 372 return TestObjV8Internal::stringAttrAttrGetter(name, info); | 372 return TestObjV8Internal::stringAttrAttrGetter(name, info); |
| 373 } | 373 } |
| 374 | 374 |
| 375 static void stringAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value
> value, const v8::AccessorInfo& info) | 375 static void stringAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value
> value, const v8::AccessorInfo& info) |
| 376 { | 376 { |
| 377 TestObj* imp = V8TestObj::toNative(info.Holder()); | 377 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 378 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, v, value); | 378 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, v, value); |
| 379 imp->setStringAttr(v); | 379 imp->setStringAttr(v); |
| 380 return; | 380 return; |
| 381 } | 381 } |
| 382 | 382 |
| 383 static void stringAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v
8::Value> value, const v8::AccessorInfo& info) | 383 static void stringAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v
8::Value> value, const v8::AccessorInfo& info) |
| 384 { | 384 { |
| 385 TestObjV8Internal::stringAttrAttrSetter(name, value, info); | 385 TestObjV8Internal::stringAttrAttrSetter(name, value, info); |
| 386 } | 386 } |
| 387 | 387 |
| 388 static v8::Handle<v8::Value> testObjAttrAttrGetter(v8::Local<v8::String> name, c
onst v8::AccessorInfo& info) | 388 static v8::Handle<v8::Value> testObjAttrAttrGetter(v8::Local<v8::String> name, c
onst v8::AccessorInfo& info) |
| 389 { | 389 { |
| 390 TestObj* imp = V8TestObj::toNative(info.Holder()); | 390 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 391 return toV8Fast(imp->testObjAttr(), info, imp); | 391 return toV8Fast(imp->testObjAttr(), info, imp); |
| 392 } | 392 } |
| 393 | 393 |
| 394 static v8::Handle<v8::Value> testObjAttrAttrGetterCallback(v8::Local<v8::String>
name, const v8::AccessorInfo& info) | 394 static v8::Handle<v8::Value> testObjAttrAttrGetterCallback(v8::Local<v8::String>
name, const v8::AccessorInfo& info) |
| 395 { | 395 { |
| 396 UseCounter::count(activeDOMWindow(), UseCounter::TestFeature); | 396 UseCounter::count(activeDOMWindow(), UseCounter::TestFeature); |
| 397 return TestObjV8Internal::testObjAttrAttrGetter(name, info); | 397 return TestObjV8Internal::testObjAttrAttrGetter(name, info); |
| 398 } | 398 } |
| 399 | 399 |
| 400 static void testObjAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Valu
e> value, const v8::AccessorInfo& info) | 400 static void testObjAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Valu
e> value, const v8::AccessorInfo& info) |
| 401 { | 401 { |
| 402 TestObj* imp = V8TestObj::toNative(info.Holder()); | 402 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 403 V8TRYCATCH_VOID(TestObj*, v, V8TestObj::HasInstance(value, info.GetIsolate()
, worldType(info.GetIsolate())) ? V8TestObj::toNative(v8::Handle<v8::Object>::Ca
st(value)) : 0); | 403 V8TRYCATCH_VOID(TestObj*, v, V8TestObject::HasInstance(value, info.GetIsolat
e(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Objec
t>::Cast(value)) : 0); |
| 404 imp->setTestObjAttr(WTF::getPtr(v)); | 404 imp->setTestObjAttr(WTF::getPtr(v)); |
| 405 return; | 405 return; |
| 406 } | 406 } |
| 407 | 407 |
| 408 static void testObjAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<
v8::Value> value, const v8::AccessorInfo& info) | 408 static void testObjAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<
v8::Value> value, const v8::AccessorInfo& info) |
| 409 { | 409 { |
| 410 UseCounter::count(activeDOMWindow(), UseCounter::TestFeature); | 410 UseCounter::count(activeDOMWindow(), UseCounter::TestFeature); |
| 411 TestObjV8Internal::testObjAttrAttrSetter(name, value, info); | 411 TestObjV8Internal::testObjAttrAttrSetter(name, value, info); |
| 412 } | 412 } |
| 413 | 413 |
| 414 static v8::Handle<v8::Value> XMLObjAttrAttrGetter(v8::Local<v8::String> name, co
nst v8::AccessorInfo& info) | 414 static v8::Handle<v8::Value> XMLObjAttrAttrGetter(v8::Local<v8::String> name, co
nst v8::AccessorInfo& info) |
| 415 { | 415 { |
| 416 TestObj* imp = V8TestObj::toNative(info.Holder()); | 416 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 417 return toV8Fast(imp->xmlObjAttr(), info, imp); | 417 return toV8Fast(imp->xmlObjAttr(), info, imp); |
| 418 } | 418 } |
| 419 | 419 |
| 420 static v8::Handle<v8::Value> XMLObjAttrAttrGetterCallback(v8::Local<v8::String>
name, const v8::AccessorInfo& info) | 420 static v8::Handle<v8::Value> XMLObjAttrAttrGetterCallback(v8::Local<v8::String>
name, const v8::AccessorInfo& info) |
| 421 { | 421 { |
| 422 return TestObjV8Internal::XMLObjAttrAttrGetter(name, info); | 422 return TestObjV8Internal::XMLObjAttrAttrGetter(name, info); |
| 423 } | 423 } |
| 424 | 424 |
| 425 static void XMLObjAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value
> value, const v8::AccessorInfo& info) | 425 static void XMLObjAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value
> value, const v8::AccessorInfo& info) |
| 426 { | 426 { |
| 427 TestObj* imp = V8TestObj::toNative(info.Holder()); | 427 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 428 V8TRYCATCH_VOID(TestObj*, v, V8TestObj::HasInstance(value, info.GetIsolate()
, worldType(info.GetIsolate())) ? V8TestObj::toNative(v8::Handle<v8::Object>::Ca
st(value)) : 0); | 428 V8TRYCATCH_VOID(TestObj*, v, V8TestObject::HasInstance(value, info.GetIsolat
e(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Objec
t>::Cast(value)) : 0); |
| 429 imp->setXMLObjAttr(WTF::getPtr(v)); | 429 imp->setXMLObjAttr(WTF::getPtr(v)); |
| 430 return; | 430 return; |
| 431 } | 431 } |
| 432 | 432 |
| 433 static void XMLObjAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v
8::Value> value, const v8::AccessorInfo& info) | 433 static void XMLObjAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v
8::Value> value, const v8::AccessorInfo& info) |
| 434 { | 434 { |
| 435 TestObjV8Internal::XMLObjAttrAttrSetter(name, value, info); | 435 TestObjV8Internal::XMLObjAttrAttrSetter(name, value, info); |
| 436 } | 436 } |
| 437 | 437 |
| 438 static v8::Handle<v8::Value> createAttrGetter(v8::Local<v8::String> name, const
v8::AccessorInfo& info) | 438 static v8::Handle<v8::Value> createAttrGetter(v8::Local<v8::String> name, const
v8::AccessorInfo& info) |
| 439 { | 439 { |
| 440 TestObj* imp = V8TestObj::toNative(info.Holder()); | 440 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 441 return v8Boolean(imp->isCreate(), info.GetIsolate()); | 441 return v8Boolean(imp->isCreate(), info.GetIsolate()); |
| 442 } | 442 } |
| 443 | 443 |
| 444 static v8::Handle<v8::Value> createAttrGetterCallback(v8::Local<v8::String> name
, const v8::AccessorInfo& info) | 444 static v8::Handle<v8::Value> createAttrGetterCallback(v8::Local<v8::String> name
, const v8::AccessorInfo& info) |
| 445 { | 445 { |
| 446 return TestObjV8Internal::createAttrGetter(name, info); | 446 return TestObjV8Internal::createAttrGetter(name, info); |
| 447 } | 447 } |
| 448 | 448 |
| 449 static void createAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> va
lue, const v8::AccessorInfo& info) | 449 static void createAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> va
lue, const v8::AccessorInfo& info) |
| 450 { | 450 { |
| 451 TestObj* imp = V8TestObj::toNative(info.Holder()); | 451 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 452 V8TRYCATCH_VOID(bool, v, value->BooleanValue()); | 452 V8TRYCATCH_VOID(bool, v, value->BooleanValue()); |
| 453 imp->setCreate(v); | 453 imp->setCreate(v); |
| 454 return; | 454 return; |
| 455 } | 455 } |
| 456 | 456 |
| 457 static void createAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::V
alue> value, const v8::AccessorInfo& info) | 457 static void createAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::V
alue> value, const v8::AccessorInfo& info) |
| 458 { | 458 { |
| 459 TestObjV8Internal::createAttrSetter(name, value, info); | 459 TestObjV8Internal::createAttrSetter(name, value, info); |
| 460 } | 460 } |
| 461 | 461 |
| 462 static v8::Handle<v8::Value> reflectedStringAttrAttrGetter(v8::Local<v8::String>
name, const v8::AccessorInfo& info) | 462 static v8::Handle<v8::Value> reflectedStringAttrAttrGetter(v8::Local<v8::String>
name, const v8::AccessorInfo& info) |
| 463 { | 463 { |
| 464 TestObj* imp = V8TestObj::toNative(info.Holder()); | 464 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 465 return v8String(imp->fastGetAttribute(WebCore::HTMLNames::reflectedstringatt
rAttr), info.GetIsolate(), ReturnUnsafeHandle); | 465 return v8String(imp->fastGetAttribute(WebCore::HTMLNames::reflectedstringatt
rAttr), info.GetIsolate(), ReturnUnsafeHandle); |
| 466 } | 466 } |
| 467 | 467 |
| 468 static v8::Handle<v8::Value> reflectedStringAttrAttrGetterCallback(v8::Local<v8:
:String> name, const v8::AccessorInfo& info) | 468 static v8::Handle<v8::Value> reflectedStringAttrAttrGetterCallback(v8::Local<v8:
:String> name, const v8::AccessorInfo& info) |
| 469 { | 469 { |
| 470 return TestObjV8Internal::reflectedStringAttrAttrGetter(name, info); | 470 return TestObjV8Internal::reflectedStringAttrAttrGetter(name, info); |
| 471 } | 471 } |
| 472 | 472 |
| 473 static void reflectedStringAttrAttrSetter(v8::Local<v8::String> name, v8::Local<
v8::Value> value, const v8::AccessorInfo& info) | 473 static void reflectedStringAttrAttrSetter(v8::Local<v8::String> name, v8::Local<
v8::Value> value, const v8::AccessorInfo& info) |
| 474 { | 474 { |
| 475 TestObj* imp = V8TestObj::toNative(info.Holder()); | 475 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 476 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, v, val
ue); | 476 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, v, val
ue); |
| 477 imp->setAttribute(WebCore::HTMLNames::reflectedstringattrAttr, v); | 477 imp->setAttribute(WebCore::HTMLNames::reflectedstringattrAttr, v); |
| 478 return; | 478 return; |
| 479 } | 479 } |
| 480 | 480 |
| 481 static void reflectedStringAttrAttrSetterCallback(v8::Local<v8::String> name, v8
::Local<v8::Value> value, const v8::AccessorInfo& info) | 481 static void reflectedStringAttrAttrSetterCallback(v8::Local<v8::String> name, v8
::Local<v8::Value> value, const v8::AccessorInfo& info) |
| 482 { | 482 { |
| 483 TestObjV8Internal::reflectedStringAttrAttrSetter(name, value, info); | 483 TestObjV8Internal::reflectedStringAttrAttrSetter(name, value, info); |
| 484 } | 484 } |
| 485 | 485 |
| 486 static v8::Handle<v8::Value> reflectedIntegralAttrAttrGetter(v8::Local<v8::Strin
g> name, const v8::AccessorInfo& info) | 486 static v8::Handle<v8::Value> reflectedIntegralAttrAttrGetter(v8::Local<v8::Strin
g> name, const v8::AccessorInfo& info) |
| 487 { | 487 { |
| 488 TestObj* imp = V8TestObj::toNative(info.Holder()); | 488 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 489 return v8Integer(imp->getIntegralAttribute(WebCore::HTMLNames::reflectedinte
gralattrAttr), info.GetIsolate()); | 489 return v8Integer(imp->getIntegralAttribute(WebCore::HTMLNames::reflectedinte
gralattrAttr), info.GetIsolate()); |
| 490 } | 490 } |
| 491 | 491 |
| 492 static v8::Handle<v8::Value> reflectedIntegralAttrAttrGetterCallback(v8::Local<v
8::String> name, const v8::AccessorInfo& info) | 492 static v8::Handle<v8::Value> reflectedIntegralAttrAttrGetterCallback(v8::Local<v
8::String> name, const v8::AccessorInfo& info) |
| 493 { | 493 { |
| 494 return TestObjV8Internal::reflectedIntegralAttrAttrGetter(name, info); | 494 return TestObjV8Internal::reflectedIntegralAttrAttrGetter(name, info); |
| 495 } | 495 } |
| 496 | 496 |
| 497 static void reflectedIntegralAttrAttrSetter(v8::Local<v8::String> name, v8::Loca
l<v8::Value> value, const v8::AccessorInfo& info) | 497 static void reflectedIntegralAttrAttrSetter(v8::Local<v8::String> name, v8::Loca
l<v8::Value> value, const v8::AccessorInfo& info) |
| 498 { | 498 { |
| 499 TestObj* imp = V8TestObj::toNative(info.Holder()); | 499 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 500 V8TRYCATCH_VOID(int, v, toInt32(value)); | 500 V8TRYCATCH_VOID(int, v, toInt32(value)); |
| 501 imp->setIntegralAttribute(WebCore::HTMLNames::reflectedintegralattrAttr, v); | 501 imp->setIntegralAttribute(WebCore::HTMLNames::reflectedintegralattrAttr, v); |
| 502 return; | 502 return; |
| 503 } | 503 } |
| 504 | 504 |
| 505 static void reflectedIntegralAttrAttrSetterCallback(v8::Local<v8::String> name,
v8::Local<v8::Value> value, const v8::AccessorInfo& info) | 505 static void reflectedIntegralAttrAttrSetterCallback(v8::Local<v8::String> name,
v8::Local<v8::Value> value, const v8::AccessorInfo& info) |
| 506 { | 506 { |
| 507 TestObjV8Internal::reflectedIntegralAttrAttrSetter(name, value, info); | 507 TestObjV8Internal::reflectedIntegralAttrAttrSetter(name, value, info); |
| 508 } | 508 } |
| 509 | 509 |
| 510 static v8::Handle<v8::Value> reflectedUnsignedIntegralAttrAttrGetter(v8::Local<v
8::String> name, const v8::AccessorInfo& info) | 510 static v8::Handle<v8::Value> reflectedUnsignedIntegralAttrAttrGetter(v8::Local<v
8::String> name, const v8::AccessorInfo& info) |
| 511 { | 511 { |
| 512 TestObj* imp = V8TestObj::toNative(info.Holder()); | 512 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 513 return v8UnsignedInteger(std::max(0, imp->getIntegralAttribute(WebCore::HTML
Names::reflectedunsignedintegralattrAttr)), info.GetIsolate()); | 513 return v8UnsignedInteger(std::max(0, imp->getIntegralAttribute(WebCore::HTML
Names::reflectedunsignedintegralattrAttr)), info.GetIsolate()); |
| 514 } | 514 } |
| 515 | 515 |
| 516 static v8::Handle<v8::Value> reflectedUnsignedIntegralAttrAttrGetterCallback(v8:
:Local<v8::String> name, const v8::AccessorInfo& info) | 516 static v8::Handle<v8::Value> reflectedUnsignedIntegralAttrAttrGetterCallback(v8:
:Local<v8::String> name, const v8::AccessorInfo& info) |
| 517 { | 517 { |
| 518 return TestObjV8Internal::reflectedUnsignedIntegralAttrAttrGetter(name, info
); | 518 return TestObjV8Internal::reflectedUnsignedIntegralAttrAttrGetter(name, info
); |
| 519 } | 519 } |
| 520 | 520 |
| 521 static void reflectedUnsignedIntegralAttrAttrSetter(v8::Local<v8::String> name,
v8::Local<v8::Value> value, const v8::AccessorInfo& info) | 521 static void reflectedUnsignedIntegralAttrAttrSetter(v8::Local<v8::String> name,
v8::Local<v8::Value> value, const v8::AccessorInfo& info) |
| 522 { | 522 { |
| 523 TestObj* imp = V8TestObj::toNative(info.Holder()); | 523 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 524 V8TRYCATCH_VOID(unsigned, v, toUInt32(value)); | 524 V8TRYCATCH_VOID(unsigned, v, toUInt32(value)); |
| 525 imp->setUnsignedIntegralAttribute(WebCore::HTMLNames::reflectedunsignedinteg
ralattrAttr, v); | 525 imp->setUnsignedIntegralAttribute(WebCore::HTMLNames::reflectedunsignedinteg
ralattrAttr, v); |
| 526 return; | 526 return; |
| 527 } | 527 } |
| 528 | 528 |
| 529 static void reflectedUnsignedIntegralAttrAttrSetterCallback(v8::Local<v8::String
> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) | 529 static void reflectedUnsignedIntegralAttrAttrSetterCallback(v8::Local<v8::String
> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) |
| 530 { | 530 { |
| 531 TestObjV8Internal::reflectedUnsignedIntegralAttrAttrSetter(name, value, info
); | 531 TestObjV8Internal::reflectedUnsignedIntegralAttrAttrSetter(name, value, info
); |
| 532 } | 532 } |
| 533 | 533 |
| 534 static v8::Handle<v8::Value> reflectedBooleanAttrAttrGetter(v8::Local<v8::String
> name, const v8::AccessorInfo& info) | 534 static v8::Handle<v8::Value> reflectedBooleanAttrAttrGetter(v8::Local<v8::String
> name, const v8::AccessorInfo& info) |
| 535 { | 535 { |
| 536 TestObj* imp = V8TestObj::toNative(info.Holder()); | 536 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 537 return v8Boolean(imp->fastHasAttribute(WebCore::HTMLNames::reflectedbooleana
ttrAttr), info.GetIsolate()); | 537 return v8Boolean(imp->fastHasAttribute(WebCore::HTMLNames::reflectedbooleana
ttrAttr), info.GetIsolate()); |
| 538 } | 538 } |
| 539 | 539 |
| 540 static v8::Handle<v8::Value> reflectedBooleanAttrAttrGetterCallback(v8::Local<v8
::String> name, const v8::AccessorInfo& info) | 540 static v8::Handle<v8::Value> reflectedBooleanAttrAttrGetterCallback(v8::Local<v8
::String> name, const v8::AccessorInfo& info) |
| 541 { | 541 { |
| 542 return TestObjV8Internal::reflectedBooleanAttrAttrGetter(name, info); | 542 return TestObjV8Internal::reflectedBooleanAttrAttrGetter(name, info); |
| 543 } | 543 } |
| 544 | 544 |
| 545 static void reflectedBooleanAttrAttrSetter(v8::Local<v8::String> name, v8::Local
<v8::Value> value, const v8::AccessorInfo& info) | 545 static void reflectedBooleanAttrAttrSetter(v8::Local<v8::String> name, v8::Local
<v8::Value> value, const v8::AccessorInfo& info) |
| 546 { | 546 { |
| 547 TestObj* imp = V8TestObj::toNative(info.Holder()); | 547 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 548 V8TRYCATCH_VOID(bool, v, value->BooleanValue()); | 548 V8TRYCATCH_VOID(bool, v, value->BooleanValue()); |
| 549 imp->setBooleanAttribute(WebCore::HTMLNames::reflectedbooleanattrAttr, v); | 549 imp->setBooleanAttribute(WebCore::HTMLNames::reflectedbooleanattrAttr, v); |
| 550 return; | 550 return; |
| 551 } | 551 } |
| 552 | 552 |
| 553 static void reflectedBooleanAttrAttrSetterCallback(v8::Local<v8::String> name, v
8::Local<v8::Value> value, const v8::AccessorInfo& info) | 553 static void reflectedBooleanAttrAttrSetterCallback(v8::Local<v8::String> name, v
8::Local<v8::Value> value, const v8::AccessorInfo& info) |
| 554 { | 554 { |
| 555 TestObjV8Internal::reflectedBooleanAttrAttrSetter(name, value, info); | 555 TestObjV8Internal::reflectedBooleanAttrAttrSetter(name, value, info); |
| 556 } | 556 } |
| 557 | 557 |
| 558 static v8::Handle<v8::Value> reflectedURLAttrAttrGetter(v8::Local<v8::String> na
me, const v8::AccessorInfo& info) | 558 static v8::Handle<v8::Value> reflectedURLAttrAttrGetter(v8::Local<v8::String> na
me, const v8::AccessorInfo& info) |
| 559 { | 559 { |
| 560 TestObj* imp = V8TestObj::toNative(info.Holder()); | 560 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 561 return v8String(imp->getURLAttribute(WebCore::HTMLNames::reflectedurlattrAtt
r), info.GetIsolate(), ReturnUnsafeHandle); | 561 return v8String(imp->getURLAttribute(WebCore::HTMLNames::reflectedurlattrAtt
r), info.GetIsolate(), ReturnUnsafeHandle); |
| 562 } | 562 } |
| 563 | 563 |
| 564 static v8::Handle<v8::Value> reflectedURLAttrAttrGetterCallback(v8::Local<v8::St
ring> name, const v8::AccessorInfo& info) | 564 static v8::Handle<v8::Value> reflectedURLAttrAttrGetterCallback(v8::Local<v8::St
ring> name, const v8::AccessorInfo& info) |
| 565 { | 565 { |
| 566 return TestObjV8Internal::reflectedURLAttrAttrGetter(name, info); | 566 return TestObjV8Internal::reflectedURLAttrAttrGetter(name, info); |
| 567 } | 567 } |
| 568 | 568 |
| 569 static void reflectedURLAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8:
:Value> value, const v8::AccessorInfo& info) | 569 static void reflectedURLAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8:
:Value> value, const v8::AccessorInfo& info) |
| 570 { | 570 { |
| 571 TestObj* imp = V8TestObj::toNative(info.Holder()); | 571 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 572 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, v, val
ue); | 572 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, v, val
ue); |
| 573 imp->setAttribute(WebCore::HTMLNames::reflectedurlattrAttr, v); | 573 imp->setAttribute(WebCore::HTMLNames::reflectedurlattrAttr, v); |
| 574 return; | 574 return; |
| 575 } | 575 } |
| 576 | 576 |
| 577 static void reflectedURLAttrAttrSetterCallback(v8::Local<v8::String> name, v8::L
ocal<v8::Value> value, const v8::AccessorInfo& info) | 577 static void reflectedURLAttrAttrSetterCallback(v8::Local<v8::String> name, v8::L
ocal<v8::Value> value, const v8::AccessorInfo& info) |
| 578 { | 578 { |
| 579 TestObjV8Internal::reflectedURLAttrAttrSetter(name, value, info); | 579 TestObjV8Internal::reflectedURLAttrAttrSetter(name, value, info); |
| 580 } | 580 } |
| 581 | 581 |
| 582 static v8::Handle<v8::Value> reflectedStringAttrAttrGetter(v8::Local<v8::String>
name, const v8::AccessorInfo& info) | 582 static v8::Handle<v8::Value> reflectedStringAttrAttrGetter(v8::Local<v8::String>
name, const v8::AccessorInfo& info) |
| 583 { | 583 { |
| 584 TestObj* imp = V8TestObj::toNative(info.Holder()); | 584 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 585 return v8String(imp->fastGetAttribute(WebCore::HTMLNames::customContentStrin
gAttrAttr), info.GetIsolate(), ReturnUnsafeHandle); | 585 return v8String(imp->fastGetAttribute(WebCore::HTMLNames::customContentStrin
gAttrAttr), info.GetIsolate(), ReturnUnsafeHandle); |
| 586 } | 586 } |
| 587 | 587 |
| 588 static v8::Handle<v8::Value> reflectedStringAttrAttrGetterCallback(v8::Local<v8:
:String> name, const v8::AccessorInfo& info) | 588 static v8::Handle<v8::Value> reflectedStringAttrAttrGetterCallback(v8::Local<v8:
:String> name, const v8::AccessorInfo& info) |
| 589 { | 589 { |
| 590 return TestObjV8Internal::reflectedStringAttrAttrGetter(name, info); | 590 return TestObjV8Internal::reflectedStringAttrAttrGetter(name, info); |
| 591 } | 591 } |
| 592 | 592 |
| 593 static void reflectedStringAttrAttrSetter(v8::Local<v8::String> name, v8::Local<
v8::Value> value, const v8::AccessorInfo& info) | 593 static void reflectedStringAttrAttrSetter(v8::Local<v8::String> name, v8::Local<
v8::Value> value, const v8::AccessorInfo& info) |
| 594 { | 594 { |
| 595 TestObj* imp = V8TestObj::toNative(info.Holder()); | 595 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 596 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, v, val
ue); | 596 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, v, val
ue); |
| 597 imp->setAttribute(WebCore::HTMLNames::customContentStringAttrAttr, v); | 597 imp->setAttribute(WebCore::HTMLNames::customContentStringAttrAttr, v); |
| 598 return; | 598 return; |
| 599 } | 599 } |
| 600 | 600 |
| 601 static void reflectedStringAttrAttrSetterCallback(v8::Local<v8::String> name, v8
::Local<v8::Value> value, const v8::AccessorInfo& info) | 601 static void reflectedStringAttrAttrSetterCallback(v8::Local<v8::String> name, v8
::Local<v8::Value> value, const v8::AccessorInfo& info) |
| 602 { | 602 { |
| 603 TestObjV8Internal::reflectedStringAttrAttrSetter(name, value, info); | 603 TestObjV8Internal::reflectedStringAttrAttrSetter(name, value, info); |
| 604 } | 604 } |
| 605 | 605 |
| 606 static v8::Handle<v8::Value> reflectedCustomIntegralAttrAttrGetter(v8::Local<v8:
:String> name, const v8::AccessorInfo& info) | 606 static v8::Handle<v8::Value> reflectedCustomIntegralAttrAttrGetter(v8::Local<v8:
:String> name, const v8::AccessorInfo& info) |
| 607 { | 607 { |
| 608 TestObj* imp = V8TestObj::toNative(info.Holder()); | 608 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 609 return v8Integer(imp->getIntegralAttribute(WebCore::HTMLNames::customContent
IntegralAttrAttr), info.GetIsolate()); | 609 return v8Integer(imp->getIntegralAttribute(WebCore::HTMLNames::customContent
IntegralAttrAttr), info.GetIsolate()); |
| 610 } | 610 } |
| 611 | 611 |
| 612 static v8::Handle<v8::Value> reflectedCustomIntegralAttrAttrGetterCallback(v8::L
ocal<v8::String> name, const v8::AccessorInfo& info) | 612 static v8::Handle<v8::Value> reflectedCustomIntegralAttrAttrGetterCallback(v8::L
ocal<v8::String> name, const v8::AccessorInfo& info) |
| 613 { | 613 { |
| 614 return TestObjV8Internal::reflectedCustomIntegralAttrAttrGetter(name, info); | 614 return TestObjV8Internal::reflectedCustomIntegralAttrAttrGetter(name, info); |
| 615 } | 615 } |
| 616 | 616 |
| 617 static void reflectedCustomIntegralAttrAttrSetter(v8::Local<v8::String> name, v8
::Local<v8::Value> value, const v8::AccessorInfo& info) | 617 static void reflectedCustomIntegralAttrAttrSetter(v8::Local<v8::String> name, v8
::Local<v8::Value> value, const v8::AccessorInfo& info) |
| 618 { | 618 { |
| 619 TestObj* imp = V8TestObj::toNative(info.Holder()); | 619 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 620 V8TRYCATCH_VOID(int, v, toInt32(value)); | 620 V8TRYCATCH_VOID(int, v, toInt32(value)); |
| 621 imp->setIntegralAttribute(WebCore::HTMLNames::customContentIntegralAttrAttr,
v); | 621 imp->setIntegralAttribute(WebCore::HTMLNames::customContentIntegralAttrAttr,
v); |
| 622 return; | 622 return; |
| 623 } | 623 } |
| 624 | 624 |
| 625 static void reflectedCustomIntegralAttrAttrSetterCallback(v8::Local<v8::String>
name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) | 625 static void reflectedCustomIntegralAttrAttrSetterCallback(v8::Local<v8::String>
name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) |
| 626 { | 626 { |
| 627 TestObjV8Internal::reflectedCustomIntegralAttrAttrSetter(name, value, info); | 627 TestObjV8Internal::reflectedCustomIntegralAttrAttrSetter(name, value, info); |
| 628 } | 628 } |
| 629 | 629 |
| 630 static v8::Handle<v8::Value> reflectedCustomBooleanAttrAttrGetter(v8::Local<v8::
String> name, const v8::AccessorInfo& info) | 630 static v8::Handle<v8::Value> reflectedCustomBooleanAttrAttrGetter(v8::Local<v8::
String> name, const v8::AccessorInfo& info) |
| 631 { | 631 { |
| 632 TestObj* imp = V8TestObj::toNative(info.Holder()); | 632 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 633 return v8Boolean(imp->fastHasAttribute(WebCore::HTMLNames::customContentBool
eanAttrAttr), info.GetIsolate()); | 633 return v8Boolean(imp->fastHasAttribute(WebCore::HTMLNames::customContentBool
eanAttrAttr), info.GetIsolate()); |
| 634 } | 634 } |
| 635 | 635 |
| 636 static v8::Handle<v8::Value> reflectedCustomBooleanAttrAttrGetterCallback(v8::Lo
cal<v8::String> name, const v8::AccessorInfo& info) | 636 static v8::Handle<v8::Value> reflectedCustomBooleanAttrAttrGetterCallback(v8::Lo
cal<v8::String> name, const v8::AccessorInfo& info) |
| 637 { | 637 { |
| 638 return TestObjV8Internal::reflectedCustomBooleanAttrAttrGetter(name, info); | 638 return TestObjV8Internal::reflectedCustomBooleanAttrAttrGetter(name, info); |
| 639 } | 639 } |
| 640 | 640 |
| 641 static void reflectedCustomBooleanAttrAttrSetter(v8::Local<v8::String> name, v8:
:Local<v8::Value> value, const v8::AccessorInfo& info) | 641 static void reflectedCustomBooleanAttrAttrSetter(v8::Local<v8::String> name, v8:
:Local<v8::Value> value, const v8::AccessorInfo& info) |
| 642 { | 642 { |
| 643 TestObj* imp = V8TestObj::toNative(info.Holder()); | 643 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 644 V8TRYCATCH_VOID(bool, v, value->BooleanValue()); | 644 V8TRYCATCH_VOID(bool, v, value->BooleanValue()); |
| 645 imp->setBooleanAttribute(WebCore::HTMLNames::customContentBooleanAttrAttr, v
); | 645 imp->setBooleanAttribute(WebCore::HTMLNames::customContentBooleanAttrAttr, v
); |
| 646 return; | 646 return; |
| 647 } | 647 } |
| 648 | 648 |
| 649 static void reflectedCustomBooleanAttrAttrSetterCallback(v8::Local<v8::String> n
ame, v8::Local<v8::Value> value, const v8::AccessorInfo& info) | 649 static void reflectedCustomBooleanAttrAttrSetterCallback(v8::Local<v8::String> n
ame, v8::Local<v8::Value> value, const v8::AccessorInfo& info) |
| 650 { | 650 { |
| 651 TestObjV8Internal::reflectedCustomBooleanAttrAttrSetter(name, value, info); | 651 TestObjV8Internal::reflectedCustomBooleanAttrAttrSetter(name, value, info); |
| 652 } | 652 } |
| 653 | 653 |
| 654 static v8::Handle<v8::Value> reflectedCustomURLAttrAttrGetter(v8::Local<v8::Stri
ng> name, const v8::AccessorInfo& info) | 654 static v8::Handle<v8::Value> reflectedCustomURLAttrAttrGetter(v8::Local<v8::Stri
ng> name, const v8::AccessorInfo& info) |
| 655 { | 655 { |
| 656 TestObj* imp = V8TestObj::toNative(info.Holder()); | 656 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 657 return v8String(imp->getURLAttribute(WebCore::HTMLNames::customContentURLAtt
rAttr), info.GetIsolate(), ReturnUnsafeHandle); | 657 return v8String(imp->getURLAttribute(WebCore::HTMLNames::customContentURLAtt
rAttr), info.GetIsolate(), ReturnUnsafeHandle); |
| 658 } | 658 } |
| 659 | 659 |
| 660 static v8::Handle<v8::Value> reflectedCustomURLAttrAttrGetterCallback(v8::Local<
v8::String> name, const v8::AccessorInfo& info) | 660 static v8::Handle<v8::Value> reflectedCustomURLAttrAttrGetterCallback(v8::Local<
v8::String> name, const v8::AccessorInfo& info) |
| 661 { | 661 { |
| 662 return TestObjV8Internal::reflectedCustomURLAttrAttrGetter(name, info); | 662 return TestObjV8Internal::reflectedCustomURLAttrAttrGetter(name, info); |
| 663 } | 663 } |
| 664 | 664 |
| 665 static void reflectedCustomURLAttrAttrSetter(v8::Local<v8::String> name, v8::Loc
al<v8::Value> value, const v8::AccessorInfo& info) | 665 static void reflectedCustomURLAttrAttrSetter(v8::Local<v8::String> name, v8::Loc
al<v8::Value> value, const v8::AccessorInfo& info) |
| 666 { | 666 { |
| 667 TestObj* imp = V8TestObj::toNative(info.Holder()); | 667 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 668 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, v, val
ue); | 668 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, v, val
ue); |
| 669 imp->setAttribute(WebCore::HTMLNames::customContentURLAttrAttr, v); | 669 imp->setAttribute(WebCore::HTMLNames::customContentURLAttrAttr, v); |
| 670 return; | 670 return; |
| 671 } | 671 } |
| 672 | 672 |
| 673 static void reflectedCustomURLAttrAttrSetterCallback(v8::Local<v8::String> name,
v8::Local<v8::Value> value, const v8::AccessorInfo& info) | 673 static void reflectedCustomURLAttrAttrSetterCallback(v8::Local<v8::String> name,
v8::Local<v8::Value> value, const v8::AccessorInfo& info) |
| 674 { | 674 { |
| 675 TestObjV8Internal::reflectedCustomURLAttrAttrSetter(name, value, info); | 675 TestObjV8Internal::reflectedCustomURLAttrAttrSetter(name, value, info); |
| 676 } | 676 } |
| 677 | 677 |
| 678 static v8::Handle<v8::Value> typedArrayAttrAttrGetter(v8::Local<v8::String> name
, const v8::AccessorInfo& info) | 678 static v8::Handle<v8::Value> typedArrayAttrAttrGetter(v8::Local<v8::String> name
, const v8::AccessorInfo& info) |
| 679 { | 679 { |
| 680 TestObj* imp = V8TestObj::toNative(info.Holder()); | 680 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 681 return toV8Fast(imp->typedArrayAttr(), info, imp); | 681 return toV8Fast(imp->typedArrayAttr(), info, imp); |
| 682 } | 682 } |
| 683 | 683 |
| 684 static v8::Handle<v8::Value> typedArrayAttrAttrGetterCallback(v8::Local<v8::Stri
ng> name, const v8::AccessorInfo& info) | 684 static v8::Handle<v8::Value> typedArrayAttrAttrGetterCallback(v8::Local<v8::Stri
ng> name, const v8::AccessorInfo& info) |
| 685 { | 685 { |
| 686 return TestObjV8Internal::typedArrayAttrAttrGetter(name, info); | 686 return TestObjV8Internal::typedArrayAttrAttrGetter(name, info); |
| 687 } | 687 } |
| 688 | 688 |
| 689 static void typedArrayAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::V
alue> value, const v8::AccessorInfo& info) | 689 static void typedArrayAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::V
alue> value, const v8::AccessorInfo& info) |
| 690 { | 690 { |
| 691 TestObj* imp = V8TestObj::toNative(info.Holder()); | 691 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 692 V8TRYCATCH_VOID(Float32Array*, v, V8Float32Array::HasInstance(value, info.Ge
tIsolate(), worldType(info.GetIsolate())) ? V8Float32Array::toNative(v8::Handle<
v8::Object>::Cast(value)) : 0); | 692 V8TRYCATCH_VOID(Float32Array*, v, V8Float32Array::HasInstance(value, info.Ge
tIsolate(), worldType(info.GetIsolate())) ? V8Float32Array::toNative(v8::Handle<
v8::Object>::Cast(value)) : 0); |
| 693 imp->setTypedArrayAttr(WTF::getPtr(v)); | 693 imp->setTypedArrayAttr(WTF::getPtr(v)); |
| 694 return; | 694 return; |
| 695 } | 695 } |
| 696 | 696 |
| 697 static void typedArrayAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Loc
al<v8::Value> value, const v8::AccessorInfo& info) | 697 static void typedArrayAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Loc
al<v8::Value> value, const v8::AccessorInfo& info) |
| 698 { | 698 { |
| 699 TestObjV8Internal::typedArrayAttrAttrSetter(name, value, info); | 699 TestObjV8Internal::typedArrayAttrAttrSetter(name, value, info); |
| 700 } | 700 } |
| 701 | 701 |
| 702 static v8::Handle<v8::Value> attrWithGetterExceptionAttrGetter(v8::Local<v8::Str
ing> name, const v8::AccessorInfo& info) | 702 static v8::Handle<v8::Value> attrWithGetterExceptionAttrGetter(v8::Local<v8::Str
ing> name, const v8::AccessorInfo& info) |
| 703 { | 703 { |
| 704 TestObj* imp = V8TestObj::toNative(info.Holder()); | 704 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 705 ExceptionCode ec = 0; | 705 ExceptionCode ec = 0; |
| 706 int v = imp->attrWithGetterException(ec); | 706 int v = imp->attrWithGetterException(ec); |
| 707 if (UNLIKELY(ec)) | 707 if (UNLIKELY(ec)) |
| 708 return setDOMException(ec, info.GetIsolate()); | 708 return setDOMException(ec, info.GetIsolate()); |
| 709 return v8Integer(v, info.GetIsolate()); | 709 return v8Integer(v, info.GetIsolate()); |
| 710 } | 710 } |
| 711 | 711 |
| 712 static v8::Handle<v8::Value> attrWithGetterExceptionAttrGetterCallback(v8::Local
<v8::String> name, const v8::AccessorInfo& info) | 712 static v8::Handle<v8::Value> attrWithGetterExceptionAttrGetterCallback(v8::Local
<v8::String> name, const v8::AccessorInfo& info) |
| 713 { | 713 { |
| 714 return TestObjV8Internal::attrWithGetterExceptionAttrGetter(name, info); | 714 return TestObjV8Internal::attrWithGetterExceptionAttrGetter(name, info); |
| 715 } | 715 } |
| 716 | 716 |
| 717 static void attrWithGetterExceptionAttrSetter(v8::Local<v8::String> name, v8::Lo
cal<v8::Value> value, const v8::AccessorInfo& info) | 717 static void attrWithGetterExceptionAttrSetter(v8::Local<v8::String> name, v8::Lo
cal<v8::Value> value, const v8::AccessorInfo& info) |
| 718 { | 718 { |
| 719 TestObj* imp = V8TestObj::toNative(info.Holder()); | 719 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 720 V8TRYCATCH_VOID(int, v, toInt32(value)); | 720 V8TRYCATCH_VOID(int, v, toInt32(value)); |
| 721 imp->setAttrWithGetterException(v); | 721 imp->setAttrWithGetterException(v); |
| 722 return; | 722 return; |
| 723 } | 723 } |
| 724 | 724 |
| 725 static void attrWithGetterExceptionAttrSetterCallback(v8::Local<v8::String> name
, v8::Local<v8::Value> value, const v8::AccessorInfo& info) | 725 static void attrWithGetterExceptionAttrSetterCallback(v8::Local<v8::String> name
, v8::Local<v8::Value> value, const v8::AccessorInfo& info) |
| 726 { | 726 { |
| 727 TestObjV8Internal::attrWithGetterExceptionAttrSetter(name, value, info); | 727 TestObjV8Internal::attrWithGetterExceptionAttrSetter(name, value, info); |
| 728 } | 728 } |
| 729 | 729 |
| 730 static v8::Handle<v8::Value> attrWithSetterExceptionAttrGetter(v8::Local<v8::Str
ing> name, const v8::AccessorInfo& info) | 730 static v8::Handle<v8::Value> attrWithSetterExceptionAttrGetter(v8::Local<v8::Str
ing> name, const v8::AccessorInfo& info) |
| 731 { | 731 { |
| 732 TestObj* imp = V8TestObj::toNative(info.Holder()); | 732 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 733 return v8Integer(imp->attrWithSetterException(), info.GetIsolate()); | 733 return v8Integer(imp->attrWithSetterException(), info.GetIsolate()); |
| 734 } | 734 } |
| 735 | 735 |
| 736 static v8::Handle<v8::Value> attrWithSetterExceptionAttrGetterCallback(v8::Local
<v8::String> name, const v8::AccessorInfo& info) | 736 static v8::Handle<v8::Value> attrWithSetterExceptionAttrGetterCallback(v8::Local
<v8::String> name, const v8::AccessorInfo& info) |
| 737 { | 737 { |
| 738 return TestObjV8Internal::attrWithSetterExceptionAttrGetter(name, info); | 738 return TestObjV8Internal::attrWithSetterExceptionAttrGetter(name, info); |
| 739 } | 739 } |
| 740 | 740 |
| 741 static void attrWithSetterExceptionAttrSetter(v8::Local<v8::String> name, v8::Lo
cal<v8::Value> value, const v8::AccessorInfo& info) | 741 static void attrWithSetterExceptionAttrSetter(v8::Local<v8::String> name, v8::Lo
cal<v8::Value> value, const v8::AccessorInfo& info) |
| 742 { | 742 { |
| 743 TestObj* imp = V8TestObj::toNative(info.Holder()); | 743 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 744 V8TRYCATCH_VOID(int, v, toInt32(value)); | 744 V8TRYCATCH_VOID(int, v, toInt32(value)); |
| 745 ExceptionCode ec = 0; | 745 ExceptionCode ec = 0; |
| 746 imp->setAttrWithSetterException(v, ec); | 746 imp->setAttrWithSetterException(v, ec); |
| 747 if (UNLIKELY(ec)) | 747 if (UNLIKELY(ec)) |
| 748 setDOMException(ec, info.GetIsolate()); | 748 setDOMException(ec, info.GetIsolate()); |
| 749 return; | 749 return; |
| 750 } | 750 } |
| 751 | 751 |
| 752 static void attrWithSetterExceptionAttrSetterCallback(v8::Local<v8::String> name
, v8::Local<v8::Value> value, const v8::AccessorInfo& info) | 752 static void attrWithSetterExceptionAttrSetterCallback(v8::Local<v8::String> name
, v8::Local<v8::Value> value, const v8::AccessorInfo& info) |
| 753 { | 753 { |
| 754 TestObjV8Internal::attrWithSetterExceptionAttrSetter(name, value, info); | 754 TestObjV8Internal::attrWithSetterExceptionAttrSetter(name, value, info); |
| 755 } | 755 } |
| 756 | 756 |
| 757 static v8::Handle<v8::Value> stringAttrWithGetterExceptionAttrGetter(v8::Local<v
8::String> name, const v8::AccessorInfo& info) | 757 static v8::Handle<v8::Value> stringAttrWithGetterExceptionAttrGetter(v8::Local<v
8::String> name, const v8::AccessorInfo& info) |
| 758 { | 758 { |
| 759 TestObj* imp = V8TestObj::toNative(info.Holder()); | 759 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 760 ExceptionCode ec = 0; | 760 ExceptionCode ec = 0; |
| 761 String v = imp->stringAttrWithGetterException(ec); | 761 String v = imp->stringAttrWithGetterException(ec); |
| 762 if (UNLIKELY(ec)) | 762 if (UNLIKELY(ec)) |
| 763 return setDOMException(ec, info.GetIsolate()); | 763 return setDOMException(ec, info.GetIsolate()); |
| 764 return v8String(v, info.GetIsolate(), ReturnUnsafeHandle); | 764 return v8String(v, info.GetIsolate(), ReturnUnsafeHandle); |
| 765 } | 765 } |
| 766 | 766 |
| 767 static v8::Handle<v8::Value> stringAttrWithGetterExceptionAttrGetterCallback(v8:
:Local<v8::String> name, const v8::AccessorInfo& info) | 767 static v8::Handle<v8::Value> stringAttrWithGetterExceptionAttrGetterCallback(v8:
:Local<v8::String> name, const v8::AccessorInfo& info) |
| 768 { | 768 { |
| 769 return TestObjV8Internal::stringAttrWithGetterExceptionAttrGetter(name, info
); | 769 return TestObjV8Internal::stringAttrWithGetterExceptionAttrGetter(name, info
); |
| 770 } | 770 } |
| 771 | 771 |
| 772 static void stringAttrWithGetterExceptionAttrSetter(v8::Local<v8::String> name,
v8::Local<v8::Value> value, const v8::AccessorInfo& info) | 772 static void stringAttrWithGetterExceptionAttrSetter(v8::Local<v8::String> name,
v8::Local<v8::Value> value, const v8::AccessorInfo& info) |
| 773 { | 773 { |
| 774 TestObj* imp = V8TestObj::toNative(info.Holder()); | 774 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 775 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, v, value); | 775 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, v, value); |
| 776 imp->setStringAttrWithGetterException(v); | 776 imp->setStringAttrWithGetterException(v); |
| 777 return; | 777 return; |
| 778 } | 778 } |
| 779 | 779 |
| 780 static void stringAttrWithGetterExceptionAttrSetterCallback(v8::Local<v8::String
> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) | 780 static void stringAttrWithGetterExceptionAttrSetterCallback(v8::Local<v8::String
> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) |
| 781 { | 781 { |
| 782 TestObjV8Internal::stringAttrWithGetterExceptionAttrSetter(name, value, info
); | 782 TestObjV8Internal::stringAttrWithGetterExceptionAttrSetter(name, value, info
); |
| 783 } | 783 } |
| 784 | 784 |
| 785 static v8::Handle<v8::Value> stringAttrWithSetterExceptionAttrGetter(v8::Local<v
8::String> name, const v8::AccessorInfo& info) | 785 static v8::Handle<v8::Value> stringAttrWithSetterExceptionAttrGetter(v8::Local<v
8::String> name, const v8::AccessorInfo& info) |
| 786 { | 786 { |
| 787 TestObj* imp = V8TestObj::toNative(info.Holder()); | 787 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 788 return v8String(imp->stringAttrWithSetterException(), info.GetIsolate(), Ret
urnUnsafeHandle); | 788 return v8String(imp->stringAttrWithSetterException(), info.GetIsolate(), Ret
urnUnsafeHandle); |
| 789 } | 789 } |
| 790 | 790 |
| 791 static v8::Handle<v8::Value> stringAttrWithSetterExceptionAttrGetterCallback(v8:
:Local<v8::String> name, const v8::AccessorInfo& info) | 791 static v8::Handle<v8::Value> stringAttrWithSetterExceptionAttrGetterCallback(v8:
:Local<v8::String> name, const v8::AccessorInfo& info) |
| 792 { | 792 { |
| 793 return TestObjV8Internal::stringAttrWithSetterExceptionAttrGetter(name, info
); | 793 return TestObjV8Internal::stringAttrWithSetterExceptionAttrGetter(name, info
); |
| 794 } | 794 } |
| 795 | 795 |
| 796 static void stringAttrWithSetterExceptionAttrSetter(v8::Local<v8::String> name,
v8::Local<v8::Value> value, const v8::AccessorInfo& info) | 796 static void stringAttrWithSetterExceptionAttrSetter(v8::Local<v8::String> name,
v8::Local<v8::Value> value, const v8::AccessorInfo& info) |
| 797 { | 797 { |
| 798 TestObj* imp = V8TestObj::toNative(info.Holder()); | 798 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 799 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, v, value); | 799 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, v, value); |
| 800 ExceptionCode ec = 0; | 800 ExceptionCode ec = 0; |
| 801 imp->setStringAttrWithSetterException(v, ec); | 801 imp->setStringAttrWithSetterException(v, ec); |
| 802 if (UNLIKELY(ec)) | 802 if (UNLIKELY(ec)) |
| 803 setDOMException(ec, info.GetIsolate()); | 803 setDOMException(ec, info.GetIsolate()); |
| 804 return; | 804 return; |
| 805 } | 805 } |
| 806 | 806 |
| 807 static void stringAttrWithSetterExceptionAttrSetterCallback(v8::Local<v8::String
> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) | 807 static void stringAttrWithSetterExceptionAttrSetterCallback(v8::Local<v8::String
> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) |
| 808 { | 808 { |
| 809 TestObjV8Internal::stringAttrWithSetterExceptionAttrSetter(name, value, info
); | 809 TestObjV8Internal::stringAttrWithSetterExceptionAttrSetter(name, value, info
); |
| 810 } | 810 } |
| 811 | 811 |
| 812 static v8::Handle<v8::Value> customAttrAttrGetterCallback(v8::Local<v8::String>
name, const v8::AccessorInfo& info) | 812 static v8::Handle<v8::Value> customAttrAttrGetterCallback(v8::Local<v8::String>
name, const v8::AccessorInfo& info) |
| 813 { | 813 { |
| 814 return V8TestObj::customAttrAttrGetterCustom(name, info); | 814 return V8TestObject::customAttrAttrGetterCustom(name, info); |
| 815 } | 815 } |
| 816 | 816 |
| 817 static void customAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v
8::Value> value, const v8::AccessorInfo& info) | 817 static void customAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v
8::Value> value, const v8::AccessorInfo& info) |
| 818 { | 818 { |
| 819 V8TestObj::customAttrAttrSetterCustom(name, value, info); | 819 V8TestObject::customAttrAttrSetterCustom(name, value, info); |
| 820 } | 820 } |
| 821 | 821 |
| 822 static v8::Handle<v8::Value> withScriptStateAttributeAttrGetter(v8::Local<v8::St
ring> name, const v8::AccessorInfo& info) | 822 static v8::Handle<v8::Value> withScriptStateAttributeAttrGetter(v8::Local<v8::St
ring> name, const v8::AccessorInfo& info) |
| 823 { | 823 { |
| 824 TestObj* imp = V8TestObj::toNative(info.Holder()); | 824 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 825 ScriptState* currentState = ScriptState::current(); | 825 ScriptState* currentState = ScriptState::current(); |
| 826 if (!currentState) | 826 if (!currentState) |
| 827 return v8Undefined(); | 827 return v8Undefined(); |
| 828 ScriptState& state = *currentState; | 828 ScriptState& state = *currentState; |
| 829 return v8Integer(imp->withScriptStateAttribute(&state), info.GetIsolate()); | 829 return v8Integer(imp->withScriptStateAttribute(&state), info.GetIsolate()); |
| 830 } | 830 } |
| 831 | 831 |
| 832 static v8::Handle<v8::Value> withScriptStateAttributeAttrGetterCallback(v8::Loca
l<v8::String> name, const v8::AccessorInfo& info) | 832 static v8::Handle<v8::Value> withScriptStateAttributeAttrGetterCallback(v8::Loca
l<v8::String> name, const v8::AccessorInfo& info) |
| 833 { | 833 { |
| 834 return TestObjV8Internal::withScriptStateAttributeAttrGetter(name, info); | 834 return TestObjV8Internal::withScriptStateAttributeAttrGetter(name, info); |
| 835 } | 835 } |
| 836 | 836 |
| 837 static void withScriptStateAttributeAttrSetter(v8::Local<v8::String> name, v8::L
ocal<v8::Value> value, const v8::AccessorInfo& info) | 837 static void withScriptStateAttributeAttrSetter(v8::Local<v8::String> name, v8::L
ocal<v8::Value> value, const v8::AccessorInfo& info) |
| 838 { | 838 { |
| 839 TestObj* imp = V8TestObj::toNative(info.Holder()); | 839 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 840 V8TRYCATCH_VOID(int, v, toInt32(value)); | 840 V8TRYCATCH_VOID(int, v, toInt32(value)); |
| 841 ScriptState* currentState = ScriptState::current(); | 841 ScriptState* currentState = ScriptState::current(); |
| 842 if (!currentState) | 842 if (!currentState) |
| 843 return; | 843 return; |
| 844 ScriptState& state = *currentState; | 844 ScriptState& state = *currentState; |
| 845 imp->setWithScriptStateAttribute(&state, v); | 845 imp->setWithScriptStateAttribute(&state, v); |
| 846 if (state.hadException()) | 846 if (state.hadException()) |
| 847 throwError(state.exception(), info.GetIsolate()); | 847 throwError(state.exception(), info.GetIsolate()); |
| 848 return; | 848 return; |
| 849 } | 849 } |
| 850 | 850 |
| 851 static void withScriptStateAttributeAttrSetterCallback(v8::Local<v8::String> nam
e, v8::Local<v8::Value> value, const v8::AccessorInfo& info) | 851 static void withScriptStateAttributeAttrSetterCallback(v8::Local<v8::String> nam
e, v8::Local<v8::Value> value, const v8::AccessorInfo& info) |
| 852 { | 852 { |
| 853 TestObjV8Internal::withScriptStateAttributeAttrSetter(name, value, info); | 853 TestObjV8Internal::withScriptStateAttributeAttrSetter(name, value, info); |
| 854 } | 854 } |
| 855 | 855 |
| 856 static v8::Handle<v8::Value> withScriptExecutionContextAttributeAttrGetter(v8::L
ocal<v8::String> name, const v8::AccessorInfo& info) | 856 static v8::Handle<v8::Value> withScriptExecutionContextAttributeAttrGetter(v8::L
ocal<v8::String> name, const v8::AccessorInfo& info) |
| 857 { | 857 { |
| 858 TestObj* imp = V8TestObj::toNative(info.Holder()); | 858 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 859 ScriptExecutionContext* scriptContext = getScriptExecutionContext(); | 859 ScriptExecutionContext* scriptContext = getScriptExecutionContext(); |
| 860 return toV8Fast(imp->withScriptExecutionContextAttribute(scriptContext), inf
o, imp); | 860 return toV8Fast(imp->withScriptExecutionContextAttribute(scriptContext), inf
o, imp); |
| 861 } | 861 } |
| 862 | 862 |
| 863 static v8::Handle<v8::Value> withScriptExecutionContextAttributeAttrGetterCallba
ck(v8::Local<v8::String> name, const v8::AccessorInfo& info) | 863 static v8::Handle<v8::Value> withScriptExecutionContextAttributeAttrGetterCallba
ck(v8::Local<v8::String> name, const v8::AccessorInfo& info) |
| 864 { | 864 { |
| 865 return TestObjV8Internal::withScriptExecutionContextAttributeAttrGetter(name
, info); | 865 return TestObjV8Internal::withScriptExecutionContextAttributeAttrGetter(name
, info); |
| 866 } | 866 } |
| 867 | 867 |
| 868 static void withScriptExecutionContextAttributeAttrSetter(v8::Local<v8::String>
name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) | 868 static void withScriptExecutionContextAttributeAttrSetter(v8::Local<v8::String>
name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) |
| 869 { | 869 { |
| 870 TestObj* imp = V8TestObj::toNative(info.Holder()); | 870 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 871 V8TRYCATCH_VOID(TestObj*, v, V8TestObj::HasInstance(value, info.GetIsolate()
, worldType(info.GetIsolate())) ? V8TestObj::toNative(v8::Handle<v8::Object>::Ca
st(value)) : 0); | 871 V8TRYCATCH_VOID(TestObj*, v, V8TestObject::HasInstance(value, info.GetIsolat
e(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Objec
t>::Cast(value)) : 0); |
| 872 ScriptExecutionContext* scriptContext = getScriptExecutionContext(); | 872 ScriptExecutionContext* scriptContext = getScriptExecutionContext(); |
| 873 imp->setWithScriptExecutionContextAttribute(scriptContext, WTF::getPtr(v)); | 873 imp->setWithScriptExecutionContextAttribute(scriptContext, WTF::getPtr(v)); |
| 874 return; | 874 return; |
| 875 } | 875 } |
| 876 | 876 |
| 877 static void withScriptExecutionContextAttributeAttrSetterCallback(v8::Local<v8::
String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) | 877 static void withScriptExecutionContextAttributeAttrSetterCallback(v8::Local<v8::
String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) |
| 878 { | 878 { |
| 879 TestObjV8Internal::withScriptExecutionContextAttributeAttrSetter(name, value
, info); | 879 TestObjV8Internal::withScriptExecutionContextAttributeAttrSetter(name, value
, info); |
| 880 } | 880 } |
| 881 | 881 |
| 882 static v8::Handle<v8::Value> withScriptStateAttributeRaisesAttrGetter(v8::Local<
v8::String> name, const v8::AccessorInfo& info) | 882 static v8::Handle<v8::Value> withScriptStateAttributeRaisesAttrGetter(v8::Local<
v8::String> name, const v8::AccessorInfo& info) |
| 883 { | 883 { |
| 884 TestObj* imp = V8TestObj::toNative(info.Holder()); | 884 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 885 ExceptionCode ec = 0; | 885 ExceptionCode ec = 0; |
| 886 ScriptState* currentState = ScriptState::current(); | 886 ScriptState* currentState = ScriptState::current(); |
| 887 if (!currentState) | 887 if (!currentState) |
| 888 return v8Undefined(); | 888 return v8Undefined(); |
| 889 ScriptState& state = *currentState; | 889 ScriptState& state = *currentState; |
| 890 RefPtr<TestObj> v = imp->withScriptStateAttributeRaises(&state, ec); | 890 RefPtr<TestObj> v = imp->withScriptStateAttributeRaises(&state, ec); |
| 891 if (UNLIKELY(ec)) | 891 if (UNLIKELY(ec)) |
| 892 return setDOMException(ec, info.GetIsolate()); | 892 return setDOMException(ec, info.GetIsolate()); |
| 893 if (state.hadException()) | 893 if (state.hadException()) |
| 894 return throwError(state.exception(), info.GetIsolate()); | 894 return throwError(state.exception(), info.GetIsolate()); |
| 895 return toV8Fast(v.release(), info, imp); | 895 return toV8Fast(v.release(), info, imp); |
| 896 } | 896 } |
| 897 | 897 |
| 898 static v8::Handle<v8::Value> withScriptStateAttributeRaisesAttrGetterCallback(v8
::Local<v8::String> name, const v8::AccessorInfo& info) | 898 static v8::Handle<v8::Value> withScriptStateAttributeRaisesAttrGetterCallback(v8
::Local<v8::String> name, const v8::AccessorInfo& info) |
| 899 { | 899 { |
| 900 return TestObjV8Internal::withScriptStateAttributeRaisesAttrGetter(name, inf
o); | 900 return TestObjV8Internal::withScriptStateAttributeRaisesAttrGetter(name, inf
o); |
| 901 } | 901 } |
| 902 | 902 |
| 903 static void withScriptStateAttributeRaisesAttrSetter(v8::Local<v8::String> name,
v8::Local<v8::Value> value, const v8::AccessorInfo& info) | 903 static void withScriptStateAttributeRaisesAttrSetter(v8::Local<v8::String> name,
v8::Local<v8::Value> value, const v8::AccessorInfo& info) |
| 904 { | 904 { |
| 905 TestObj* imp = V8TestObj::toNative(info.Holder()); | 905 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 906 V8TRYCATCH_VOID(TestObj*, v, V8TestObj::HasInstance(value, info.GetIsolate()
, worldType(info.GetIsolate())) ? V8TestObj::toNative(v8::Handle<v8::Object>::Ca
st(value)) : 0); | 906 V8TRYCATCH_VOID(TestObj*, v, V8TestObject::HasInstance(value, info.GetIsolat
e(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Objec
t>::Cast(value)) : 0); |
| 907 ScriptState* currentState = ScriptState::current(); | 907 ScriptState* currentState = ScriptState::current(); |
| 908 if (!currentState) | 908 if (!currentState) |
| 909 return; | 909 return; |
| 910 ScriptState& state = *currentState; | 910 ScriptState& state = *currentState; |
| 911 imp->setWithScriptStateAttributeRaises(&state, WTF::getPtr(v)); | 911 imp->setWithScriptStateAttributeRaises(&state, WTF::getPtr(v)); |
| 912 if (state.hadException()) | 912 if (state.hadException()) |
| 913 throwError(state.exception(), info.GetIsolate()); | 913 throwError(state.exception(), info.GetIsolate()); |
| 914 return; | 914 return; |
| 915 } | 915 } |
| 916 | 916 |
| 917 static void withScriptStateAttributeRaisesAttrSetterCallback(v8::Local<v8::Strin
g> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) | 917 static void withScriptStateAttributeRaisesAttrSetterCallback(v8::Local<v8::Strin
g> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) |
| 918 { | 918 { |
| 919 TestObjV8Internal::withScriptStateAttributeRaisesAttrSetter(name, value, inf
o); | 919 TestObjV8Internal::withScriptStateAttributeRaisesAttrSetter(name, value, inf
o); |
| 920 } | 920 } |
| 921 | 921 |
| 922 static v8::Handle<v8::Value> withScriptExecutionContextAttributeRaisesAttrGetter
(v8::Local<v8::String> name, const v8::AccessorInfo& info) | 922 static v8::Handle<v8::Value> withScriptExecutionContextAttributeRaisesAttrGetter
(v8::Local<v8::String> name, const v8::AccessorInfo& info) |
| 923 { | 923 { |
| 924 TestObj* imp = V8TestObj::toNative(info.Holder()); | 924 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 925 ExceptionCode ec = 0; | 925 ExceptionCode ec = 0; |
| 926 ScriptExecutionContext* scriptContext = getScriptExecutionContext(); | 926 ScriptExecutionContext* scriptContext = getScriptExecutionContext(); |
| 927 RefPtr<TestObj> v = imp->withScriptExecutionContextAttributeRaises(scriptCon
text, ec); | 927 RefPtr<TestObj> v = imp->withScriptExecutionContextAttributeRaises(scriptCon
text, ec); |
| 928 if (UNLIKELY(ec)) | 928 if (UNLIKELY(ec)) |
| 929 return setDOMException(ec, info.GetIsolate()); | 929 return setDOMException(ec, info.GetIsolate()); |
| 930 return toV8Fast(v.release(), info, imp); | 930 return toV8Fast(v.release(), info, imp); |
| 931 } | 931 } |
| 932 | 932 |
| 933 static v8::Handle<v8::Value> withScriptExecutionContextAttributeRaisesAttrGetter
Callback(v8::Local<v8::String> name, const v8::AccessorInfo& info) | 933 static v8::Handle<v8::Value> withScriptExecutionContextAttributeRaisesAttrGetter
Callback(v8::Local<v8::String> name, const v8::AccessorInfo& info) |
| 934 { | 934 { |
| 935 return TestObjV8Internal::withScriptExecutionContextAttributeRaisesAttrGette
r(name, info); | 935 return TestObjV8Internal::withScriptExecutionContextAttributeRaisesAttrGette
r(name, info); |
| 936 } | 936 } |
| 937 | 937 |
| 938 static void withScriptExecutionContextAttributeRaisesAttrSetter(v8::Local<v8::St
ring> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) | 938 static void withScriptExecutionContextAttributeRaisesAttrSetter(v8::Local<v8::St
ring> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) |
| 939 { | 939 { |
| 940 TestObj* imp = V8TestObj::toNative(info.Holder()); | 940 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 941 V8TRYCATCH_VOID(TestObj*, v, V8TestObj::HasInstance(value, info.GetIsolate()
, worldType(info.GetIsolate())) ? V8TestObj::toNative(v8::Handle<v8::Object>::Ca
st(value)) : 0); | 941 V8TRYCATCH_VOID(TestObj*, v, V8TestObject::HasInstance(value, info.GetIsolat
e(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Objec
t>::Cast(value)) : 0); |
| 942 ScriptExecutionContext* scriptContext = getScriptExecutionContext(); | 942 ScriptExecutionContext* scriptContext = getScriptExecutionContext(); |
| 943 imp->setWithScriptExecutionContextAttributeRaises(scriptContext, WTF::getPtr
(v)); | 943 imp->setWithScriptExecutionContextAttributeRaises(scriptContext, WTF::getPtr
(v)); |
| 944 return; | 944 return; |
| 945 } | 945 } |
| 946 | 946 |
| 947 static void withScriptExecutionContextAttributeRaisesAttrSetterCallback(v8::Loca
l<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) | 947 static void withScriptExecutionContextAttributeRaisesAttrSetterCallback(v8::Loca
l<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) |
| 948 { | 948 { |
| 949 TestObjV8Internal::withScriptExecutionContextAttributeRaisesAttrSetter(name,
value, info); | 949 TestObjV8Internal::withScriptExecutionContextAttributeRaisesAttrSetter(name,
value, info); |
| 950 } | 950 } |
| 951 | 951 |
| 952 static v8::Handle<v8::Value> withScriptExecutionContextAndScriptStateAttributeAt
trGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info) | 952 static v8::Handle<v8::Value> withScriptExecutionContextAndScriptStateAttributeAt
trGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info) |
| 953 { | 953 { |
| 954 TestObj* imp = V8TestObj::toNative(info.Holder()); | 954 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 955 ScriptState* currentState = ScriptState::current(); | 955 ScriptState* currentState = ScriptState::current(); |
| 956 if (!currentState) | 956 if (!currentState) |
| 957 return v8Undefined(); | 957 return v8Undefined(); |
| 958 ScriptState& state = *currentState; | 958 ScriptState& state = *currentState; |
| 959 ScriptExecutionContext* scriptContext = getScriptExecutionContext(); | 959 ScriptExecutionContext* scriptContext = getScriptExecutionContext(); |
| 960 return toV8Fast(imp->withScriptExecutionContextAndScriptStateAttribute(&stat
e, scriptContext), info, imp); | 960 return toV8Fast(imp->withScriptExecutionContextAndScriptStateAttribute(&stat
e, scriptContext), info, imp); |
| 961 } | 961 } |
| 962 | 962 |
| 963 static v8::Handle<v8::Value> withScriptExecutionContextAndScriptStateAttributeAt
trGetterCallback(v8::Local<v8::String> name, const v8::AccessorInfo& info) | 963 static v8::Handle<v8::Value> withScriptExecutionContextAndScriptStateAttributeAt
trGetterCallback(v8::Local<v8::String> name, const v8::AccessorInfo& info) |
| 964 { | 964 { |
| 965 return TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeA
ttrGetter(name, info); | 965 return TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeA
ttrGetter(name, info); |
| 966 } | 966 } |
| 967 | 967 |
| 968 static void withScriptExecutionContextAndScriptStateAttributeAttrSetter(v8::Loca
l<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) | 968 static void withScriptExecutionContextAndScriptStateAttributeAttrSetter(v8::Loca
l<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) |
| 969 { | 969 { |
| 970 TestObj* imp = V8TestObj::toNative(info.Holder()); | 970 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 971 V8TRYCATCH_VOID(TestObj*, v, V8TestObj::HasInstance(value, info.GetIsolate()
, worldType(info.GetIsolate())) ? V8TestObj::toNative(v8::Handle<v8::Object>::Ca
st(value)) : 0); | 971 V8TRYCATCH_VOID(TestObj*, v, V8TestObject::HasInstance(value, info.GetIsolat
e(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Objec
t>::Cast(value)) : 0); |
| 972 ScriptState* currentState = ScriptState::current(); | 972 ScriptState* currentState = ScriptState::current(); |
| 973 if (!currentState) | 973 if (!currentState) |
| 974 return; | 974 return; |
| 975 ScriptState& state = *currentState; | 975 ScriptState& state = *currentState; |
| 976 ScriptExecutionContext* scriptContext = getScriptExecutionContext(); | 976 ScriptExecutionContext* scriptContext = getScriptExecutionContext(); |
| 977 imp->setWithScriptExecutionContextAndScriptStateAttribute(&state, scriptCont
ext, WTF::getPtr(v)); | 977 imp->setWithScriptExecutionContextAndScriptStateAttribute(&state, scriptCont
ext, WTF::getPtr(v)); |
| 978 if (state.hadException()) | 978 if (state.hadException()) |
| 979 throwError(state.exception(), info.GetIsolate()); | 979 throwError(state.exception(), info.GetIsolate()); |
| 980 return; | 980 return; |
| 981 } | 981 } |
| 982 | 982 |
| 983 static void withScriptExecutionContextAndScriptStateAttributeAttrSetterCallback(
v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo&
info) | 983 static void withScriptExecutionContextAndScriptStateAttributeAttrSetterCallback(
v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo&
info) |
| 984 { | 984 { |
| 985 TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeAttrSett
er(name, value, info); | 985 TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeAttrSett
er(name, value, info); |
| 986 } | 986 } |
| 987 | 987 |
| 988 static v8::Handle<v8::Value> withScriptExecutionContextAndScriptStateAttributeRa
isesAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info) | 988 static v8::Handle<v8::Value> withScriptExecutionContextAndScriptStateAttributeRa
isesAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info) |
| 989 { | 989 { |
| 990 TestObj* imp = V8TestObj::toNative(info.Holder()); | 990 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 991 ExceptionCode ec = 0; | 991 ExceptionCode ec = 0; |
| 992 ScriptState* currentState = ScriptState::current(); | 992 ScriptState* currentState = ScriptState::current(); |
| 993 if (!currentState) | 993 if (!currentState) |
| 994 return v8Undefined(); | 994 return v8Undefined(); |
| 995 ScriptState& state = *currentState; | 995 ScriptState& state = *currentState; |
| 996 ScriptExecutionContext* scriptContext = getScriptExecutionContext(); | 996 ScriptExecutionContext* scriptContext = getScriptExecutionContext(); |
| 997 RefPtr<TestObj> v = imp->withScriptExecutionContextAndScriptStateAttributeRa
ises(&state, scriptContext, ec); | 997 RefPtr<TestObj> v = imp->withScriptExecutionContextAndScriptStateAttributeRa
ises(&state, scriptContext, ec); |
| 998 if (UNLIKELY(ec)) | 998 if (UNLIKELY(ec)) |
| 999 return setDOMException(ec, info.GetIsolate()); | 999 return setDOMException(ec, info.GetIsolate()); |
| 1000 if (state.hadException()) | 1000 if (state.hadException()) |
| 1001 return throwError(state.exception(), info.GetIsolate()); | 1001 return throwError(state.exception(), info.GetIsolate()); |
| 1002 return toV8Fast(v.release(), info, imp); | 1002 return toV8Fast(v.release(), info, imp); |
| 1003 } | 1003 } |
| 1004 | 1004 |
| 1005 static v8::Handle<v8::Value> withScriptExecutionContextAndScriptStateAttributeRa
isesAttrGetterCallback(v8::Local<v8::String> name, const v8::AccessorInfo& info) | 1005 static v8::Handle<v8::Value> withScriptExecutionContextAndScriptStateAttributeRa
isesAttrGetterCallback(v8::Local<v8::String> name, const v8::AccessorInfo& info) |
| 1006 { | 1006 { |
| 1007 return TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeR
aisesAttrGetter(name, info); | 1007 return TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeR
aisesAttrGetter(name, info); |
| 1008 } | 1008 } |
| 1009 | 1009 |
| 1010 static void withScriptExecutionContextAndScriptStateAttributeRaisesAttrSetter(v8
::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& in
fo) | 1010 static void withScriptExecutionContextAndScriptStateAttributeRaisesAttrSetter(v8
::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& in
fo) |
| 1011 { | 1011 { |
| 1012 TestObj* imp = V8TestObj::toNative(info.Holder()); | 1012 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1013 V8TRYCATCH_VOID(TestObj*, v, V8TestObj::HasInstance(value, info.GetIsolate()
, worldType(info.GetIsolate())) ? V8TestObj::toNative(v8::Handle<v8::Object>::Ca
st(value)) : 0); | 1013 V8TRYCATCH_VOID(TestObj*, v, V8TestObject::HasInstance(value, info.GetIsolat
e(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Objec
t>::Cast(value)) : 0); |
| 1014 ScriptState* currentState = ScriptState::current(); | 1014 ScriptState* currentState = ScriptState::current(); |
| 1015 if (!currentState) | 1015 if (!currentState) |
| 1016 return; | 1016 return; |
| 1017 ScriptState& state = *currentState; | 1017 ScriptState& state = *currentState; |
| 1018 ScriptExecutionContext* scriptContext = getScriptExecutionContext(); | 1018 ScriptExecutionContext* scriptContext = getScriptExecutionContext(); |
| 1019 imp->setWithScriptExecutionContextAndScriptStateAttributeRaises(&state, scri
ptContext, WTF::getPtr(v)); | 1019 imp->setWithScriptExecutionContextAndScriptStateAttributeRaises(&state, scri
ptContext, WTF::getPtr(v)); |
| 1020 if (state.hadException()) | 1020 if (state.hadException()) |
| 1021 throwError(state.exception(), info.GetIsolate()); | 1021 throwError(state.exception(), info.GetIsolate()); |
| 1022 return; | 1022 return; |
| 1023 } | 1023 } |
| 1024 | 1024 |
| 1025 static void withScriptExecutionContextAndScriptStateAttributeRaisesAttrSetterCal
lback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::Accessor
Info& info) | 1025 static void withScriptExecutionContextAndScriptStateAttributeRaisesAttrSetterCal
lback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::Accessor
Info& info) |
| 1026 { | 1026 { |
| 1027 TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeRaisesAt
trSetter(name, value, info); | 1027 TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeRaisesAt
trSetter(name, value, info); |
| 1028 } | 1028 } |
| 1029 | 1029 |
| 1030 static v8::Handle<v8::Value> withScriptExecutionContextAndScriptStateWithSpacesA
ttributeAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info) | 1030 static v8::Handle<v8::Value> withScriptExecutionContextAndScriptStateWithSpacesA
ttributeAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info) |
| 1031 { | 1031 { |
| 1032 TestObj* imp = V8TestObj::toNative(info.Holder()); | 1032 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1033 ScriptState* currentState = ScriptState::current(); | 1033 ScriptState* currentState = ScriptState::current(); |
| 1034 if (!currentState) | 1034 if (!currentState) |
| 1035 return v8Undefined(); | 1035 return v8Undefined(); |
| 1036 ScriptState& state = *currentState; | 1036 ScriptState& state = *currentState; |
| 1037 ScriptExecutionContext* scriptContext = getScriptExecutionContext(); | 1037 ScriptExecutionContext* scriptContext = getScriptExecutionContext(); |
| 1038 return toV8Fast(imp->withScriptExecutionContextAndScriptStateWithSpacesAttri
bute(&state, scriptContext), info, imp); | 1038 return toV8Fast(imp->withScriptExecutionContextAndScriptStateWithSpacesAttri
bute(&state, scriptContext), info, imp); |
| 1039 } | 1039 } |
| 1040 | 1040 |
| 1041 static v8::Handle<v8::Value> withScriptExecutionContextAndScriptStateWithSpacesA
ttributeAttrGetterCallback(v8::Local<v8::String> name, const v8::AccessorInfo& i
nfo) | 1041 static v8::Handle<v8::Value> withScriptExecutionContextAndScriptStateWithSpacesA
ttributeAttrGetterCallback(v8::Local<v8::String> name, const v8::AccessorInfo& i
nfo) |
| 1042 { | 1042 { |
| 1043 return TestObjV8Internal::withScriptExecutionContextAndScriptStateWithSpaces
AttributeAttrGetter(name, info); | 1043 return TestObjV8Internal::withScriptExecutionContextAndScriptStateWithSpaces
AttributeAttrGetter(name, info); |
| 1044 } | 1044 } |
| 1045 | 1045 |
| 1046 static void withScriptExecutionContextAndScriptStateWithSpacesAttributeAttrSette
r(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo
& info) | 1046 static void withScriptExecutionContextAndScriptStateWithSpacesAttributeAttrSette
r(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo
& info) |
| 1047 { | 1047 { |
| 1048 TestObj* imp = V8TestObj::toNative(info.Holder()); | 1048 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1049 V8TRYCATCH_VOID(TestObj*, v, V8TestObj::HasInstance(value, info.GetIsolate()
, worldType(info.GetIsolate())) ? V8TestObj::toNative(v8::Handle<v8::Object>::Ca
st(value)) : 0); | 1049 V8TRYCATCH_VOID(TestObj*, v, V8TestObject::HasInstance(value, info.GetIsolat
e(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Objec
t>::Cast(value)) : 0); |
| 1050 ScriptState* currentState = ScriptState::current(); | 1050 ScriptState* currentState = ScriptState::current(); |
| 1051 if (!currentState) | 1051 if (!currentState) |
| 1052 return; | 1052 return; |
| 1053 ScriptState& state = *currentState; | 1053 ScriptState& state = *currentState; |
| 1054 ScriptExecutionContext* scriptContext = getScriptExecutionContext(); | 1054 ScriptExecutionContext* scriptContext = getScriptExecutionContext(); |
| 1055 imp->setWithScriptExecutionContextAndScriptStateWithSpacesAttribute(&state,
scriptContext, WTF::getPtr(v)); | 1055 imp->setWithScriptExecutionContextAndScriptStateWithSpacesAttribute(&state,
scriptContext, WTF::getPtr(v)); |
| 1056 if (state.hadException()) | 1056 if (state.hadException()) |
| 1057 throwError(state.exception(), info.GetIsolate()); | 1057 throwError(state.exception(), info.GetIsolate()); |
| 1058 return; | 1058 return; |
| 1059 } | 1059 } |
| 1060 | 1060 |
| 1061 static void withScriptExecutionContextAndScriptStateWithSpacesAttributeAttrSette
rCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::Acce
ssorInfo& info) | 1061 static void withScriptExecutionContextAndScriptStateWithSpacesAttributeAttrSette
rCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::Acce
ssorInfo& info) |
| 1062 { | 1062 { |
| 1063 TestObjV8Internal::withScriptExecutionContextAndScriptStateWithSpacesAttribu
teAttrSetter(name, value, info); | 1063 TestObjV8Internal::withScriptExecutionContextAndScriptStateWithSpacesAttribu
teAttrSetter(name, value, info); |
| 1064 } | 1064 } |
| 1065 | 1065 |
| 1066 static v8::Handle<v8::Value> enforcedRangeLongAttrAttrGetter(v8::Local<v8::Strin
g> name, const v8::AccessorInfo& info) | 1066 static v8::Handle<v8::Value> enforcedRangeLongAttrAttrGetter(v8::Local<v8::Strin
g> name, const v8::AccessorInfo& info) |
| 1067 { | 1067 { |
| 1068 TestObj* imp = V8TestObj::toNative(info.Holder()); | 1068 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1069 return v8Integer(imp->enforcedRangeLongAttr(), info.GetIsolate()); | 1069 return v8Integer(imp->enforcedRangeLongAttr(), info.GetIsolate()); |
| 1070 } | 1070 } |
| 1071 | 1071 |
| 1072 static v8::Handle<v8::Value> enforcedRangeLongAttrAttrGetterCallback(v8::Local<v
8::String> name, const v8::AccessorInfo& info) | 1072 static v8::Handle<v8::Value> enforcedRangeLongAttrAttrGetterCallback(v8::Local<v
8::String> name, const v8::AccessorInfo& info) |
| 1073 { | 1073 { |
| 1074 return TestObjV8Internal::enforcedRangeLongAttrAttrGetter(name, info); | 1074 return TestObjV8Internal::enforcedRangeLongAttrAttrGetter(name, info); |
| 1075 } | 1075 } |
| 1076 | 1076 |
| 1077 static void enforcedRangeLongAttrAttrSetter(v8::Local<v8::String> name, v8::Loca
l<v8::Value> value, const v8::AccessorInfo& info) | 1077 static void enforcedRangeLongAttrAttrSetter(v8::Local<v8::String> name, v8::Loca
l<v8::Value> value, const v8::AccessorInfo& info) |
| 1078 { | 1078 { |
| 1079 TestObj* imp = V8TestObj::toNative(info.Holder()); | 1079 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1080 V8TRYCATCH_WITH_TYPECHECK_VOID(int, v, toInt32(value, EnforceRange, ok), inf
o.GetIsolate()); | 1080 V8TRYCATCH_WITH_TYPECHECK_VOID(int, v, toInt32(value, EnforceRange, ok), inf
o.GetIsolate()); |
| 1081 imp->setEnforcedRangeLongAttr(v); | 1081 imp->setEnforcedRangeLongAttr(v); |
| 1082 return; | 1082 return; |
| 1083 } | 1083 } |
| 1084 | 1084 |
| 1085 static void enforcedRangeLongAttrAttrSetterCallback(v8::Local<v8::String> name,
v8::Local<v8::Value> value, const v8::AccessorInfo& info) | 1085 static void enforcedRangeLongAttrAttrSetterCallback(v8::Local<v8::String> name,
v8::Local<v8::Value> value, const v8::AccessorInfo& info) |
| 1086 { | 1086 { |
| 1087 TestObjV8Internal::enforcedRangeLongAttrAttrSetter(name, value, info); | 1087 TestObjV8Internal::enforcedRangeLongAttrAttrSetter(name, value, info); |
| 1088 } | 1088 } |
| 1089 | 1089 |
| 1090 static v8::Handle<v8::Value> enforcedRangeUnsignedLongAttrAttrGetter(v8::Local<v
8::String> name, const v8::AccessorInfo& info) | 1090 static v8::Handle<v8::Value> enforcedRangeUnsignedLongAttrAttrGetter(v8::Local<v
8::String> name, const v8::AccessorInfo& info) |
| 1091 { | 1091 { |
| 1092 TestObj* imp = V8TestObj::toNative(info.Holder()); | 1092 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1093 return v8UnsignedInteger(imp->enforcedRangeUnsignedLongAttr(), info.GetIsola
te()); | 1093 return v8UnsignedInteger(imp->enforcedRangeUnsignedLongAttr(), info.GetIsola
te()); |
| 1094 } | 1094 } |
| 1095 | 1095 |
| 1096 static v8::Handle<v8::Value> enforcedRangeUnsignedLongAttrAttrGetterCallback(v8:
:Local<v8::String> name, const v8::AccessorInfo& info) | 1096 static v8::Handle<v8::Value> enforcedRangeUnsignedLongAttrAttrGetterCallback(v8:
:Local<v8::String> name, const v8::AccessorInfo& info) |
| 1097 { | 1097 { |
| 1098 return TestObjV8Internal::enforcedRangeUnsignedLongAttrAttrGetter(name, info
); | 1098 return TestObjV8Internal::enforcedRangeUnsignedLongAttrAttrGetter(name, info
); |
| 1099 } | 1099 } |
| 1100 | 1100 |
| 1101 static void enforcedRangeUnsignedLongAttrAttrSetter(v8::Local<v8::String> name,
v8::Local<v8::Value> value, const v8::AccessorInfo& info) | 1101 static void enforcedRangeUnsignedLongAttrAttrSetter(v8::Local<v8::String> name,
v8::Local<v8::Value> value, const v8::AccessorInfo& info) |
| 1102 { | 1102 { |
| 1103 TestObj* imp = V8TestObj::toNative(info.Holder()); | 1103 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1104 V8TRYCATCH_WITH_TYPECHECK_VOID(unsigned, v, toUInt32(value, EnforceRange, ok
), info.GetIsolate()); | 1104 V8TRYCATCH_WITH_TYPECHECK_VOID(unsigned, v, toUInt32(value, EnforceRange, ok
), info.GetIsolate()); |
| 1105 imp->setEnforcedRangeUnsignedLongAttr(v); | 1105 imp->setEnforcedRangeUnsignedLongAttr(v); |
| 1106 return; | 1106 return; |
| 1107 } | 1107 } |
| 1108 | 1108 |
| 1109 static void enforcedRangeUnsignedLongAttrAttrSetterCallback(v8::Local<v8::String
> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) | 1109 static void enforcedRangeUnsignedLongAttrAttrSetterCallback(v8::Local<v8::String
> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) |
| 1110 { | 1110 { |
| 1111 TestObjV8Internal::enforcedRangeUnsignedLongAttrAttrSetter(name, value, info
); | 1111 TestObjV8Internal::enforcedRangeUnsignedLongAttrAttrSetter(name, value, info
); |
| 1112 } | 1112 } |
| 1113 | 1113 |
| 1114 static v8::Handle<v8::Value> enforcedRangeLongLongAttrAttrGetter(v8::Local<v8::S
tring> name, const v8::AccessorInfo& info) | 1114 static v8::Handle<v8::Value> enforcedRangeLongLongAttrAttrGetter(v8::Local<v8::S
tring> name, const v8::AccessorInfo& info) |
| 1115 { | 1115 { |
| 1116 TestObj* imp = V8TestObj::toNative(info.Holder()); | 1116 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1117 return v8::Number::New(static_cast<double>(imp->enforcedRangeLongLongAttr())
); | 1117 return v8::Number::New(static_cast<double>(imp->enforcedRangeLongLongAttr())
); |
| 1118 } | 1118 } |
| 1119 | 1119 |
| 1120 static v8::Handle<v8::Value> enforcedRangeLongLongAttrAttrGetterCallback(v8::Loc
al<v8::String> name, const v8::AccessorInfo& info) | 1120 static v8::Handle<v8::Value> enforcedRangeLongLongAttrAttrGetterCallback(v8::Loc
al<v8::String> name, const v8::AccessorInfo& info) |
| 1121 { | 1121 { |
| 1122 return TestObjV8Internal::enforcedRangeLongLongAttrAttrGetter(name, info); | 1122 return TestObjV8Internal::enforcedRangeLongLongAttrAttrGetter(name, info); |
| 1123 } | 1123 } |
| 1124 | 1124 |
| 1125 static void enforcedRangeLongLongAttrAttrSetter(v8::Local<v8::String> name, v8::
Local<v8::Value> value, const v8::AccessorInfo& info) | 1125 static void enforcedRangeLongLongAttrAttrSetter(v8::Local<v8::String> name, v8::
Local<v8::Value> value, const v8::AccessorInfo& info) |
| 1126 { | 1126 { |
| 1127 TestObj* imp = V8TestObj::toNative(info.Holder()); | 1127 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1128 V8TRYCATCH_WITH_TYPECHECK_VOID(long long, v, toInt64(value, EnforceRange, ok
), info.GetIsolate()); | 1128 V8TRYCATCH_WITH_TYPECHECK_VOID(long long, v, toInt64(value, EnforceRange, ok
), info.GetIsolate()); |
| 1129 imp->setEnforcedRangeLongLongAttr(v); | 1129 imp->setEnforcedRangeLongLongAttr(v); |
| 1130 return; | 1130 return; |
| 1131 } | 1131 } |
| 1132 | 1132 |
| 1133 static void enforcedRangeLongLongAttrAttrSetterCallback(v8::Local<v8::String> na
me, v8::Local<v8::Value> value, const v8::AccessorInfo& info) | 1133 static void enforcedRangeLongLongAttrAttrSetterCallback(v8::Local<v8::String> na
me, v8::Local<v8::Value> value, const v8::AccessorInfo& info) |
| 1134 { | 1134 { |
| 1135 TestObjV8Internal::enforcedRangeLongLongAttrAttrSetter(name, value, info); | 1135 TestObjV8Internal::enforcedRangeLongLongAttrAttrSetter(name, value, info); |
| 1136 } | 1136 } |
| 1137 | 1137 |
| 1138 static v8::Handle<v8::Value> enforcedRangeUnsignedLongLongAttrAttrGetter(v8::Loc
al<v8::String> name, const v8::AccessorInfo& info) | 1138 static v8::Handle<v8::Value> enforcedRangeUnsignedLongLongAttrAttrGetter(v8::Loc
al<v8::String> name, const v8::AccessorInfo& info) |
| 1139 { | 1139 { |
| 1140 TestObj* imp = V8TestObj::toNative(info.Holder()); | 1140 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1141 return v8::Number::New(static_cast<double>(imp->enforcedRangeUnsignedLongLon
gAttr())); | 1141 return v8::Number::New(static_cast<double>(imp->enforcedRangeUnsignedLongLon
gAttr())); |
| 1142 } | 1142 } |
| 1143 | 1143 |
| 1144 static v8::Handle<v8::Value> enforcedRangeUnsignedLongLongAttrAttrGetterCallback
(v8::Local<v8::String> name, const v8::AccessorInfo& info) | 1144 static v8::Handle<v8::Value> enforcedRangeUnsignedLongLongAttrAttrGetterCallback
(v8::Local<v8::String> name, const v8::AccessorInfo& info) |
| 1145 { | 1145 { |
| 1146 return TestObjV8Internal::enforcedRangeUnsignedLongLongAttrAttrGetter(name,
info); | 1146 return TestObjV8Internal::enforcedRangeUnsignedLongLongAttrAttrGetter(name,
info); |
| 1147 } | 1147 } |
| 1148 | 1148 |
| 1149 static void enforcedRangeUnsignedLongLongAttrAttrSetter(v8::Local<v8::String> na
me, v8::Local<v8::Value> value, const v8::AccessorInfo& info) | 1149 static void enforcedRangeUnsignedLongLongAttrAttrSetter(v8::Local<v8::String> na
me, v8::Local<v8::Value> value, const v8::AccessorInfo& info) |
| 1150 { | 1150 { |
| 1151 TestObj* imp = V8TestObj::toNative(info.Holder()); | 1151 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1152 V8TRYCATCH_WITH_TYPECHECK_VOID(unsigned long long, v, toUInt64(value, Enforc
eRange, ok), info.GetIsolate()); | 1152 V8TRYCATCH_WITH_TYPECHECK_VOID(unsigned long long, v, toUInt64(value, Enforc
eRange, ok), info.GetIsolate()); |
| 1153 imp->setEnforcedRangeUnsignedLongLongAttr(v); | 1153 imp->setEnforcedRangeUnsignedLongLongAttr(v); |
| 1154 return; | 1154 return; |
| 1155 } | 1155 } |
| 1156 | 1156 |
| 1157 static void enforcedRangeUnsignedLongLongAttrAttrSetterCallback(v8::Local<v8::St
ring> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) | 1157 static void enforcedRangeUnsignedLongLongAttrAttrSetterCallback(v8::Local<v8::St
ring> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) |
| 1158 { | 1158 { |
| 1159 TestObjV8Internal::enforcedRangeUnsignedLongLongAttrAttrSetter(name, value,
info); | 1159 TestObjV8Internal::enforcedRangeUnsignedLongLongAttrAttrSetter(name, value,
info); |
| 1160 } | 1160 } |
| 1161 | 1161 |
| 1162 #if ENABLE(Condition1) | 1162 #if ENABLE(Condition1) |
| 1163 | 1163 |
| 1164 static v8::Handle<v8::Value> conditionalAttr1AttrGetter(v8::Local<v8::String> na
me, const v8::AccessorInfo& info) | 1164 static v8::Handle<v8::Value> conditionalAttr1AttrGetter(v8::Local<v8::String> na
me, const v8::AccessorInfo& info) |
| 1165 { | 1165 { |
| 1166 TestObj* imp = V8TestObj::toNative(info.Holder()); | 1166 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1167 return v8Integer(imp->conditionalAttr1(), info.GetIsolate()); | 1167 return v8Integer(imp->conditionalAttr1(), info.GetIsolate()); |
| 1168 } | 1168 } |
| 1169 | 1169 |
| 1170 #endif // ENABLE(Condition1) | 1170 #endif // ENABLE(Condition1) |
| 1171 | 1171 |
| 1172 #if ENABLE(Condition1) | 1172 #if ENABLE(Condition1) |
| 1173 | 1173 |
| 1174 static v8::Handle<v8::Value> conditionalAttr1AttrGetterCallback(v8::Local<v8::St
ring> name, const v8::AccessorInfo& info) | 1174 static v8::Handle<v8::Value> conditionalAttr1AttrGetterCallback(v8::Local<v8::St
ring> name, const v8::AccessorInfo& info) |
| 1175 { | 1175 { |
| 1176 return TestObjV8Internal::conditionalAttr1AttrGetter(name, info); | 1176 return TestObjV8Internal::conditionalAttr1AttrGetter(name, info); |
| 1177 } | 1177 } |
| 1178 | 1178 |
| 1179 #endif // ENABLE(Condition1) | 1179 #endif // ENABLE(Condition1) |
| 1180 | 1180 |
| 1181 #if ENABLE(Condition1) | 1181 #if ENABLE(Condition1) |
| 1182 | 1182 |
| 1183 static void conditionalAttr1AttrSetter(v8::Local<v8::String> name, v8::Local<v8:
:Value> value, const v8::AccessorInfo& info) | 1183 static void conditionalAttr1AttrSetter(v8::Local<v8::String> name, v8::Local<v8:
:Value> value, const v8::AccessorInfo& info) |
| 1184 { | 1184 { |
| 1185 TestObj* imp = V8TestObj::toNative(info.Holder()); | 1185 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1186 V8TRYCATCH_VOID(int, v, toInt32(value)); | 1186 V8TRYCATCH_VOID(int, v, toInt32(value)); |
| 1187 imp->setConditionalAttr1(v); | 1187 imp->setConditionalAttr1(v); |
| 1188 return; | 1188 return; |
| 1189 } | 1189 } |
| 1190 | 1190 |
| 1191 #endif // ENABLE(Condition1) | 1191 #endif // ENABLE(Condition1) |
| 1192 | 1192 |
| 1193 #if ENABLE(Condition1) | 1193 #if ENABLE(Condition1) |
| 1194 | 1194 |
| 1195 static void conditionalAttr1AttrSetterCallback(v8::Local<v8::String> name, v8::L
ocal<v8::Value> value, const v8::AccessorInfo& info) | 1195 static void conditionalAttr1AttrSetterCallback(v8::Local<v8::String> name, v8::L
ocal<v8::Value> value, const v8::AccessorInfo& info) |
| 1196 { | 1196 { |
| 1197 TestObjV8Internal::conditionalAttr1AttrSetter(name, value, info); | 1197 TestObjV8Internal::conditionalAttr1AttrSetter(name, value, info); |
| 1198 } | 1198 } |
| 1199 | 1199 |
| 1200 #endif // ENABLE(Condition1) | 1200 #endif // ENABLE(Condition1) |
| 1201 | 1201 |
| 1202 #if ENABLE(Condition1) && ENABLE(Condition2) | 1202 #if ENABLE(Condition1) && ENABLE(Condition2) |
| 1203 | 1203 |
| 1204 static v8::Handle<v8::Value> conditionalAttr2AttrGetter(v8::Local<v8::String> na
me, const v8::AccessorInfo& info) | 1204 static v8::Handle<v8::Value> conditionalAttr2AttrGetter(v8::Local<v8::String> na
me, const v8::AccessorInfo& info) |
| 1205 { | 1205 { |
| 1206 TestObj* imp = V8TestObj::toNative(info.Holder()); | 1206 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1207 return v8Integer(imp->conditionalAttr2(), info.GetIsolate()); | 1207 return v8Integer(imp->conditionalAttr2(), info.GetIsolate()); |
| 1208 } | 1208 } |
| 1209 | 1209 |
| 1210 #endif // ENABLE(Condition1) && ENABLE(Condition2) | 1210 #endif // ENABLE(Condition1) && ENABLE(Condition2) |
| 1211 | 1211 |
| 1212 #if ENABLE(Condition1) && ENABLE(Condition2) | 1212 #if ENABLE(Condition1) && ENABLE(Condition2) |
| 1213 | 1213 |
| 1214 static v8::Handle<v8::Value> conditionalAttr2AttrGetterCallback(v8::Local<v8::St
ring> name, const v8::AccessorInfo& info) | 1214 static v8::Handle<v8::Value> conditionalAttr2AttrGetterCallback(v8::Local<v8::St
ring> name, const v8::AccessorInfo& info) |
| 1215 { | 1215 { |
| 1216 return TestObjV8Internal::conditionalAttr2AttrGetter(name, info); | 1216 return TestObjV8Internal::conditionalAttr2AttrGetter(name, info); |
| 1217 } | 1217 } |
| 1218 | 1218 |
| 1219 #endif // ENABLE(Condition1) && ENABLE(Condition2) | 1219 #endif // ENABLE(Condition1) && ENABLE(Condition2) |
| 1220 | 1220 |
| 1221 #if ENABLE(Condition1) && ENABLE(Condition2) | 1221 #if ENABLE(Condition1) && ENABLE(Condition2) |
| 1222 | 1222 |
| 1223 static void conditionalAttr2AttrSetter(v8::Local<v8::String> name, v8::Local<v8:
:Value> value, const v8::AccessorInfo& info) | 1223 static void conditionalAttr2AttrSetter(v8::Local<v8::String> name, v8::Local<v8:
:Value> value, const v8::AccessorInfo& info) |
| 1224 { | 1224 { |
| 1225 TestObj* imp = V8TestObj::toNative(info.Holder()); | 1225 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1226 V8TRYCATCH_VOID(int, v, toInt32(value)); | 1226 V8TRYCATCH_VOID(int, v, toInt32(value)); |
| 1227 imp->setConditionalAttr2(v); | 1227 imp->setConditionalAttr2(v); |
| 1228 return; | 1228 return; |
| 1229 } | 1229 } |
| 1230 | 1230 |
| 1231 #endif // ENABLE(Condition1) && ENABLE(Condition2) | 1231 #endif // ENABLE(Condition1) && ENABLE(Condition2) |
| 1232 | 1232 |
| 1233 #if ENABLE(Condition1) && ENABLE(Condition2) | 1233 #if ENABLE(Condition1) && ENABLE(Condition2) |
| 1234 | 1234 |
| 1235 static void conditionalAttr2AttrSetterCallback(v8::Local<v8::String> name, v8::L
ocal<v8::Value> value, const v8::AccessorInfo& info) | 1235 static void conditionalAttr2AttrSetterCallback(v8::Local<v8::String> name, v8::L
ocal<v8::Value> value, const v8::AccessorInfo& info) |
| 1236 { | 1236 { |
| 1237 TestObjV8Internal::conditionalAttr2AttrSetter(name, value, info); | 1237 TestObjV8Internal::conditionalAttr2AttrSetter(name, value, info); |
| 1238 } | 1238 } |
| 1239 | 1239 |
| 1240 #endif // ENABLE(Condition1) && ENABLE(Condition2) | 1240 #endif // ENABLE(Condition1) && ENABLE(Condition2) |
| 1241 | 1241 |
| 1242 #if ENABLE(Condition1) || ENABLE(Condition2) | 1242 #if ENABLE(Condition1) || ENABLE(Condition2) |
| 1243 | 1243 |
| 1244 static v8::Handle<v8::Value> conditionalAttr3AttrGetter(v8::Local<v8::String> na
me, const v8::AccessorInfo& info) | 1244 static v8::Handle<v8::Value> conditionalAttr3AttrGetter(v8::Local<v8::String> na
me, const v8::AccessorInfo& info) |
| 1245 { | 1245 { |
| 1246 TestObj* imp = V8TestObj::toNative(info.Holder()); | 1246 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1247 return v8Integer(imp->conditionalAttr3(), info.GetIsolate()); | 1247 return v8Integer(imp->conditionalAttr3(), info.GetIsolate()); |
| 1248 } | 1248 } |
| 1249 | 1249 |
| 1250 #endif // ENABLE(Condition1) || ENABLE(Condition2) | 1250 #endif // ENABLE(Condition1) || ENABLE(Condition2) |
| 1251 | 1251 |
| 1252 #if ENABLE(Condition1) || ENABLE(Condition2) | 1252 #if ENABLE(Condition1) || ENABLE(Condition2) |
| 1253 | 1253 |
| 1254 static v8::Handle<v8::Value> conditionalAttr3AttrGetterCallback(v8::Local<v8::St
ring> name, const v8::AccessorInfo& info) | 1254 static v8::Handle<v8::Value> conditionalAttr3AttrGetterCallback(v8::Local<v8::St
ring> name, const v8::AccessorInfo& info) |
| 1255 { | 1255 { |
| 1256 return TestObjV8Internal::conditionalAttr3AttrGetter(name, info); | 1256 return TestObjV8Internal::conditionalAttr3AttrGetter(name, info); |
| 1257 } | 1257 } |
| 1258 | 1258 |
| 1259 #endif // ENABLE(Condition1) || ENABLE(Condition2) | 1259 #endif // ENABLE(Condition1) || ENABLE(Condition2) |
| 1260 | 1260 |
| 1261 #if ENABLE(Condition1) || ENABLE(Condition2) | 1261 #if ENABLE(Condition1) || ENABLE(Condition2) |
| 1262 | 1262 |
| 1263 static void conditionalAttr3AttrSetter(v8::Local<v8::String> name, v8::Local<v8:
:Value> value, const v8::AccessorInfo& info) | 1263 static void conditionalAttr3AttrSetter(v8::Local<v8::String> name, v8::Local<v8:
:Value> value, const v8::AccessorInfo& info) |
| 1264 { | 1264 { |
| 1265 TestObj* imp = V8TestObj::toNative(info.Holder()); | 1265 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1266 V8TRYCATCH_VOID(int, v, toInt32(value)); | 1266 V8TRYCATCH_VOID(int, v, toInt32(value)); |
| 1267 imp->setConditionalAttr3(v); | 1267 imp->setConditionalAttr3(v); |
| 1268 return; | 1268 return; |
| 1269 } | 1269 } |
| 1270 | 1270 |
| 1271 #endif // ENABLE(Condition1) || ENABLE(Condition2) | 1271 #endif // ENABLE(Condition1) || ENABLE(Condition2) |
| 1272 | 1272 |
| 1273 #if ENABLE(Condition1) || ENABLE(Condition2) | 1273 #if ENABLE(Condition1) || ENABLE(Condition2) |
| 1274 | 1274 |
| 1275 static void conditionalAttr3AttrSetterCallback(v8::Local<v8::String> name, v8::L
ocal<v8::Value> value, const v8::AccessorInfo& info) | 1275 static void conditionalAttr3AttrSetterCallback(v8::Local<v8::String> name, v8::L
ocal<v8::Value> value, const v8::AccessorInfo& info) |
| 1276 { | 1276 { |
| 1277 TestObjV8Internal::conditionalAttr3AttrSetter(name, value, info); | 1277 TestObjV8Internal::conditionalAttr3AttrSetter(name, value, info); |
| 1278 } | 1278 } |
| 1279 | 1279 |
| 1280 #endif // ENABLE(Condition1) || ENABLE(Condition2) | 1280 #endif // ENABLE(Condition1) || ENABLE(Condition2) |
| 1281 | 1281 |
| 1282 static v8::Handle<v8::Value> cachedAttribute1AttrGetter(v8::Local<v8::String> na
me, const v8::AccessorInfo& info) | 1282 static v8::Handle<v8::Value> cachedAttribute1AttrGetter(v8::Local<v8::String> na
me, const v8::AccessorInfo& info) |
| 1283 { | 1283 { |
| 1284 TestObj* imp = V8TestObj::toNative(info.Holder()); | 1284 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1285 return imp->cachedAttribute1().v8Value(); | 1285 return imp->cachedAttribute1().v8Value(); |
| 1286 } | 1286 } |
| 1287 | 1287 |
| 1288 static v8::Handle<v8::Value> cachedAttribute1AttrGetterCallback(v8::Local<v8::St
ring> name, const v8::AccessorInfo& info) | 1288 static v8::Handle<v8::Value> cachedAttribute1AttrGetterCallback(v8::Local<v8::St
ring> name, const v8::AccessorInfo& info) |
| 1289 { | 1289 { |
| 1290 return TestObjV8Internal::cachedAttribute1AttrGetter(name, info); | 1290 return TestObjV8Internal::cachedAttribute1AttrGetter(name, info); |
| 1291 } | 1291 } |
| 1292 | 1292 |
| 1293 static v8::Handle<v8::Value> cachedAttribute2AttrGetter(v8::Local<v8::String> na
me, const v8::AccessorInfo& info) | 1293 static v8::Handle<v8::Value> cachedAttribute2AttrGetter(v8::Local<v8::String> na
me, const v8::AccessorInfo& info) |
| 1294 { | 1294 { |
| 1295 TestObj* imp = V8TestObj::toNative(info.Holder()); | 1295 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1296 return imp->cachedAttribute2().v8Value(); | 1296 return imp->cachedAttribute2().v8Value(); |
| 1297 } | 1297 } |
| 1298 | 1298 |
| 1299 static v8::Handle<v8::Value> cachedAttribute2AttrGetterCallback(v8::Local<v8::St
ring> name, const v8::AccessorInfo& info) | 1299 static v8::Handle<v8::Value> cachedAttribute2AttrGetterCallback(v8::Local<v8::St
ring> name, const v8::AccessorInfo& info) |
| 1300 { | 1300 { |
| 1301 return TestObjV8Internal::cachedAttribute2AttrGetter(name, info); | 1301 return TestObjV8Internal::cachedAttribute2AttrGetter(name, info); |
| 1302 } | 1302 } |
| 1303 | 1303 |
| 1304 static v8::Handle<v8::Value> anyAttributeAttrGetter(v8::Local<v8::String> name,
const v8::AccessorInfo& info) | 1304 static v8::Handle<v8::Value> anyAttributeAttrGetter(v8::Local<v8::String> name,
const v8::AccessorInfo& info) |
| 1305 { | 1305 { |
| 1306 TestObj* imp = V8TestObj::toNative(info.Holder()); | 1306 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1307 return imp->anyAttribute().v8Value(); | 1307 return imp->anyAttribute().v8Value(); |
| 1308 } | 1308 } |
| 1309 | 1309 |
| 1310 static v8::Handle<v8::Value> anyAttributeAttrGetterCallback(v8::Local<v8::String
> name, const v8::AccessorInfo& info) | 1310 static v8::Handle<v8::Value> anyAttributeAttrGetterCallback(v8::Local<v8::String
> name, const v8::AccessorInfo& info) |
| 1311 { | 1311 { |
| 1312 return TestObjV8Internal::anyAttributeAttrGetter(name, info); | 1312 return TestObjV8Internal::anyAttributeAttrGetter(name, info); |
| 1313 } | 1313 } |
| 1314 | 1314 |
| 1315 static void anyAttributeAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Val
ue> value, const v8::AccessorInfo& info) | 1315 static void anyAttributeAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Val
ue> value, const v8::AccessorInfo& info) |
| 1316 { | 1316 { |
| 1317 TestObj* imp = V8TestObj::toNative(info.Holder()); | 1317 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1318 V8TRYCATCH_VOID(ScriptValue, v, ScriptValue(value)); | 1318 V8TRYCATCH_VOID(ScriptValue, v, ScriptValue(value)); |
| 1319 imp->setAnyAttribute(WTF::getPtr(v)); | 1319 imp->setAnyAttribute(WTF::getPtr(v)); |
| 1320 return; | 1320 return; |
| 1321 } | 1321 } |
| 1322 | 1322 |
| 1323 static void anyAttributeAttrSetterCallback(v8::Local<v8::String> name, v8::Local
<v8::Value> value, const v8::AccessorInfo& info) | 1323 static void anyAttributeAttrSetterCallback(v8::Local<v8::String> name, v8::Local
<v8::Value> value, const v8::AccessorInfo& info) |
| 1324 { | 1324 { |
| 1325 TestObjV8Internal::anyAttributeAttrSetter(name, value, info); | 1325 TestObjV8Internal::anyAttributeAttrSetter(name, value, info); |
| 1326 } | 1326 } |
| 1327 | 1327 |
| 1328 static v8::Handle<v8::Value> enabledAtRuntimeAttr1AttrGetter(v8::Local<v8::Strin
g> name, const v8::AccessorInfo& info) | 1328 static v8::Handle<v8::Value> enabledAtRuntimeAttr1AttrGetter(v8::Local<v8::Strin
g> name, const v8::AccessorInfo& info) |
| 1329 { | 1329 { |
| 1330 TestObj* imp = V8TestObj::toNative(info.Holder()); | 1330 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1331 return v8Integer(imp->enabledAtRuntimeAttr1(), info.GetIsolate()); | 1331 return v8Integer(imp->enabledAtRuntimeAttr1(), info.GetIsolate()); |
| 1332 } | 1332 } |
| 1333 | 1333 |
| 1334 static v8::Handle<v8::Value> enabledAtRuntimeAttr1AttrGetterCallback(v8::Local<v
8::String> name, const v8::AccessorInfo& info) | 1334 static v8::Handle<v8::Value> enabledAtRuntimeAttr1AttrGetterCallback(v8::Local<v
8::String> name, const v8::AccessorInfo& info) |
| 1335 { | 1335 { |
| 1336 return TestObjV8Internal::enabledAtRuntimeAttr1AttrGetter(name, info); | 1336 return TestObjV8Internal::enabledAtRuntimeAttr1AttrGetter(name, info); |
| 1337 } | 1337 } |
| 1338 | 1338 |
| 1339 static void enabledAtRuntimeAttr1AttrSetter(v8::Local<v8::String> name, v8::Loca
l<v8::Value> value, const v8::AccessorInfo& info) | 1339 static void enabledAtRuntimeAttr1AttrSetter(v8::Local<v8::String> name, v8::Loca
l<v8::Value> value, const v8::AccessorInfo& info) |
| 1340 { | 1340 { |
| 1341 TestObj* imp = V8TestObj::toNative(info.Holder()); | 1341 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1342 V8TRYCATCH_VOID(int, v, toInt32(value)); | 1342 V8TRYCATCH_VOID(int, v, toInt32(value)); |
| 1343 imp->setEnabledAtRuntimeAttr1(v); | 1343 imp->setEnabledAtRuntimeAttr1(v); |
| 1344 return; | 1344 return; |
| 1345 } | 1345 } |
| 1346 | 1346 |
| 1347 static void enabledAtRuntimeAttr1AttrSetterCallback(v8::Local<v8::String> name,
v8::Local<v8::Value> value, const v8::AccessorInfo& info) | 1347 static void enabledAtRuntimeAttr1AttrSetterCallback(v8::Local<v8::String> name,
v8::Local<v8::Value> value, const v8::AccessorInfo& info) |
| 1348 { | 1348 { |
| 1349 TestObjV8Internal::enabledAtRuntimeAttr1AttrSetter(name, value, info); | 1349 TestObjV8Internal::enabledAtRuntimeAttr1AttrSetter(name, value, info); |
| 1350 } | 1350 } |
| 1351 | 1351 |
| 1352 static v8::Handle<v8::Value> enabledAtRuntimeAttr2AttrGetter(v8::Local<v8::Strin
g> name, const v8::AccessorInfo& info) | 1352 static v8::Handle<v8::Value> enabledAtRuntimeAttr2AttrGetter(v8::Local<v8::Strin
g> name, const v8::AccessorInfo& info) |
| 1353 { | 1353 { |
| 1354 TestObj* imp = V8TestObj::toNative(info.Holder()); | 1354 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1355 return v8Integer(imp->enabledAtRuntimeAttr2(), info.GetIsolate()); | 1355 return v8Integer(imp->enabledAtRuntimeAttr2(), info.GetIsolate()); |
| 1356 } | 1356 } |
| 1357 | 1357 |
| 1358 static v8::Handle<v8::Value> enabledAtRuntimeAttr2AttrGetterCallback(v8::Local<v
8::String> name, const v8::AccessorInfo& info) | 1358 static v8::Handle<v8::Value> enabledAtRuntimeAttr2AttrGetterCallback(v8::Local<v
8::String> name, const v8::AccessorInfo& info) |
| 1359 { | 1359 { |
| 1360 return TestObjV8Internal::enabledAtRuntimeAttr2AttrGetter(name, info); | 1360 return TestObjV8Internal::enabledAtRuntimeAttr2AttrGetter(name, info); |
| 1361 } | 1361 } |
| 1362 | 1362 |
| 1363 static void enabledAtRuntimeAttr2AttrSetter(v8::Local<v8::String> name, v8::Loca
l<v8::Value> value, const v8::AccessorInfo& info) | 1363 static void enabledAtRuntimeAttr2AttrSetter(v8::Local<v8::String> name, v8::Loca
l<v8::Value> value, const v8::AccessorInfo& info) |
| 1364 { | 1364 { |
| 1365 TestObj* imp = V8TestObj::toNative(info.Holder()); | 1365 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1366 V8TRYCATCH_VOID(int, v, toInt32(value)); | 1366 V8TRYCATCH_VOID(int, v, toInt32(value)); |
| 1367 imp->setEnabledAtRuntimeAttr2(v); | 1367 imp->setEnabledAtRuntimeAttr2(v); |
| 1368 return; | 1368 return; |
| 1369 } | 1369 } |
| 1370 | 1370 |
| 1371 static void enabledAtRuntimeAttr2AttrSetterCallback(v8::Local<v8::String> name,
v8::Local<v8::Value> value, const v8::AccessorInfo& info) | 1371 static void enabledAtRuntimeAttr2AttrSetterCallback(v8::Local<v8::String> name,
v8::Local<v8::Value> value, const v8::AccessorInfo& info) |
| 1372 { | 1372 { |
| 1373 TestObjV8Internal::enabledAtRuntimeAttr2AttrSetter(name, value, info); | 1373 TestObjV8Internal::enabledAtRuntimeAttr2AttrSetter(name, value, info); |
| 1374 } | 1374 } |
| 1375 | 1375 |
| 1376 static v8::Handle<v8::Value> enabledPerContextAttr1AttrGetter(v8::Local<v8::Stri
ng> name, const v8::AccessorInfo& info) | 1376 static v8::Handle<v8::Value> enabledPerContextAttr1AttrGetter(v8::Local<v8::Stri
ng> name, const v8::AccessorInfo& info) |
| 1377 { | 1377 { |
| 1378 TestObj* imp = V8TestObj::toNative(info.Holder()); | 1378 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1379 return v8Integer(imp->enabledPerContextAttr1(), info.GetIsolate()); | 1379 return v8Integer(imp->enabledPerContextAttr1(), info.GetIsolate()); |
| 1380 } | 1380 } |
| 1381 | 1381 |
| 1382 static v8::Handle<v8::Value> enabledPerContextAttr1AttrGetterCallback(v8::Local<
v8::String> name, const v8::AccessorInfo& info) | 1382 static v8::Handle<v8::Value> enabledPerContextAttr1AttrGetterCallback(v8::Local<
v8::String> name, const v8::AccessorInfo& info) |
| 1383 { | 1383 { |
| 1384 return TestObjV8Internal::enabledPerContextAttr1AttrGetter(name, info); | 1384 return TestObjV8Internal::enabledPerContextAttr1AttrGetter(name, info); |
| 1385 } | 1385 } |
| 1386 | 1386 |
| 1387 static void enabledPerContextAttr1AttrSetter(v8::Local<v8::String> name, v8::Loc
al<v8::Value> value, const v8::AccessorInfo& info) | 1387 static void enabledPerContextAttr1AttrSetter(v8::Local<v8::String> name, v8::Loc
al<v8::Value> value, const v8::AccessorInfo& info) |
| 1388 { | 1388 { |
| 1389 TestObj* imp = V8TestObj::toNative(info.Holder()); | 1389 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1390 V8TRYCATCH_VOID(int, v, toInt32(value)); | 1390 V8TRYCATCH_VOID(int, v, toInt32(value)); |
| 1391 imp->setEnabledPerContextAttr1(v); | 1391 imp->setEnabledPerContextAttr1(v); |
| 1392 return; | 1392 return; |
| 1393 } | 1393 } |
| 1394 | 1394 |
| 1395 static void enabledPerContextAttr1AttrSetterCallback(v8::Local<v8::String> name,
v8::Local<v8::Value> value, const v8::AccessorInfo& info) | 1395 static void enabledPerContextAttr1AttrSetterCallback(v8::Local<v8::String> name,
v8::Local<v8::Value> value, const v8::AccessorInfo& info) |
| 1396 { | 1396 { |
| 1397 TestObjV8Internal::enabledPerContextAttr1AttrSetter(name, value, info); | 1397 TestObjV8Internal::enabledPerContextAttr1AttrSetter(name, value, info); |
| 1398 } | 1398 } |
| 1399 | 1399 |
| 1400 static v8::Handle<v8::Value> enabledPerContextAttr2AttrGetter(v8::Local<v8::Stri
ng> name, const v8::AccessorInfo& info) | 1400 static v8::Handle<v8::Value> enabledPerContextAttr2AttrGetter(v8::Local<v8::Stri
ng> name, const v8::AccessorInfo& info) |
| 1401 { | 1401 { |
| 1402 TestObj* imp = V8TestObj::toNative(info.Holder()); | 1402 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1403 return v8Integer(imp->enabledPerContextAttr2(), info.GetIsolate()); | 1403 return v8Integer(imp->enabledPerContextAttr2(), info.GetIsolate()); |
| 1404 } | 1404 } |
| 1405 | 1405 |
| 1406 static v8::Handle<v8::Value> enabledPerContextAttr2AttrGetterCallback(v8::Local<
v8::String> name, const v8::AccessorInfo& info) | 1406 static v8::Handle<v8::Value> enabledPerContextAttr2AttrGetterCallback(v8::Local<
v8::String> name, const v8::AccessorInfo& info) |
| 1407 { | 1407 { |
| 1408 return TestObjV8Internal::enabledPerContextAttr2AttrGetter(name, info); | 1408 return TestObjV8Internal::enabledPerContextAttr2AttrGetter(name, info); |
| 1409 } | 1409 } |
| 1410 | 1410 |
| 1411 static void enabledPerContextAttr2AttrSetter(v8::Local<v8::String> name, v8::Loc
al<v8::Value> value, const v8::AccessorInfo& info) | 1411 static void enabledPerContextAttr2AttrSetter(v8::Local<v8::String> name, v8::Loc
al<v8::Value> value, const v8::AccessorInfo& info) |
| 1412 { | 1412 { |
| 1413 TestObj* imp = V8TestObj::toNative(info.Holder()); | 1413 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1414 V8TRYCATCH_VOID(int, v, toInt32(value)); | 1414 V8TRYCATCH_VOID(int, v, toInt32(value)); |
| 1415 imp->setEnabledPerContextAttr2(v); | 1415 imp->setEnabledPerContextAttr2(v); |
| 1416 return; | 1416 return; |
| 1417 } | 1417 } |
| 1418 | 1418 |
| 1419 static void enabledPerContextAttr2AttrSetterCallback(v8::Local<v8::String> name,
v8::Local<v8::Value> value, const v8::AccessorInfo& info) | 1419 static void enabledPerContextAttr2AttrSetterCallback(v8::Local<v8::String> name,
v8::Local<v8::Value> value, const v8::AccessorInfo& info) |
| 1420 { | 1420 { |
| 1421 TestObjV8Internal::enabledPerContextAttr2AttrSetter(name, value, info); | 1421 TestObjV8Internal::enabledPerContextAttr2AttrSetter(name, value, info); |
| 1422 } | 1422 } |
| 1423 | 1423 |
| 1424 static v8::Handle<v8::Value> floatArrayAttrGetter(v8::Local<v8::String> name, co
nst v8::AccessorInfo& info) | 1424 static v8::Handle<v8::Value> floatArrayAttrGetter(v8::Local<v8::String> name, co
nst v8::AccessorInfo& info) |
| 1425 { | 1425 { |
| 1426 TestObj* imp = V8TestObj::toNative(info.Holder()); | 1426 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1427 return v8Array(imp->floatArray(), info.GetIsolate()); | 1427 return v8Array(imp->floatArray(), info.GetIsolate()); |
| 1428 } | 1428 } |
| 1429 | 1429 |
| 1430 static v8::Handle<v8::Value> floatArrayAttrGetterCallback(v8::Local<v8::String>
name, const v8::AccessorInfo& info) | 1430 static v8::Handle<v8::Value> floatArrayAttrGetterCallback(v8::Local<v8::String>
name, const v8::AccessorInfo& info) |
| 1431 { | 1431 { |
| 1432 return TestObjV8Internal::floatArrayAttrGetter(name, info); | 1432 return TestObjV8Internal::floatArrayAttrGetter(name, info); |
| 1433 } | 1433 } |
| 1434 | 1434 |
| 1435 static void floatArrayAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value
> value, const v8::AccessorInfo& info) | 1435 static void floatArrayAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value
> value, const v8::AccessorInfo& info) |
| 1436 { | 1436 { |
| 1437 TestObj* imp = V8TestObj::toNative(info.Holder()); | 1437 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1438 V8TRYCATCH_VOID(Vector<float>, v, toNativeArray<float>(value)); | 1438 V8TRYCATCH_VOID(Vector<float>, v, toNativeArray<float>(value)); |
| 1439 imp->setFloatArray(v); | 1439 imp->setFloatArray(v); |
| 1440 return; | 1440 return; |
| 1441 } | 1441 } |
| 1442 | 1442 |
| 1443 static void floatArrayAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v
8::Value> value, const v8::AccessorInfo& info) | 1443 static void floatArrayAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v
8::Value> value, const v8::AccessorInfo& info) |
| 1444 { | 1444 { |
| 1445 TestObjV8Internal::floatArrayAttrSetter(name, value, info); | 1445 TestObjV8Internal::floatArrayAttrSetter(name, value, info); |
| 1446 } | 1446 } |
| 1447 | 1447 |
| 1448 static v8::Handle<v8::Value> doubleArrayAttrGetter(v8::Local<v8::String> name, c
onst v8::AccessorInfo& info) | 1448 static v8::Handle<v8::Value> doubleArrayAttrGetter(v8::Local<v8::String> name, c
onst v8::AccessorInfo& info) |
| 1449 { | 1449 { |
| 1450 TestObj* imp = V8TestObj::toNative(info.Holder()); | 1450 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1451 return v8Array(imp->doubleArray(), info.GetIsolate()); | 1451 return v8Array(imp->doubleArray(), info.GetIsolate()); |
| 1452 } | 1452 } |
| 1453 | 1453 |
| 1454 static v8::Handle<v8::Value> doubleArrayAttrGetterCallback(v8::Local<v8::String>
name, const v8::AccessorInfo& info) | 1454 static v8::Handle<v8::Value> doubleArrayAttrGetterCallback(v8::Local<v8::String>
name, const v8::AccessorInfo& info) |
| 1455 { | 1455 { |
| 1456 return TestObjV8Internal::doubleArrayAttrGetter(name, info); | 1456 return TestObjV8Internal::doubleArrayAttrGetter(name, info); |
| 1457 } | 1457 } |
| 1458 | 1458 |
| 1459 static void doubleArrayAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Valu
e> value, const v8::AccessorInfo& info) | 1459 static void doubleArrayAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Valu
e> value, const v8::AccessorInfo& info) |
| 1460 { | 1460 { |
| 1461 TestObj* imp = V8TestObj::toNative(info.Holder()); | 1461 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1462 V8TRYCATCH_VOID(Vector<double>, v, toNativeArray<double>(value)); | 1462 V8TRYCATCH_VOID(Vector<double>, v, toNativeArray<double>(value)); |
| 1463 imp->setDoubleArray(v); | 1463 imp->setDoubleArray(v); |
| 1464 return; | 1464 return; |
| 1465 } | 1465 } |
| 1466 | 1466 |
| 1467 static void doubleArrayAttrSetterCallback(v8::Local<v8::String> name, v8::Local<
v8::Value> value, const v8::AccessorInfo& info) | 1467 static void doubleArrayAttrSetterCallback(v8::Local<v8::String> name, v8::Local<
v8::Value> value, const v8::AccessorInfo& info) |
| 1468 { | 1468 { |
| 1469 TestObjV8Internal::doubleArrayAttrSetter(name, value, info); | 1469 TestObjV8Internal::doubleArrayAttrSetter(name, value, info); |
| 1470 } | 1470 } |
| 1471 | 1471 |
| 1472 static v8::Handle<v8::Value> contentDocumentAttrGetter(v8::Local<v8::String> nam
e, const v8::AccessorInfo& info) | 1472 static v8::Handle<v8::Value> contentDocumentAttrGetter(v8::Local<v8::String> nam
e, const v8::AccessorInfo& info) |
| 1473 { | 1473 { |
| 1474 TestObj* imp = V8TestObj::toNative(info.Holder()); | 1474 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1475 if (!BindingSecurity::shouldAllowAccessToNode(imp->contentDocument())) | 1475 if (!BindingSecurity::shouldAllowAccessToNode(imp->contentDocument())) |
| 1476 return v8::Handle<v8::Value>(v8Null(info.GetIsolate())); | 1476 return v8::Handle<v8::Value>(v8Null(info.GetIsolate())); |
| 1477 | 1477 |
| 1478 return toV8Fast(imp->contentDocument(), info, imp); | 1478 return toV8Fast(imp->contentDocument(), info, imp); |
| 1479 } | 1479 } |
| 1480 | 1480 |
| 1481 static v8::Handle<v8::Value> contentDocumentAttrGetterCallback(v8::Local<v8::Str
ing> name, const v8::AccessorInfo& info) | 1481 static v8::Handle<v8::Value> contentDocumentAttrGetterCallback(v8::Local<v8::Str
ing> name, const v8::AccessorInfo& info) |
| 1482 { | 1482 { |
| 1483 return TestObjV8Internal::contentDocumentAttrGetter(name, info); | 1483 return TestObjV8Internal::contentDocumentAttrGetter(name, info); |
| 1484 } | 1484 } |
| 1485 | 1485 |
| 1486 static v8::Handle<v8::Value> mutablePointAttrGetter(v8::Local<v8::String> name,
const v8::AccessorInfo& info) | 1486 static v8::Handle<v8::Value> mutablePointAttrGetter(v8::Local<v8::String> name,
const v8::AccessorInfo& info) |
| 1487 { | 1487 { |
| 1488 TestObj* imp = V8TestObj::toNative(info.Holder()); | 1488 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1489 return toV8Fast(WTF::getPtr(SVGStaticPropertyTearOff<TestObj, FloatPoint>::c
reate(imp, imp->mutablePoint(), &TestObj::updateMutablePoint)), info, imp); | 1489 return toV8Fast(WTF::getPtr(SVGStaticPropertyTearOff<TestObj, FloatPoint>::c
reate(imp, imp->mutablePoint(), &TestObj::updateMutablePoint)), info, imp); |
| 1490 } | 1490 } |
| 1491 | 1491 |
| 1492 static v8::Handle<v8::Value> mutablePointAttrGetterCallback(v8::Local<v8::String
> name, const v8::AccessorInfo& info) | 1492 static v8::Handle<v8::Value> mutablePointAttrGetterCallback(v8::Local<v8::String
> name, const v8::AccessorInfo& info) |
| 1493 { | 1493 { |
| 1494 return TestObjV8Internal::mutablePointAttrGetter(name, info); | 1494 return TestObjV8Internal::mutablePointAttrGetter(name, info); |
| 1495 } | 1495 } |
| 1496 | 1496 |
| 1497 static void mutablePointAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Val
ue> value, const v8::AccessorInfo& info) | 1497 static void mutablePointAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Val
ue> value, const v8::AccessorInfo& info) |
| 1498 { | 1498 { |
| 1499 TestObj* imp = V8TestObj::toNative(info.Holder()); | 1499 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1500 V8TRYCATCH_VOID(RefPtr<SVGPropertyTearOff<FloatPoint> >, v, V8SVGPoint::HasI
nstance(value, info.GetIsolate(), worldType(info.GetIsolate())) ? V8SVGPoint::to
Native(v8::Handle<v8::Object>::Cast(value)) : 0); | 1500 V8TRYCATCH_VOID(RefPtr<SVGPropertyTearOff<FloatPoint> >, v, V8SVGPoint::HasI
nstance(value, info.GetIsolate(), worldType(info.GetIsolate())) ? V8SVGPoint::to
Native(v8::Handle<v8::Object>::Cast(value)) : 0); |
| 1501 imp->setMutablePoint(WTF::getPtr(v)); | 1501 imp->setMutablePoint(WTF::getPtr(v)); |
| 1502 return; | 1502 return; |
| 1503 } | 1503 } |
| 1504 | 1504 |
| 1505 static void mutablePointAttrSetterCallback(v8::Local<v8::String> name, v8::Local
<v8::Value> value, const v8::AccessorInfo& info) | 1505 static void mutablePointAttrSetterCallback(v8::Local<v8::String> name, v8::Local
<v8::Value> value, const v8::AccessorInfo& info) |
| 1506 { | 1506 { |
| 1507 TestObjV8Internal::mutablePointAttrSetter(name, value, info); | 1507 TestObjV8Internal::mutablePointAttrSetter(name, value, info); |
| 1508 } | 1508 } |
| 1509 | 1509 |
| 1510 static v8::Handle<v8::Value> immutablePointAttrGetter(v8::Local<v8::String> name
, const v8::AccessorInfo& info) | 1510 static v8::Handle<v8::Value> immutablePointAttrGetter(v8::Local<v8::String> name
, const v8::AccessorInfo& info) |
| 1511 { | 1511 { |
| 1512 TestObj* imp = V8TestObj::toNative(info.Holder()); | 1512 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1513 return toV8Fast(WTF::getPtr(SVGPropertyTearOff<FloatPoint>::create(imp->immu
tablePoint())), info, imp); | 1513 return toV8Fast(WTF::getPtr(SVGPropertyTearOff<FloatPoint>::create(imp->immu
tablePoint())), info, imp); |
| 1514 } | 1514 } |
| 1515 | 1515 |
| 1516 static v8::Handle<v8::Value> immutablePointAttrGetterCallback(v8::Local<v8::Stri
ng> name, const v8::AccessorInfo& info) | 1516 static v8::Handle<v8::Value> immutablePointAttrGetterCallback(v8::Local<v8::Stri
ng> name, const v8::AccessorInfo& info) |
| 1517 { | 1517 { |
| 1518 return TestObjV8Internal::immutablePointAttrGetter(name, info); | 1518 return TestObjV8Internal::immutablePointAttrGetter(name, info); |
| 1519 } | 1519 } |
| 1520 | 1520 |
| 1521 static void immutablePointAttrSetter(v8::Local<v8::String> name, v8::Local<v8::V
alue> value, const v8::AccessorInfo& info) | 1521 static void immutablePointAttrSetter(v8::Local<v8::String> name, v8::Local<v8::V
alue> value, const v8::AccessorInfo& info) |
| 1522 { | 1522 { |
| 1523 TestObj* imp = V8TestObj::toNative(info.Holder()); | 1523 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1524 V8TRYCATCH_VOID(RefPtr<SVGPropertyTearOff<FloatPoint> >, v, V8SVGPoint::HasI
nstance(value, info.GetIsolate(), worldType(info.GetIsolate())) ? V8SVGPoint::to
Native(v8::Handle<v8::Object>::Cast(value)) : 0); | 1524 V8TRYCATCH_VOID(RefPtr<SVGPropertyTearOff<FloatPoint> >, v, V8SVGPoint::HasI
nstance(value, info.GetIsolate(), worldType(info.GetIsolate())) ? V8SVGPoint::to
Native(v8::Handle<v8::Object>::Cast(value)) : 0); |
| 1525 imp->setImmutablePoint(WTF::getPtr(v)); | 1525 imp->setImmutablePoint(WTF::getPtr(v)); |
| 1526 return; | 1526 return; |
| 1527 } | 1527 } |
| 1528 | 1528 |
| 1529 static void immutablePointAttrSetterCallback(v8::Local<v8::String> name, v8::Loc
al<v8::Value> value, const v8::AccessorInfo& info) | 1529 static void immutablePointAttrSetterCallback(v8::Local<v8::String> name, v8::Loc
al<v8::Value> value, const v8::AccessorInfo& info) |
| 1530 { | 1530 { |
| 1531 TestObjV8Internal::immutablePointAttrSetter(name, value, info); | 1531 TestObjV8Internal::immutablePointAttrSetter(name, value, info); |
| 1532 } | 1532 } |
| 1533 | 1533 |
| 1534 static v8::Handle<v8::Value> strawberryAttrGetter(v8::Local<v8::String> name, co
nst v8::AccessorInfo& info) | 1534 static v8::Handle<v8::Value> strawberryAttrGetter(v8::Local<v8::String> name, co
nst v8::AccessorInfo& info) |
| 1535 { | 1535 { |
| 1536 TestObj* imp = V8TestObj::toNative(info.Holder()); | 1536 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1537 return v8Integer(imp->blueberry(), info.GetIsolate()); | 1537 return v8Integer(imp->blueberry(), info.GetIsolate()); |
| 1538 } | 1538 } |
| 1539 | 1539 |
| 1540 static v8::Handle<v8::Value> strawberryAttrGetterCallback(v8::Local<v8::String>
name, const v8::AccessorInfo& info) | 1540 static v8::Handle<v8::Value> strawberryAttrGetterCallback(v8::Local<v8::String>
name, const v8::AccessorInfo& info) |
| 1541 { | 1541 { |
| 1542 return TestObjV8Internal::strawberryAttrGetter(name, info); | 1542 return TestObjV8Internal::strawberryAttrGetter(name, info); |
| 1543 } | 1543 } |
| 1544 | 1544 |
| 1545 static void strawberryAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value
> value, const v8::AccessorInfo& info) | 1545 static void strawberryAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value
> value, const v8::AccessorInfo& info) |
| 1546 { | 1546 { |
| 1547 TestObj* imp = V8TestObj::toNative(info.Holder()); | 1547 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1548 V8TRYCATCH_VOID(int, v, toInt32(value)); | 1548 V8TRYCATCH_VOID(int, v, toInt32(value)); |
| 1549 imp->setBlueberry(v); | 1549 imp->setBlueberry(v); |
| 1550 return; | 1550 return; |
| 1551 } | 1551 } |
| 1552 | 1552 |
| 1553 static void strawberryAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v
8::Value> value, const v8::AccessorInfo& info) | 1553 static void strawberryAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v
8::Value> value, const v8::AccessorInfo& info) |
| 1554 { | 1554 { |
| 1555 TestObjV8Internal::strawberryAttrSetter(name, value, info); | 1555 TestObjV8Internal::strawberryAttrSetter(name, value, info); |
| 1556 } | 1556 } |
| 1557 | 1557 |
| 1558 static v8::Handle<v8::Value> strictFloatAttrGetter(v8::Local<v8::String> name, c
onst v8::AccessorInfo& info) | 1558 static v8::Handle<v8::Value> strictFloatAttrGetter(v8::Local<v8::String> name, c
onst v8::AccessorInfo& info) |
| 1559 { | 1559 { |
| 1560 TestObj* imp = V8TestObj::toNative(info.Holder()); | 1560 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1561 return v8::Number::New(imp->strictFloat()); | 1561 return v8::Number::New(imp->strictFloat()); |
| 1562 } | 1562 } |
| 1563 | 1563 |
| 1564 static v8::Handle<v8::Value> strictFloatAttrGetterCallback(v8::Local<v8::String>
name, const v8::AccessorInfo& info) | 1564 static v8::Handle<v8::Value> strictFloatAttrGetterCallback(v8::Local<v8::String>
name, const v8::AccessorInfo& info) |
| 1565 { | 1565 { |
| 1566 return TestObjV8Internal::strictFloatAttrGetter(name, info); | 1566 return TestObjV8Internal::strictFloatAttrGetter(name, info); |
| 1567 } | 1567 } |
| 1568 | 1568 |
| 1569 static void strictFloatAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Valu
e> value, const v8::AccessorInfo& info) | 1569 static void strictFloatAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Valu
e> value, const v8::AccessorInfo& info) |
| 1570 { | 1570 { |
| 1571 TestObj* imp = V8TestObj::toNative(info.Holder()); | 1571 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1572 V8TRYCATCH_VOID(float, v, static_cast<float>(value->NumberValue())); | 1572 V8TRYCATCH_VOID(float, v, static_cast<float>(value->NumberValue())); |
| 1573 imp->setStrictFloat(v); | 1573 imp->setStrictFloat(v); |
| 1574 return; | 1574 return; |
| 1575 } | 1575 } |
| 1576 | 1576 |
| 1577 static void strictFloatAttrSetterCallback(v8::Local<v8::String> name, v8::Local<
v8::Value> value, const v8::AccessorInfo& info) | 1577 static void strictFloatAttrSetterCallback(v8::Local<v8::String> name, v8::Local<
v8::Value> value, const v8::AccessorInfo& info) |
| 1578 { | 1578 { |
| 1579 TestObjV8Internal::strictFloatAttrSetter(name, value, info); | 1579 TestObjV8Internal::strictFloatAttrSetter(name, value, info); |
| 1580 } | 1580 } |
| 1581 | 1581 |
| 1582 static v8::Handle<v8::Value> descriptionAttrGetter(v8::Local<v8::String> name, c
onst v8::AccessorInfo& info) | 1582 static v8::Handle<v8::Value> descriptionAttrGetter(v8::Local<v8::String> name, c
onst v8::AccessorInfo& info) |
| 1583 { | 1583 { |
| 1584 TestObj* imp = V8TestObj::toNative(info.Holder()); | 1584 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1585 return v8Integer(imp->description(), info.GetIsolate()); | 1585 return v8Integer(imp->description(), info.GetIsolate()); |
| 1586 } | 1586 } |
| 1587 | 1587 |
| 1588 static v8::Handle<v8::Value> descriptionAttrGetterCallback(v8::Local<v8::String>
name, const v8::AccessorInfo& info) | 1588 static v8::Handle<v8::Value> descriptionAttrGetterCallback(v8::Local<v8::String>
name, const v8::AccessorInfo& info) |
| 1589 { | 1589 { |
| 1590 return TestObjV8Internal::descriptionAttrGetter(name, info); | 1590 return TestObjV8Internal::descriptionAttrGetter(name, info); |
| 1591 } | 1591 } |
| 1592 | 1592 |
| 1593 static v8::Handle<v8::Value> idAttrGetter(v8::Local<v8::String> name, const v8::
AccessorInfo& info) | 1593 static v8::Handle<v8::Value> idAttrGetter(v8::Local<v8::String> name, const v8::
AccessorInfo& info) |
| 1594 { | 1594 { |
| 1595 TestObj* imp = V8TestObj::toNative(info.Holder()); | 1595 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1596 return v8Integer(imp->id(), info.GetIsolate()); | 1596 return v8Integer(imp->id(), info.GetIsolate()); |
| 1597 } | 1597 } |
| 1598 | 1598 |
| 1599 static v8::Handle<v8::Value> idAttrGetterCallback(v8::Local<v8::String> name, co
nst v8::AccessorInfo& info) | 1599 static v8::Handle<v8::Value> idAttrGetterCallback(v8::Local<v8::String> name, co
nst v8::AccessorInfo& info) |
| 1600 { | 1600 { |
| 1601 return TestObjV8Internal::idAttrGetter(name, info); | 1601 return TestObjV8Internal::idAttrGetter(name, info); |
| 1602 } | 1602 } |
| 1603 | 1603 |
| 1604 static void idAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value,
const v8::AccessorInfo& info) | 1604 static void idAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value,
const v8::AccessorInfo& info) |
| 1605 { | 1605 { |
| 1606 TestObj* imp = V8TestObj::toNative(info.Holder()); | 1606 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1607 V8TRYCATCH_VOID(int, v, toInt32(value)); | 1607 V8TRYCATCH_VOID(int, v, toInt32(value)); |
| 1608 imp->setId(v); | 1608 imp->setId(v); |
| 1609 return; | 1609 return; |
| 1610 } | 1610 } |
| 1611 | 1611 |
| 1612 static void idAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value
> value, const v8::AccessorInfo& info) | 1612 static void idAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value
> value, const v8::AccessorInfo& info) |
| 1613 { | 1613 { |
| 1614 TestObjV8Internal::idAttrSetter(name, value, info); | 1614 TestObjV8Internal::idAttrSetter(name, value, info); |
| 1615 } | 1615 } |
| 1616 | 1616 |
| 1617 static v8::Handle<v8::Value> hashAttrGetter(v8::Local<v8::String> name, const v8
::AccessorInfo& info) | 1617 static v8::Handle<v8::Value> hashAttrGetter(v8::Local<v8::String> name, const v8
::AccessorInfo& info) |
| 1618 { | 1618 { |
| 1619 TestObj* imp = V8TestObj::toNative(info.Holder()); | 1619 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1620 return v8String(imp->hash(), info.GetIsolate(), ReturnUnsafeHandle); | 1620 return v8String(imp->hash(), info.GetIsolate(), ReturnUnsafeHandle); |
| 1621 } | 1621 } |
| 1622 | 1622 |
| 1623 static v8::Handle<v8::Value> hashAttrGetterCallback(v8::Local<v8::String> name,
const v8::AccessorInfo& info) | 1623 static v8::Handle<v8::Value> hashAttrGetterCallback(v8::Local<v8::String> name,
const v8::AccessorInfo& info) |
| 1624 { | 1624 { |
| 1625 return TestObjV8Internal::hashAttrGetter(name, info); | 1625 return TestObjV8Internal::hashAttrGetter(name, info); |
| 1626 } | 1626 } |
| 1627 | 1627 |
| 1628 static v8::Handle<v8::Value> replaceableAttributeAttrGetter(v8::Local<v8::String
> name, const v8::AccessorInfo& info) | 1628 static v8::Handle<v8::Value> replaceableAttributeAttrGetter(v8::Local<v8::String
> name, const v8::AccessorInfo& info) |
| 1629 { | 1629 { |
| 1630 TestObj* imp = V8TestObj::toNative(info.Holder()); | 1630 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1631 return v8Integer(imp->replaceableAttribute(), info.GetIsolate()); | 1631 return v8Integer(imp->replaceableAttribute(), info.GetIsolate()); |
| 1632 } | 1632 } |
| 1633 | 1633 |
| 1634 static v8::Handle<v8::Value> replaceableAttributeAttrGetterCallback(v8::Local<v8
::String> name, const v8::AccessorInfo& info) | 1634 static v8::Handle<v8::Value> replaceableAttributeAttrGetterCallback(v8::Local<v8
::String> name, const v8::AccessorInfo& info) |
| 1635 { | 1635 { |
| 1636 return TestObjV8Internal::replaceableAttributeAttrGetter(name, info); | 1636 return TestObjV8Internal::replaceableAttributeAttrGetter(name, info); |
| 1637 } | 1637 } |
| 1638 | 1638 |
| 1639 static v8::Handle<v8::Value> nullableDoubleAttributeAttrGetter(v8::Local<v8::Str
ing> name, const v8::AccessorInfo& info) | 1639 static v8::Handle<v8::Value> nullableDoubleAttributeAttrGetter(v8::Local<v8::Str
ing> name, const v8::AccessorInfo& info) |
| 1640 { | 1640 { |
| 1641 TestObj* imp = V8TestObj::toNative(info.Holder()); | 1641 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1642 bool isNull = false; | 1642 bool isNull = false; |
| 1643 double v = imp->nullableDoubleAttribute(isNull); | 1643 double v = imp->nullableDoubleAttribute(isNull); |
| 1644 if (isNull) | 1644 if (isNull) |
| 1645 return v8Null(info.GetIsolate()); | 1645 return v8Null(info.GetIsolate()); |
| 1646 return v8::Number::New(v); | 1646 return v8::Number::New(v); |
| 1647 } | 1647 } |
| 1648 | 1648 |
| 1649 static v8::Handle<v8::Value> nullableDoubleAttributeAttrGetterCallback(v8::Local
<v8::String> name, const v8::AccessorInfo& info) | 1649 static v8::Handle<v8::Value> nullableDoubleAttributeAttrGetterCallback(v8::Local
<v8::String> name, const v8::AccessorInfo& info) |
| 1650 { | 1650 { |
| 1651 return TestObjV8Internal::nullableDoubleAttributeAttrGetter(name, info); | 1651 return TestObjV8Internal::nullableDoubleAttributeAttrGetter(name, info); |
| 1652 } | 1652 } |
| 1653 | 1653 |
| 1654 static v8::Handle<v8::Value> nullableLongAttributeAttrGetter(v8::Local<v8::Strin
g> name, const v8::AccessorInfo& info) | 1654 static v8::Handle<v8::Value> nullableLongAttributeAttrGetter(v8::Local<v8::Strin
g> name, const v8::AccessorInfo& info) |
| 1655 { | 1655 { |
| 1656 TestObj* imp = V8TestObj::toNative(info.Holder()); | 1656 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1657 bool isNull = false; | 1657 bool isNull = false; |
| 1658 int v = imp->nullableLongAttribute(isNull); | 1658 int v = imp->nullableLongAttribute(isNull); |
| 1659 if (isNull) | 1659 if (isNull) |
| 1660 return v8Null(info.GetIsolate()); | 1660 return v8Null(info.GetIsolate()); |
| 1661 return v8Integer(v, info.GetIsolate()); | 1661 return v8Integer(v, info.GetIsolate()); |
| 1662 } | 1662 } |
| 1663 | 1663 |
| 1664 static v8::Handle<v8::Value> nullableLongAttributeAttrGetterCallback(v8::Local<v
8::String> name, const v8::AccessorInfo& info) | 1664 static v8::Handle<v8::Value> nullableLongAttributeAttrGetterCallback(v8::Local<v
8::String> name, const v8::AccessorInfo& info) |
| 1665 { | 1665 { |
| 1666 return TestObjV8Internal::nullableLongAttributeAttrGetter(name, info); | 1666 return TestObjV8Internal::nullableLongAttributeAttrGetter(name, info); |
| 1667 } | 1667 } |
| 1668 | 1668 |
| 1669 static v8::Handle<v8::Value> nullableBooleanAttributeAttrGetter(v8::Local<v8::St
ring> name, const v8::AccessorInfo& info) | 1669 static v8::Handle<v8::Value> nullableBooleanAttributeAttrGetter(v8::Local<v8::St
ring> name, const v8::AccessorInfo& info) |
| 1670 { | 1670 { |
| 1671 TestObj* imp = V8TestObj::toNative(info.Holder()); | 1671 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1672 bool isNull = false; | 1672 bool isNull = false; |
| 1673 bool v = imp->nullableBooleanAttribute(isNull); | 1673 bool v = imp->nullableBooleanAttribute(isNull); |
| 1674 if (isNull) | 1674 if (isNull) |
| 1675 return v8Null(info.GetIsolate()); | 1675 return v8Null(info.GetIsolate()); |
| 1676 return v8Boolean(v, info.GetIsolate()); | 1676 return v8Boolean(v, info.GetIsolate()); |
| 1677 } | 1677 } |
| 1678 | 1678 |
| 1679 static v8::Handle<v8::Value> nullableBooleanAttributeAttrGetterCallback(v8::Loca
l<v8::String> name, const v8::AccessorInfo& info) | 1679 static v8::Handle<v8::Value> nullableBooleanAttributeAttrGetterCallback(v8::Loca
l<v8::String> name, const v8::AccessorInfo& info) |
| 1680 { | 1680 { |
| 1681 return TestObjV8Internal::nullableBooleanAttributeAttrGetter(name, info); | 1681 return TestObjV8Internal::nullableBooleanAttributeAttrGetter(name, info); |
| 1682 } | 1682 } |
| 1683 | 1683 |
| 1684 static v8::Handle<v8::Value> nullableStringAttributeAttrGetter(v8::Local<v8::Str
ing> name, const v8::AccessorInfo& info) | 1684 static v8::Handle<v8::Value> nullableStringAttributeAttrGetter(v8::Local<v8::Str
ing> name, const v8::AccessorInfo& info) |
| 1685 { | 1685 { |
| 1686 TestObj* imp = V8TestObj::toNative(info.Holder()); | 1686 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1687 bool isNull = false; | 1687 bool isNull = false; |
| 1688 String v = imp->nullableStringAttribute(isNull); | 1688 String v = imp->nullableStringAttribute(isNull); |
| 1689 if (isNull) | 1689 if (isNull) |
| 1690 return v8Null(info.GetIsolate()); | 1690 return v8Null(info.GetIsolate()); |
| 1691 return v8String(v, info.GetIsolate(), ReturnUnsafeHandle); | 1691 return v8String(v, info.GetIsolate(), ReturnUnsafeHandle); |
| 1692 } | 1692 } |
| 1693 | 1693 |
| 1694 static v8::Handle<v8::Value> nullableStringAttributeAttrGetterCallback(v8::Local
<v8::String> name, const v8::AccessorInfo& info) | 1694 static v8::Handle<v8::Value> nullableStringAttributeAttrGetterCallback(v8::Local
<v8::String> name, const v8::AccessorInfo& info) |
| 1695 { | 1695 { |
| 1696 return TestObjV8Internal::nullableStringAttributeAttrGetter(name, info); | 1696 return TestObjV8Internal::nullableStringAttributeAttrGetter(name, info); |
| 1697 } | 1697 } |
| 1698 | 1698 |
| 1699 static v8::Handle<v8::Value> nullableLongSettableAttributeAttrGetter(v8::Local<v
8::String> name, const v8::AccessorInfo& info) | 1699 static v8::Handle<v8::Value> nullableLongSettableAttributeAttrGetter(v8::Local<v
8::String> name, const v8::AccessorInfo& info) |
| 1700 { | 1700 { |
| 1701 TestObj* imp = V8TestObj::toNative(info.Holder()); | 1701 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1702 bool isNull = false; | 1702 bool isNull = false; |
| 1703 int v = imp->nullableLongSettableAttribute(isNull); | 1703 int v = imp->nullableLongSettableAttribute(isNull); |
| 1704 if (isNull) | 1704 if (isNull) |
| 1705 return v8Null(info.GetIsolate()); | 1705 return v8Null(info.GetIsolate()); |
| 1706 return v8Integer(v, info.GetIsolate()); | 1706 return v8Integer(v, info.GetIsolate()); |
| 1707 } | 1707 } |
| 1708 | 1708 |
| 1709 static v8::Handle<v8::Value> nullableLongSettableAttributeAttrGetterCallback(v8:
:Local<v8::String> name, const v8::AccessorInfo& info) | 1709 static v8::Handle<v8::Value> nullableLongSettableAttributeAttrGetterCallback(v8:
:Local<v8::String> name, const v8::AccessorInfo& info) |
| 1710 { | 1710 { |
| 1711 return TestObjV8Internal::nullableLongSettableAttributeAttrGetter(name, info
); | 1711 return TestObjV8Internal::nullableLongSettableAttributeAttrGetter(name, info
); |
| 1712 } | 1712 } |
| 1713 | 1713 |
| 1714 static void nullableLongSettableAttributeAttrSetter(v8::Local<v8::String> name,
v8::Local<v8::Value> value, const v8::AccessorInfo& info) | 1714 static void nullableLongSettableAttributeAttrSetter(v8::Local<v8::String> name,
v8::Local<v8::Value> value, const v8::AccessorInfo& info) |
| 1715 { | 1715 { |
| 1716 TestObj* imp = V8TestObj::toNative(info.Holder()); | 1716 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1717 V8TRYCATCH_VOID(int, v, toInt32(value)); | 1717 V8TRYCATCH_VOID(int, v, toInt32(value)); |
| 1718 imp->setNullableLongSettableAttribute(v); | 1718 imp->setNullableLongSettableAttribute(v); |
| 1719 return; | 1719 return; |
| 1720 } | 1720 } |
| 1721 | 1721 |
| 1722 static void nullableLongSettableAttributeAttrSetterCallback(v8::Local<v8::String
> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) | 1722 static void nullableLongSettableAttributeAttrSetterCallback(v8::Local<v8::String
> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) |
| 1723 { | 1723 { |
| 1724 TestObjV8Internal::nullableLongSettableAttributeAttrSetter(name, value, info
); | 1724 TestObjV8Internal::nullableLongSettableAttributeAttrSetter(name, value, info
); |
| 1725 } | 1725 } |
| 1726 | 1726 |
| 1727 static v8::Handle<v8::Value> nullableStringValueAttrGetter(v8::Local<v8::String>
name, const v8::AccessorInfo& info) | 1727 static v8::Handle<v8::Value> nullableStringValueAttrGetter(v8::Local<v8::String>
name, const v8::AccessorInfo& info) |
| 1728 { | 1728 { |
| 1729 TestObj* imp = V8TestObj::toNative(info.Holder()); | 1729 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1730 ExceptionCode ec = 0; | 1730 ExceptionCode ec = 0; |
| 1731 bool isNull = false; | 1731 bool isNull = false; |
| 1732 int v = imp->nullableStringValue(isNull, ec); | 1732 int v = imp->nullableStringValue(isNull, ec); |
| 1733 if (isNull) | 1733 if (isNull) |
| 1734 return v8Null(info.GetIsolate()); | 1734 return v8Null(info.GetIsolate()); |
| 1735 if (UNLIKELY(ec)) | 1735 if (UNLIKELY(ec)) |
| 1736 return setDOMException(ec, info.GetIsolate()); | 1736 return setDOMException(ec, info.GetIsolate()); |
| 1737 return v8Integer(v, info.GetIsolate()); | 1737 return v8Integer(v, info.GetIsolate()); |
| 1738 } | 1738 } |
| 1739 | 1739 |
| 1740 static v8::Handle<v8::Value> nullableStringValueAttrGetterCallback(v8::Local<v8:
:String> name, const v8::AccessorInfo& info) | 1740 static v8::Handle<v8::Value> nullableStringValueAttrGetterCallback(v8::Local<v8:
:String> name, const v8::AccessorInfo& info) |
| 1741 { | 1741 { |
| 1742 return TestObjV8Internal::nullableStringValueAttrGetter(name, info); | 1742 return TestObjV8Internal::nullableStringValueAttrGetter(name, info); |
| 1743 } | 1743 } |
| 1744 | 1744 |
| 1745 static void nullableStringValueAttrSetter(v8::Local<v8::String> name, v8::Local<
v8::Value> value, const v8::AccessorInfo& info) | 1745 static void nullableStringValueAttrSetter(v8::Local<v8::String> name, v8::Local<
v8::Value> value, const v8::AccessorInfo& info) |
| 1746 { | 1746 { |
| 1747 TestObj* imp = V8TestObj::toNative(info.Holder()); | 1747 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1748 V8TRYCATCH_VOID(int, v, toInt32(value)); | 1748 V8TRYCATCH_VOID(int, v, toInt32(value)); |
| 1749 imp->setNullableStringValue(v); | 1749 imp->setNullableStringValue(v); |
| 1750 return; | 1750 return; |
| 1751 } | 1751 } |
| 1752 | 1752 |
| 1753 static void nullableStringValueAttrSetterCallback(v8::Local<v8::String> name, v8
::Local<v8::Value> value, const v8::AccessorInfo& info) | 1753 static void nullableStringValueAttrSetterCallback(v8::Local<v8::String> name, v8
::Local<v8::Value> value, const v8::AccessorInfo& info) |
| 1754 { | 1754 { |
| 1755 TestObjV8Internal::nullableStringValueAttrSetter(name, value, info); | 1755 TestObjV8Internal::nullableStringValueAttrSetter(name, value, info); |
| 1756 } | 1756 } |
| 1757 | 1757 |
| 1758 static v8::Handle<v8::Value> perWorldReadOnlyAttributeAttrGetter(v8::Local<v8::S
tring> name, const v8::AccessorInfo& info) | 1758 static v8::Handle<v8::Value> perWorldReadOnlyAttributeAttrGetter(v8::Local<v8::S
tring> name, const v8::AccessorInfo& info) |
| 1759 { | 1759 { |
| 1760 TestObj* imp = V8TestObj::toNative(info.Holder()); | 1760 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1761 RefPtr<TestObj> result = imp->perWorldReadOnlyAttribute(); | 1761 RefPtr<TestObj> result = imp->perWorldReadOnlyAttribute(); |
| 1762 v8::Handle<v8::Value> wrapper = result.get() ? v8::Handle<v8::Value>(DOMData
Store::getWrapper(result.get(), info.GetIsolate())) : v8Undefined(); | 1762 v8::Handle<v8::Value> wrapper = result.get() ? v8::Handle<v8::Value>(DOMData
Store::getWrapper(result.get(), info.GetIsolate())) : v8Undefined(); |
| 1763 if (wrapper.IsEmpty()) { | 1763 if (wrapper.IsEmpty()) { |
| 1764 wrapper = toV8(result.get(), info.Holder(), info.GetIsolate()); | 1764 wrapper = toV8(result.get(), info.Holder(), info.GetIsolate()); |
| 1765 if (!wrapper.IsEmpty()) | 1765 if (!wrapper.IsEmpty()) |
| 1766 V8HiddenPropertyName::setNamedHiddenReference(info.Holder(), "perWor
ldReadOnlyAttribute", wrapper); | 1766 V8HiddenPropertyName::setNamedHiddenReference(info.Holder(), "perWor
ldReadOnlyAttribute", wrapper); |
| 1767 } | 1767 } |
| 1768 return wrapper; | 1768 return wrapper; |
| 1769 } | 1769 } |
| 1770 | 1770 |
| 1771 static v8::Handle<v8::Value> perWorldReadOnlyAttributeAttrGetterCallback(v8::Loc
al<v8::String> name, const v8::AccessorInfo& info) | 1771 static v8::Handle<v8::Value> perWorldReadOnlyAttributeAttrGetterCallback(v8::Loc
al<v8::String> name, const v8::AccessorInfo& info) |
| 1772 { | 1772 { |
| 1773 return TestObjV8Internal::perWorldReadOnlyAttributeAttrGetter(name, info); | 1773 return TestObjV8Internal::perWorldReadOnlyAttributeAttrGetter(name, info); |
| 1774 } | 1774 } |
| 1775 | 1775 |
| 1776 static v8::Handle<v8::Value> perWorldReadOnlyAttributeAttrGetterForMainWorld(v8:
:Local<v8::String> name, const v8::AccessorInfo& info) | 1776 static v8::Handle<v8::Value> perWorldReadOnlyAttributeAttrGetterForMainWorld(v8:
:Local<v8::String> name, const v8::AccessorInfo& info) |
| 1777 { | 1777 { |
| 1778 TestObj* imp = V8TestObj::toNative(info.Holder()); | 1778 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1779 RefPtr<TestObj> result = imp->perWorldReadOnlyAttribute(); | 1779 RefPtr<TestObj> result = imp->perWorldReadOnlyAttribute(); |
| 1780 v8::Handle<v8::Value> wrapper = result.get() ? v8::Handle<v8::Value>(DOMData
Store::getWrapperForMainWorld(result.get())) : v8Undefined(); | 1780 v8::Handle<v8::Value> wrapper = result.get() ? v8::Handle<v8::Value>(DOMData
Store::getWrapperForMainWorld(result.get())) : v8Undefined(); |
| 1781 if (wrapper.IsEmpty()) { | 1781 if (wrapper.IsEmpty()) { |
| 1782 wrapper = toV8(result.get(), info.Holder(), info.GetIsolate()); | 1782 wrapper = toV8(result.get(), info.Holder(), info.GetIsolate()); |
| 1783 if (!wrapper.IsEmpty()) | 1783 if (!wrapper.IsEmpty()) |
| 1784 V8HiddenPropertyName::setNamedHiddenReference(info.Holder(), "perWor
ldReadOnlyAttribute", wrapper); | 1784 V8HiddenPropertyName::setNamedHiddenReference(info.Holder(), "perWor
ldReadOnlyAttribute", wrapper); |
| 1785 } | 1785 } |
| 1786 return wrapper; | 1786 return wrapper; |
| 1787 } | 1787 } |
| 1788 | 1788 |
| 1789 static v8::Handle<v8::Value> perWorldReadOnlyAttributeAttrGetterCallbackForMainW
orld(v8::Local<v8::String> name, const v8::AccessorInfo& info) | 1789 static v8::Handle<v8::Value> perWorldReadOnlyAttributeAttrGetterCallbackForMainW
orld(v8::Local<v8::String> name, const v8::AccessorInfo& info) |
| 1790 { | 1790 { |
| 1791 return TestObjV8Internal::perWorldReadOnlyAttributeAttrGetterForMainWorld(na
me, info); | 1791 return TestObjV8Internal::perWorldReadOnlyAttributeAttrGetterForMainWorld(na
me, info); |
| 1792 } | 1792 } |
| 1793 | 1793 |
| 1794 static v8::Handle<v8::Value> perWorldAttributeAttrGetter(v8::Local<v8::String> n
ame, const v8::AccessorInfo& info) | 1794 static v8::Handle<v8::Value> perWorldAttributeAttrGetter(v8::Local<v8::String> n
ame, const v8::AccessorInfo& info) |
| 1795 { | 1795 { |
| 1796 TestObj* imp = V8TestObj::toNative(info.Holder()); | 1796 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1797 return toV8Fast(imp->perWorldAttribute(), info, imp); | 1797 return toV8Fast(imp->perWorldAttribute(), info, imp); |
| 1798 } | 1798 } |
| 1799 | 1799 |
| 1800 static v8::Handle<v8::Value> perWorldAttributeAttrGetterCallback(v8::Local<v8::S
tring> name, const v8::AccessorInfo& info) | 1800 static v8::Handle<v8::Value> perWorldAttributeAttrGetterCallback(v8::Local<v8::S
tring> name, const v8::AccessorInfo& info) |
| 1801 { | 1801 { |
| 1802 return TestObjV8Internal::perWorldAttributeAttrGetter(name, info); | 1802 return TestObjV8Internal::perWorldAttributeAttrGetter(name, info); |
| 1803 } | 1803 } |
| 1804 | 1804 |
| 1805 static v8::Handle<v8::Value> perWorldAttributeAttrGetterForMainWorld(v8::Local<v
8::String> name, const v8::AccessorInfo& info) | 1805 static v8::Handle<v8::Value> perWorldAttributeAttrGetterForMainWorld(v8::Local<v
8::String> name, const v8::AccessorInfo& info) |
| 1806 { | 1806 { |
| 1807 TestObj* imp = V8TestObj::toNative(info.Holder()); | 1807 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1808 return toV8FastForMainWorld(imp->perWorldAttribute(), info, imp); | 1808 return toV8FastForMainWorld(imp->perWorldAttribute(), info, imp); |
| 1809 } | 1809 } |
| 1810 | 1810 |
| 1811 static v8::Handle<v8::Value> perWorldAttributeAttrGetterCallbackForMainWorld(v8:
:Local<v8::String> name, const v8::AccessorInfo& info) | 1811 static v8::Handle<v8::Value> perWorldAttributeAttrGetterCallbackForMainWorld(v8:
:Local<v8::String> name, const v8::AccessorInfo& info) |
| 1812 { | 1812 { |
| 1813 return TestObjV8Internal::perWorldAttributeAttrGetterForMainWorld(name, info
); | 1813 return TestObjV8Internal::perWorldAttributeAttrGetterForMainWorld(name, info
); |
| 1814 } | 1814 } |
| 1815 | 1815 |
| 1816 static void perWorldAttributeAttrSetter(v8::Local<v8::String> name, v8::Local<v8
::Value> value, const v8::AccessorInfo& info) | 1816 static void perWorldAttributeAttrSetter(v8::Local<v8::String> name, v8::Local<v8
::Value> value, const v8::AccessorInfo& info) |
| 1817 { | 1817 { |
| 1818 TestObj* imp = V8TestObj::toNative(info.Holder()); | 1818 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1819 V8TRYCATCH_VOID(TestObj*, v, V8TestObj::HasInstance(value, info.GetIsolate()
, worldType(info.GetIsolate())) ? V8TestObj::toNative(v8::Handle<v8::Object>::Ca
st(value)) : 0); | 1819 V8TRYCATCH_VOID(TestObj*, v, V8TestObject::HasInstance(value, info.GetIsolat
e(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Objec
t>::Cast(value)) : 0); |
| 1820 imp->setPerWorldAttribute(WTF::getPtr(v)); | 1820 imp->setPerWorldAttribute(WTF::getPtr(v)); |
| 1821 return; | 1821 return; |
| 1822 } | 1822 } |
| 1823 | 1823 |
| 1824 static void perWorldAttributeAttrSetterCallback(v8::Local<v8::String> name, v8::
Local<v8::Value> value, const v8::AccessorInfo& info) | 1824 static void perWorldAttributeAttrSetterCallback(v8::Local<v8::String> name, v8::
Local<v8::Value> value, const v8::AccessorInfo& info) |
| 1825 { | 1825 { |
| 1826 TestObjV8Internal::perWorldAttributeAttrSetter(name, value, info); | 1826 TestObjV8Internal::perWorldAttributeAttrSetter(name, value, info); |
| 1827 } | 1827 } |
| 1828 | 1828 |
| 1829 static void perWorldAttributeAttrSetterForMainWorld(v8::Local<v8::String> name,
v8::Local<v8::Value> value, const v8::AccessorInfo& info) | 1829 static void perWorldAttributeAttrSetterForMainWorld(v8::Local<v8::String> name,
v8::Local<v8::Value> value, const v8::AccessorInfo& info) |
| 1830 { | 1830 { |
| 1831 TestObj* imp = V8TestObj::toNative(info.Holder()); | 1831 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1832 V8TRYCATCH_VOID(TestObj*, v, V8TestObj::HasInstance(value, info.GetIsolate()
, worldType(info.GetIsolate())) ? V8TestObj::toNative(v8::Handle<v8::Object>::Ca
st(value)) : 0); | 1832 V8TRYCATCH_VOID(TestObj*, v, V8TestObject::HasInstance(value, info.GetIsolat
e(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Objec
t>::Cast(value)) : 0); |
| 1833 imp->setPerWorldAttribute(WTF::getPtr(v)); | 1833 imp->setPerWorldAttribute(WTF::getPtr(v)); |
| 1834 return; | 1834 return; |
| 1835 } | 1835 } |
| 1836 | 1836 |
| 1837 static void perWorldAttributeAttrSetterCallbackForMainWorld(v8::Local<v8::String
> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) | 1837 static void perWorldAttributeAttrSetterCallbackForMainWorld(v8::Local<v8::String
> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) |
| 1838 { | 1838 { |
| 1839 TestObjV8Internal::perWorldAttributeAttrSetterForMainWorld(name, value, info
); | 1839 TestObjV8Internal::perWorldAttributeAttrSetterForMainWorld(name, value, info
); |
| 1840 } | 1840 } |
| 1841 | 1841 |
| 1842 static v8::Handle<v8::Value> activityLoggedAttr1AttrGetter(v8::Local<v8::String>
name, const v8::AccessorInfo& info) | 1842 static v8::Handle<v8::Value> activityLoggedAttr1AttrGetter(v8::Local<v8::String>
name, const v8::AccessorInfo& info) |
| 1843 { | 1843 { |
| 1844 TestObj* imp = V8TestObj::toNative(info.Holder()); | 1844 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1845 return v8Integer(imp->activityLoggedAttr1(), info.GetIsolate()); | 1845 return v8Integer(imp->activityLoggedAttr1(), info.GetIsolate()); |
| 1846 } | 1846 } |
| 1847 | 1847 |
| 1848 static v8::Handle<v8::Value> activityLoggedAttr1AttrGetterCallback(v8::Local<v8:
:String> name, const v8::AccessorInfo& info) | 1848 static v8::Handle<v8::Value> activityLoggedAttr1AttrGetterCallback(v8::Local<v8:
:String> name, const v8::AccessorInfo& info) |
| 1849 { | 1849 { |
| 1850 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 1850 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
| 1851 if (contextData && contextData->activityLogger()) | 1851 if (contextData && contextData->activityLogger()) |
| 1852 contextData->activityLogger()->log("TestObject.activityLoggedAttr1", 0,
0, "Getter"); | 1852 contextData->activityLogger()->log("TestObject.activityLoggedAttr1", 0,
0, "Getter"); |
| 1853 return TestObjV8Internal::activityLoggedAttr1AttrGetter(name, info); | 1853 return TestObjV8Internal::activityLoggedAttr1AttrGetter(name, info); |
| 1854 } | 1854 } |
| 1855 | 1855 |
| 1856 static void activityLoggedAttr1AttrSetter(v8::Local<v8::String> name, v8::Local<
v8::Value> value, const v8::AccessorInfo& info) | 1856 static void activityLoggedAttr1AttrSetter(v8::Local<v8::String> name, v8::Local<
v8::Value> value, const v8::AccessorInfo& info) |
| 1857 { | 1857 { |
| 1858 TestObj* imp = V8TestObj::toNative(info.Holder()); | 1858 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1859 V8TRYCATCH_VOID(int, v, toInt32(value)); | 1859 V8TRYCATCH_VOID(int, v, toInt32(value)); |
| 1860 imp->setActivityLoggedAttr1(v); | 1860 imp->setActivityLoggedAttr1(v); |
| 1861 return; | 1861 return; |
| 1862 } | 1862 } |
| 1863 | 1863 |
| 1864 static void activityLoggedAttr1AttrSetterCallback(v8::Local<v8::String> name, v8
::Local<v8::Value> value, const v8::AccessorInfo& info) | 1864 static void activityLoggedAttr1AttrSetterCallback(v8::Local<v8::String> name, v8
::Local<v8::Value> value, const v8::AccessorInfo& info) |
| 1865 { | 1865 { |
| 1866 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 1866 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
| 1867 if (contextData && contextData->activityLogger()) { | 1867 if (contextData && contextData->activityLogger()) { |
| 1868 v8::Handle<v8::Value> loggerArg[] = { value }; | 1868 v8::Handle<v8::Value> loggerArg[] = { value }; |
| 1869 contextData->activityLogger()->log("TestObject.activityLoggedAttr1", 1,
&loggerArg[0], "Setter"); | 1869 contextData->activityLogger()->log("TestObject.activityLoggedAttr1", 1,
&loggerArg[0], "Setter"); |
| 1870 } | 1870 } |
| 1871 TestObjV8Internal::activityLoggedAttr1AttrSetter(name, value, info); | 1871 TestObjV8Internal::activityLoggedAttr1AttrSetter(name, value, info); |
| 1872 } | 1872 } |
| 1873 | 1873 |
| 1874 static v8::Handle<v8::Value> activityLoggedAttr2AttrGetter(v8::Local<v8::String>
name, const v8::AccessorInfo& info) | 1874 static v8::Handle<v8::Value> activityLoggedAttr2AttrGetter(v8::Local<v8::String>
name, const v8::AccessorInfo& info) |
| 1875 { | 1875 { |
| 1876 TestObj* imp = V8TestObj::toNative(info.Holder()); | 1876 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1877 return v8Integer(imp->activityLoggedAttr2(), info.GetIsolate()); | 1877 return v8Integer(imp->activityLoggedAttr2(), info.GetIsolate()); |
| 1878 } | 1878 } |
| 1879 | 1879 |
| 1880 static v8::Handle<v8::Value> activityLoggedAttr2AttrGetterCallback(v8::Local<v8:
:String> name, const v8::AccessorInfo& info) | 1880 static v8::Handle<v8::Value> activityLoggedAttr2AttrGetterCallback(v8::Local<v8:
:String> name, const v8::AccessorInfo& info) |
| 1881 { | 1881 { |
| 1882 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 1882 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
| 1883 if (contextData && contextData->activityLogger()) | 1883 if (contextData && contextData->activityLogger()) |
| 1884 contextData->activityLogger()->log("TestObject.activityLoggedAttr2", 0,
0, "Getter"); | 1884 contextData->activityLogger()->log("TestObject.activityLoggedAttr2", 0,
0, "Getter"); |
| 1885 return TestObjV8Internal::activityLoggedAttr2AttrGetter(name, info); | 1885 return TestObjV8Internal::activityLoggedAttr2AttrGetter(name, info); |
| 1886 } | 1886 } |
| 1887 | 1887 |
| 1888 static v8::Handle<v8::Value> activityLoggedAttr2AttrGetterForMainWorld(v8::Local
<v8::String> name, const v8::AccessorInfo& info) | 1888 static v8::Handle<v8::Value> activityLoggedAttr2AttrGetterForMainWorld(v8::Local
<v8::String> name, const v8::AccessorInfo& info) |
| 1889 { | 1889 { |
| 1890 TestObj* imp = V8TestObj::toNative(info.Holder()); | 1890 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1891 return v8Integer(imp->activityLoggedAttr2(), info.GetIsolate()); | 1891 return v8Integer(imp->activityLoggedAttr2(), info.GetIsolate()); |
| 1892 } | 1892 } |
| 1893 | 1893 |
| 1894 static v8::Handle<v8::Value> activityLoggedAttr2AttrGetterCallbackForMainWorld(v
8::Local<v8::String> name, const v8::AccessorInfo& info) | 1894 static v8::Handle<v8::Value> activityLoggedAttr2AttrGetterCallbackForMainWorld(v
8::Local<v8::String> name, const v8::AccessorInfo& info) |
| 1895 { | 1895 { |
| 1896 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 1896 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
| 1897 if (contextData && contextData->activityLogger()) | 1897 if (contextData && contextData->activityLogger()) |
| 1898 contextData->activityLogger()->log("TestObject.activityLoggedAttr2", 0,
0, "Getter"); | 1898 contextData->activityLogger()->log("TestObject.activityLoggedAttr2", 0,
0, "Getter"); |
| 1899 return TestObjV8Internal::activityLoggedAttr2AttrGetterForMainWorld(name, in
fo); | 1899 return TestObjV8Internal::activityLoggedAttr2AttrGetterForMainWorld(name, in
fo); |
| 1900 } | 1900 } |
| 1901 | 1901 |
| 1902 static void activityLoggedAttr2AttrSetter(v8::Local<v8::String> name, v8::Local<
v8::Value> value, const v8::AccessorInfo& info) | 1902 static void activityLoggedAttr2AttrSetter(v8::Local<v8::String> name, v8::Local<
v8::Value> value, const v8::AccessorInfo& info) |
| 1903 { | 1903 { |
| 1904 TestObj* imp = V8TestObj::toNative(info.Holder()); | 1904 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1905 V8TRYCATCH_VOID(int, v, toInt32(value)); | 1905 V8TRYCATCH_VOID(int, v, toInt32(value)); |
| 1906 imp->setActivityLoggedAttr2(v); | 1906 imp->setActivityLoggedAttr2(v); |
| 1907 return; | 1907 return; |
| 1908 } | 1908 } |
| 1909 | 1909 |
| 1910 static void activityLoggedAttr2AttrSetterCallback(v8::Local<v8::String> name, v8
::Local<v8::Value> value, const v8::AccessorInfo& info) | 1910 static void activityLoggedAttr2AttrSetterCallback(v8::Local<v8::String> name, v8
::Local<v8::Value> value, const v8::AccessorInfo& info) |
| 1911 { | 1911 { |
| 1912 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 1912 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
| 1913 if (contextData && contextData->activityLogger()) { | 1913 if (contextData && contextData->activityLogger()) { |
| 1914 v8::Handle<v8::Value> loggerArg[] = { value }; | 1914 v8::Handle<v8::Value> loggerArg[] = { value }; |
| 1915 contextData->activityLogger()->log("TestObject.activityLoggedAttr2", 1,
&loggerArg[0], "Setter"); | 1915 contextData->activityLogger()->log("TestObject.activityLoggedAttr2", 1,
&loggerArg[0], "Setter"); |
| 1916 } | 1916 } |
| 1917 TestObjV8Internal::activityLoggedAttr2AttrSetter(name, value, info); | 1917 TestObjV8Internal::activityLoggedAttr2AttrSetter(name, value, info); |
| 1918 } | 1918 } |
| 1919 | 1919 |
| 1920 static void activityLoggedAttr2AttrSetterForMainWorld(v8::Local<v8::String> name
, v8::Local<v8::Value> value, const v8::AccessorInfo& info) | 1920 static void activityLoggedAttr2AttrSetterForMainWorld(v8::Local<v8::String> name
, v8::Local<v8::Value> value, const v8::AccessorInfo& info) |
| 1921 { | 1921 { |
| 1922 TestObj* imp = V8TestObj::toNative(info.Holder()); | 1922 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1923 V8TRYCATCH_VOID(int, v, toInt32(value)); | 1923 V8TRYCATCH_VOID(int, v, toInt32(value)); |
| 1924 imp->setActivityLoggedAttr2(v); | 1924 imp->setActivityLoggedAttr2(v); |
| 1925 return; | 1925 return; |
| 1926 } | 1926 } |
| 1927 | 1927 |
| 1928 static void activityLoggedAttr2AttrSetterCallbackForMainWorld(v8::Local<v8::Stri
ng> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) | 1928 static void activityLoggedAttr2AttrSetterCallbackForMainWorld(v8::Local<v8::Stri
ng> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) |
| 1929 { | 1929 { |
| 1930 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 1930 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
| 1931 if (contextData && contextData->activityLogger()) { | 1931 if (contextData && contextData->activityLogger()) { |
| 1932 v8::Handle<v8::Value> loggerArg[] = { value }; | 1932 v8::Handle<v8::Value> loggerArg[] = { value }; |
| 1933 contextData->activityLogger()->log("TestObject.activityLoggedAttr2", 1,
&loggerArg[0], "Setter"); | 1933 contextData->activityLogger()->log("TestObject.activityLoggedAttr2", 1,
&loggerArg[0], "Setter"); |
| 1934 } | 1934 } |
| 1935 TestObjV8Internal::activityLoggedAttr2AttrSetterForMainWorld(name, value, in
fo); | 1935 TestObjV8Internal::activityLoggedAttr2AttrSetterForMainWorld(name, value, in
fo); |
| 1936 } | 1936 } |
| 1937 | 1937 |
| 1938 static v8::Handle<v8::Value> activityLoggedInIsolatedWorldsAttrAttrGetter(v8::Lo
cal<v8::String> name, const v8::AccessorInfo& info) | 1938 static v8::Handle<v8::Value> activityLoggedInIsolatedWorldsAttrAttrGetter(v8::Lo
cal<v8::String> name, const v8::AccessorInfo& info) |
| 1939 { | 1939 { |
| 1940 TestObj* imp = V8TestObj::toNative(info.Holder()); | 1940 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1941 return v8Integer(imp->activityLoggedInIsolatedWorldsAttr(), info.GetIsolate(
)); | 1941 return v8Integer(imp->activityLoggedInIsolatedWorldsAttr(), info.GetIsolate(
)); |
| 1942 } | 1942 } |
| 1943 | 1943 |
| 1944 static v8::Handle<v8::Value> activityLoggedInIsolatedWorldsAttrAttrGetterCallbac
k(v8::Local<v8::String> name, const v8::AccessorInfo& info) | 1944 static v8::Handle<v8::Value> activityLoggedInIsolatedWorldsAttrAttrGetterCallbac
k(v8::Local<v8::String> name, const v8::AccessorInfo& info) |
| 1945 { | 1945 { |
| 1946 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 1946 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
| 1947 if (contextData && contextData->activityLogger()) | 1947 if (contextData && contextData->activityLogger()) |
| 1948 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW
orldsAttr", 0, 0, "Getter"); | 1948 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW
orldsAttr", 0, 0, "Getter"); |
| 1949 return TestObjV8Internal::activityLoggedInIsolatedWorldsAttrAttrGetter(name,
info); | 1949 return TestObjV8Internal::activityLoggedInIsolatedWorldsAttrAttrGetter(name,
info); |
| 1950 } | 1950 } |
| 1951 | 1951 |
| 1952 static v8::Handle<v8::Value> activityLoggedInIsolatedWorldsAttrAttrGetterForMain
World(v8::Local<v8::String> name, const v8::AccessorInfo& info) | 1952 static v8::Handle<v8::Value> activityLoggedInIsolatedWorldsAttrAttrGetterForMain
World(v8::Local<v8::String> name, const v8::AccessorInfo& info) |
| 1953 { | 1953 { |
| 1954 TestObj* imp = V8TestObj::toNative(info.Holder()); | 1954 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1955 return v8Integer(imp->activityLoggedInIsolatedWorldsAttr(), info.GetIsolate(
)); | 1955 return v8Integer(imp->activityLoggedInIsolatedWorldsAttr(), info.GetIsolate(
)); |
| 1956 } | 1956 } |
| 1957 | 1957 |
| 1958 static v8::Handle<v8::Value> activityLoggedInIsolatedWorldsAttrAttrGetterCallbac
kForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info) | 1958 static v8::Handle<v8::Value> activityLoggedInIsolatedWorldsAttrAttrGetterCallbac
kForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info) |
| 1959 { | 1959 { |
| 1960 return TestObjV8Internal::activityLoggedInIsolatedWorldsAttrAttrGetterForMai
nWorld(name, info); | 1960 return TestObjV8Internal::activityLoggedInIsolatedWorldsAttrAttrGetterForMai
nWorld(name, info); |
| 1961 } | 1961 } |
| 1962 | 1962 |
| 1963 static void activityLoggedInIsolatedWorldsAttrAttrSetter(v8::Local<v8::String> n
ame, v8::Local<v8::Value> value, const v8::AccessorInfo& info) | 1963 static void activityLoggedInIsolatedWorldsAttrAttrSetter(v8::Local<v8::String> n
ame, v8::Local<v8::Value> value, const v8::AccessorInfo& info) |
| 1964 { | 1964 { |
| 1965 TestObj* imp = V8TestObj::toNative(info.Holder()); | 1965 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1966 V8TRYCATCH_VOID(int, v, toInt32(value)); | 1966 V8TRYCATCH_VOID(int, v, toInt32(value)); |
| 1967 imp->setActivityLoggedInIsolatedWorldsAttr(v); | 1967 imp->setActivityLoggedInIsolatedWorldsAttr(v); |
| 1968 return; | 1968 return; |
| 1969 } | 1969 } |
| 1970 | 1970 |
| 1971 static void activityLoggedInIsolatedWorldsAttrAttrSetterCallback(v8::Local<v8::S
tring> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) | 1971 static void activityLoggedInIsolatedWorldsAttrAttrSetterCallback(v8::Local<v8::S
tring> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) |
| 1972 { | 1972 { |
| 1973 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 1973 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
| 1974 if (contextData && contextData->activityLogger()) { | 1974 if (contextData && contextData->activityLogger()) { |
| 1975 v8::Handle<v8::Value> loggerArg[] = { value }; | 1975 v8::Handle<v8::Value> loggerArg[] = { value }; |
| 1976 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW
orldsAttr", 1, &loggerArg[0], "Setter"); | 1976 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW
orldsAttr", 1, &loggerArg[0], "Setter"); |
| 1977 } | 1977 } |
| 1978 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrAttrSetter(name, value,
info); | 1978 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrAttrSetter(name, value,
info); |
| 1979 } | 1979 } |
| 1980 | 1980 |
| 1981 static void activityLoggedInIsolatedWorldsAttrAttrSetterForMainWorld(v8::Local<v
8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) | 1981 static void activityLoggedInIsolatedWorldsAttrAttrSetterForMainWorld(v8::Local<v
8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) |
| 1982 { | 1982 { |
| 1983 TestObj* imp = V8TestObj::toNative(info.Holder()); | 1983 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1984 V8TRYCATCH_VOID(int, v, toInt32(value)); | 1984 V8TRYCATCH_VOID(int, v, toInt32(value)); |
| 1985 imp->setActivityLoggedInIsolatedWorldsAttr(v); | 1985 imp->setActivityLoggedInIsolatedWorldsAttr(v); |
| 1986 return; | 1986 return; |
| 1987 } | 1987 } |
| 1988 | 1988 |
| 1989 static void activityLoggedInIsolatedWorldsAttrAttrSetterCallbackForMainWorld(v8:
:Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& inf
o) | 1989 static void activityLoggedInIsolatedWorldsAttrAttrSetterCallbackForMainWorld(v8:
:Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& inf
o) |
| 1990 { | 1990 { |
| 1991 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrAttrSetterForMainWorld(
name, value, info); | 1991 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrAttrSetterForMainWorld(
name, value, info); |
| 1992 } | 1992 } |
| 1993 | 1993 |
| 1994 static v8::Handle<v8::Value> activityLoggedAttrSetter1AttrGetter(v8::Local<v8::S
tring> name, const v8::AccessorInfo& info) | 1994 static v8::Handle<v8::Value> activityLoggedAttrSetter1AttrGetter(v8::Local<v8::S
tring> name, const v8::AccessorInfo& info) |
| 1995 { | 1995 { |
| 1996 TestObj* imp = V8TestObj::toNative(info.Holder()); | 1996 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1997 return v8Integer(imp->activityLoggedAttrSetter1(), info.GetIsolate()); | 1997 return v8Integer(imp->activityLoggedAttrSetter1(), info.GetIsolate()); |
| 1998 } | 1998 } |
| 1999 | 1999 |
| 2000 static v8::Handle<v8::Value> activityLoggedAttrSetter1AttrGetterCallback(v8::Loc
al<v8::String> name, const v8::AccessorInfo& info) | 2000 static v8::Handle<v8::Value> activityLoggedAttrSetter1AttrGetterCallback(v8::Loc
al<v8::String> name, const v8::AccessorInfo& info) |
| 2001 { | 2001 { |
| 2002 return TestObjV8Internal::activityLoggedAttrSetter1AttrGetter(name, info); | 2002 return TestObjV8Internal::activityLoggedAttrSetter1AttrGetter(name, info); |
| 2003 } | 2003 } |
| 2004 | 2004 |
| 2005 static void activityLoggedAttrSetter1AttrSetter(v8::Local<v8::String> name, v8::
Local<v8::Value> value, const v8::AccessorInfo& info) | 2005 static void activityLoggedAttrSetter1AttrSetter(v8::Local<v8::String> name, v8::
Local<v8::Value> value, const v8::AccessorInfo& info) |
| 2006 { | 2006 { |
| 2007 TestObj* imp = V8TestObj::toNative(info.Holder()); | 2007 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2008 V8TRYCATCH_VOID(int, v, toInt32(value)); | 2008 V8TRYCATCH_VOID(int, v, toInt32(value)); |
| 2009 imp->setActivityLoggedAttrSetter1(v); | 2009 imp->setActivityLoggedAttrSetter1(v); |
| 2010 return; | 2010 return; |
| 2011 } | 2011 } |
| 2012 | 2012 |
| 2013 static void activityLoggedAttrSetter1AttrSetterCallback(v8::Local<v8::String> na
me, v8::Local<v8::Value> value, const v8::AccessorInfo& info) | 2013 static void activityLoggedAttrSetter1AttrSetterCallback(v8::Local<v8::String> na
me, v8::Local<v8::Value> value, const v8::AccessorInfo& info) |
| 2014 { | 2014 { |
| 2015 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 2015 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
| 2016 if (contextData && contextData->activityLogger()) { | 2016 if (contextData && contextData->activityLogger()) { |
| 2017 v8::Handle<v8::Value> loggerArg[] = { value }; | 2017 v8::Handle<v8::Value> loggerArg[] = { value }; |
| 2018 contextData->activityLogger()->log("TestObject.activityLoggedAttrSetter1
", 1, &loggerArg[0], "Setter"); | 2018 contextData->activityLogger()->log("TestObject.activityLoggedAttrSetter1
", 1, &loggerArg[0], "Setter"); |
| 2019 } | 2019 } |
| 2020 TestObjV8Internal::activityLoggedAttrSetter1AttrSetter(name, value, info); | 2020 TestObjV8Internal::activityLoggedAttrSetter1AttrSetter(name, value, info); |
| 2021 } | 2021 } |
| 2022 | 2022 |
| 2023 static v8::Handle<v8::Value> activityLoggedAttrSetter2AttrGetter(v8::Local<v8::S
tring> name, const v8::AccessorInfo& info) | 2023 static v8::Handle<v8::Value> activityLoggedAttrSetter2AttrGetter(v8::Local<v8::S
tring> name, const v8::AccessorInfo& info) |
| 2024 { | 2024 { |
| 2025 TestObj* imp = V8TestObj::toNative(info.Holder()); | 2025 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2026 return v8Integer(imp->activityLoggedAttrSetter2(), info.GetIsolate()); | 2026 return v8Integer(imp->activityLoggedAttrSetter2(), info.GetIsolate()); |
| 2027 } | 2027 } |
| 2028 | 2028 |
| 2029 static v8::Handle<v8::Value> activityLoggedAttrSetter2AttrGetterCallback(v8::Loc
al<v8::String> name, const v8::AccessorInfo& info) | 2029 static v8::Handle<v8::Value> activityLoggedAttrSetter2AttrGetterCallback(v8::Loc
al<v8::String> name, const v8::AccessorInfo& info) |
| 2030 { | 2030 { |
| 2031 return TestObjV8Internal::activityLoggedAttrSetter2AttrGetter(name, info); | 2031 return TestObjV8Internal::activityLoggedAttrSetter2AttrGetter(name, info); |
| 2032 } | 2032 } |
| 2033 | 2033 |
| 2034 static v8::Handle<v8::Value> activityLoggedAttrSetter2AttrGetterForMainWorld(v8:
:Local<v8::String> name, const v8::AccessorInfo& info) | 2034 static v8::Handle<v8::Value> activityLoggedAttrSetter2AttrGetterForMainWorld(v8:
:Local<v8::String> name, const v8::AccessorInfo& info) |
| 2035 { | 2035 { |
| 2036 TestObj* imp = V8TestObj::toNative(info.Holder()); | 2036 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2037 return v8Integer(imp->activityLoggedAttrSetter2(), info.GetIsolate()); | 2037 return v8Integer(imp->activityLoggedAttrSetter2(), info.GetIsolate()); |
| 2038 } | 2038 } |
| 2039 | 2039 |
| 2040 static v8::Handle<v8::Value> activityLoggedAttrSetter2AttrGetterCallbackForMainW
orld(v8::Local<v8::String> name, const v8::AccessorInfo& info) | 2040 static v8::Handle<v8::Value> activityLoggedAttrSetter2AttrGetterCallbackForMainW
orld(v8::Local<v8::String> name, const v8::AccessorInfo& info) |
| 2041 { | 2041 { |
| 2042 return TestObjV8Internal::activityLoggedAttrSetter2AttrGetterForMainWorld(na
me, info); | 2042 return TestObjV8Internal::activityLoggedAttrSetter2AttrGetterForMainWorld(na
me, info); |
| 2043 } | 2043 } |
| 2044 | 2044 |
| 2045 static void activityLoggedAttrSetter2AttrSetter(v8::Local<v8::String> name, v8::
Local<v8::Value> value, const v8::AccessorInfo& info) | 2045 static void activityLoggedAttrSetter2AttrSetter(v8::Local<v8::String> name, v8::
Local<v8::Value> value, const v8::AccessorInfo& info) |
| 2046 { | 2046 { |
| 2047 TestObj* imp = V8TestObj::toNative(info.Holder()); | 2047 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2048 V8TRYCATCH_VOID(int, v, toInt32(value)); | 2048 V8TRYCATCH_VOID(int, v, toInt32(value)); |
| 2049 imp->setActivityLoggedAttrSetter2(v); | 2049 imp->setActivityLoggedAttrSetter2(v); |
| 2050 return; | 2050 return; |
| 2051 } | 2051 } |
| 2052 | 2052 |
| 2053 static void activityLoggedAttrSetter2AttrSetterCallback(v8::Local<v8::String> na
me, v8::Local<v8::Value> value, const v8::AccessorInfo& info) | 2053 static void activityLoggedAttrSetter2AttrSetterCallback(v8::Local<v8::String> na
me, v8::Local<v8::Value> value, const v8::AccessorInfo& info) |
| 2054 { | 2054 { |
| 2055 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 2055 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
| 2056 if (contextData && contextData->activityLogger()) { | 2056 if (contextData && contextData->activityLogger()) { |
| 2057 v8::Handle<v8::Value> loggerArg[] = { value }; | 2057 v8::Handle<v8::Value> loggerArg[] = { value }; |
| 2058 contextData->activityLogger()->log("TestObject.activityLoggedAttrSetter2
", 1, &loggerArg[0], "Setter"); | 2058 contextData->activityLogger()->log("TestObject.activityLoggedAttrSetter2
", 1, &loggerArg[0], "Setter"); |
| 2059 } | 2059 } |
| 2060 TestObjV8Internal::activityLoggedAttrSetter2AttrSetter(name, value, info); | 2060 TestObjV8Internal::activityLoggedAttrSetter2AttrSetter(name, value, info); |
| 2061 } | 2061 } |
| 2062 | 2062 |
| 2063 static void activityLoggedAttrSetter2AttrSetterForMainWorld(v8::Local<v8::String
> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) | 2063 static void activityLoggedAttrSetter2AttrSetterForMainWorld(v8::Local<v8::String
> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) |
| 2064 { | 2064 { |
| 2065 TestObj* imp = V8TestObj::toNative(info.Holder()); | 2065 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2066 V8TRYCATCH_VOID(int, v, toInt32(value)); | 2066 V8TRYCATCH_VOID(int, v, toInt32(value)); |
| 2067 imp->setActivityLoggedAttrSetter2(v); | 2067 imp->setActivityLoggedAttrSetter2(v); |
| 2068 return; | 2068 return; |
| 2069 } | 2069 } |
| 2070 | 2070 |
| 2071 static void activityLoggedAttrSetter2AttrSetterCallbackForMainWorld(v8::Local<v8
::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) | 2071 static void activityLoggedAttrSetter2AttrSetterCallbackForMainWorld(v8::Local<v8
::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) |
| 2072 { | 2072 { |
| 2073 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 2073 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
| 2074 if (contextData && contextData->activityLogger()) { | 2074 if (contextData && contextData->activityLogger()) { |
| 2075 v8::Handle<v8::Value> loggerArg[] = { value }; | 2075 v8::Handle<v8::Value> loggerArg[] = { value }; |
| 2076 contextData->activityLogger()->log("TestObject.activityLoggedAttrSetter2
", 1, &loggerArg[0], "Setter"); | 2076 contextData->activityLogger()->log("TestObject.activityLoggedAttrSetter2
", 1, &loggerArg[0], "Setter"); |
| 2077 } | 2077 } |
| 2078 TestObjV8Internal::activityLoggedAttrSetter2AttrSetterForMainWorld(name, val
ue, info); | 2078 TestObjV8Internal::activityLoggedAttrSetter2AttrSetterForMainWorld(name, val
ue, info); |
| 2079 } | 2079 } |
| 2080 | 2080 |
| 2081 static v8::Handle<v8::Value> activityLoggedInIsolatedWorldsAttrSetterAttrGetter(
v8::Local<v8::String> name, const v8::AccessorInfo& info) | 2081 static v8::Handle<v8::Value> activityLoggedInIsolatedWorldsAttrSetterAttrGetter(
v8::Local<v8::String> name, const v8::AccessorInfo& info) |
| 2082 { | 2082 { |
| 2083 TestObj* imp = V8TestObj::toNative(info.Holder()); | 2083 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2084 return v8Integer(imp->activityLoggedInIsolatedWorldsAttrSetter(), info.GetIs
olate()); | 2084 return v8Integer(imp->activityLoggedInIsolatedWorldsAttrSetter(), info.GetIs
olate()); |
| 2085 } | 2085 } |
| 2086 | 2086 |
| 2087 static v8::Handle<v8::Value> activityLoggedInIsolatedWorldsAttrSetterAttrGetterC
allback(v8::Local<v8::String> name, const v8::AccessorInfo& info) | 2087 static v8::Handle<v8::Value> activityLoggedInIsolatedWorldsAttrSetterAttrGetterC
allback(v8::Local<v8::String> name, const v8::AccessorInfo& info) |
| 2088 { | 2088 { |
| 2089 return TestObjV8Internal::activityLoggedInIsolatedWorldsAttrSetterAttrGetter
(name, info); | 2089 return TestObjV8Internal::activityLoggedInIsolatedWorldsAttrSetterAttrGetter
(name, info); |
| 2090 } | 2090 } |
| 2091 | 2091 |
| 2092 static v8::Handle<v8::Value> activityLoggedInIsolatedWorldsAttrSetterAttrGetterF
orMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info) | 2092 static v8::Handle<v8::Value> activityLoggedInIsolatedWorldsAttrSetterAttrGetterF
orMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info) |
| 2093 { | 2093 { |
| 2094 TestObj* imp = V8TestObj::toNative(info.Holder()); | 2094 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2095 return v8Integer(imp->activityLoggedInIsolatedWorldsAttrSetter(), info.GetIs
olate()); | 2095 return v8Integer(imp->activityLoggedInIsolatedWorldsAttrSetter(), info.GetIs
olate()); |
| 2096 } | 2096 } |
| 2097 | 2097 |
| 2098 static v8::Handle<v8::Value> activityLoggedInIsolatedWorldsAttrSetterAttrGetterC
allbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info) | 2098 static v8::Handle<v8::Value> activityLoggedInIsolatedWorldsAttrSetterAttrGetterC
allbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info) |
| 2099 { | 2099 { |
| 2100 return TestObjV8Internal::activityLoggedInIsolatedWorldsAttrSetterAttrGetter
ForMainWorld(name, info); | 2100 return TestObjV8Internal::activityLoggedInIsolatedWorldsAttrSetterAttrGetter
ForMainWorld(name, info); |
| 2101 } | 2101 } |
| 2102 | 2102 |
| 2103 static void activityLoggedInIsolatedWorldsAttrSetterAttrSetter(v8::Local<v8::Str
ing> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) | 2103 static void activityLoggedInIsolatedWorldsAttrSetterAttrSetter(v8::Local<v8::Str
ing> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) |
| 2104 { | 2104 { |
| 2105 TestObj* imp = V8TestObj::toNative(info.Holder()); | 2105 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2106 V8TRYCATCH_VOID(int, v, toInt32(value)); | 2106 V8TRYCATCH_VOID(int, v, toInt32(value)); |
| 2107 imp->setActivityLoggedInIsolatedWorldsAttrSetter(v); | 2107 imp->setActivityLoggedInIsolatedWorldsAttrSetter(v); |
| 2108 return; | 2108 return; |
| 2109 } | 2109 } |
| 2110 | 2110 |
| 2111 static void activityLoggedInIsolatedWorldsAttrSetterAttrSetterCallback(v8::Local
<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) | 2111 static void activityLoggedInIsolatedWorldsAttrSetterAttrSetterCallback(v8::Local
<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) |
| 2112 { | 2112 { |
| 2113 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 2113 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
| 2114 if (contextData && contextData->activityLogger()) { | 2114 if (contextData && contextData->activityLogger()) { |
| 2115 v8::Handle<v8::Value> loggerArg[] = { value }; | 2115 v8::Handle<v8::Value> loggerArg[] = { value }; |
| 2116 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW
orldsAttrSetter", 1, &loggerArg[0], "Setter"); | 2116 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW
orldsAttrSetter", 1, &loggerArg[0], "Setter"); |
| 2117 } | 2117 } |
| 2118 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrSetterAttrSetter(name,
value, info); | 2118 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrSetterAttrSetter(name,
value, info); |
| 2119 } | 2119 } |
| 2120 | 2120 |
| 2121 static void activityLoggedInIsolatedWorldsAttrSetterAttrSetterForMainWorld(v8::L
ocal<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) | 2121 static void activityLoggedInIsolatedWorldsAttrSetterAttrSetterForMainWorld(v8::L
ocal<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) |
| 2122 { | 2122 { |
| 2123 TestObj* imp = V8TestObj::toNative(info.Holder()); | 2123 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2124 V8TRYCATCH_VOID(int, v, toInt32(value)); | 2124 V8TRYCATCH_VOID(int, v, toInt32(value)); |
| 2125 imp->setActivityLoggedInIsolatedWorldsAttrSetter(v); | 2125 imp->setActivityLoggedInIsolatedWorldsAttrSetter(v); |
| 2126 return; | 2126 return; |
| 2127 } | 2127 } |
| 2128 | 2128 |
| 2129 static void activityLoggedInIsolatedWorldsAttrSetterAttrSetterCallbackForMainWor
ld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInf
o& info) | 2129 static void activityLoggedInIsolatedWorldsAttrSetterAttrSetterCallbackForMainWor
ld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInf
o& info) |
| 2130 { | 2130 { |
| 2131 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrSetterAttrSetterForMain
World(name, value, info); | 2131 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrSetterAttrSetterForMain
World(name, value, info); |
| 2132 } | 2132 } |
| 2133 | 2133 |
| 2134 static v8::Handle<v8::Value> activityLoggedAttrGetter1AttrGetter(v8::Local<v8::S
tring> name, const v8::AccessorInfo& info) | 2134 static v8::Handle<v8::Value> activityLoggedAttrGetter1AttrGetter(v8::Local<v8::S
tring> name, const v8::AccessorInfo& info) |
| 2135 { | 2135 { |
| 2136 TestObj* imp = V8TestObj::toNative(info.Holder()); | 2136 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2137 return v8Integer(imp->activityLoggedAttrGetter1(), info.GetIsolate()); | 2137 return v8Integer(imp->activityLoggedAttrGetter1(), info.GetIsolate()); |
| 2138 } | 2138 } |
| 2139 | 2139 |
| 2140 static v8::Handle<v8::Value> activityLoggedAttrGetter1AttrGetterCallback(v8::Loc
al<v8::String> name, const v8::AccessorInfo& info) | 2140 static v8::Handle<v8::Value> activityLoggedAttrGetter1AttrGetterCallback(v8::Loc
al<v8::String> name, const v8::AccessorInfo& info) |
| 2141 { | 2141 { |
| 2142 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 2142 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
| 2143 if (contextData && contextData->activityLogger()) | 2143 if (contextData && contextData->activityLogger()) |
| 2144 contextData->activityLogger()->log("TestObject.activityLoggedAttrGetter1
", 0, 0, "Getter"); | 2144 contextData->activityLogger()->log("TestObject.activityLoggedAttrGetter1
", 0, 0, "Getter"); |
| 2145 return TestObjV8Internal::activityLoggedAttrGetter1AttrGetter(name, info); | 2145 return TestObjV8Internal::activityLoggedAttrGetter1AttrGetter(name, info); |
| 2146 } | 2146 } |
| 2147 | 2147 |
| 2148 static void activityLoggedAttrGetter1AttrSetter(v8::Local<v8::String> name, v8::
Local<v8::Value> value, const v8::AccessorInfo& info) | 2148 static void activityLoggedAttrGetter1AttrSetter(v8::Local<v8::String> name, v8::
Local<v8::Value> value, const v8::AccessorInfo& info) |
| 2149 { | 2149 { |
| 2150 TestObj* imp = V8TestObj::toNative(info.Holder()); | 2150 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2151 V8TRYCATCH_VOID(int, v, toInt32(value)); | 2151 V8TRYCATCH_VOID(int, v, toInt32(value)); |
| 2152 imp->setActivityLoggedAttrGetter1(v); | 2152 imp->setActivityLoggedAttrGetter1(v); |
| 2153 return; | 2153 return; |
| 2154 } | 2154 } |
| 2155 | 2155 |
| 2156 static void activityLoggedAttrGetter1AttrSetterCallback(v8::Local<v8::String> na
me, v8::Local<v8::Value> value, const v8::AccessorInfo& info) | 2156 static void activityLoggedAttrGetter1AttrSetterCallback(v8::Local<v8::String> na
me, v8::Local<v8::Value> value, const v8::AccessorInfo& info) |
| 2157 { | 2157 { |
| 2158 TestObjV8Internal::activityLoggedAttrGetter1AttrSetter(name, value, info); | 2158 TestObjV8Internal::activityLoggedAttrGetter1AttrSetter(name, value, info); |
| 2159 } | 2159 } |
| 2160 | 2160 |
| 2161 static v8::Handle<v8::Value> activityLoggedAttrGetter2AttrGetter(v8::Local<v8::S
tring> name, const v8::AccessorInfo& info) | 2161 static v8::Handle<v8::Value> activityLoggedAttrGetter2AttrGetter(v8::Local<v8::S
tring> name, const v8::AccessorInfo& info) |
| 2162 { | 2162 { |
| 2163 TestObj* imp = V8TestObj::toNative(info.Holder()); | 2163 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2164 return v8Integer(imp->activityLoggedAttrGetter2(), info.GetIsolate()); | 2164 return v8Integer(imp->activityLoggedAttrGetter2(), info.GetIsolate()); |
| 2165 } | 2165 } |
| 2166 | 2166 |
| 2167 static v8::Handle<v8::Value> activityLoggedAttrGetter2AttrGetterCallback(v8::Loc
al<v8::String> name, const v8::AccessorInfo& info) | 2167 static v8::Handle<v8::Value> activityLoggedAttrGetter2AttrGetterCallback(v8::Loc
al<v8::String> name, const v8::AccessorInfo& info) |
| 2168 { | 2168 { |
| 2169 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 2169 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
| 2170 if (contextData && contextData->activityLogger()) | 2170 if (contextData && contextData->activityLogger()) |
| 2171 contextData->activityLogger()->log("TestObject.activityLoggedAttrGetter2
", 0, 0, "Getter"); | 2171 contextData->activityLogger()->log("TestObject.activityLoggedAttrGetter2
", 0, 0, "Getter"); |
| 2172 return TestObjV8Internal::activityLoggedAttrGetter2AttrGetter(name, info); | 2172 return TestObjV8Internal::activityLoggedAttrGetter2AttrGetter(name, info); |
| 2173 } | 2173 } |
| 2174 | 2174 |
| 2175 static v8::Handle<v8::Value> activityLoggedAttrGetter2AttrGetterForMainWorld(v8:
:Local<v8::String> name, const v8::AccessorInfo& info) | 2175 static v8::Handle<v8::Value> activityLoggedAttrGetter2AttrGetterForMainWorld(v8:
:Local<v8::String> name, const v8::AccessorInfo& info) |
| 2176 { | 2176 { |
| 2177 TestObj* imp = V8TestObj::toNative(info.Holder()); | 2177 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2178 return v8Integer(imp->activityLoggedAttrGetter2(), info.GetIsolate()); | 2178 return v8Integer(imp->activityLoggedAttrGetter2(), info.GetIsolate()); |
| 2179 } | 2179 } |
| 2180 | 2180 |
| 2181 static v8::Handle<v8::Value> activityLoggedAttrGetter2AttrGetterCallbackForMainW
orld(v8::Local<v8::String> name, const v8::AccessorInfo& info) | 2181 static v8::Handle<v8::Value> activityLoggedAttrGetter2AttrGetterCallbackForMainW
orld(v8::Local<v8::String> name, const v8::AccessorInfo& info) |
| 2182 { | 2182 { |
| 2183 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 2183 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
| 2184 if (contextData && contextData->activityLogger()) | 2184 if (contextData && contextData->activityLogger()) |
| 2185 contextData->activityLogger()->log("TestObject.activityLoggedAttrGetter2
", 0, 0, "Getter"); | 2185 contextData->activityLogger()->log("TestObject.activityLoggedAttrGetter2
", 0, 0, "Getter"); |
| 2186 return TestObjV8Internal::activityLoggedAttrGetter2AttrGetterForMainWorld(na
me, info); | 2186 return TestObjV8Internal::activityLoggedAttrGetter2AttrGetterForMainWorld(na
me, info); |
| 2187 } | 2187 } |
| 2188 | 2188 |
| 2189 static void activityLoggedAttrGetter2AttrSetter(v8::Local<v8::String> name, v8::
Local<v8::Value> value, const v8::AccessorInfo& info) | 2189 static void activityLoggedAttrGetter2AttrSetter(v8::Local<v8::String> name, v8::
Local<v8::Value> value, const v8::AccessorInfo& info) |
| 2190 { | 2190 { |
| 2191 TestObj* imp = V8TestObj::toNative(info.Holder()); | 2191 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2192 V8TRYCATCH_VOID(int, v, toInt32(value)); | 2192 V8TRYCATCH_VOID(int, v, toInt32(value)); |
| 2193 imp->setActivityLoggedAttrGetter2(v); | 2193 imp->setActivityLoggedAttrGetter2(v); |
| 2194 return; | 2194 return; |
| 2195 } | 2195 } |
| 2196 | 2196 |
| 2197 static void activityLoggedAttrGetter2AttrSetterCallback(v8::Local<v8::String> na
me, v8::Local<v8::Value> value, const v8::AccessorInfo& info) | 2197 static void activityLoggedAttrGetter2AttrSetterCallback(v8::Local<v8::String> na
me, v8::Local<v8::Value> value, const v8::AccessorInfo& info) |
| 2198 { | 2198 { |
| 2199 TestObjV8Internal::activityLoggedAttrGetter2AttrSetter(name, value, info); | 2199 TestObjV8Internal::activityLoggedAttrGetter2AttrSetter(name, value, info); |
| 2200 } | 2200 } |
| 2201 | 2201 |
| 2202 static void activityLoggedAttrGetter2AttrSetterForMainWorld(v8::Local<v8::String
> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) | 2202 static void activityLoggedAttrGetter2AttrSetterForMainWorld(v8::Local<v8::String
> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) |
| 2203 { | 2203 { |
| 2204 TestObj* imp = V8TestObj::toNative(info.Holder()); | 2204 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2205 V8TRYCATCH_VOID(int, v, toInt32(value)); | 2205 V8TRYCATCH_VOID(int, v, toInt32(value)); |
| 2206 imp->setActivityLoggedAttrGetter2(v); | 2206 imp->setActivityLoggedAttrGetter2(v); |
| 2207 return; | 2207 return; |
| 2208 } | 2208 } |
| 2209 | 2209 |
| 2210 static void activityLoggedAttrGetter2AttrSetterCallbackForMainWorld(v8::Local<v8
::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) | 2210 static void activityLoggedAttrGetter2AttrSetterCallbackForMainWorld(v8::Local<v8
::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) |
| 2211 { | 2211 { |
| 2212 TestObjV8Internal::activityLoggedAttrGetter2AttrSetterForMainWorld(name, val
ue, info); | 2212 TestObjV8Internal::activityLoggedAttrGetter2AttrSetterForMainWorld(name, val
ue, info); |
| 2213 } | 2213 } |
| 2214 | 2214 |
| 2215 static v8::Handle<v8::Value> activityLoggedInIsolatedWorldsAttrGetterAttrGetter(
v8::Local<v8::String> name, const v8::AccessorInfo& info) | 2215 static v8::Handle<v8::Value> activityLoggedInIsolatedWorldsAttrGetterAttrGetter(
v8::Local<v8::String> name, const v8::AccessorInfo& info) |
| 2216 { | 2216 { |
| 2217 TestObj* imp = V8TestObj::toNative(info.Holder()); | 2217 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2218 return v8Integer(imp->activityLoggedInIsolatedWorldsAttrGetter(), info.GetIs
olate()); | 2218 return v8Integer(imp->activityLoggedInIsolatedWorldsAttrGetter(), info.GetIs
olate()); |
| 2219 } | 2219 } |
| 2220 | 2220 |
| 2221 static v8::Handle<v8::Value> activityLoggedInIsolatedWorldsAttrGetterAttrGetterC
allback(v8::Local<v8::String> name, const v8::AccessorInfo& info) | 2221 static v8::Handle<v8::Value> activityLoggedInIsolatedWorldsAttrGetterAttrGetterC
allback(v8::Local<v8::String> name, const v8::AccessorInfo& info) |
| 2222 { | 2222 { |
| 2223 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 2223 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
| 2224 if (contextData && contextData->activityLogger()) | 2224 if (contextData && contextData->activityLogger()) |
| 2225 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW
orldsAttrGetter", 0, 0, "Getter"); | 2225 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW
orldsAttrGetter", 0, 0, "Getter"); |
| 2226 return TestObjV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttrGetter
(name, info); | 2226 return TestObjV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttrGetter
(name, info); |
| 2227 } | 2227 } |
| 2228 | 2228 |
| 2229 static v8::Handle<v8::Value> activityLoggedInIsolatedWorldsAttrGetterAttrGetterF
orMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info) | 2229 static v8::Handle<v8::Value> activityLoggedInIsolatedWorldsAttrGetterAttrGetterF
orMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info) |
| 2230 { | 2230 { |
| 2231 TestObj* imp = V8TestObj::toNative(info.Holder()); | 2231 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2232 return v8Integer(imp->activityLoggedInIsolatedWorldsAttrGetter(), info.GetIs
olate()); | 2232 return v8Integer(imp->activityLoggedInIsolatedWorldsAttrGetter(), info.GetIs
olate()); |
| 2233 } | 2233 } |
| 2234 | 2234 |
| 2235 static v8::Handle<v8::Value> activityLoggedInIsolatedWorldsAttrGetterAttrGetterC
allbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info) | 2235 static v8::Handle<v8::Value> activityLoggedInIsolatedWorldsAttrGetterAttrGetterC
allbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info) |
| 2236 { | 2236 { |
| 2237 return TestObjV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttrGetter
ForMainWorld(name, info); | 2237 return TestObjV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttrGetter
ForMainWorld(name, info); |
| 2238 } | 2238 } |
| 2239 | 2239 |
| 2240 static void activityLoggedInIsolatedWorldsAttrGetterAttrSetter(v8::Local<v8::Str
ing> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) | 2240 static void activityLoggedInIsolatedWorldsAttrGetterAttrSetter(v8::Local<v8::Str
ing> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) |
| 2241 { | 2241 { |
| 2242 TestObj* imp = V8TestObj::toNative(info.Holder()); | 2242 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2243 V8TRYCATCH_VOID(int, v, toInt32(value)); | 2243 V8TRYCATCH_VOID(int, v, toInt32(value)); |
| 2244 imp->setActivityLoggedInIsolatedWorldsAttrGetter(v); | 2244 imp->setActivityLoggedInIsolatedWorldsAttrGetter(v); |
| 2245 return; | 2245 return; |
| 2246 } | 2246 } |
| 2247 | 2247 |
| 2248 static void activityLoggedInIsolatedWorldsAttrGetterAttrSetterCallback(v8::Local
<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) | 2248 static void activityLoggedInIsolatedWorldsAttrGetterAttrSetterCallback(v8::Local
<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) |
| 2249 { | 2249 { |
| 2250 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttrSetter(name,
value, info); | 2250 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttrSetter(name,
value, info); |
| 2251 } | 2251 } |
| 2252 | 2252 |
| 2253 static void activityLoggedInIsolatedWorldsAttrGetterAttrSetterForMainWorld(v8::L
ocal<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) | 2253 static void activityLoggedInIsolatedWorldsAttrGetterAttrSetterForMainWorld(v8::L
ocal<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) |
| 2254 { | 2254 { |
| 2255 TestObj* imp = V8TestObj::toNative(info.Holder()); | 2255 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2256 V8TRYCATCH_VOID(int, v, toInt32(value)); | 2256 V8TRYCATCH_VOID(int, v, toInt32(value)); |
| 2257 imp->setActivityLoggedInIsolatedWorldsAttrGetter(v); | 2257 imp->setActivityLoggedInIsolatedWorldsAttrGetter(v); |
| 2258 return; | 2258 return; |
| 2259 } | 2259 } |
| 2260 | 2260 |
| 2261 static void activityLoggedInIsolatedWorldsAttrGetterAttrSetterCallbackForMainWor
ld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInf
o& info) | 2261 static void activityLoggedInIsolatedWorldsAttrGetterAttrSetterCallbackForMainWor
ld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInf
o& info) |
| 2262 { | 2262 { |
| 2263 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttrSetterForMain
World(name, value, info); | 2263 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttrSetterForMain
World(name, value, info); |
| 2264 } | 2264 } |
| 2265 | 2265 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 2293 } | 2293 } |
| 2294 | 2294 |
| 2295 static void deprecatedStaticAttrAttrSetterCallback(v8::Local<v8::String> name, v
8::Local<v8::Value> value, const v8::AccessorInfo& info) | 2295 static void deprecatedStaticAttrAttrSetterCallback(v8::Local<v8::String> name, v
8::Local<v8::Value> value, const v8::AccessorInfo& info) |
| 2296 { | 2296 { |
| 2297 UseCounter::countDeprecation(activeDOMWindow(), UseCounter::StaticAttribute)
; | 2297 UseCounter::countDeprecation(activeDOMWindow(), UseCounter::StaticAttribute)
; |
| 2298 TestObjV8Internal::deprecatedStaticAttrAttrSetter(name, value, info); | 2298 TestObjV8Internal::deprecatedStaticAttrAttrSetter(name, value, info); |
| 2299 } | 2299 } |
| 2300 | 2300 |
| 2301 static v8::Handle<v8::Value> deprecatedReadonlyAttrAttrGetter(v8::Local<v8::Stri
ng> name, const v8::AccessorInfo& info) | 2301 static v8::Handle<v8::Value> deprecatedReadonlyAttrAttrGetter(v8::Local<v8::Stri
ng> name, const v8::AccessorInfo& info) |
| 2302 { | 2302 { |
| 2303 TestObj* imp = V8TestObj::toNative(info.Holder()); | 2303 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2304 return v8Integer(imp->deprecatedReadonlyAttr(), info.GetIsolate()); | 2304 return v8Integer(imp->deprecatedReadonlyAttr(), info.GetIsolate()); |
| 2305 } | 2305 } |
| 2306 | 2306 |
| 2307 static v8::Handle<v8::Value> deprecatedReadonlyAttrAttrGetterCallback(v8::Local<
v8::String> name, const v8::AccessorInfo& info) | 2307 static v8::Handle<v8::Value> deprecatedReadonlyAttrAttrGetterCallback(v8::Local<
v8::String> name, const v8::AccessorInfo& info) |
| 2308 { | 2308 { |
| 2309 UseCounter::countDeprecation(activeDOMWindow(), UseCounter::ReadonlyAttribut
e); | 2309 UseCounter::countDeprecation(activeDOMWindow(), UseCounter::ReadonlyAttribut
e); |
| 2310 return TestObjV8Internal::deprecatedReadonlyAttrAttrGetter(name, info); | 2310 return TestObjV8Internal::deprecatedReadonlyAttrAttrGetter(name, info); |
| 2311 } | 2311 } |
| 2312 | 2312 |
| 2313 static v8::Handle<v8::Value> deprecatedAttrAttrGetter(v8::Local<v8::String> name
, const v8::AccessorInfo& info) | 2313 static v8::Handle<v8::Value> deprecatedAttrAttrGetter(v8::Local<v8::String> name
, const v8::AccessorInfo& info) |
| 2314 { | 2314 { |
| 2315 TestObj* imp = V8TestObj::toNative(info.Holder()); | 2315 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2316 return v8Integer(imp->deprecatedAttr(), info.GetIsolate()); | 2316 return v8Integer(imp->deprecatedAttr(), info.GetIsolate()); |
| 2317 } | 2317 } |
| 2318 | 2318 |
| 2319 static v8::Handle<v8::Value> deprecatedAttrAttrGetterCallback(v8::Local<v8::Stri
ng> name, const v8::AccessorInfo& info) | 2319 static v8::Handle<v8::Value> deprecatedAttrAttrGetterCallback(v8::Local<v8::Stri
ng> name, const v8::AccessorInfo& info) |
| 2320 { | 2320 { |
| 2321 UseCounter::countDeprecation(activeDOMWindow(), UseCounter::Attribute); | 2321 UseCounter::countDeprecation(activeDOMWindow(), UseCounter::Attribute); |
| 2322 return TestObjV8Internal::deprecatedAttrAttrGetter(name, info); | 2322 return TestObjV8Internal::deprecatedAttrAttrGetter(name, info); |
| 2323 } | 2323 } |
| 2324 | 2324 |
| 2325 static void deprecatedAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::V
alue> value, const v8::AccessorInfo& info) | 2325 static void deprecatedAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::V
alue> value, const v8::AccessorInfo& info) |
| 2326 { | 2326 { |
| 2327 TestObj* imp = V8TestObj::toNative(info.Holder()); | 2327 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2328 V8TRYCATCH_VOID(int, v, toInt32(value)); | 2328 V8TRYCATCH_VOID(int, v, toInt32(value)); |
| 2329 imp->setDeprecatedAttr(v); | 2329 imp->setDeprecatedAttr(v); |
| 2330 return; | 2330 return; |
| 2331 } | 2331 } |
| 2332 | 2332 |
| 2333 static void deprecatedAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Loc
al<v8::Value> value, const v8::AccessorInfo& info) | 2333 static void deprecatedAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Loc
al<v8::Value> value, const v8::AccessorInfo& info) |
| 2334 { | 2334 { |
| 2335 UseCounter::countDeprecation(activeDOMWindow(), UseCounter::Attribute); | 2335 UseCounter::countDeprecation(activeDOMWindow(), UseCounter::Attribute); |
| 2336 TestObjV8Internal::deprecatedAttrAttrSetter(name, value, info); | 2336 TestObjV8Internal::deprecatedAttrAttrSetter(name, value, info); |
| 2337 } | 2337 } |
| (...skipping 12 matching lines...) Expand all Loading... |
| 2350 info.This()->ForceSet(name, value); | 2350 info.This()->ForceSet(name, value); |
| 2351 } | 2351 } |
| 2352 | 2352 |
| 2353 static void TestObjReplaceableAttrSetterCallback(v8::Local<v8::String> name, v8:
:Local<v8::Value> value, const v8::AccessorInfo& info) | 2353 static void TestObjReplaceableAttrSetterCallback(v8::Local<v8::String> name, v8:
:Local<v8::Value> value, const v8::AccessorInfo& info) |
| 2354 { | 2354 { |
| 2355 return TestObjV8Internal::TestObjReplaceableAttrSetter(name, value, info); | 2355 return TestObjV8Internal::TestObjReplaceableAttrSetter(name, value, info); |
| 2356 } | 2356 } |
| 2357 | 2357 |
| 2358 static v8::Handle<v8::Value> voidMethodMethod(const v8::Arguments& args) | 2358 static v8::Handle<v8::Value> voidMethodMethod(const v8::Arguments& args) |
| 2359 { | 2359 { |
| 2360 TestObj* imp = V8TestObj::toNative(args.Holder()); | 2360 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 2361 imp->voidMethod(); | 2361 imp->voidMethod(); |
| 2362 return v8Undefined(); | 2362 return v8Undefined(); |
| 2363 } | 2363 } |
| 2364 | 2364 |
| 2365 static v8::Handle<v8::Value> voidMethodMethodCallback(const v8::Arguments& args) | 2365 static v8::Handle<v8::Value> voidMethodMethodCallback(const v8::Arguments& args) |
| 2366 { | 2366 { |
| 2367 return TestObjV8Internal::voidMethodMethod(args); | 2367 return TestObjV8Internal::voidMethodMethod(args); |
| 2368 } | 2368 } |
| 2369 | 2369 |
| 2370 static v8::Handle<v8::Value> voidMethodWithArgsMethod(const v8::Arguments& args) | 2370 static v8::Handle<v8::Value> voidMethodWithArgsMethod(const v8::Arguments& args) |
| 2371 { | 2371 { |
| 2372 if (args.Length() < 3) | 2372 if (args.Length() < 3) |
| 2373 return throwNotEnoughArgumentsError(args.GetIsolate()); | 2373 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 2374 TestObj* imp = V8TestObj::toNative(args.Holder()); | 2374 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 2375 V8TRYCATCH(int, longArg, toInt32(args[0])); | 2375 V8TRYCATCH(int, longArg, toInt32(args[0])); |
| 2376 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, strArg, args[1]); | 2376 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, strArg, args[1]); |
| 2377 V8TRYCATCH(TestObj*, objArg, V8TestObj::HasInstance(args[2], args.GetIsolate
(), worldType(args.GetIsolate())) ? V8TestObj::toNative(v8::Handle<v8::Object>::
Cast(args[2])) : 0); | 2377 V8TRYCATCH(TestObj*, objArg, V8TestObject::HasInstance(args[2], args.GetIsol
ate(), worldType(args.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Obj
ect>::Cast(args[2])) : 0); |
| 2378 imp->voidMethodWithArgs(longArg, strArg, objArg); | 2378 imp->voidMethodWithArgs(longArg, strArg, objArg); |
| 2379 return v8Undefined(); | 2379 return v8Undefined(); |
| 2380 } | 2380 } |
| 2381 | 2381 |
| 2382 static v8::Handle<v8::Value> voidMethodWithArgsMethodCallback(const v8::Argument
s& args) | 2382 static v8::Handle<v8::Value> voidMethodWithArgsMethodCallback(const v8::Argument
s& args) |
| 2383 { | 2383 { |
| 2384 return TestObjV8Internal::voidMethodWithArgsMethod(args); | 2384 return TestObjV8Internal::voidMethodWithArgsMethod(args); |
| 2385 } | 2385 } |
| 2386 | 2386 |
| 2387 static v8::Handle<v8::Value> longMethodMethod(const v8::Arguments& args) | 2387 static v8::Handle<v8::Value> longMethodMethod(const v8::Arguments& args) |
| 2388 { | 2388 { |
| 2389 TestObj* imp = V8TestObj::toNative(args.Holder()); | 2389 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 2390 return v8Integer(imp->longMethod(), args.GetIsolate()); | 2390 return v8Integer(imp->longMethod(), args.GetIsolate()); |
| 2391 } | 2391 } |
| 2392 | 2392 |
| 2393 static v8::Handle<v8::Value> longMethodMethodCallback(const v8::Arguments& args) | 2393 static v8::Handle<v8::Value> longMethodMethodCallback(const v8::Arguments& args) |
| 2394 { | 2394 { |
| 2395 return TestObjV8Internal::longMethodMethod(args); | 2395 return TestObjV8Internal::longMethodMethod(args); |
| 2396 } | 2396 } |
| 2397 | 2397 |
| 2398 static v8::Handle<v8::Value> longMethodWithArgsMethod(const v8::Arguments& args) | 2398 static v8::Handle<v8::Value> longMethodWithArgsMethod(const v8::Arguments& args) |
| 2399 { | 2399 { |
| 2400 if (args.Length() < 3) | 2400 if (args.Length() < 3) |
| 2401 return throwNotEnoughArgumentsError(args.GetIsolate()); | 2401 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 2402 TestObj* imp = V8TestObj::toNative(args.Holder()); | 2402 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 2403 V8TRYCATCH(int, longArg, toInt32(args[0])); | 2403 V8TRYCATCH(int, longArg, toInt32(args[0])); |
| 2404 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, strArg, args[1]); | 2404 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, strArg, args[1]); |
| 2405 V8TRYCATCH(TestObj*, objArg, V8TestObj::HasInstance(args[2], args.GetIsolate
(), worldType(args.GetIsolate())) ? V8TestObj::toNative(v8::Handle<v8::Object>::
Cast(args[2])) : 0); | 2405 V8TRYCATCH(TestObj*, objArg, V8TestObject::HasInstance(args[2], args.GetIsol
ate(), worldType(args.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Obj
ect>::Cast(args[2])) : 0); |
| 2406 return v8Integer(imp->longMethodWithArgs(longArg, strArg, objArg), args.GetI
solate()); | 2406 return v8Integer(imp->longMethodWithArgs(longArg, strArg, objArg), args.GetI
solate()); |
| 2407 } | 2407 } |
| 2408 | 2408 |
| 2409 static v8::Handle<v8::Value> longMethodWithArgsMethodCallback(const v8::Argument
s& args) | 2409 static v8::Handle<v8::Value> longMethodWithArgsMethodCallback(const v8::Argument
s& args) |
| 2410 { | 2410 { |
| 2411 return TestObjV8Internal::longMethodWithArgsMethod(args); | 2411 return TestObjV8Internal::longMethodWithArgsMethod(args); |
| 2412 } | 2412 } |
| 2413 | 2413 |
| 2414 static v8::Handle<v8::Value> objMethodMethod(const v8::Arguments& args) | 2414 static v8::Handle<v8::Value> objMethodMethod(const v8::Arguments& args) |
| 2415 { | 2415 { |
| 2416 TestObj* imp = V8TestObj::toNative(args.Holder()); | 2416 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 2417 return toV8(imp->objMethod(), args.Holder(), args.GetIsolate()); | 2417 return toV8(imp->objMethod(), args.Holder(), args.GetIsolate()); |
| 2418 } | 2418 } |
| 2419 | 2419 |
| 2420 static v8::Handle<v8::Value> objMethodMethodCallback(const v8::Arguments& args) | 2420 static v8::Handle<v8::Value> objMethodMethodCallback(const v8::Arguments& args) |
| 2421 { | 2421 { |
| 2422 UseCounter::count(activeDOMWindow(), UseCounter::TestFeature); | 2422 UseCounter::count(activeDOMWindow(), UseCounter::TestFeature); |
| 2423 return TestObjV8Internal::objMethodMethod(args); | 2423 return TestObjV8Internal::objMethodMethod(args); |
| 2424 } | 2424 } |
| 2425 | 2425 |
| 2426 static v8::Handle<v8::Value> objMethodWithArgsMethod(const v8::Arguments& args) | 2426 static v8::Handle<v8::Value> objMethodWithArgsMethod(const v8::Arguments& args) |
| 2427 { | 2427 { |
| 2428 if (args.Length() < 3) | 2428 if (args.Length() < 3) |
| 2429 return throwNotEnoughArgumentsError(args.GetIsolate()); | 2429 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 2430 TestObj* imp = V8TestObj::toNative(args.Holder()); | 2430 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 2431 V8TRYCATCH(int, longArg, toInt32(args[0])); | 2431 V8TRYCATCH(int, longArg, toInt32(args[0])); |
| 2432 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, strArg, args[1]); | 2432 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, strArg, args[1]); |
| 2433 V8TRYCATCH(TestObj*, objArg, V8TestObj::HasInstance(args[2], args.GetIsolate
(), worldType(args.GetIsolate())) ? V8TestObj::toNative(v8::Handle<v8::Object>::
Cast(args[2])) : 0); | 2433 V8TRYCATCH(TestObj*, objArg, V8TestObject::HasInstance(args[2], args.GetIsol
ate(), worldType(args.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Obj
ect>::Cast(args[2])) : 0); |
| 2434 return toV8(imp->objMethodWithArgs(longArg, strArg, objArg), args.Holder(),
args.GetIsolate()); | 2434 return toV8(imp->objMethodWithArgs(longArg, strArg, objArg), args.Holder(),
args.GetIsolate()); |
| 2435 } | 2435 } |
| 2436 | 2436 |
| 2437 static v8::Handle<v8::Value> objMethodWithArgsMethodCallback(const v8::Arguments
& args) | 2437 static v8::Handle<v8::Value> objMethodWithArgsMethodCallback(const v8::Arguments
& args) |
| 2438 { | 2438 { |
| 2439 return TestObjV8Internal::objMethodWithArgsMethod(args); | 2439 return TestObjV8Internal::objMethodWithArgsMethod(args); |
| 2440 } | 2440 } |
| 2441 | 2441 |
| 2442 static v8::Handle<v8::Value> methodWithSequenceArgMethod(const v8::Arguments& ar
gs) | 2442 static v8::Handle<v8::Value> methodWithSequenceArgMethod(const v8::Arguments& ar
gs) |
| 2443 { | 2443 { |
| 2444 if (args.Length() < 1) | 2444 if (args.Length() < 1) |
| 2445 return throwNotEnoughArgumentsError(args.GetIsolate()); | 2445 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 2446 TestObj* imp = V8TestObj::toNative(args.Holder()); | 2446 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 2447 V8TRYCATCH(Vector<RefPtr<ScriptProfile> >, sequenceArg, (toRefPtrNativeArray
<ScriptProfile, V8ScriptProfile>(args[0], args.GetIsolate()))); | 2447 V8TRYCATCH(Vector<RefPtr<ScriptProfile> >, sequenceArg, (toRefPtrNativeArray
<ScriptProfile, V8ScriptProfile>(args[0], args.GetIsolate()))); |
| 2448 imp->methodWithSequenceArg(sequenceArg); | 2448 imp->methodWithSequenceArg(sequenceArg); |
| 2449 return v8Undefined(); | 2449 return v8Undefined(); |
| 2450 } | 2450 } |
| 2451 | 2451 |
| 2452 static v8::Handle<v8::Value> methodWithSequenceArgMethodCallback(const v8::Argum
ents& args) | 2452 static v8::Handle<v8::Value> methodWithSequenceArgMethodCallback(const v8::Argum
ents& args) |
| 2453 { | 2453 { |
| 2454 return TestObjV8Internal::methodWithSequenceArgMethod(args); | 2454 return TestObjV8Internal::methodWithSequenceArgMethod(args); |
| 2455 } | 2455 } |
| 2456 | 2456 |
| 2457 static v8::Handle<v8::Value> methodReturningSequenceMethod(const v8::Arguments&
args) | 2457 static v8::Handle<v8::Value> methodReturningSequenceMethod(const v8::Arguments&
args) |
| 2458 { | 2458 { |
| 2459 if (args.Length() < 1) | 2459 if (args.Length() < 1) |
| 2460 return throwNotEnoughArgumentsError(args.GetIsolate()); | 2460 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 2461 TestObj* imp = V8TestObj::toNative(args.Holder()); | 2461 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 2462 V8TRYCATCH(int, longArg, toInt32(args[0])); | 2462 V8TRYCATCH(int, longArg, toInt32(args[0])); |
| 2463 return v8Array(imp->methodReturningSequence(longArg), args.GetIsolate()); | 2463 return v8Array(imp->methodReturningSequence(longArg), args.GetIsolate()); |
| 2464 } | 2464 } |
| 2465 | 2465 |
| 2466 static v8::Handle<v8::Value> methodReturningSequenceMethodCallback(const v8::Arg
uments& args) | 2466 static v8::Handle<v8::Value> methodReturningSequenceMethodCallback(const v8::Arg
uments& args) |
| 2467 { | 2467 { |
| 2468 return TestObjV8Internal::methodReturningSequenceMethod(args); | 2468 return TestObjV8Internal::methodReturningSequenceMethod(args); |
| 2469 } | 2469 } |
| 2470 | 2470 |
| 2471 static v8::Handle<v8::Value> methodWithEnumArgMethod(const v8::Arguments& args) | 2471 static v8::Handle<v8::Value> methodWithEnumArgMethod(const v8::Arguments& args) |
| 2472 { | 2472 { |
| 2473 if (args.Length() < 1) | 2473 if (args.Length() < 1) |
| 2474 return throwNotEnoughArgumentsError(args.GetIsolate()); | 2474 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 2475 TestObj* imp = V8TestObj::toNative(args.Holder()); | 2475 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 2476 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, enumArg, args[0]); | 2476 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, enumArg, args[0]); |
| 2477 String string = enumArg; | 2477 String string = enumArg; |
| 2478 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" || st
ring == "EnumValue3")) | 2478 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" || st
ring == "EnumValue3")) |
| 2479 return throwTypeError(0, args.GetIsolate()); | 2479 return throwTypeError(0, args.GetIsolate()); |
| 2480 imp->methodWithEnumArg(enumArg); | 2480 imp->methodWithEnumArg(enumArg); |
| 2481 return v8Undefined(); | 2481 return v8Undefined(); |
| 2482 } | 2482 } |
| 2483 | 2483 |
| 2484 static v8::Handle<v8::Value> methodWithEnumArgMethodCallback(const v8::Arguments
& args) | 2484 static v8::Handle<v8::Value> methodWithEnumArgMethodCallback(const v8::Arguments
& args) |
| 2485 { | 2485 { |
| 2486 return TestObjV8Internal::methodWithEnumArgMethod(args); | 2486 return TestObjV8Internal::methodWithEnumArgMethod(args); |
| 2487 } | 2487 } |
| 2488 | 2488 |
| 2489 static v8::Handle<v8::Value> methodThatRequiresAllArgsAndThrowsMethod(const v8::
Arguments& args) | 2489 static v8::Handle<v8::Value> methodThatRequiresAllArgsAndThrowsMethod(const v8::
Arguments& args) |
| 2490 { | 2490 { |
| 2491 if (args.Length() < 2) | 2491 if (args.Length() < 2) |
| 2492 return throwNotEnoughArgumentsError(args.GetIsolate()); | 2492 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 2493 TestObj* imp = V8TestObj::toNative(args.Holder()); | 2493 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 2494 ExceptionCode ec = 0; | 2494 ExceptionCode ec = 0; |
| 2495 { | 2495 { |
| 2496 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, strArg, args[0]); | 2496 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, strArg, args[0]); |
| 2497 V8TRYCATCH(TestObj*, objArg, V8TestObj::HasInstance(args[1], args.GetIsolate
(), worldType(args.GetIsolate())) ? V8TestObj::toNative(v8::Handle<v8::Object>::
Cast(args[1])) : 0); | 2497 V8TRYCATCH(TestObj*, objArg, V8TestObject::HasInstance(args[1], args.GetIsol
ate(), worldType(args.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Obj
ect>::Cast(args[1])) : 0); |
| 2498 RefPtr<TestObj> result = imp->methodThatRequiresAllArgsAndThrows(strArg, obj
Arg, ec); | 2498 RefPtr<TestObj> result = imp->methodThatRequiresAllArgsAndThrows(strArg, obj
Arg, ec); |
| 2499 if (UNLIKELY(ec)) | 2499 if (UNLIKELY(ec)) |
| 2500 goto fail; | 2500 goto fail; |
| 2501 return toV8(result.release(), args.Holder(), args.GetIsolate()); | 2501 return toV8(result.release(), args.Holder(), args.GetIsolate()); |
| 2502 } | 2502 } |
| 2503 fail: | 2503 fail: |
| 2504 return setDOMException(ec, args.GetIsolate()); | 2504 return setDOMException(ec, args.GetIsolate()); |
| 2505 } | 2505 } |
| 2506 | 2506 |
| 2507 static v8::Handle<v8::Value> methodThatRequiresAllArgsAndThrowsMethodCallback(co
nst v8::Arguments& args) | 2507 static v8::Handle<v8::Value> methodThatRequiresAllArgsAndThrowsMethodCallback(co
nst v8::Arguments& args) |
| 2508 { | 2508 { |
| 2509 return TestObjV8Internal::methodThatRequiresAllArgsAndThrowsMethod(args); | 2509 return TestObjV8Internal::methodThatRequiresAllArgsAndThrowsMethod(args); |
| 2510 } | 2510 } |
| 2511 | 2511 |
| 2512 static v8::Handle<v8::Value> serializedValueMethod(const v8::Arguments& args) | 2512 static v8::Handle<v8::Value> serializedValueMethod(const v8::Arguments& args) |
| 2513 { | 2513 { |
| 2514 if (args.Length() < 1) | 2514 if (args.Length() < 1) |
| 2515 return throwNotEnoughArgumentsError(args.GetIsolate()); | 2515 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 2516 TestObj* imp = V8TestObj::toNative(args.Holder()); | 2516 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 2517 bool serializedArgDidThrow = false; | 2517 bool serializedArgDidThrow = false; |
| 2518 RefPtr<SerializedScriptValue> serializedArg = SerializedScriptValue::create(
args[0], 0, 0, serializedArgDidThrow, args.GetIsolate()); | 2518 RefPtr<SerializedScriptValue> serializedArg = SerializedScriptValue::create(
args[0], 0, 0, serializedArgDidThrow, args.GetIsolate()); |
| 2519 if (serializedArgDidThrow) | 2519 if (serializedArgDidThrow) |
| 2520 return v8Undefined(); | 2520 return v8Undefined(); |
| 2521 imp->serializedValue(serializedArg); | 2521 imp->serializedValue(serializedArg); |
| 2522 return v8Undefined(); | 2522 return v8Undefined(); |
| 2523 } | 2523 } |
| 2524 | 2524 |
| 2525 static v8::Handle<v8::Value> serializedValueMethodCallback(const v8::Arguments&
args) | 2525 static v8::Handle<v8::Value> serializedValueMethodCallback(const v8::Arguments&
args) |
| 2526 { | 2526 { |
| 2527 return TestObjV8Internal::serializedValueMethod(args); | 2527 return TestObjV8Internal::serializedValueMethod(args); |
| 2528 } | 2528 } |
| 2529 | 2529 |
| 2530 static v8::Handle<v8::Value> optionsObjectMethod(const v8::Arguments& args) | 2530 static v8::Handle<v8::Value> optionsObjectMethod(const v8::Arguments& args) |
| 2531 { | 2531 { |
| 2532 if (args.Length() < 1) | 2532 if (args.Length() < 1) |
| 2533 return throwNotEnoughArgumentsError(args.GetIsolate()); | 2533 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 2534 TestObj* imp = V8TestObj::toNative(args.Holder()); | 2534 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 2535 V8TRYCATCH(Dictionary, oo, Dictionary(args[0], args.GetIsolate())); | 2535 V8TRYCATCH(Dictionary, oo, Dictionary(args[0], args.GetIsolate())); |
| 2536 if (!oo.isUndefinedOrNull() && !oo.isObject()) | 2536 if (!oo.isUndefinedOrNull() && !oo.isObject()) |
| 2537 return throwTypeError("Not an object.", args.GetIsolate()); | 2537 return throwTypeError("Not an object.", args.GetIsolate()); |
| 2538 V8TRYCATCH(Dictionary, ooo, Dictionary(args[1], args.GetIsolate())); | 2538 V8TRYCATCH(Dictionary, ooo, Dictionary(args[1], args.GetIsolate())); |
| 2539 if (!ooo.isUndefinedOrNull() && !ooo.isObject()) | 2539 if (!ooo.isUndefinedOrNull() && !ooo.isObject()) |
| 2540 return throwTypeError("Not an object.", args.GetIsolate()); | 2540 return throwTypeError("Not an object.", args.GetIsolate()); |
| 2541 imp->optionsObject(oo, ooo); | 2541 imp->optionsObject(oo, ooo); |
| 2542 return v8Undefined(); | 2542 return v8Undefined(); |
| 2543 } | 2543 } |
| 2544 | 2544 |
| 2545 static v8::Handle<v8::Value> optionsObjectMethodCallback(const v8::Arguments& ar
gs) | 2545 static v8::Handle<v8::Value> optionsObjectMethodCallback(const v8::Arguments& ar
gs) |
| 2546 { | 2546 { |
| 2547 return TestObjV8Internal::optionsObjectMethod(args); | 2547 return TestObjV8Internal::optionsObjectMethod(args); |
| 2548 } | 2548 } |
| 2549 | 2549 |
| 2550 static v8::Handle<v8::Value> methodWithExceptionMethod(const v8::Arguments& args
) | 2550 static v8::Handle<v8::Value> methodWithExceptionMethod(const v8::Arguments& args
) |
| 2551 { | 2551 { |
| 2552 TestObj* imp = V8TestObj::toNative(args.Holder()); | 2552 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 2553 ExceptionCode ec = 0; | 2553 ExceptionCode ec = 0; |
| 2554 { | 2554 { |
| 2555 imp->methodWithException(ec); | 2555 imp->methodWithException(ec); |
| 2556 if (UNLIKELY(ec)) | 2556 if (UNLIKELY(ec)) |
| 2557 goto fail; | 2557 goto fail; |
| 2558 return v8Undefined(); | 2558 return v8Undefined(); |
| 2559 } | 2559 } |
| 2560 fail: | 2560 fail: |
| 2561 return setDOMException(ec, args.GetIsolate()); | 2561 return setDOMException(ec, args.GetIsolate()); |
| 2562 } | 2562 } |
| 2563 | 2563 |
| 2564 static v8::Handle<v8::Value> methodWithExceptionMethodCallback(const v8::Argumen
ts& args) | 2564 static v8::Handle<v8::Value> methodWithExceptionMethodCallback(const v8::Argumen
ts& args) |
| 2565 { | 2565 { |
| 2566 return TestObjV8Internal::methodWithExceptionMethod(args); | 2566 return TestObjV8Internal::methodWithExceptionMethod(args); |
| 2567 } | 2567 } |
| 2568 | 2568 |
| 2569 static v8::Handle<v8::Value> customMethodMethodCallback(const v8::Arguments& arg
s) | 2569 static v8::Handle<v8::Value> customMethodMethodCallback(const v8::Arguments& arg
s) |
| 2570 { | 2570 { |
| 2571 UseCounter::count(activeDOMWindow(), UseCounter::CustomTestFeature); | 2571 UseCounter::count(activeDOMWindow(), UseCounter::CustomTestFeature); |
| 2572 return V8TestObj::customMethodMethodCustom(args); | 2572 return V8TestObject::customMethodMethodCustom(args); |
| 2573 } | 2573 } |
| 2574 | 2574 |
| 2575 static v8::Handle<v8::Value> customMethodWithArgsMethodCallback(const v8::Argume
nts& args) | 2575 static v8::Handle<v8::Value> customMethodWithArgsMethodCallback(const v8::Argume
nts& args) |
| 2576 { | 2576 { |
| 2577 return V8TestObj::customMethodWithArgsMethodCustom(args); | 2577 return V8TestObject::customMethodWithArgsMethodCustom(args); |
| 2578 } | 2578 } |
| 2579 | 2579 |
| 2580 static v8::Handle<v8::Value> addEventListenerMethod(const v8::Arguments& args) | 2580 static v8::Handle<v8::Value> addEventListenerMethod(const v8::Arguments& args) |
| 2581 { | 2581 { |
| 2582 RefPtr<EventListener> listener = V8EventListenerList::getEventListener(args[
1], false, ListenerFindOrCreate); | 2582 RefPtr<EventListener> listener = V8EventListenerList::getEventListener(args[
1], false, ListenerFindOrCreate); |
| 2583 if (listener) { | 2583 if (listener) { |
| 2584 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<WithNullCheck>, stringR
esource, args[0]); | 2584 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<WithNullCheck>, stringR
esource, args[0]); |
| 2585 V8TestObj::toNative(args.Holder())->addEventListener(stringResource, lis
tener, args[2]->BooleanValue()); | 2585 V8TestObject::toNative(args.Holder())->addEventListener(stringResource,
listener, args[2]->BooleanValue()); |
| 2586 createHiddenDependency(args.Holder(), args[1], V8TestObj::eventListenerC
acheIndex, args.GetIsolate()); | 2586 createHiddenDependency(args.Holder(), args[1], V8TestObject::eventListen
erCacheIndex, args.GetIsolate()); |
| 2587 } | 2587 } |
| 2588 return v8Undefined(); | 2588 return v8Undefined(); |
| 2589 } | 2589 } |
| 2590 | 2590 |
| 2591 static v8::Handle<v8::Value> addEventListenerMethodCallback(const v8::Arguments&
args) | 2591 static v8::Handle<v8::Value> addEventListenerMethodCallback(const v8::Arguments&
args) |
| 2592 { | 2592 { |
| 2593 return TestObjV8Internal::addEventListenerMethod(args); | 2593 return TestObjV8Internal::addEventListenerMethod(args); |
| 2594 } | 2594 } |
| 2595 | 2595 |
| 2596 static v8::Handle<v8::Value> removeEventListenerMethod(const v8::Arguments& args
) | 2596 static v8::Handle<v8::Value> removeEventListenerMethod(const v8::Arguments& args
) |
| 2597 { | 2597 { |
| 2598 RefPtr<EventListener> listener = V8EventListenerList::getEventListener(args[
1], false, ListenerFindOnly); | 2598 RefPtr<EventListener> listener = V8EventListenerList::getEventListener(args[
1], false, ListenerFindOnly); |
| 2599 if (listener) { | 2599 if (listener) { |
| 2600 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<WithNullCheck>, stringR
esource, args[0]); | 2600 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<WithNullCheck>, stringR
esource, args[0]); |
| 2601 V8TestObj::toNative(args.Holder())->removeEventListener(stringResource,
listener.get(), args[2]->BooleanValue()); | 2601 V8TestObject::toNative(args.Holder())->removeEventListener(stringResourc
e, listener.get(), args[2]->BooleanValue()); |
| 2602 removeHiddenDependency(args.Holder(), args[1], V8TestObj::eventListenerC
acheIndex, args.GetIsolate()); | 2602 removeHiddenDependency(args.Holder(), args[1], V8TestObject::eventListen
erCacheIndex, args.GetIsolate()); |
| 2603 } | 2603 } |
| 2604 return v8Undefined(); | 2604 return v8Undefined(); |
| 2605 } | 2605 } |
| 2606 | 2606 |
| 2607 static v8::Handle<v8::Value> removeEventListenerMethodCallback(const v8::Argumen
ts& args) | 2607 static v8::Handle<v8::Value> removeEventListenerMethodCallback(const v8::Argumen
ts& args) |
| 2608 { | 2608 { |
| 2609 return TestObjV8Internal::removeEventListenerMethod(args); | 2609 return TestObjV8Internal::removeEventListenerMethod(args); |
| 2610 } | 2610 } |
| 2611 | 2611 |
| 2612 static v8::Handle<v8::Value> withScriptStateVoidMethod(const v8::Arguments& args
) | 2612 static v8::Handle<v8::Value> withScriptStateVoidMethod(const v8::Arguments& args
) |
| 2613 { | 2613 { |
| 2614 TestObj* imp = V8TestObj::toNative(args.Holder()); | 2614 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 2615 ScriptState* currentState = ScriptState::current(); | 2615 ScriptState* currentState = ScriptState::current(); |
| 2616 if (!currentState) | 2616 if (!currentState) |
| 2617 return v8Undefined(); | 2617 return v8Undefined(); |
| 2618 ScriptState& state = *currentState; | 2618 ScriptState& state = *currentState; |
| 2619 imp->withScriptStateVoid(&state); | 2619 imp->withScriptStateVoid(&state); |
| 2620 if (state.hadException()) { | 2620 if (state.hadException()) { |
| 2621 v8::Local<v8::Value> exception = state.exception(); | 2621 v8::Local<v8::Value> exception = state.exception(); |
| 2622 state.clearException(); | 2622 state.clearException(); |
| 2623 return throwError(exception, args.GetIsolate()); | 2623 return throwError(exception, args.GetIsolate()); |
| 2624 } | 2624 } |
| 2625 return v8Undefined(); | 2625 return v8Undefined(); |
| 2626 } | 2626 } |
| 2627 | 2627 |
| 2628 static v8::Handle<v8::Value> withScriptStateVoidMethodCallback(const v8::Argumen
ts& args) | 2628 static v8::Handle<v8::Value> withScriptStateVoidMethodCallback(const v8::Argumen
ts& args) |
| 2629 { | 2629 { |
| 2630 return TestObjV8Internal::withScriptStateVoidMethod(args); | 2630 return TestObjV8Internal::withScriptStateVoidMethod(args); |
| 2631 } | 2631 } |
| 2632 | 2632 |
| 2633 static v8::Handle<v8::Value> withScriptStateObjMethod(const v8::Arguments& args) | 2633 static v8::Handle<v8::Value> withScriptStateObjMethod(const v8::Arguments& args) |
| 2634 { | 2634 { |
| 2635 TestObj* imp = V8TestObj::toNative(args.Holder()); | 2635 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 2636 ScriptState* currentState = ScriptState::current(); | 2636 ScriptState* currentState = ScriptState::current(); |
| 2637 if (!currentState) | 2637 if (!currentState) |
| 2638 return v8Undefined(); | 2638 return v8Undefined(); |
| 2639 ScriptState& state = *currentState; | 2639 ScriptState& state = *currentState; |
| 2640 RefPtr<TestObj> result = imp->withScriptStateObj(&state); | 2640 RefPtr<TestObj> result = imp->withScriptStateObj(&state); |
| 2641 if (state.hadException()) { | 2641 if (state.hadException()) { |
| 2642 v8::Local<v8::Value> exception = state.exception(); | 2642 v8::Local<v8::Value> exception = state.exception(); |
| 2643 state.clearException(); | 2643 state.clearException(); |
| 2644 return throwError(exception, args.GetIsolate()); | 2644 return throwError(exception, args.GetIsolate()); |
| 2645 } | 2645 } |
| 2646 return toV8(result.release(), args.Holder(), args.GetIsolate()); | 2646 return toV8(result.release(), args.Holder(), args.GetIsolate()); |
| 2647 } | 2647 } |
| 2648 | 2648 |
| 2649 static v8::Handle<v8::Value> withScriptStateObjMethodCallback(const v8::Argument
s& args) | 2649 static v8::Handle<v8::Value> withScriptStateObjMethodCallback(const v8::Argument
s& args) |
| 2650 { | 2650 { |
| 2651 return TestObjV8Internal::withScriptStateObjMethod(args); | 2651 return TestObjV8Internal::withScriptStateObjMethod(args); |
| 2652 } | 2652 } |
| 2653 | 2653 |
| 2654 static v8::Handle<v8::Value> withScriptStateVoidExceptionMethod(const v8::Argume
nts& args) | 2654 static v8::Handle<v8::Value> withScriptStateVoidExceptionMethod(const v8::Argume
nts& args) |
| 2655 { | 2655 { |
| 2656 TestObj* imp = V8TestObj::toNative(args.Holder()); | 2656 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 2657 ExceptionCode ec = 0; | 2657 ExceptionCode ec = 0; |
| 2658 { | 2658 { |
| 2659 ScriptState* currentState = ScriptState::current(); | 2659 ScriptState* currentState = ScriptState::current(); |
| 2660 if (!currentState) | 2660 if (!currentState) |
| 2661 return v8Undefined(); | 2661 return v8Undefined(); |
| 2662 ScriptState& state = *currentState; | 2662 ScriptState& state = *currentState; |
| 2663 imp->withScriptStateVoidException(&state, ec); | 2663 imp->withScriptStateVoidException(&state, ec); |
| 2664 if (UNLIKELY(ec)) | 2664 if (UNLIKELY(ec)) |
| 2665 goto fail; | 2665 goto fail; |
| 2666 if (state.hadException()) { | 2666 if (state.hadException()) { |
| 2667 v8::Local<v8::Value> exception = state.exception(); | 2667 v8::Local<v8::Value> exception = state.exception(); |
| 2668 state.clearException(); | 2668 state.clearException(); |
| 2669 return throwError(exception, args.GetIsolate()); | 2669 return throwError(exception, args.GetIsolate()); |
| 2670 } | 2670 } |
| 2671 return v8Undefined(); | 2671 return v8Undefined(); |
| 2672 } | 2672 } |
| 2673 fail: | 2673 fail: |
| 2674 return setDOMException(ec, args.GetIsolate()); | 2674 return setDOMException(ec, args.GetIsolate()); |
| 2675 } | 2675 } |
| 2676 | 2676 |
| 2677 static v8::Handle<v8::Value> withScriptStateVoidExceptionMethodCallback(const v8
::Arguments& args) | 2677 static v8::Handle<v8::Value> withScriptStateVoidExceptionMethodCallback(const v8
::Arguments& args) |
| 2678 { | 2678 { |
| 2679 return TestObjV8Internal::withScriptStateVoidExceptionMethod(args); | 2679 return TestObjV8Internal::withScriptStateVoidExceptionMethod(args); |
| 2680 } | 2680 } |
| 2681 | 2681 |
| 2682 static v8::Handle<v8::Value> withScriptStateObjExceptionMethod(const v8::Argumen
ts& args) | 2682 static v8::Handle<v8::Value> withScriptStateObjExceptionMethod(const v8::Argumen
ts& args) |
| 2683 { | 2683 { |
| 2684 TestObj* imp = V8TestObj::toNative(args.Holder()); | 2684 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 2685 ExceptionCode ec = 0; | 2685 ExceptionCode ec = 0; |
| 2686 { | 2686 { |
| 2687 ScriptState* currentState = ScriptState::current(); | 2687 ScriptState* currentState = ScriptState::current(); |
| 2688 if (!currentState) | 2688 if (!currentState) |
| 2689 return v8Undefined(); | 2689 return v8Undefined(); |
| 2690 ScriptState& state = *currentState; | 2690 ScriptState& state = *currentState; |
| 2691 RefPtr<TestObj> result = imp->withScriptStateObjException(&state, ec); | 2691 RefPtr<TestObj> result = imp->withScriptStateObjException(&state, ec); |
| 2692 if (UNLIKELY(ec)) | 2692 if (UNLIKELY(ec)) |
| 2693 goto fail; | 2693 goto fail; |
| 2694 if (state.hadException()) { | 2694 if (state.hadException()) { |
| 2695 v8::Local<v8::Value> exception = state.exception(); | 2695 v8::Local<v8::Value> exception = state.exception(); |
| 2696 state.clearException(); | 2696 state.clearException(); |
| 2697 return throwError(exception, args.GetIsolate()); | 2697 return throwError(exception, args.GetIsolate()); |
| 2698 } | 2698 } |
| 2699 return toV8(result.release(), args.Holder(), args.GetIsolate()); | 2699 return toV8(result.release(), args.Holder(), args.GetIsolate()); |
| 2700 } | 2700 } |
| 2701 fail: | 2701 fail: |
| 2702 return setDOMException(ec, args.GetIsolate()); | 2702 return setDOMException(ec, args.GetIsolate()); |
| 2703 } | 2703 } |
| 2704 | 2704 |
| 2705 static v8::Handle<v8::Value> withScriptStateObjExceptionMethodCallback(const v8:
:Arguments& args) | 2705 static v8::Handle<v8::Value> withScriptStateObjExceptionMethodCallback(const v8:
:Arguments& args) |
| 2706 { | 2706 { |
| 2707 return TestObjV8Internal::withScriptStateObjExceptionMethod(args); | 2707 return TestObjV8Internal::withScriptStateObjExceptionMethod(args); |
| 2708 } | 2708 } |
| 2709 | 2709 |
| 2710 static v8::Handle<v8::Value> withScriptExecutionContextMethod(const v8::Argument
s& args) | 2710 static v8::Handle<v8::Value> withScriptExecutionContextMethod(const v8::Argument
s& args) |
| 2711 { | 2711 { |
| 2712 TestObj* imp = V8TestObj::toNative(args.Holder()); | 2712 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 2713 ScriptExecutionContext* scriptContext = getScriptExecutionContext(); | 2713 ScriptExecutionContext* scriptContext = getScriptExecutionContext(); |
| 2714 imp->withScriptExecutionContext(scriptContext); | 2714 imp->withScriptExecutionContext(scriptContext); |
| 2715 return v8Undefined(); | 2715 return v8Undefined(); |
| 2716 } | 2716 } |
| 2717 | 2717 |
| 2718 static v8::Handle<v8::Value> withScriptExecutionContextMethodCallback(const v8::
Arguments& args) | 2718 static v8::Handle<v8::Value> withScriptExecutionContextMethodCallback(const v8::
Arguments& args) |
| 2719 { | 2719 { |
| 2720 return TestObjV8Internal::withScriptExecutionContextMethod(args); | 2720 return TestObjV8Internal::withScriptExecutionContextMethod(args); |
| 2721 } | 2721 } |
| 2722 | 2722 |
| 2723 static v8::Handle<v8::Value> withScriptExecutionContextAndScriptStateMethod(cons
t v8::Arguments& args) | 2723 static v8::Handle<v8::Value> withScriptExecutionContextAndScriptStateMethod(cons
t v8::Arguments& args) |
| 2724 { | 2724 { |
| 2725 TestObj* imp = V8TestObj::toNative(args.Holder()); | 2725 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 2726 ScriptState* currentState = ScriptState::current(); | 2726 ScriptState* currentState = ScriptState::current(); |
| 2727 if (!currentState) | 2727 if (!currentState) |
| 2728 return v8Undefined(); | 2728 return v8Undefined(); |
| 2729 ScriptState& state = *currentState; | 2729 ScriptState& state = *currentState; |
| 2730 ScriptExecutionContext* scriptContext = getScriptExecutionContext(); | 2730 ScriptExecutionContext* scriptContext = getScriptExecutionContext(); |
| 2731 imp->withScriptExecutionContextAndScriptState(&state, scriptContext); | 2731 imp->withScriptExecutionContextAndScriptState(&state, scriptContext); |
| 2732 if (state.hadException()) { | 2732 if (state.hadException()) { |
| 2733 v8::Local<v8::Value> exception = state.exception(); | 2733 v8::Local<v8::Value> exception = state.exception(); |
| 2734 state.clearException(); | 2734 state.clearException(); |
| 2735 return throwError(exception, args.GetIsolate()); | 2735 return throwError(exception, args.GetIsolate()); |
| 2736 } | 2736 } |
| 2737 return v8Undefined(); | 2737 return v8Undefined(); |
| 2738 } | 2738 } |
| 2739 | 2739 |
| 2740 static v8::Handle<v8::Value> withScriptExecutionContextAndScriptStateMethodCallb
ack(const v8::Arguments& args) | 2740 static v8::Handle<v8::Value> withScriptExecutionContextAndScriptStateMethodCallb
ack(const v8::Arguments& args) |
| 2741 { | 2741 { |
| 2742 return TestObjV8Internal::withScriptExecutionContextAndScriptStateMethod(arg
s); | 2742 return TestObjV8Internal::withScriptExecutionContextAndScriptStateMethod(arg
s); |
| 2743 } | 2743 } |
| 2744 | 2744 |
| 2745 static v8::Handle<v8::Value> withScriptExecutionContextAndScriptStateObjExceptio
nMethod(const v8::Arguments& args) | 2745 static v8::Handle<v8::Value> withScriptExecutionContextAndScriptStateObjExceptio
nMethod(const v8::Arguments& args) |
| 2746 { | 2746 { |
| 2747 TestObj* imp = V8TestObj::toNative(args.Holder()); | 2747 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 2748 ExceptionCode ec = 0; | 2748 ExceptionCode ec = 0; |
| 2749 { | 2749 { |
| 2750 ScriptState* currentState = ScriptState::current(); | 2750 ScriptState* currentState = ScriptState::current(); |
| 2751 if (!currentState) | 2751 if (!currentState) |
| 2752 return v8Undefined(); | 2752 return v8Undefined(); |
| 2753 ScriptState& state = *currentState; | 2753 ScriptState& state = *currentState; |
| 2754 ScriptExecutionContext* scriptContext = getScriptExecutionContext(); | 2754 ScriptExecutionContext* scriptContext = getScriptExecutionContext(); |
| 2755 RefPtr<TestObj> result = imp->withScriptExecutionContextAndScriptStateObjExc
eption(&state, scriptContext, ec); | 2755 RefPtr<TestObj> result = imp->withScriptExecutionContextAndScriptStateObjExc
eption(&state, scriptContext, ec); |
| 2756 if (UNLIKELY(ec)) | 2756 if (UNLIKELY(ec)) |
| 2757 goto fail; | 2757 goto fail; |
| 2758 if (state.hadException()) { | 2758 if (state.hadException()) { |
| 2759 v8::Local<v8::Value> exception = state.exception(); | 2759 v8::Local<v8::Value> exception = state.exception(); |
| 2760 state.clearException(); | 2760 state.clearException(); |
| 2761 return throwError(exception, args.GetIsolate()); | 2761 return throwError(exception, args.GetIsolate()); |
| 2762 } | 2762 } |
| 2763 return toV8(result.release(), args.Holder(), args.GetIsolate()); | 2763 return toV8(result.release(), args.Holder(), args.GetIsolate()); |
| 2764 } | 2764 } |
| 2765 fail: | 2765 fail: |
| 2766 return setDOMException(ec, args.GetIsolate()); | 2766 return setDOMException(ec, args.GetIsolate()); |
| 2767 } | 2767 } |
| 2768 | 2768 |
| 2769 static v8::Handle<v8::Value> withScriptExecutionContextAndScriptStateObjExceptio
nMethodCallback(const v8::Arguments& args) | 2769 static v8::Handle<v8::Value> withScriptExecutionContextAndScriptStateObjExceptio
nMethodCallback(const v8::Arguments& args) |
| 2770 { | 2770 { |
| 2771 return TestObjV8Internal::withScriptExecutionContextAndScriptStateObjExcepti
onMethod(args); | 2771 return TestObjV8Internal::withScriptExecutionContextAndScriptStateObjExcepti
onMethod(args); |
| 2772 } | 2772 } |
| 2773 | 2773 |
| 2774 static v8::Handle<v8::Value> withScriptExecutionContextAndScriptStateWithSpacesM
ethod(const v8::Arguments& args) | 2774 static v8::Handle<v8::Value> withScriptExecutionContextAndScriptStateWithSpacesM
ethod(const v8::Arguments& args) |
| 2775 { | 2775 { |
| 2776 TestObj* imp = V8TestObj::toNative(args.Holder()); | 2776 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 2777 ScriptState* currentState = ScriptState::current(); | 2777 ScriptState* currentState = ScriptState::current(); |
| 2778 if (!currentState) | 2778 if (!currentState) |
| 2779 return v8Undefined(); | 2779 return v8Undefined(); |
| 2780 ScriptState& state = *currentState; | 2780 ScriptState& state = *currentState; |
| 2781 ScriptExecutionContext* scriptContext = getScriptExecutionContext(); | 2781 ScriptExecutionContext* scriptContext = getScriptExecutionContext(); |
| 2782 RefPtr<TestObj> result = imp->withScriptExecutionContextAndScriptStateWithSp
aces(&state, scriptContext); | 2782 RefPtr<TestObj> result = imp->withScriptExecutionContextAndScriptStateWithSp
aces(&state, scriptContext); |
| 2783 if (state.hadException()) { | 2783 if (state.hadException()) { |
| 2784 v8::Local<v8::Value> exception = state.exception(); | 2784 v8::Local<v8::Value> exception = state.exception(); |
| 2785 state.clearException(); | 2785 state.clearException(); |
| 2786 return throwError(exception, args.GetIsolate()); | 2786 return throwError(exception, args.GetIsolate()); |
| 2787 } | 2787 } |
| 2788 return toV8(result.release(), args.Holder(), args.GetIsolate()); | 2788 return toV8(result.release(), args.Holder(), args.GetIsolate()); |
| 2789 } | 2789 } |
| 2790 | 2790 |
| 2791 static v8::Handle<v8::Value> withScriptExecutionContextAndScriptStateWithSpacesM
ethodCallback(const v8::Arguments& args) | 2791 static v8::Handle<v8::Value> withScriptExecutionContextAndScriptStateWithSpacesM
ethodCallback(const v8::Arguments& args) |
| 2792 { | 2792 { |
| 2793 return TestObjV8Internal::withScriptExecutionContextAndScriptStateWithSpaces
Method(args); | 2793 return TestObjV8Internal::withScriptExecutionContextAndScriptStateWithSpaces
Method(args); |
| 2794 } | 2794 } |
| 2795 | 2795 |
| 2796 static v8::Handle<v8::Value> methodWithOptionalArgMethod(const v8::Arguments& ar
gs) | 2796 static v8::Handle<v8::Value> methodWithOptionalArgMethod(const v8::Arguments& ar
gs) |
| 2797 { | 2797 { |
| 2798 TestObj* imp = V8TestObj::toNative(args.Holder()); | 2798 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 2799 if (args.Length() <= 0) { | 2799 if (args.Length() <= 0) { |
| 2800 imp->methodWithOptionalArg(); | 2800 imp->methodWithOptionalArg(); |
| 2801 return v8Undefined(); | 2801 return v8Undefined(); |
| 2802 } | 2802 } |
| 2803 V8TRYCATCH(int, opt, toInt32(args[0])); | 2803 V8TRYCATCH(int, opt, toInt32(args[0])); |
| 2804 imp->methodWithOptionalArg(opt); | 2804 imp->methodWithOptionalArg(opt); |
| 2805 return v8Undefined(); | 2805 return v8Undefined(); |
| 2806 } | 2806 } |
| 2807 | 2807 |
| 2808 static v8::Handle<v8::Value> methodWithOptionalArgMethodCallback(const v8::Argum
ents& args) | 2808 static v8::Handle<v8::Value> methodWithOptionalArgMethodCallback(const v8::Argum
ents& args) |
| 2809 { | 2809 { |
| 2810 return TestObjV8Internal::methodWithOptionalArgMethod(args); | 2810 return TestObjV8Internal::methodWithOptionalArgMethod(args); |
| 2811 } | 2811 } |
| 2812 | 2812 |
| 2813 static v8::Handle<v8::Value> methodWithNonOptionalArgAndOptionalArgMethod(const
v8::Arguments& args) | 2813 static v8::Handle<v8::Value> methodWithNonOptionalArgAndOptionalArgMethod(const
v8::Arguments& args) |
| 2814 { | 2814 { |
| 2815 if (args.Length() < 1) | 2815 if (args.Length() < 1) |
| 2816 return throwNotEnoughArgumentsError(args.GetIsolate()); | 2816 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 2817 TestObj* imp = V8TestObj::toNative(args.Holder()); | 2817 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 2818 V8TRYCATCH(int, nonOpt, toInt32(args[0])); | 2818 V8TRYCATCH(int, nonOpt, toInt32(args[0])); |
| 2819 if (args.Length() <= 1) { | 2819 if (args.Length() <= 1) { |
| 2820 imp->methodWithNonOptionalArgAndOptionalArg(nonOpt); | 2820 imp->methodWithNonOptionalArgAndOptionalArg(nonOpt); |
| 2821 return v8Undefined(); | 2821 return v8Undefined(); |
| 2822 } | 2822 } |
| 2823 V8TRYCATCH(int, opt, toInt32(args[1])); | 2823 V8TRYCATCH(int, opt, toInt32(args[1])); |
| 2824 imp->methodWithNonOptionalArgAndOptionalArg(nonOpt, opt); | 2824 imp->methodWithNonOptionalArgAndOptionalArg(nonOpt, opt); |
| 2825 return v8Undefined(); | 2825 return v8Undefined(); |
| 2826 } | 2826 } |
| 2827 | 2827 |
| 2828 static v8::Handle<v8::Value> methodWithNonOptionalArgAndOptionalArgMethodCallbac
k(const v8::Arguments& args) | 2828 static v8::Handle<v8::Value> methodWithNonOptionalArgAndOptionalArgMethodCallbac
k(const v8::Arguments& args) |
| 2829 { | 2829 { |
| 2830 return TestObjV8Internal::methodWithNonOptionalArgAndOptionalArgMethod(args)
; | 2830 return TestObjV8Internal::methodWithNonOptionalArgAndOptionalArgMethod(args)
; |
| 2831 } | 2831 } |
| 2832 | 2832 |
| 2833 static v8::Handle<v8::Value> methodWithNonOptionalArgAndTwoOptionalArgsMethod(co
nst v8::Arguments& args) | 2833 static v8::Handle<v8::Value> methodWithNonOptionalArgAndTwoOptionalArgsMethod(co
nst v8::Arguments& args) |
| 2834 { | 2834 { |
| 2835 if (args.Length() < 1) | 2835 if (args.Length() < 1) |
| 2836 return throwNotEnoughArgumentsError(args.GetIsolate()); | 2836 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 2837 TestObj* imp = V8TestObj::toNative(args.Holder()); | 2837 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 2838 V8TRYCATCH(int, nonOpt, toInt32(args[0])); | 2838 V8TRYCATCH(int, nonOpt, toInt32(args[0])); |
| 2839 if (args.Length() <= 1) { | 2839 if (args.Length() <= 1) { |
| 2840 imp->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt); | 2840 imp->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt); |
| 2841 return v8Undefined(); | 2841 return v8Undefined(); |
| 2842 } | 2842 } |
| 2843 V8TRYCATCH(int, opt1, toInt32(args[1])); | 2843 V8TRYCATCH(int, opt1, toInt32(args[1])); |
| 2844 if (args.Length() <= 2) { | 2844 if (args.Length() <= 2) { |
| 2845 imp->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt, opt1); | 2845 imp->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt, opt1); |
| 2846 return v8Undefined(); | 2846 return v8Undefined(); |
| 2847 } | 2847 } |
| 2848 V8TRYCATCH(int, opt2, toInt32(args[2])); | 2848 V8TRYCATCH(int, opt2, toInt32(args[2])); |
| 2849 imp->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt, opt1, opt2); | 2849 imp->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt, opt1, opt2); |
| 2850 return v8Undefined(); | 2850 return v8Undefined(); |
| 2851 } | 2851 } |
| 2852 | 2852 |
| 2853 static v8::Handle<v8::Value> methodWithNonOptionalArgAndTwoOptionalArgsMethodCal
lback(const v8::Arguments& args) | 2853 static v8::Handle<v8::Value> methodWithNonOptionalArgAndTwoOptionalArgsMethodCal
lback(const v8::Arguments& args) |
| 2854 { | 2854 { |
| 2855 return TestObjV8Internal::methodWithNonOptionalArgAndTwoOptionalArgsMethod(a
rgs); | 2855 return TestObjV8Internal::methodWithNonOptionalArgAndTwoOptionalArgsMethod(a
rgs); |
| 2856 } | 2856 } |
| 2857 | 2857 |
| 2858 static v8::Handle<v8::Value> methodWithOptionalStringMethod(const v8::Arguments&
args) | 2858 static v8::Handle<v8::Value> methodWithOptionalStringMethod(const v8::Arguments&
args) |
| 2859 { | 2859 { |
| 2860 TestObj* imp = V8TestObj::toNative(args.Holder()); | 2860 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 2861 if (args.Length() <= 0) { | 2861 if (args.Length() <= 0) { |
| 2862 imp->methodWithOptionalString(); | 2862 imp->methodWithOptionalString(); |
| 2863 return v8Undefined(); | 2863 return v8Undefined(); |
| 2864 } | 2864 } |
| 2865 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, str, args[0]); | 2865 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, str, args[0]); |
| 2866 imp->methodWithOptionalString(str); | 2866 imp->methodWithOptionalString(str); |
| 2867 return v8Undefined(); | 2867 return v8Undefined(); |
| 2868 } | 2868 } |
| 2869 | 2869 |
| 2870 static v8::Handle<v8::Value> methodWithOptionalStringMethodCallback(const v8::Ar
guments& args) | 2870 static v8::Handle<v8::Value> methodWithOptionalStringMethodCallback(const v8::Ar
guments& args) |
| 2871 { | 2871 { |
| 2872 return TestObjV8Internal::methodWithOptionalStringMethod(args); | 2872 return TestObjV8Internal::methodWithOptionalStringMethod(args); |
| 2873 } | 2873 } |
| 2874 | 2874 |
| 2875 static v8::Handle<v8::Value> methodWithOptionalStringIsUndefinedMethod(const v8:
:Arguments& args) | 2875 static v8::Handle<v8::Value> methodWithOptionalStringIsUndefinedMethod(const v8:
:Arguments& args) |
| 2876 { | 2876 { |
| 2877 TestObj* imp = V8TestObj::toNative(args.Holder()); | 2877 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 2878 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, str, args[0]); | 2878 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, str, args[0]); |
| 2879 imp->methodWithOptionalStringIsUndefined(str); | 2879 imp->methodWithOptionalStringIsUndefined(str); |
| 2880 return v8Undefined(); | 2880 return v8Undefined(); |
| 2881 } | 2881 } |
| 2882 | 2882 |
| 2883 static v8::Handle<v8::Value> methodWithOptionalStringIsUndefinedMethodCallback(c
onst v8::Arguments& args) | 2883 static v8::Handle<v8::Value> methodWithOptionalStringIsUndefinedMethodCallback(c
onst v8::Arguments& args) |
| 2884 { | 2884 { |
| 2885 return TestObjV8Internal::methodWithOptionalStringIsUndefinedMethod(args); | 2885 return TestObjV8Internal::methodWithOptionalStringIsUndefinedMethod(args); |
| 2886 } | 2886 } |
| 2887 | 2887 |
| 2888 static v8::Handle<v8::Value> methodWithOptionalStringIsNullStringMethod(const v8
::Arguments& args) | 2888 static v8::Handle<v8::Value> methodWithOptionalStringIsNullStringMethod(const v8
::Arguments& args) |
| 2889 { | 2889 { |
| 2890 TestObj* imp = V8TestObj::toNative(args.Holder()); | 2890 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 2891 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, str, argumentOrNull(args
, 0)); | 2891 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, str, argumentOrNull(args
, 0)); |
| 2892 imp->methodWithOptionalStringIsNullString(str); | 2892 imp->methodWithOptionalStringIsNullString(str); |
| 2893 return v8Undefined(); | 2893 return v8Undefined(); |
| 2894 } | 2894 } |
| 2895 | 2895 |
| 2896 static v8::Handle<v8::Value> methodWithOptionalStringIsNullStringMethodCallback(
const v8::Arguments& args) | 2896 static v8::Handle<v8::Value> methodWithOptionalStringIsNullStringMethodCallback(
const v8::Arguments& args) |
| 2897 { | 2897 { |
| 2898 return TestObjV8Internal::methodWithOptionalStringIsNullStringMethod(args); | 2898 return TestObjV8Internal::methodWithOptionalStringIsNullStringMethod(args); |
| 2899 } | 2899 } |
| 2900 | 2900 |
| 2901 static v8::Handle<v8::Value> methodWithCallbackArgMethod(const v8::Arguments& ar
gs) | 2901 static v8::Handle<v8::Value> methodWithCallbackArgMethod(const v8::Arguments& ar
gs) |
| 2902 { | 2902 { |
| 2903 if (args.Length() < 1) | 2903 if (args.Length() < 1) |
| 2904 return throwNotEnoughArgumentsError(args.GetIsolate()); | 2904 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 2905 TestObj* imp = V8TestObj::toNative(args.Holder()); | 2905 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 2906 if (args.Length() <= 0 || !args[0]->IsFunction()) | 2906 if (args.Length() <= 0 || !args[0]->IsFunction()) |
| 2907 return throwTypeError(0, args.GetIsolate()); | 2907 return throwTypeError(0, args.GetIsolate()); |
| 2908 RefPtr<TestCallback> callback = V8TestCallback::create(args[0], getScriptExe
cutionContext()); | 2908 RefPtr<TestCallback> callback = V8TestCallback::create(args[0], getScriptExe
cutionContext()); |
| 2909 imp->methodWithCallbackArg(callback); | 2909 imp->methodWithCallbackArg(callback); |
| 2910 return v8Undefined(); | 2910 return v8Undefined(); |
| 2911 } | 2911 } |
| 2912 | 2912 |
| 2913 static v8::Handle<v8::Value> methodWithCallbackArgMethodCallback(const v8::Argum
ents& args) | 2913 static v8::Handle<v8::Value> methodWithCallbackArgMethodCallback(const v8::Argum
ents& args) |
| 2914 { | 2914 { |
| 2915 return TestObjV8Internal::methodWithCallbackArgMethod(args); | 2915 return TestObjV8Internal::methodWithCallbackArgMethod(args); |
| 2916 } | 2916 } |
| 2917 | 2917 |
| 2918 static v8::Handle<v8::Value> methodWithNonCallbackArgAndCallbackArgMethod(const
v8::Arguments& args) | 2918 static v8::Handle<v8::Value> methodWithNonCallbackArgAndCallbackArgMethod(const
v8::Arguments& args) |
| 2919 { | 2919 { |
| 2920 if (args.Length() < 2) | 2920 if (args.Length() < 2) |
| 2921 return throwNotEnoughArgumentsError(args.GetIsolate()); | 2921 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 2922 TestObj* imp = V8TestObj::toNative(args.Holder()); | 2922 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 2923 V8TRYCATCH(int, nonCallback, toInt32(args[0])); | 2923 V8TRYCATCH(int, nonCallback, toInt32(args[0])); |
| 2924 if (args.Length() <= 1 || !args[1]->IsFunction()) | 2924 if (args.Length() <= 1 || !args[1]->IsFunction()) |
| 2925 return throwTypeError(0, args.GetIsolate()); | 2925 return throwTypeError(0, args.GetIsolate()); |
| 2926 RefPtr<TestCallback> callback = V8TestCallback::create(args[1], getScriptExe
cutionContext()); | 2926 RefPtr<TestCallback> callback = V8TestCallback::create(args[1], getScriptExe
cutionContext()); |
| 2927 imp->methodWithNonCallbackArgAndCallbackArg(nonCallback, callback); | 2927 imp->methodWithNonCallbackArgAndCallbackArg(nonCallback, callback); |
| 2928 return v8Undefined(); | 2928 return v8Undefined(); |
| 2929 } | 2929 } |
| 2930 | 2930 |
| 2931 static v8::Handle<v8::Value> methodWithNonCallbackArgAndCallbackArgMethodCallbac
k(const v8::Arguments& args) | 2931 static v8::Handle<v8::Value> methodWithNonCallbackArgAndCallbackArgMethodCallbac
k(const v8::Arguments& args) |
| 2932 { | 2932 { |
| 2933 return TestObjV8Internal::methodWithNonCallbackArgAndCallbackArgMethod(args)
; | 2933 return TestObjV8Internal::methodWithNonCallbackArgAndCallbackArgMethod(args)
; |
| 2934 } | 2934 } |
| 2935 | 2935 |
| 2936 static v8::Handle<v8::Value> methodWithCallbackAndOptionalArgMethod(const v8::Ar
guments& args) | 2936 static v8::Handle<v8::Value> methodWithCallbackAndOptionalArgMethod(const v8::Ar
guments& args) |
| 2937 { | 2937 { |
| 2938 TestObj* imp = V8TestObj::toNative(args.Holder()); | 2938 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 2939 RefPtr<TestCallback> callback; | 2939 RefPtr<TestCallback> callback; |
| 2940 if (args.Length() > 0 && !args[0]->IsNull() && !args[0]->IsUndefined()) { | 2940 if (args.Length() > 0 && !args[0]->IsNull() && !args[0]->IsUndefined()) { |
| 2941 if (!args[0]->IsFunction()) | 2941 if (!args[0]->IsFunction()) |
| 2942 return throwTypeError(0, args.GetIsolate()); | 2942 return throwTypeError(0, args.GetIsolate()); |
| 2943 callback = V8TestCallback::create(args[0], getScriptExecutionContext()); | 2943 callback = V8TestCallback::create(args[0], getScriptExecutionContext()); |
| 2944 } | 2944 } |
| 2945 imp->methodWithCallbackAndOptionalArg(callback); | 2945 imp->methodWithCallbackAndOptionalArg(callback); |
| 2946 return v8Undefined(); | 2946 return v8Undefined(); |
| 2947 } | 2947 } |
| 2948 | 2948 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2981 | 2981 |
| 2982 static v8::Handle<v8::Value> staticMethodWithCallbackArgMethodCallback(const v8:
:Arguments& args) | 2982 static v8::Handle<v8::Value> staticMethodWithCallbackArgMethodCallback(const v8:
:Arguments& args) |
| 2983 { | 2983 { |
| 2984 return TestObjV8Internal::staticMethodWithCallbackArgMethod(args); | 2984 return TestObjV8Internal::staticMethodWithCallbackArgMethod(args); |
| 2985 } | 2985 } |
| 2986 | 2986 |
| 2987 static v8::Handle<v8::Value> methodWithEnforceRangeInt32Method(const v8::Argumen
ts& args) | 2987 static v8::Handle<v8::Value> methodWithEnforceRangeInt32Method(const v8::Argumen
ts& args) |
| 2988 { | 2988 { |
| 2989 if (args.Length() < 1) | 2989 if (args.Length() < 1) |
| 2990 return throwNotEnoughArgumentsError(args.GetIsolate()); | 2990 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 2991 TestObj* imp = V8TestObj::toNative(args.Holder()); | 2991 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 2992 V8TRYCATCH_WITH_TYPECHECK(int, value, toInt32(args[0], EnforceRange, ok), ar
gs.GetIsolate()); | 2992 V8TRYCATCH_WITH_TYPECHECK(int, value, toInt32(args[0], EnforceRange, ok), ar
gs.GetIsolate()); |
| 2993 imp->methodWithEnforceRangeInt32(value); | 2993 imp->methodWithEnforceRangeInt32(value); |
| 2994 return v8Undefined(); | 2994 return v8Undefined(); |
| 2995 } | 2995 } |
| 2996 | 2996 |
| 2997 static v8::Handle<v8::Value> methodWithEnforceRangeInt32MethodCallback(const v8:
:Arguments& args) | 2997 static v8::Handle<v8::Value> methodWithEnforceRangeInt32MethodCallback(const v8:
:Arguments& args) |
| 2998 { | 2998 { |
| 2999 return TestObjV8Internal::methodWithEnforceRangeInt32Method(args); | 2999 return TestObjV8Internal::methodWithEnforceRangeInt32Method(args); |
| 3000 } | 3000 } |
| 3001 | 3001 |
| 3002 static v8::Handle<v8::Value> methodWithEnforceRangeUInt32Method(const v8::Argume
nts& args) | 3002 static v8::Handle<v8::Value> methodWithEnforceRangeUInt32Method(const v8::Argume
nts& args) |
| 3003 { | 3003 { |
| 3004 if (args.Length() < 1) | 3004 if (args.Length() < 1) |
| 3005 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3005 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3006 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3006 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3007 V8TRYCATCH_WITH_TYPECHECK(unsigned, value, toUInt32(args[0], EnforceRange, o
k), args.GetIsolate()); | 3007 V8TRYCATCH_WITH_TYPECHECK(unsigned, value, toUInt32(args[0], EnforceRange, o
k), args.GetIsolate()); |
| 3008 imp->methodWithEnforceRangeUInt32(value); | 3008 imp->methodWithEnforceRangeUInt32(value); |
| 3009 return v8Undefined(); | 3009 return v8Undefined(); |
| 3010 } | 3010 } |
| 3011 | 3011 |
| 3012 static v8::Handle<v8::Value> methodWithEnforceRangeUInt32MethodCallback(const v8
::Arguments& args) | 3012 static v8::Handle<v8::Value> methodWithEnforceRangeUInt32MethodCallback(const v8
::Arguments& args) |
| 3013 { | 3013 { |
| 3014 return TestObjV8Internal::methodWithEnforceRangeUInt32Method(args); | 3014 return TestObjV8Internal::methodWithEnforceRangeUInt32Method(args); |
| 3015 } | 3015 } |
| 3016 | 3016 |
| 3017 static v8::Handle<v8::Value> methodWithEnforceRangeInt64Method(const v8::Argumen
ts& args) | 3017 static v8::Handle<v8::Value> methodWithEnforceRangeInt64Method(const v8::Argumen
ts& args) |
| 3018 { | 3018 { |
| 3019 if (args.Length() < 1) | 3019 if (args.Length() < 1) |
| 3020 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3020 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3021 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3021 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3022 V8TRYCATCH_WITH_TYPECHECK(long long, value, toInt64(args[0], EnforceRange, o
k), args.GetIsolate()); | 3022 V8TRYCATCH_WITH_TYPECHECK(long long, value, toInt64(args[0], EnforceRange, o
k), args.GetIsolate()); |
| 3023 imp->methodWithEnforceRangeInt64(value); | 3023 imp->methodWithEnforceRangeInt64(value); |
| 3024 return v8Undefined(); | 3024 return v8Undefined(); |
| 3025 } | 3025 } |
| 3026 | 3026 |
| 3027 static v8::Handle<v8::Value> methodWithEnforceRangeInt64MethodCallback(const v8:
:Arguments& args) | 3027 static v8::Handle<v8::Value> methodWithEnforceRangeInt64MethodCallback(const v8:
:Arguments& args) |
| 3028 { | 3028 { |
| 3029 return TestObjV8Internal::methodWithEnforceRangeInt64Method(args); | 3029 return TestObjV8Internal::methodWithEnforceRangeInt64Method(args); |
| 3030 } | 3030 } |
| 3031 | 3031 |
| 3032 static v8::Handle<v8::Value> methodWithEnforceRangeUInt64Method(const v8::Argume
nts& args) | 3032 static v8::Handle<v8::Value> methodWithEnforceRangeUInt64Method(const v8::Argume
nts& args) |
| 3033 { | 3033 { |
| 3034 if (args.Length() < 1) | 3034 if (args.Length() < 1) |
| 3035 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3035 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3036 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3036 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3037 V8TRYCATCH_WITH_TYPECHECK(unsigned long long, value, toUInt64(args[0], Enfor
ceRange, ok), args.GetIsolate()); | 3037 V8TRYCATCH_WITH_TYPECHECK(unsigned long long, value, toUInt64(args[0], Enfor
ceRange, ok), args.GetIsolate()); |
| 3038 imp->methodWithEnforceRangeUInt64(value); | 3038 imp->methodWithEnforceRangeUInt64(value); |
| 3039 return v8Undefined(); | 3039 return v8Undefined(); |
| 3040 } | 3040 } |
| 3041 | 3041 |
| 3042 static v8::Handle<v8::Value> methodWithEnforceRangeUInt64MethodCallback(const v8
::Arguments& args) | 3042 static v8::Handle<v8::Value> methodWithEnforceRangeUInt64MethodCallback(const v8
::Arguments& args) |
| 3043 { | 3043 { |
| 3044 return TestObjV8Internal::methodWithEnforceRangeUInt64Method(args); | 3044 return TestObjV8Internal::methodWithEnforceRangeUInt64Method(args); |
| 3045 } | 3045 } |
| 3046 | 3046 |
| 3047 #if ENABLE(Condition1) | 3047 #if ENABLE(Condition1) |
| 3048 | 3048 |
| 3049 static v8::Handle<v8::Value> conditionalMethod1Method(const v8::Arguments& args) | 3049 static v8::Handle<v8::Value> conditionalMethod1Method(const v8::Arguments& args) |
| 3050 { | 3050 { |
| 3051 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3051 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3052 return v8String(imp->conditionalMethod1(), args.GetIsolate(), ReturnUnsafeHa
ndle); | 3052 return v8String(imp->conditionalMethod1(), args.GetIsolate(), ReturnUnsafeHa
ndle); |
| 3053 } | 3053 } |
| 3054 | 3054 |
| 3055 #endif // ENABLE(Condition1) | 3055 #endif // ENABLE(Condition1) |
| 3056 | 3056 |
| 3057 #if ENABLE(Condition1) | 3057 #if ENABLE(Condition1) |
| 3058 | 3058 |
| 3059 static v8::Handle<v8::Value> conditionalMethod1MethodCallback(const v8::Argument
s& args) | 3059 static v8::Handle<v8::Value> conditionalMethod1MethodCallback(const v8::Argument
s& args) |
| 3060 { | 3060 { |
| 3061 return TestObjV8Internal::conditionalMethod1Method(args); | 3061 return TestObjV8Internal::conditionalMethod1Method(args); |
| 3062 } | 3062 } |
| 3063 | 3063 |
| 3064 #endif // ENABLE(Condition1) | 3064 #endif // ENABLE(Condition1) |
| 3065 | 3065 |
| 3066 #if ENABLE(Condition1) && ENABLE(Condition2) | 3066 #if ENABLE(Condition1) && ENABLE(Condition2) |
| 3067 | 3067 |
| 3068 static v8::Handle<v8::Value> conditionalMethod2Method(const v8::Arguments& args) | 3068 static v8::Handle<v8::Value> conditionalMethod2Method(const v8::Arguments& args) |
| 3069 { | 3069 { |
| 3070 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3070 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3071 imp->conditionalMethod2(); | 3071 imp->conditionalMethod2(); |
| 3072 return v8Undefined(); | 3072 return v8Undefined(); |
| 3073 } | 3073 } |
| 3074 | 3074 |
| 3075 #endif // ENABLE(Condition1) && ENABLE(Condition2) | 3075 #endif // ENABLE(Condition1) && ENABLE(Condition2) |
| 3076 | 3076 |
| 3077 #if ENABLE(Condition1) && ENABLE(Condition2) | 3077 #if ENABLE(Condition1) && ENABLE(Condition2) |
| 3078 | 3078 |
| 3079 static v8::Handle<v8::Value> conditionalMethod2MethodCallback(const v8::Argument
s& args) | 3079 static v8::Handle<v8::Value> conditionalMethod2MethodCallback(const v8::Argument
s& args) |
| 3080 { | 3080 { |
| 3081 return TestObjV8Internal::conditionalMethod2Method(args); | 3081 return TestObjV8Internal::conditionalMethod2Method(args); |
| 3082 } | 3082 } |
| 3083 | 3083 |
| 3084 #endif // ENABLE(Condition1) && ENABLE(Condition2) | 3084 #endif // ENABLE(Condition1) && ENABLE(Condition2) |
| 3085 | 3085 |
| 3086 #if ENABLE(Condition1) || ENABLE(Condition2) | 3086 #if ENABLE(Condition1) || ENABLE(Condition2) |
| 3087 | 3087 |
| 3088 static v8::Handle<v8::Value> conditionalMethod3Method(const v8::Arguments& args) | 3088 static v8::Handle<v8::Value> conditionalMethod3Method(const v8::Arguments& args) |
| 3089 { | 3089 { |
| 3090 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3090 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3091 imp->conditionalMethod3(); | 3091 imp->conditionalMethod3(); |
| 3092 return v8Undefined(); | 3092 return v8Undefined(); |
| 3093 } | 3093 } |
| 3094 | 3094 |
| 3095 #endif // ENABLE(Condition1) || ENABLE(Condition2) | 3095 #endif // ENABLE(Condition1) || ENABLE(Condition2) |
| 3096 | 3096 |
| 3097 #if ENABLE(Condition1) || ENABLE(Condition2) | 3097 #if ENABLE(Condition1) || ENABLE(Condition2) |
| 3098 | 3098 |
| 3099 static v8::Handle<v8::Value> conditionalMethod3MethodCallback(const v8::Argument
s& args) | 3099 static v8::Handle<v8::Value> conditionalMethod3MethodCallback(const v8::Argument
s& args) |
| 3100 { | 3100 { |
| 3101 return TestObjV8Internal::conditionalMethod3Method(args); | 3101 return TestObjV8Internal::conditionalMethod3Method(args); |
| 3102 } | 3102 } |
| 3103 | 3103 |
| 3104 #endif // ENABLE(Condition1) || ENABLE(Condition2) | 3104 #endif // ENABLE(Condition1) || ENABLE(Condition2) |
| 3105 | 3105 |
| 3106 static v8::Handle<v8::Value> overloadedMethod1Method(const v8::Arguments& args) | 3106 static v8::Handle<v8::Value> overloadedMethod1Method(const v8::Arguments& args) |
| 3107 { | 3107 { |
| 3108 if (args.Length() < 2) | 3108 if (args.Length() < 2) |
| 3109 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3109 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3110 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3110 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3111 V8TRYCATCH(TestObj*, objArg, V8TestObj::HasInstance(args[0], args.GetIsolate
(), worldType(args.GetIsolate())) ? V8TestObj::toNative(v8::Handle<v8::Object>::
Cast(args[0])) : 0); | 3111 V8TRYCATCH(TestObj*, objArg, V8TestObject::HasInstance(args[0], args.GetIsol
ate(), worldType(args.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Obj
ect>::Cast(args[0])) : 0); |
| 3112 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, strArg, args[1]); | 3112 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, strArg, args[1]); |
| 3113 imp->overloadedMethod(objArg, strArg); | 3113 imp->overloadedMethod(objArg, strArg); |
| 3114 return v8Undefined(); | 3114 return v8Undefined(); |
| 3115 } | 3115 } |
| 3116 | 3116 |
| 3117 static v8::Handle<v8::Value> overloadedMethod2Method(const v8::Arguments& args) | 3117 static v8::Handle<v8::Value> overloadedMethod2Method(const v8::Arguments& args) |
| 3118 { | 3118 { |
| 3119 if (args.Length() < 1) | 3119 if (args.Length() < 1) |
| 3120 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3120 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3121 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3121 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3122 V8TRYCATCH(TestObj*, objArg, V8TestObj::HasInstance(args[0], args.GetIsolate
(), worldType(args.GetIsolate())) ? V8TestObj::toNative(v8::Handle<v8::Object>::
Cast(args[0])) : 0); | 3122 V8TRYCATCH(TestObj*, objArg, V8TestObject::HasInstance(args[0], args.GetIsol
ate(), worldType(args.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Obj
ect>::Cast(args[0])) : 0); |
| 3123 if (args.Length() <= 1) { | 3123 if (args.Length() <= 1) { |
| 3124 imp->overloadedMethod(objArg); | 3124 imp->overloadedMethod(objArg); |
| 3125 return v8Undefined(); | 3125 return v8Undefined(); |
| 3126 } | 3126 } |
| 3127 V8TRYCATCH(int, longArg, toInt32(args[1])); | 3127 V8TRYCATCH(int, longArg, toInt32(args[1])); |
| 3128 imp->overloadedMethod(objArg, longArg); | 3128 imp->overloadedMethod(objArg, longArg); |
| 3129 return v8Undefined(); | 3129 return v8Undefined(); |
| 3130 } | 3130 } |
| 3131 | 3131 |
| 3132 static v8::Handle<v8::Value> overloadedMethod3Method(const v8::Arguments& args) | 3132 static v8::Handle<v8::Value> overloadedMethod3Method(const v8::Arguments& args) |
| 3133 { | 3133 { |
| 3134 if (args.Length() < 1) | 3134 if (args.Length() < 1) |
| 3135 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3135 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3136 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3136 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3137 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, strArg, args[0]); | 3137 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, strArg, args[0]); |
| 3138 imp->overloadedMethod(strArg); | 3138 imp->overloadedMethod(strArg); |
| 3139 return v8Undefined(); | 3139 return v8Undefined(); |
| 3140 } | 3140 } |
| 3141 | 3141 |
| 3142 static v8::Handle<v8::Value> overloadedMethod4Method(const v8::Arguments& args) | 3142 static v8::Handle<v8::Value> overloadedMethod4Method(const v8::Arguments& args) |
| 3143 { | 3143 { |
| 3144 if (args.Length() < 1) | 3144 if (args.Length() < 1) |
| 3145 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3145 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3146 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3146 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3147 V8TRYCATCH(int, longArg, toInt32(args[0])); | 3147 V8TRYCATCH(int, longArg, toInt32(args[0])); |
| 3148 imp->overloadedMethod(longArg); | 3148 imp->overloadedMethod(longArg); |
| 3149 return v8Undefined(); | 3149 return v8Undefined(); |
| 3150 } | 3150 } |
| 3151 | 3151 |
| 3152 static v8::Handle<v8::Value> overloadedMethod5Method(const v8::Arguments& args) | 3152 static v8::Handle<v8::Value> overloadedMethod5Method(const v8::Arguments& args) |
| 3153 { | 3153 { |
| 3154 if (args.Length() < 1) | 3154 if (args.Length() < 1) |
| 3155 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3155 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3156 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3156 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3157 if (args.Length() <= 0 || !args[0]->IsFunction()) | 3157 if (args.Length() <= 0 || !args[0]->IsFunction()) |
| 3158 return throwTypeError(0, args.GetIsolate()); | 3158 return throwTypeError(0, args.GetIsolate()); |
| 3159 RefPtr<TestCallback> callback = V8TestCallback::create(args[0], getScriptExe
cutionContext()); | 3159 RefPtr<TestCallback> callback = V8TestCallback::create(args[0], getScriptExe
cutionContext()); |
| 3160 imp->overloadedMethod(callback); | 3160 imp->overloadedMethod(callback); |
| 3161 return v8Undefined(); | 3161 return v8Undefined(); |
| 3162 } | 3162 } |
| 3163 | 3163 |
| 3164 static v8::Handle<v8::Value> overloadedMethod6Method(const v8::Arguments& args) | 3164 static v8::Handle<v8::Value> overloadedMethod6Method(const v8::Arguments& args) |
| 3165 { | 3165 { |
| 3166 if (args.Length() < 1) | 3166 if (args.Length() < 1) |
| 3167 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3167 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3168 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3168 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3169 V8TRYCATCH(RefPtr<DOMStringList>, listArg, toDOMStringList(args[0], args.Get
Isolate())); | 3169 V8TRYCATCH(RefPtr<DOMStringList>, listArg, toDOMStringList(args[0], args.Get
Isolate())); |
| 3170 imp->overloadedMethod(listArg); | 3170 imp->overloadedMethod(listArg); |
| 3171 return v8Undefined(); | 3171 return v8Undefined(); |
| 3172 } | 3172 } |
| 3173 | 3173 |
| 3174 static v8::Handle<v8::Value> overloadedMethod7Method(const v8::Arguments& args) | 3174 static v8::Handle<v8::Value> overloadedMethod7Method(const v8::Arguments& args) |
| 3175 { | 3175 { |
| 3176 if (args.Length() < 1) | 3176 if (args.Length() < 1) |
| 3177 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3177 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3178 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3178 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3179 V8TRYCATCH(Vector<String>, arrayArg, toNativeArray<String>(args[0])); | 3179 V8TRYCATCH(Vector<String>, arrayArg, toNativeArray<String>(args[0])); |
| 3180 imp->overloadedMethod(arrayArg); | 3180 imp->overloadedMethod(arrayArg); |
| 3181 return v8Undefined(); | 3181 return v8Undefined(); |
| 3182 } | 3182 } |
| 3183 | 3183 |
| 3184 static v8::Handle<v8::Value> overloadedMethod8Method(const v8::Arguments& args) | 3184 static v8::Handle<v8::Value> overloadedMethod8Method(const v8::Arguments& args) |
| 3185 { | 3185 { |
| 3186 if (args.Length() < 1) | 3186 if (args.Length() < 1) |
| 3187 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3187 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3188 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3188 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3189 V8TRYCATCH(TestObj*, objArg, V8TestObj::HasInstance(args[0], args.GetIsolate
(), worldType(args.GetIsolate())) ? V8TestObj::toNative(v8::Handle<v8::Object>::
Cast(args[0])) : 0); | 3189 V8TRYCATCH(TestObj*, objArg, V8TestObject::HasInstance(args[0], args.GetIsol
ate(), worldType(args.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Obj
ect>::Cast(args[0])) : 0); |
| 3190 imp->overloadedMethod(objArg); | 3190 imp->overloadedMethod(objArg); |
| 3191 return v8Undefined(); | 3191 return v8Undefined(); |
| 3192 } | 3192 } |
| 3193 | 3193 |
| 3194 static v8::Handle<v8::Value> overloadedMethod9Method(const v8::Arguments& args) | 3194 static v8::Handle<v8::Value> overloadedMethod9Method(const v8::Arguments& args) |
| 3195 { | 3195 { |
| 3196 if (args.Length() < 1) | 3196 if (args.Length() < 1) |
| 3197 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3197 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3198 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3198 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3199 V8TRYCATCH(Vector<String>, arrayArg, toNativeArray<String>(args[0])); | 3199 V8TRYCATCH(Vector<String>, arrayArg, toNativeArray<String>(args[0])); |
| 3200 imp->overloadedMethod(arrayArg); | 3200 imp->overloadedMethod(arrayArg); |
| 3201 return v8Undefined(); | 3201 return v8Undefined(); |
| 3202 } | 3202 } |
| 3203 | 3203 |
| 3204 static v8::Handle<v8::Value> overloadedMethod10Method(const v8::Arguments& args) | 3204 static v8::Handle<v8::Value> overloadedMethod10Method(const v8::Arguments& args) |
| 3205 { | 3205 { |
| 3206 if (args.Length() < 1) | 3206 if (args.Length() < 1) |
| 3207 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3207 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3208 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3208 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3209 V8TRYCATCH(Vector<unsigned>, arrayArg, toNativeArray<unsigned>(args[0])); | 3209 V8TRYCATCH(Vector<unsigned>, arrayArg, toNativeArray<unsigned>(args[0])); |
| 3210 imp->overloadedMethod(arrayArg); | 3210 imp->overloadedMethod(arrayArg); |
| 3211 return v8Undefined(); | 3211 return v8Undefined(); |
| 3212 } | 3212 } |
| 3213 | 3213 |
| 3214 static v8::Handle<v8::Value> overloadedMethod11Method(const v8::Arguments& args) | 3214 static v8::Handle<v8::Value> overloadedMethod11Method(const v8::Arguments& args) |
| 3215 { | 3215 { |
| 3216 if (args.Length() < 1) | 3216 if (args.Length() < 1) |
| 3217 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3217 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3218 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3218 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3219 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, strArg, args[0]); | 3219 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, strArg, args[0]); |
| 3220 imp->overloadedMethod(strArg); | 3220 imp->overloadedMethod(strArg); |
| 3221 return v8Undefined(); | 3221 return v8Undefined(); |
| 3222 } | 3222 } |
| 3223 | 3223 |
| 3224 static v8::Handle<v8::Value> overloadedMethodMethod(const v8::Arguments& args) | 3224 static v8::Handle<v8::Value> overloadedMethodMethod(const v8::Arguments& args) |
| 3225 { | 3225 { |
| 3226 if ((args.Length() == 2 && (args[0]->IsNull() || V8TestObj::HasInstance(args
[0], args.GetIsolate(), worldType(args.GetIsolate()))) && (args[1]->IsNull() ||
args[1]->IsUndefined() || args[1]->IsString() || args[1]->IsObject()))) | 3226 if ((args.Length() == 2 && (args[0]->IsNull() || V8TestObject::HasInstance(a
rgs[0], args.GetIsolate(), worldType(args.GetIsolate()))) && (args[1]->IsNull()
|| args[1]->IsUndefined() || args[1]->IsString() || args[1]->IsObject()))) |
| 3227 return overloadedMethod1Method(args); | 3227 return overloadedMethod1Method(args); |
| 3228 if ((args.Length() == 1 && (args[0]->IsNull() || V8TestObj::HasInstance(args
[0], args.GetIsolate(), worldType(args.GetIsolate())))) || (args.Length() == 2 &
& (args[0]->IsNull() || V8TestObj::HasInstance(args[0], args.GetIsolate(), world
Type(args.GetIsolate()))))) | 3228 if ((args.Length() == 1 && (args[0]->IsNull() || V8TestObject::HasInstance(a
rgs[0], args.GetIsolate(), worldType(args.GetIsolate())))) || (args.Length() ==
2 && (args[0]->IsNull() || V8TestObject::HasInstance(args[0], args.GetIsolate(),
worldType(args.GetIsolate()))))) |
| 3229 return overloadedMethod2Method(args); | 3229 return overloadedMethod2Method(args); |
| 3230 if ((args.Length() == 1 && (args[0]->IsNull() || args[0]->IsUndefined() || a
rgs[0]->IsString() || args[0]->IsObject()))) | 3230 if ((args.Length() == 1 && (args[0]->IsNull() || args[0]->IsUndefined() || a
rgs[0]->IsString() || args[0]->IsObject()))) |
| 3231 return overloadedMethod3Method(args); | 3231 return overloadedMethod3Method(args); |
| 3232 if (args.Length() == 1) | 3232 if (args.Length() == 1) |
| 3233 return overloadedMethod4Method(args); | 3233 return overloadedMethod4Method(args); |
| 3234 if ((args.Length() == 1 && (args[0]->IsNull() || args[0]->IsFunction()))) | 3234 if ((args.Length() == 1 && (args[0]->IsNull() || args[0]->IsFunction()))) |
| 3235 return overloadedMethod5Method(args); | 3235 return overloadedMethod5Method(args); |
| 3236 if ((args.Length() == 1 && (args[0]->IsNull() || V8DOMStringList::HasInstanc
e(args[0], args.GetIsolate(), worldType(args.GetIsolate()))))) | 3236 if ((args.Length() == 1 && (args[0]->IsNull() || V8DOMStringList::HasInstanc
e(args[0], args.GetIsolate(), worldType(args.GetIsolate()))))) |
| 3237 return overloadedMethod6Method(args); | 3237 return overloadedMethod6Method(args); |
| 3238 if ((args.Length() == 1 && (args[0]->IsNull() || args[0]->IsArray()))) | 3238 if ((args.Length() == 1 && (args[0]->IsNull() || args[0]->IsArray()))) |
| 3239 return overloadedMethod7Method(args); | 3239 return overloadedMethod7Method(args); |
| 3240 if ((args.Length() == 1 && (V8TestObj::HasInstance(args[0], args.GetIsolate(
), worldType(args.GetIsolate()))))) | 3240 if ((args.Length() == 1 && (V8TestObject::HasInstance(args[0], args.GetIsola
te(), worldType(args.GetIsolate()))))) |
| 3241 return overloadedMethod8Method(args); | 3241 return overloadedMethod8Method(args); |
| 3242 if ((args.Length() == 1 && (args[0]->IsArray()))) | 3242 if ((args.Length() == 1 && (args[0]->IsArray()))) |
| 3243 return overloadedMethod9Method(args); | 3243 return overloadedMethod9Method(args); |
| 3244 if ((args.Length() == 1 && (args[0]->IsArray()))) | 3244 if ((args.Length() == 1 && (args[0]->IsArray()))) |
| 3245 return overloadedMethod10Method(args); | 3245 return overloadedMethod10Method(args); |
| 3246 if (args.Length() == 1) | 3246 if (args.Length() == 1) |
| 3247 return overloadedMethod11Method(args); | 3247 return overloadedMethod11Method(args); |
| 3248 if (args.Length() < 1) | 3248 if (args.Length() < 1) |
| 3249 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3249 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3250 return throwTypeError(0, args.GetIsolate()); | 3250 return throwTypeError(0, args.GetIsolate()); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 3261 return v8Undefined(); | 3261 return v8Undefined(); |
| 3262 } | 3262 } |
| 3263 | 3263 |
| 3264 static v8::Handle<v8::Value> classMethodMethodCallback(const v8::Arguments& args
) | 3264 static v8::Handle<v8::Value> classMethodMethodCallback(const v8::Arguments& args
) |
| 3265 { | 3265 { |
| 3266 return TestObjV8Internal::classMethodMethod(args); | 3266 return TestObjV8Internal::classMethodMethod(args); |
| 3267 } | 3267 } |
| 3268 | 3268 |
| 3269 static v8::Handle<v8::Value> classMethodWithOptionalMethod(const v8::Arguments&
args) | 3269 static v8::Handle<v8::Value> classMethodWithOptionalMethod(const v8::Arguments&
args) |
| 3270 { | 3270 { |
| 3271 if (args.Length() <= 0) { | 3271 if (args.Length() <= 0) |
| 3272 return v8Integer(TestObj::classMethodWithOptional(), args.GetIsolate()); | 3272 return v8Integer(TestObj::classMethodWithOptional(), args.GetIsolate()); |
| 3273 } | 3273 |
| 3274 V8TRYCATCH(int, arg, toInt32(args[0])); | 3274 V8TRYCATCH(int, arg, toInt32(args[0])); |
| 3275 return v8Integer(TestObj::classMethodWithOptional(arg), args.GetIsolate()); | 3275 return v8Integer(TestObj::classMethodWithOptional(arg), args.GetIsolate()); |
| 3276 } | 3276 } |
| 3277 | 3277 |
| 3278 static v8::Handle<v8::Value> classMethodWithOptionalMethodCallback(const v8::Arg
uments& args) | 3278 static v8::Handle<v8::Value> classMethodWithOptionalMethodCallback(const v8::Arg
uments& args) |
| 3279 { | 3279 { |
| 3280 return TestObjV8Internal::classMethodWithOptionalMethod(args); | 3280 return TestObjV8Internal::classMethodWithOptionalMethod(args); |
| 3281 } | 3281 } |
| 3282 | 3282 |
| 3283 static v8::Handle<v8::Value> classMethod2MethodCallback(const v8::Arguments& arg
s) | 3283 static v8::Handle<v8::Value> classMethod2MethodCallback(const v8::Arguments& arg
s) |
| 3284 { | 3284 { |
| 3285 return V8TestObj::classMethod2MethodCustom(args); | 3285 return V8TestObject::classMethod2MethodCustom(args); |
| 3286 } | 3286 } |
| 3287 | 3287 |
| 3288 #if ENABLE(Condition1) | 3288 #if ENABLE(Condition1) |
| 3289 | 3289 |
| 3290 static v8::Handle<v8::Value> overloadedMethod11Method(const v8::Arguments& args) | 3290 static v8::Handle<v8::Value> overloadedMethod11Method(const v8::Arguments& args) |
| 3291 { | 3291 { |
| 3292 if (args.Length() < 1) | 3292 if (args.Length() < 1) |
| 3293 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3293 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3294 V8TRYCATCH(int, arg, toInt32(args[0])); | 3294 V8TRYCATCH(int, arg, toInt32(args[0])); |
| 3295 TestObj::overloadedMethod1(arg); | 3295 TestObj::overloadedMethod1(arg); |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3332 { | 3332 { |
| 3333 return TestObjV8Internal::overloadedMethod1Method(args); | 3333 return TestObjV8Internal::overloadedMethod1Method(args); |
| 3334 } | 3334 } |
| 3335 | 3335 |
| 3336 #endif // ENABLE(Condition1) | 3336 #endif // ENABLE(Condition1) |
| 3337 | 3337 |
| 3338 static v8::Handle<v8::Value> classMethodWithClampMethod(const v8::Arguments& arg
s) | 3338 static v8::Handle<v8::Value> classMethodWithClampMethod(const v8::Arguments& arg
s) |
| 3339 { | 3339 { |
| 3340 if (args.Length() < 2) | 3340 if (args.Length() < 2) |
| 3341 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3341 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3342 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3342 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3343 unsigned short objArgsShort = 0; | 3343 unsigned short objArgsShort = 0; |
| 3344 V8TRYCATCH(double, objArgsShortNativeValue, args[0]->NumberValue()); | 3344 V8TRYCATCH(double, objArgsShortNativeValue, args[0]->NumberValue()); |
| 3345 if (!std::isnan(objArgsShortNativeValue)) | 3345 if (!std::isnan(objArgsShortNativeValue)) |
| 3346 objArgsShort = clampTo<unsigned short>(objArgsShortNativeValue); | 3346 objArgsShort = clampTo<unsigned short>(objArgsShortNativeValue); |
| 3347 unsigned long objArgsLong = 0; | 3347 unsigned long objArgsLong = 0; |
| 3348 V8TRYCATCH(double, objArgsLongNativeValue, args[1]->NumberValue()); | 3348 V8TRYCATCH(double, objArgsLongNativeValue, args[1]->NumberValue()); |
| 3349 if (!std::isnan(objArgsLongNativeValue)) | 3349 if (!std::isnan(objArgsLongNativeValue)) |
| 3350 objArgsLong = clampTo<unsigned long>(objArgsLongNativeValue); | 3350 objArgsLong = clampTo<unsigned long>(objArgsLongNativeValue); |
| 3351 imp->classMethodWithClamp(objArgsShort, objArgsLong); | 3351 imp->classMethodWithClamp(objArgsShort, objArgsLong); |
| 3352 return v8Undefined(); | 3352 return v8Undefined(); |
| 3353 } | 3353 } |
| 3354 | 3354 |
| 3355 static v8::Handle<v8::Value> classMethodWithClampMethodCallback(const v8::Argume
nts& args) | 3355 static v8::Handle<v8::Value> classMethodWithClampMethodCallback(const v8::Argume
nts& args) |
| 3356 { | 3356 { |
| 3357 return TestObjV8Internal::classMethodWithClampMethod(args); | 3357 return TestObjV8Internal::classMethodWithClampMethod(args); |
| 3358 } | 3358 } |
| 3359 | 3359 |
| 3360 static v8::Handle<v8::Value> enabledAtRuntimeMethod1Method(const v8::Arguments&
args) | 3360 static v8::Handle<v8::Value> enabledAtRuntimeMethod1Method(const v8::Arguments&
args) |
| 3361 { | 3361 { |
| 3362 if (args.Length() < 1) | 3362 if (args.Length() < 1) |
| 3363 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3363 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3364 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3364 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3365 V8TRYCATCH(int, longArg, toInt32(args[0])); | 3365 V8TRYCATCH(int, longArg, toInt32(args[0])); |
| 3366 imp->enabledAtRuntimeMethod1(longArg); | 3366 imp->enabledAtRuntimeMethod1(longArg); |
| 3367 return v8Undefined(); | 3367 return v8Undefined(); |
| 3368 } | 3368 } |
| 3369 | 3369 |
| 3370 static v8::Handle<v8::Value> enabledAtRuntimeMethod1MethodCallback(const v8::Arg
uments& args) | 3370 static v8::Handle<v8::Value> enabledAtRuntimeMethod1MethodCallback(const v8::Arg
uments& args) |
| 3371 { | 3371 { |
| 3372 return TestObjV8Internal::enabledAtRuntimeMethod1Method(args); | 3372 return TestObjV8Internal::enabledAtRuntimeMethod1Method(args); |
| 3373 } | 3373 } |
| 3374 | 3374 |
| 3375 static v8::Handle<v8::Value> enabledAtRuntimeMethod2Method(const v8::Arguments&
args) | 3375 static v8::Handle<v8::Value> enabledAtRuntimeMethod2Method(const v8::Arguments&
args) |
| 3376 { | 3376 { |
| 3377 if (args.Length() < 1) | 3377 if (args.Length() < 1) |
| 3378 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3378 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3379 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3379 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3380 V8TRYCATCH(int, longArg, toInt32(args[0])); | 3380 V8TRYCATCH(int, longArg, toInt32(args[0])); |
| 3381 imp->enabledAtRuntimeMethod2(longArg); | 3381 imp->enabledAtRuntimeMethod2(longArg); |
| 3382 return v8Undefined(); | 3382 return v8Undefined(); |
| 3383 } | 3383 } |
| 3384 | 3384 |
| 3385 static v8::Handle<v8::Value> enabledAtRuntimeMethod2MethodCallback(const v8::Arg
uments& args) | 3385 static v8::Handle<v8::Value> enabledAtRuntimeMethod2MethodCallback(const v8::Arg
uments& args) |
| 3386 { | 3386 { |
| 3387 return TestObjV8Internal::enabledAtRuntimeMethod2Method(args); | 3387 return TestObjV8Internal::enabledAtRuntimeMethod2Method(args); |
| 3388 } | 3388 } |
| 3389 | 3389 |
| 3390 static v8::Handle<v8::Value> enabledPerContextMethod1Method(const v8::Arguments&
args) | 3390 static v8::Handle<v8::Value> enabledPerContextMethod1Method(const v8::Arguments&
args) |
| 3391 { | 3391 { |
| 3392 if (args.Length() < 1) | 3392 if (args.Length() < 1) |
| 3393 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3393 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3394 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3394 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3395 V8TRYCATCH(int, longArg, toInt32(args[0])); | 3395 V8TRYCATCH(int, longArg, toInt32(args[0])); |
| 3396 imp->enabledPerContextMethod1(longArg); | 3396 imp->enabledPerContextMethod1(longArg); |
| 3397 return v8Undefined(); | 3397 return v8Undefined(); |
| 3398 } | 3398 } |
| 3399 | 3399 |
| 3400 static v8::Handle<v8::Value> enabledPerContextMethod1MethodCallback(const v8::Ar
guments& args) | 3400 static v8::Handle<v8::Value> enabledPerContextMethod1MethodCallback(const v8::Ar
guments& args) |
| 3401 { | 3401 { |
| 3402 return TestObjV8Internal::enabledPerContextMethod1Method(args); | 3402 return TestObjV8Internal::enabledPerContextMethod1Method(args); |
| 3403 } | 3403 } |
| 3404 | 3404 |
| 3405 static v8::Handle<v8::Value> enabledPerContextMethod2Method(const v8::Arguments&
args) | 3405 static v8::Handle<v8::Value> enabledPerContextMethod2Method(const v8::Arguments&
args) |
| 3406 { | 3406 { |
| 3407 if (args.Length() < 1) | 3407 if (args.Length() < 1) |
| 3408 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3408 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3409 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3409 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3410 V8TRYCATCH(int, longArg, toInt32(args[0])); | 3410 V8TRYCATCH(int, longArg, toInt32(args[0])); |
| 3411 imp->enabledPerContextMethod2(longArg); | 3411 imp->enabledPerContextMethod2(longArg); |
| 3412 return v8Undefined(); | 3412 return v8Undefined(); |
| 3413 } | 3413 } |
| 3414 | 3414 |
| 3415 static v8::Handle<v8::Value> enabledPerContextMethod2MethodCallback(const v8::Ar
guments& args) | 3415 static v8::Handle<v8::Value> enabledPerContextMethod2MethodCallback(const v8::Ar
guments& args) |
| 3416 { | 3416 { |
| 3417 return TestObjV8Internal::enabledPerContextMethod2Method(args); | 3417 return TestObjV8Internal::enabledPerContextMethod2Method(args); |
| 3418 } | 3418 } |
| 3419 | 3419 |
| 3420 static v8::Handle<v8::Value> methodWithUnsignedLongSequenceMethod(const v8::Argu
ments& args) | 3420 static v8::Handle<v8::Value> methodWithUnsignedLongSequenceMethod(const v8::Argu
ments& args) |
| 3421 { | 3421 { |
| 3422 if (args.Length() < 1) | 3422 if (args.Length() < 1) |
| 3423 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3423 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3424 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3424 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3425 V8TRYCATCH(Vector<unsigned>, unsignedLongSequence, toNativeArray<unsigned>(a
rgs[0])); | 3425 V8TRYCATCH(Vector<unsigned>, unsignedLongSequence, toNativeArray<unsigned>(a
rgs[0])); |
| 3426 imp->methodWithUnsignedLongSequence(unsignedLongSequence); | 3426 imp->methodWithUnsignedLongSequence(unsignedLongSequence); |
| 3427 return v8Undefined(); | 3427 return v8Undefined(); |
| 3428 } | 3428 } |
| 3429 | 3429 |
| 3430 static v8::Handle<v8::Value> methodWithUnsignedLongSequenceMethodCallback(const
v8::Arguments& args) | 3430 static v8::Handle<v8::Value> methodWithUnsignedLongSequenceMethodCallback(const
v8::Arguments& args) |
| 3431 { | 3431 { |
| 3432 return TestObjV8Internal::methodWithUnsignedLongSequenceMethod(args); | 3432 return TestObjV8Internal::methodWithUnsignedLongSequenceMethod(args); |
| 3433 } | 3433 } |
| 3434 | 3434 |
| 3435 static v8::Handle<v8::Value> stringArrayFunctionMethod(const v8::Arguments& args
) | 3435 static v8::Handle<v8::Value> stringArrayFunctionMethod(const v8::Arguments& args
) |
| 3436 { | 3436 { |
| 3437 if (args.Length() < 1) | 3437 if (args.Length() < 1) |
| 3438 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3438 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3439 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3439 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3440 ExceptionCode ec = 0; | 3440 ExceptionCode ec = 0; |
| 3441 { | 3441 { |
| 3442 V8TRYCATCH(Vector<String>, values, toNativeArray<String>(args[0])); | 3442 V8TRYCATCH(Vector<String>, values, toNativeArray<String>(args[0])); |
| 3443 Vector<String> result = imp->stringArrayFunction(values, ec); | 3443 Vector<String> result = imp->stringArrayFunction(values, ec); |
| 3444 if (UNLIKELY(ec)) | 3444 if (UNLIKELY(ec)) |
| 3445 goto fail; | 3445 goto fail; |
| 3446 return v8Array(result, args.GetIsolate()); | 3446 return v8Array(result, args.GetIsolate()); |
| 3447 } | 3447 } |
| 3448 fail: | 3448 fail: |
| 3449 return setDOMException(ec, args.GetIsolate()); | 3449 return setDOMException(ec, args.GetIsolate()); |
| 3450 } | 3450 } |
| 3451 | 3451 |
| 3452 static v8::Handle<v8::Value> stringArrayFunctionMethodCallback(const v8::Argumen
ts& args) | 3452 static v8::Handle<v8::Value> stringArrayFunctionMethodCallback(const v8::Argumen
ts& args) |
| 3453 { | 3453 { |
| 3454 return TestObjV8Internal::stringArrayFunctionMethod(args); | 3454 return TestObjV8Internal::stringArrayFunctionMethod(args); |
| 3455 } | 3455 } |
| 3456 | 3456 |
| 3457 static v8::Handle<v8::Value> domStringListFunctionMethod(const v8::Arguments& ar
gs) | 3457 static v8::Handle<v8::Value> domStringListFunctionMethod(const v8::Arguments& ar
gs) |
| 3458 { | 3458 { |
| 3459 if (args.Length() < 1) | 3459 if (args.Length() < 1) |
| 3460 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3460 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3461 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3461 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3462 ExceptionCode ec = 0; | 3462 ExceptionCode ec = 0; |
| 3463 { | 3463 { |
| 3464 V8TRYCATCH(RefPtr<DOMStringList>, values, toDOMStringList(args[0], args.GetI
solate())); | 3464 V8TRYCATCH(RefPtr<DOMStringList>, values, toDOMStringList(args[0], args.GetI
solate())); |
| 3465 RefPtr<DOMStringList> result = imp->domStringListFunction(values, ec); | 3465 RefPtr<DOMStringList> result = imp->domStringListFunction(values, ec); |
| 3466 if (UNLIKELY(ec)) | 3466 if (UNLIKELY(ec)) |
| 3467 goto fail; | 3467 goto fail; |
| 3468 return toV8(result.release(), args.Holder(), args.GetIsolate()); | 3468 return toV8(result.release(), args.Holder(), args.GetIsolate()); |
| 3469 } | 3469 } |
| 3470 fail: | 3470 fail: |
| 3471 return setDOMException(ec, args.GetIsolate()); | 3471 return setDOMException(ec, args.GetIsolate()); |
| 3472 } | 3472 } |
| 3473 | 3473 |
| 3474 static v8::Handle<v8::Value> domStringListFunctionMethodCallback(const v8::Argum
ents& args) | 3474 static v8::Handle<v8::Value> domStringListFunctionMethodCallback(const v8::Argum
ents& args) |
| 3475 { | 3475 { |
| 3476 return TestObjV8Internal::domStringListFunctionMethod(args); | 3476 return TestObjV8Internal::domStringListFunctionMethod(args); |
| 3477 } | 3477 } |
| 3478 | 3478 |
| 3479 static v8::Handle<v8::Value> getSVGDocumentMethod(const v8::Arguments& args) | 3479 static v8::Handle<v8::Value> getSVGDocumentMethod(const v8::Arguments& args) |
| 3480 { | 3480 { |
| 3481 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3481 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3482 ExceptionCode ec = 0; | 3482 ExceptionCode ec = 0; |
| 3483 { | 3483 { |
| 3484 if (!BindingSecurity::shouldAllowAccessToNode(imp->getSVGDocument(ec))) | 3484 if (!BindingSecurity::shouldAllowAccessToNode(imp->getSVGDocument(ec))) |
| 3485 return v8::Handle<v8::Value>(v8Null(args.GetIsolate())); | 3485 return v8::Handle<v8::Value>(v8Null(args.GetIsolate())); |
| 3486 RefPtr<SVGDocument> result = imp->getSVGDocument(ec); | 3486 RefPtr<SVGDocument> result = imp->getSVGDocument(ec); |
| 3487 if (UNLIKELY(ec)) | 3487 if (UNLIKELY(ec)) |
| 3488 goto fail; | 3488 goto fail; |
| 3489 return toV8(result.release(), args.Holder(), args.GetIsolate()); | 3489 return toV8(result.release(), args.Holder(), args.GetIsolate()); |
| 3490 } | 3490 } |
| 3491 fail: | 3491 fail: |
| 3492 return setDOMException(ec, args.GetIsolate()); | 3492 return setDOMException(ec, args.GetIsolate()); |
| 3493 } | 3493 } |
| 3494 | 3494 |
| 3495 static v8::Handle<v8::Value> getSVGDocumentMethodCallback(const v8::Arguments& a
rgs) | 3495 static v8::Handle<v8::Value> getSVGDocumentMethodCallback(const v8::Arguments& a
rgs) |
| 3496 { | 3496 { |
| 3497 return TestObjV8Internal::getSVGDocumentMethod(args); | 3497 return TestObjV8Internal::getSVGDocumentMethod(args); |
| 3498 } | 3498 } |
| 3499 | 3499 |
| 3500 static v8::Handle<v8::Value> convert1Method(const v8::Arguments& args) | 3500 static v8::Handle<v8::Value> convert1Method(const v8::Arguments& args) |
| 3501 { | 3501 { |
| 3502 if (args.Length() < 1) | 3502 if (args.Length() < 1) |
| 3503 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3503 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3504 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3504 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3505 V8TRYCATCH(TestNode*, value, V8TestNode::HasInstance(args[0], args.GetIsolat
e(), worldType(args.GetIsolate())) ? V8TestNode::toNative(v8::Handle<v8::Object>
::Cast(args[0])) : 0); | 3505 V8TRYCATCH(TestNode*, value, V8TestNode::HasInstance(args[0], args.GetIsolat
e(), worldType(args.GetIsolate())) ? V8TestNode::toNative(v8::Handle<v8::Object>
::Cast(args[0])) : 0); |
| 3506 imp->convert1(value); | 3506 imp->convert1(value); |
| 3507 return v8Undefined(); | 3507 return v8Undefined(); |
| 3508 } | 3508 } |
| 3509 | 3509 |
| 3510 static v8::Handle<v8::Value> convert1MethodCallback(const v8::Arguments& args) | 3510 static v8::Handle<v8::Value> convert1MethodCallback(const v8::Arguments& args) |
| 3511 { | 3511 { |
| 3512 return TestObjV8Internal::convert1Method(args); | 3512 return TestObjV8Internal::convert1Method(args); |
| 3513 } | 3513 } |
| 3514 | 3514 |
| 3515 static v8::Handle<v8::Value> convert2Method(const v8::Arguments& args) | 3515 static v8::Handle<v8::Value> convert2Method(const v8::Arguments& args) |
| 3516 { | 3516 { |
| 3517 if (args.Length() < 1) | 3517 if (args.Length() < 1) |
| 3518 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3518 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3519 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3519 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3520 V8TRYCATCH(TestNode*, value, V8TestNode::HasInstance(args[0], args.GetIsolat
e(), worldType(args.GetIsolate())) ? V8TestNode::toNative(v8::Handle<v8::Object>
::Cast(args[0])) : 0); | 3520 V8TRYCATCH(TestNode*, value, V8TestNode::HasInstance(args[0], args.GetIsolat
e(), worldType(args.GetIsolate())) ? V8TestNode::toNative(v8::Handle<v8::Object>
::Cast(args[0])) : 0); |
| 3521 imp->convert2(value); | 3521 imp->convert2(value); |
| 3522 return v8Undefined(); | 3522 return v8Undefined(); |
| 3523 } | 3523 } |
| 3524 | 3524 |
| 3525 static v8::Handle<v8::Value> convert2MethodCallback(const v8::Arguments& args) | 3525 static v8::Handle<v8::Value> convert2MethodCallback(const v8::Arguments& args) |
| 3526 { | 3526 { |
| 3527 return TestObjV8Internal::convert2Method(args); | 3527 return TestObjV8Internal::convert2Method(args); |
| 3528 } | 3528 } |
| 3529 | 3529 |
| 3530 static v8::Handle<v8::Value> convert4Method(const v8::Arguments& args) | 3530 static v8::Handle<v8::Value> convert4Method(const v8::Arguments& args) |
| 3531 { | 3531 { |
| 3532 if (args.Length() < 1) | 3532 if (args.Length() < 1) |
| 3533 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3533 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3534 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3534 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3535 V8TRYCATCH(TestNode*, value, V8TestNode::HasInstance(args[0], args.GetIsolat
e(), worldType(args.GetIsolate())) ? V8TestNode::toNative(v8::Handle<v8::Object>
::Cast(args[0])) : 0); | 3535 V8TRYCATCH(TestNode*, value, V8TestNode::HasInstance(args[0], args.GetIsolat
e(), worldType(args.GetIsolate())) ? V8TestNode::toNative(v8::Handle<v8::Object>
::Cast(args[0])) : 0); |
| 3536 imp->convert4(value); | 3536 imp->convert4(value); |
| 3537 return v8Undefined(); | 3537 return v8Undefined(); |
| 3538 } | 3538 } |
| 3539 | 3539 |
| 3540 static v8::Handle<v8::Value> convert4MethodCallback(const v8::Arguments& args) | 3540 static v8::Handle<v8::Value> convert4MethodCallback(const v8::Arguments& args) |
| 3541 { | 3541 { |
| 3542 return TestObjV8Internal::convert4Method(args); | 3542 return TestObjV8Internal::convert4Method(args); |
| 3543 } | 3543 } |
| 3544 | 3544 |
| 3545 static v8::Handle<v8::Value> convert5Method(const v8::Arguments& args) | 3545 static v8::Handle<v8::Value> convert5Method(const v8::Arguments& args) |
| 3546 { | 3546 { |
| 3547 if (args.Length() < 1) | 3547 if (args.Length() < 1) |
| 3548 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3548 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3549 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3549 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3550 V8TRYCATCH(TestNode*, value, V8TestNode::HasInstance(args[0], args.GetIsolat
e(), worldType(args.GetIsolate())) ? V8TestNode::toNative(v8::Handle<v8::Object>
::Cast(args[0])) : 0); | 3550 V8TRYCATCH(TestNode*, value, V8TestNode::HasInstance(args[0], args.GetIsolat
e(), worldType(args.GetIsolate())) ? V8TestNode::toNative(v8::Handle<v8::Object>
::Cast(args[0])) : 0); |
| 3551 imp->convert5(value); | 3551 imp->convert5(value); |
| 3552 return v8Undefined(); | 3552 return v8Undefined(); |
| 3553 } | 3553 } |
| 3554 | 3554 |
| 3555 static v8::Handle<v8::Value> convert5MethodCallback(const v8::Arguments& args) | 3555 static v8::Handle<v8::Value> convert5MethodCallback(const v8::Arguments& args) |
| 3556 { | 3556 { |
| 3557 return TestObjV8Internal::convert5Method(args); | 3557 return TestObjV8Internal::convert5Method(args); |
| 3558 } | 3558 } |
| 3559 | 3559 |
| 3560 static v8::Handle<v8::Value> mutablePointFunctionMethod(const v8::Arguments& arg
s) | 3560 static v8::Handle<v8::Value> mutablePointFunctionMethod(const v8::Arguments& arg
s) |
| 3561 { | 3561 { |
| 3562 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3562 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3563 return toV8(WTF::getPtr(SVGPropertyTearOff<FloatPoint>::create(imp->mutableP
ointFunction())), args.Holder(), args.GetIsolate()); | 3563 return toV8(WTF::getPtr(SVGPropertyTearOff<FloatPoint>::create(imp->mutableP
ointFunction())), args.Holder(), args.GetIsolate()); |
| 3564 } | 3564 } |
| 3565 | 3565 |
| 3566 static v8::Handle<v8::Value> mutablePointFunctionMethodCallback(const v8::Argume
nts& args) | 3566 static v8::Handle<v8::Value> mutablePointFunctionMethodCallback(const v8::Argume
nts& args) |
| 3567 { | 3567 { |
| 3568 return TestObjV8Internal::mutablePointFunctionMethod(args); | 3568 return TestObjV8Internal::mutablePointFunctionMethod(args); |
| 3569 } | 3569 } |
| 3570 | 3570 |
| 3571 static v8::Handle<v8::Value> immutablePointFunctionMethod(const v8::Arguments& a
rgs) | 3571 static v8::Handle<v8::Value> immutablePointFunctionMethod(const v8::Arguments& a
rgs) |
| 3572 { | 3572 { |
| 3573 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3573 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3574 return toV8(WTF::getPtr(SVGPropertyTearOff<FloatPoint>::create(imp->immutabl
ePointFunction())), args.Holder(), args.GetIsolate()); | 3574 return toV8(WTF::getPtr(SVGPropertyTearOff<FloatPoint>::create(imp->immutabl
ePointFunction())), args.Holder(), args.GetIsolate()); |
| 3575 } | 3575 } |
| 3576 | 3576 |
| 3577 static v8::Handle<v8::Value> immutablePointFunctionMethodCallback(const v8::Argu
ments& args) | 3577 static v8::Handle<v8::Value> immutablePointFunctionMethodCallback(const v8::Argu
ments& args) |
| 3578 { | 3578 { |
| 3579 return TestObjV8Internal::immutablePointFunctionMethod(args); | 3579 return TestObjV8Internal::immutablePointFunctionMethod(args); |
| 3580 } | 3580 } |
| 3581 | 3581 |
| 3582 static v8::Handle<v8::Value> orangeMethod(const v8::Arguments& args) | 3582 static v8::Handle<v8::Value> orangeMethod(const v8::Arguments& args) |
| 3583 { | 3583 { |
| 3584 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3584 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3585 imp->banana(); | 3585 imp->banana(); |
| 3586 return v8Undefined(); | 3586 return v8Undefined(); |
| 3587 } | 3587 } |
| 3588 | 3588 |
| 3589 static v8::Handle<v8::Value> orangeMethodCallback(const v8::Arguments& args) | 3589 static v8::Handle<v8::Value> orangeMethodCallback(const v8::Arguments& args) |
| 3590 { | 3590 { |
| 3591 return TestObjV8Internal::orangeMethod(args); | 3591 return TestObjV8Internal::orangeMethod(args); |
| 3592 } | 3592 } |
| 3593 | 3593 |
| 3594 static v8::Handle<v8::Value> strictFunctionMethod(const v8::Arguments& args) | 3594 static v8::Handle<v8::Value> strictFunctionMethod(const v8::Arguments& args) |
| 3595 { | 3595 { |
| 3596 if (args.Length() < 3) | 3596 if (args.Length() < 3) |
| 3597 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3597 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3598 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3598 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3599 ExceptionCode ec = 0; | 3599 ExceptionCode ec = 0; |
| 3600 { | 3600 { |
| 3601 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, str, args[0]); | 3601 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, str, args[0]); |
| 3602 V8TRYCATCH(float, a, static_cast<float>(args[1]->NumberValue())); | 3602 V8TRYCATCH(float, a, static_cast<float>(args[1]->NumberValue())); |
| 3603 V8TRYCATCH(int, b, toInt32(args[2])); | 3603 V8TRYCATCH(int, b, toInt32(args[2])); |
| 3604 bool result = imp->strictFunction(str, a, b, ec); | 3604 bool result = imp->strictFunction(str, a, b, ec); |
| 3605 if (UNLIKELY(ec)) | 3605 if (UNLIKELY(ec)) |
| 3606 goto fail; | 3606 goto fail; |
| 3607 return v8Boolean(result, args.GetIsolate()); | 3607 return v8Boolean(result, args.GetIsolate()); |
| 3608 } | 3608 } |
| 3609 fail: | 3609 fail: |
| 3610 return setDOMException(ec, args.GetIsolate()); | 3610 return setDOMException(ec, args.GetIsolate()); |
| 3611 } | 3611 } |
| 3612 | 3612 |
| 3613 static v8::Handle<v8::Value> strictFunctionMethodCallback(const v8::Arguments& a
rgs) | 3613 static v8::Handle<v8::Value> strictFunctionMethodCallback(const v8::Arguments& a
rgs) |
| 3614 { | 3614 { |
| 3615 return TestObjV8Internal::strictFunctionMethod(args); | 3615 return TestObjV8Internal::strictFunctionMethod(args); |
| 3616 } | 3616 } |
| 3617 | 3617 |
| 3618 static v8::Handle<v8::Value> variadicStringMethodMethod(const v8::Arguments& arg
s) | 3618 static v8::Handle<v8::Value> variadicStringMethodMethod(const v8::Arguments& arg
s) |
| 3619 { | 3619 { |
| 3620 if (args.Length() < 1) | 3620 if (args.Length() < 1) |
| 3621 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3621 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3622 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3622 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3623 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, head, args[0]); | 3623 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, head, args[0]); |
| 3624 V8TRYCATCH(Vector<String>, tail, toNativeArguments<String>(args, 1)); | 3624 V8TRYCATCH(Vector<String>, tail, toNativeArguments<String>(args, 1)); |
| 3625 imp->variadicStringMethod(head, tail); | 3625 imp->variadicStringMethod(head, tail); |
| 3626 return v8Undefined(); | 3626 return v8Undefined(); |
| 3627 } | 3627 } |
| 3628 | 3628 |
| 3629 static v8::Handle<v8::Value> variadicStringMethodMethodCallback(const v8::Argume
nts& args) | 3629 static v8::Handle<v8::Value> variadicStringMethodMethodCallback(const v8::Argume
nts& args) |
| 3630 { | 3630 { |
| 3631 return TestObjV8Internal::variadicStringMethodMethod(args); | 3631 return TestObjV8Internal::variadicStringMethodMethod(args); |
| 3632 } | 3632 } |
| 3633 | 3633 |
| 3634 static v8::Handle<v8::Value> variadicDoubleMethodMethod(const v8::Arguments& arg
s) | 3634 static v8::Handle<v8::Value> variadicDoubleMethodMethod(const v8::Arguments& arg
s) |
| 3635 { | 3635 { |
| 3636 if (args.Length() < 1) | 3636 if (args.Length() < 1) |
| 3637 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3637 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3638 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3638 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3639 V8TRYCATCH(double, head, static_cast<double>(args[0]->NumberValue())); | 3639 V8TRYCATCH(double, head, static_cast<double>(args[0]->NumberValue())); |
| 3640 V8TRYCATCH(Vector<double>, tail, toNativeArguments<double>(args, 1)); | 3640 V8TRYCATCH(Vector<double>, tail, toNativeArguments<double>(args, 1)); |
| 3641 imp->variadicDoubleMethod(head, tail); | 3641 imp->variadicDoubleMethod(head, tail); |
| 3642 return v8Undefined(); | 3642 return v8Undefined(); |
| 3643 } | 3643 } |
| 3644 | 3644 |
| 3645 static v8::Handle<v8::Value> variadicDoubleMethodMethodCallback(const v8::Argume
nts& args) | 3645 static v8::Handle<v8::Value> variadicDoubleMethodMethodCallback(const v8::Argume
nts& args) |
| 3646 { | 3646 { |
| 3647 return TestObjV8Internal::variadicDoubleMethodMethod(args); | 3647 return TestObjV8Internal::variadicDoubleMethodMethod(args); |
| 3648 } | 3648 } |
| 3649 | 3649 |
| 3650 static v8::Handle<v8::Value> variadicNodeMethodMethod(const v8::Arguments& args) | 3650 static v8::Handle<v8::Value> variadicNodeMethodMethod(const v8::Arguments& args) |
| 3651 { | 3651 { |
| 3652 if (args.Length() < 1) | 3652 if (args.Length() < 1) |
| 3653 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3653 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3654 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3654 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3655 V8TRYCATCH(Node*, head, V8Node::HasInstance(args[0], args.GetIsolate(), worl
dType(args.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(args[0
])) : 0); | 3655 V8TRYCATCH(Node*, head, V8Node::HasInstance(args[0], args.GetIsolate(), worl
dType(args.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(args[0
])) : 0); |
| 3656 Vector<RefPtr<Node> > tail; | 3656 Vector<RefPtr<Node> > tail; |
| 3657 for (int i = 1; i < args.Length(); ++i) { | 3657 for (int i = 1; i < args.Length(); ++i) { |
| 3658 if (!V8Node::HasInstance(args[i], args.GetIsolate(), worldType(args.GetI
solate()))) | 3658 if (!V8Node::HasInstance(args[i], args.GetIsolate(), worldType(args.GetI
solate()))) |
| 3659 return throwTypeError(0, args.GetIsolate()); | 3659 return throwTypeError(0, args.GetIsolate()); |
| 3660 tail.append(V8Node::toNative(v8::Handle<v8::Object>::Cast(args[i]))); | 3660 tail.append(V8Node::toNative(v8::Handle<v8::Object>::Cast(args[i]))); |
| 3661 } | 3661 } |
| 3662 imp->variadicNodeMethod(head, tail); | 3662 imp->variadicNodeMethod(head, tail); |
| 3663 return v8Undefined(); | 3663 return v8Undefined(); |
| 3664 } | 3664 } |
| 3665 | 3665 |
| 3666 static v8::Handle<v8::Value> variadicNodeMethodMethodCallback(const v8::Argument
s& args) | 3666 static v8::Handle<v8::Value> variadicNodeMethodMethodCallback(const v8::Argument
s& args) |
| 3667 { | 3667 { |
| 3668 return TestObjV8Internal::variadicNodeMethodMethod(args); | 3668 return TestObjV8Internal::variadicNodeMethodMethod(args); |
| 3669 } | 3669 } |
| 3670 | 3670 |
| 3671 static v8::Handle<v8::Value> perWorldMethodMethod(const v8::Arguments& args) | 3671 static v8::Handle<v8::Value> perWorldMethodMethod(const v8::Arguments& args) |
| 3672 { | 3672 { |
| 3673 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3673 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3674 imp->perWorldMethod(); | 3674 imp->perWorldMethod(); |
| 3675 return v8Undefined(); | 3675 return v8Undefined(); |
| 3676 } | 3676 } |
| 3677 | 3677 |
| 3678 static v8::Handle<v8::Value> perWorldMethodMethodForMainWorld(const v8::Argument
s& args) | 3678 static v8::Handle<v8::Value> perWorldMethodMethodForMainWorld(const v8::Argument
s& args) |
| 3679 { | 3679 { |
| 3680 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3680 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3681 imp->perWorldMethod(); | 3681 imp->perWorldMethod(); |
| 3682 return v8Undefined(); | 3682 return v8Undefined(); |
| 3683 } | 3683 } |
| 3684 | 3684 |
| 3685 static v8::Handle<v8::Value> perWorldMethodMethodCallback(const v8::Arguments& a
rgs) | 3685 static v8::Handle<v8::Value> perWorldMethodMethodCallback(const v8::Arguments& a
rgs) |
| 3686 { | 3686 { |
| 3687 return TestObjV8Internal::perWorldMethodMethod(args); | 3687 return TestObjV8Internal::perWorldMethodMethod(args); |
| 3688 } | 3688 } |
| 3689 | 3689 |
| 3690 static v8::Handle<v8::Value> perWorldMethodMethodCallbackForMainWorld(const v8::
Arguments& args) | 3690 static v8::Handle<v8::Value> perWorldMethodMethodCallbackForMainWorld(const v8::
Arguments& args) |
| 3691 { | 3691 { |
| 3692 return TestObjV8Internal::perWorldMethodMethodForMainWorld(args); | 3692 return TestObjV8Internal::perWorldMethodMethodForMainWorld(args); |
| 3693 } | 3693 } |
| 3694 | 3694 |
| 3695 static v8::Handle<v8::Value> overloadedPerWorldMethod1Method(const v8::Arguments
& args) | 3695 static v8::Handle<v8::Value> overloadedPerWorldMethod1Method(const v8::Arguments
& args) |
| 3696 { | 3696 { |
| 3697 if (args.Length() < 1) | 3697 if (args.Length() < 1) |
| 3698 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3698 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3699 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3699 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3700 V8TRYCATCH(int, longArg, toInt32(args[0])); | 3700 V8TRYCATCH(int, longArg, toInt32(args[0])); |
| 3701 imp->overloadedPerWorldMethod(longArg); | 3701 imp->overloadedPerWorldMethod(longArg); |
| 3702 return v8Undefined(); | 3702 return v8Undefined(); |
| 3703 } | 3703 } |
| 3704 | 3704 |
| 3705 static v8::Handle<v8::Value> overloadedPerWorldMethod1MethodForMainWorld(const v
8::Arguments& args) | 3705 static v8::Handle<v8::Value> overloadedPerWorldMethod1MethodForMainWorld(const v
8::Arguments& args) |
| 3706 { | 3706 { |
| 3707 if (args.Length() < 1) | 3707 if (args.Length() < 1) |
| 3708 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3708 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3709 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3709 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3710 V8TRYCATCH(int, longArg, toInt32(args[0])); | 3710 V8TRYCATCH(int, longArg, toInt32(args[0])); |
| 3711 imp->overloadedPerWorldMethod(longArg); | 3711 imp->overloadedPerWorldMethod(longArg); |
| 3712 return v8Undefined(); | 3712 return v8Undefined(); |
| 3713 } | 3713 } |
| 3714 | 3714 |
| 3715 static v8::Handle<v8::Value> overloadedPerWorldMethod2Method(const v8::Arguments
& args) | 3715 static v8::Handle<v8::Value> overloadedPerWorldMethod2Method(const v8::Arguments
& args) |
| 3716 { | 3716 { |
| 3717 if (args.Length() < 2) | 3717 if (args.Length() < 2) |
| 3718 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3718 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3719 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3719 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3720 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, strArg, args[0]); | 3720 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, strArg, args[0]); |
| 3721 V8TRYCATCH(int, longArg, toInt32(args[1])); | 3721 V8TRYCATCH(int, longArg, toInt32(args[1])); |
| 3722 imp->overloadedPerWorldMethod(strArg, longArg); | 3722 imp->overloadedPerWorldMethod(strArg, longArg); |
| 3723 return v8Undefined(); | 3723 return v8Undefined(); |
| 3724 } | 3724 } |
| 3725 | 3725 |
| 3726 static v8::Handle<v8::Value> overloadedPerWorldMethod2MethodForMainWorld(const v
8::Arguments& args) | 3726 static v8::Handle<v8::Value> overloadedPerWorldMethod2MethodForMainWorld(const v
8::Arguments& args) |
| 3727 { | 3727 { |
| 3728 if (args.Length() < 2) | 3728 if (args.Length() < 2) |
| 3729 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3729 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3730 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3730 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3731 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, strArg, args[0]); | 3731 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, strArg, args[0]); |
| 3732 V8TRYCATCH(int, longArg, toInt32(args[1])); | 3732 V8TRYCATCH(int, longArg, toInt32(args[1])); |
| 3733 imp->overloadedPerWorldMethod(strArg, longArg); | 3733 imp->overloadedPerWorldMethod(strArg, longArg); |
| 3734 return v8Undefined(); | 3734 return v8Undefined(); |
| 3735 } | 3735 } |
| 3736 | 3736 |
| 3737 static v8::Handle<v8::Value> overloadedPerWorldMethodMethod(const v8::Arguments&
args) | 3737 static v8::Handle<v8::Value> overloadedPerWorldMethodMethod(const v8::Arguments&
args) |
| 3738 { | 3738 { |
| 3739 if (args.Length() == 1) | 3739 if (args.Length() == 1) |
| 3740 return overloadedPerWorldMethod1Method(args); | 3740 return overloadedPerWorldMethod1Method(args); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 3763 | 3763 |
| 3764 static v8::Handle<v8::Value> overloadedPerWorldMethodMethodCallbackForMainWorld(
const v8::Arguments& args) | 3764 static v8::Handle<v8::Value> overloadedPerWorldMethodMethodCallbackForMainWorld(
const v8::Arguments& args) |
| 3765 { | 3765 { |
| 3766 return TestObjV8Internal::overloadedPerWorldMethodMethodForMainWorld(args); | 3766 return TestObjV8Internal::overloadedPerWorldMethodMethodForMainWorld(args); |
| 3767 } | 3767 } |
| 3768 | 3768 |
| 3769 static v8::Handle<v8::Value> activityLoggedMethod1Method(const v8::Arguments& ar
gs) | 3769 static v8::Handle<v8::Value> activityLoggedMethod1Method(const v8::Arguments& ar
gs) |
| 3770 { | 3770 { |
| 3771 if (args.Length() < 1) | 3771 if (args.Length() < 1) |
| 3772 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3772 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3773 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3773 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3774 V8TRYCATCH(int, longArg, toInt32(args[0])); | 3774 V8TRYCATCH(int, longArg, toInt32(args[0])); |
| 3775 imp->activityLoggedMethod1(longArg); | 3775 imp->activityLoggedMethod1(longArg); |
| 3776 return v8Undefined(); | 3776 return v8Undefined(); |
| 3777 } | 3777 } |
| 3778 | 3778 |
| 3779 static v8::Handle<v8::Value> activityLoggedMethod1MethodCallback(const v8::Argum
ents& args) | 3779 static v8::Handle<v8::Value> activityLoggedMethod1MethodCallback(const v8::Argum
ents& args) |
| 3780 { | 3780 { |
| 3781 V8PerContextData* contextData = V8PerContextData::from(args.GetIsolate()->Ge
tCurrentContext()); | 3781 V8PerContextData* contextData = V8PerContextData::from(args.GetIsolate()->Ge
tCurrentContext()); |
| 3782 if (contextData && contextData->activityLogger()) { | 3782 if (contextData && contextData->activityLogger()) { |
| 3783 Vector<v8::Handle<v8::Value> > loggerArgs = toVectorOfArguments(args); | 3783 Vector<v8::Handle<v8::Value> > loggerArgs = toVectorOfArguments(args); |
| 3784 contextData->activityLogger()->log("TestObject.activityLoggedMethod1", a
rgs.Length(), loggerArgs.data(), "Method"); | 3784 contextData->activityLogger()->log("TestObject.activityLoggedMethod1", a
rgs.Length(), loggerArgs.data(), "Method"); |
| 3785 } | 3785 } |
| 3786 return TestObjV8Internal::activityLoggedMethod1Method(args); | 3786 return TestObjV8Internal::activityLoggedMethod1Method(args); |
| 3787 } | 3787 } |
| 3788 | 3788 |
| 3789 static v8::Handle<v8::Value> activityLoggedMethod2Method(const v8::Arguments& ar
gs) | 3789 static v8::Handle<v8::Value> activityLoggedMethod2Method(const v8::Arguments& ar
gs) |
| 3790 { | 3790 { |
| 3791 if (args.Length() < 1) | 3791 if (args.Length() < 1) |
| 3792 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3792 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3793 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3793 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3794 V8TRYCATCH(int, longArg, toInt32(args[0])); | 3794 V8TRYCATCH(int, longArg, toInt32(args[0])); |
| 3795 imp->activityLoggedMethod2(longArg); | 3795 imp->activityLoggedMethod2(longArg); |
| 3796 return v8Undefined(); | 3796 return v8Undefined(); |
| 3797 } | 3797 } |
| 3798 | 3798 |
| 3799 static v8::Handle<v8::Value> activityLoggedMethod2MethodForMainWorld(const v8::A
rguments& args) | 3799 static v8::Handle<v8::Value> activityLoggedMethod2MethodForMainWorld(const v8::A
rguments& args) |
| 3800 { | 3800 { |
| 3801 if (args.Length() < 1) | 3801 if (args.Length() < 1) |
| 3802 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3802 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3803 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3803 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3804 V8TRYCATCH(int, longArg, toInt32(args[0])); | 3804 V8TRYCATCH(int, longArg, toInt32(args[0])); |
| 3805 imp->activityLoggedMethod2(longArg); | 3805 imp->activityLoggedMethod2(longArg); |
| 3806 return v8Undefined(); | 3806 return v8Undefined(); |
| 3807 } | 3807 } |
| 3808 | 3808 |
| 3809 static v8::Handle<v8::Value> activityLoggedMethod2MethodCallback(const v8::Argum
ents& args) | 3809 static v8::Handle<v8::Value> activityLoggedMethod2MethodCallback(const v8::Argum
ents& args) |
| 3810 { | 3810 { |
| 3811 V8PerContextData* contextData = V8PerContextData::from(args.GetIsolate()->Ge
tCurrentContext()); | 3811 V8PerContextData* contextData = V8PerContextData::from(args.GetIsolate()->Ge
tCurrentContext()); |
| 3812 if (contextData && contextData->activityLogger()) { | 3812 if (contextData && contextData->activityLogger()) { |
| 3813 Vector<v8::Handle<v8::Value> > loggerArgs = toVectorOfArguments(args); | 3813 Vector<v8::Handle<v8::Value> > loggerArgs = toVectorOfArguments(args); |
| 3814 contextData->activityLogger()->log("TestObject.activityLoggedMethod2", a
rgs.Length(), loggerArgs.data(), "Method"); | 3814 contextData->activityLogger()->log("TestObject.activityLoggedMethod2", a
rgs.Length(), loggerArgs.data(), "Method"); |
| 3815 } | 3815 } |
| 3816 return TestObjV8Internal::activityLoggedMethod2Method(args); | 3816 return TestObjV8Internal::activityLoggedMethod2Method(args); |
| 3817 } | 3817 } |
| 3818 | 3818 |
| 3819 static v8::Handle<v8::Value> activityLoggedMethod2MethodCallbackForMainWorld(con
st v8::Arguments& args) | 3819 static v8::Handle<v8::Value> activityLoggedMethod2MethodCallbackForMainWorld(con
st v8::Arguments& args) |
| 3820 { | 3820 { |
| 3821 V8PerContextData* contextData = V8PerContextData::from(args.GetIsolate()->Ge
tCurrentContext()); | 3821 V8PerContextData* contextData = V8PerContextData::from(args.GetIsolate()->Ge
tCurrentContext()); |
| 3822 if (contextData && contextData->activityLogger()) { | 3822 if (contextData && contextData->activityLogger()) { |
| 3823 Vector<v8::Handle<v8::Value> > loggerArgs = toVectorOfArguments(args); | 3823 Vector<v8::Handle<v8::Value> > loggerArgs = toVectorOfArguments(args); |
| 3824 contextData->activityLogger()->log("TestObject.activityLoggedMethod2", a
rgs.Length(), loggerArgs.data(), "Method"); | 3824 contextData->activityLogger()->log("TestObject.activityLoggedMethod2", a
rgs.Length(), loggerArgs.data(), "Method"); |
| 3825 } | 3825 } |
| 3826 return TestObjV8Internal::activityLoggedMethod2MethodForMainWorld(args); | 3826 return TestObjV8Internal::activityLoggedMethod2MethodForMainWorld(args); |
| 3827 } | 3827 } |
| 3828 | 3828 |
| 3829 static v8::Handle<v8::Value> activityLoggedInIsolatedWorldMethodMethod(const v8:
:Arguments& args) | 3829 static v8::Handle<v8::Value> activityLoggedInIsolatedWorldMethodMethod(const v8:
:Arguments& args) |
| 3830 { | 3830 { |
| 3831 if (args.Length() < 1) | 3831 if (args.Length() < 1) |
| 3832 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3832 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3833 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3833 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3834 V8TRYCATCH(int, longArg, toInt32(args[0])); | 3834 V8TRYCATCH(int, longArg, toInt32(args[0])); |
| 3835 imp->activityLoggedInIsolatedWorldMethod(longArg); | 3835 imp->activityLoggedInIsolatedWorldMethod(longArg); |
| 3836 return v8Undefined(); | 3836 return v8Undefined(); |
| 3837 } | 3837 } |
| 3838 | 3838 |
| 3839 static v8::Handle<v8::Value> activityLoggedInIsolatedWorldMethodMethodForMainWor
ld(const v8::Arguments& args) | 3839 static v8::Handle<v8::Value> activityLoggedInIsolatedWorldMethodMethodForMainWor
ld(const v8::Arguments& args) |
| 3840 { | 3840 { |
| 3841 if (args.Length() < 1) | 3841 if (args.Length() < 1) |
| 3842 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3842 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3843 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3843 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3844 V8TRYCATCH(int, longArg, toInt32(args[0])); | 3844 V8TRYCATCH(int, longArg, toInt32(args[0])); |
| 3845 imp->activityLoggedInIsolatedWorldMethod(longArg); | 3845 imp->activityLoggedInIsolatedWorldMethod(longArg); |
| 3846 return v8Undefined(); | 3846 return v8Undefined(); |
| 3847 } | 3847 } |
| 3848 | 3848 |
| 3849 static v8::Handle<v8::Value> activityLoggedInIsolatedWorldMethodMethodCallback(c
onst v8::Arguments& args) | 3849 static v8::Handle<v8::Value> activityLoggedInIsolatedWorldMethodMethodCallback(c
onst v8::Arguments& args) |
| 3850 { | 3850 { |
| 3851 V8PerContextData* contextData = V8PerContextData::from(args.GetIsolate()->Ge
tCurrentContext()); | 3851 V8PerContextData* contextData = V8PerContextData::from(args.GetIsolate()->Ge
tCurrentContext()); |
| 3852 if (contextData && contextData->activityLogger()) { | 3852 if (contextData && contextData->activityLogger()) { |
| 3853 Vector<v8::Handle<v8::Value> > loggerArgs = toVectorOfArguments(args); | 3853 Vector<v8::Handle<v8::Value> > loggerArgs = toVectorOfArguments(args); |
| 3854 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW
orldMethod", args.Length(), loggerArgs.data(), "Method"); | 3854 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW
orldMethod", args.Length(), loggerArgs.data(), "Method"); |
| 3855 } | 3855 } |
| 3856 return TestObjV8Internal::activityLoggedInIsolatedWorldMethodMethod(args); | 3856 return TestObjV8Internal::activityLoggedInIsolatedWorldMethodMethod(args); |
| 3857 } | 3857 } |
| 3858 | 3858 |
| 3859 static v8::Handle<v8::Value> activityLoggedInIsolatedWorldMethodMethodCallbackFo
rMainWorld(const v8::Arguments& args) | 3859 static v8::Handle<v8::Value> activityLoggedInIsolatedWorldMethodMethodCallbackFo
rMainWorld(const v8::Arguments& args) |
| 3860 { | 3860 { |
| 3861 return TestObjV8Internal::activityLoggedInIsolatedWorldMethodMethodForMainWo
rld(args); | 3861 return TestObjV8Internal::activityLoggedInIsolatedWorldMethodMethodForMainWo
rld(args); |
| 3862 } | 3862 } |
| 3863 | 3863 |
| 3864 static v8::Handle<v8::Value> overloadedActivityLoggedMethod1Method(const v8::Arg
uments& args) | 3864 static v8::Handle<v8::Value> overloadedActivityLoggedMethod1Method(const v8::Arg
uments& args) |
| 3865 { | 3865 { |
| 3866 if (args.Length() < 1) | 3866 if (args.Length() < 1) |
| 3867 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3867 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3868 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3868 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3869 V8TRYCATCH(int, longArg, toInt32(args[0])); | 3869 V8TRYCATCH(int, longArg, toInt32(args[0])); |
| 3870 imp->overloadedActivityLoggedMethod(longArg); | 3870 imp->overloadedActivityLoggedMethod(longArg); |
| 3871 return v8Undefined(); | 3871 return v8Undefined(); |
| 3872 } | 3872 } |
| 3873 | 3873 |
| 3874 static v8::Handle<v8::Value> overloadedActivityLoggedMethod1MethodForMainWorld(c
onst v8::Arguments& args) | 3874 static v8::Handle<v8::Value> overloadedActivityLoggedMethod1MethodForMainWorld(c
onst v8::Arguments& args) |
| 3875 { | 3875 { |
| 3876 if (args.Length() < 1) | 3876 if (args.Length() < 1) |
| 3877 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3877 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3878 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3878 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3879 V8TRYCATCH(int, longArg, toInt32(args[0])); | 3879 V8TRYCATCH(int, longArg, toInt32(args[0])); |
| 3880 imp->overloadedActivityLoggedMethod(longArg); | 3880 imp->overloadedActivityLoggedMethod(longArg); |
| 3881 return v8Undefined(); | 3881 return v8Undefined(); |
| 3882 } | 3882 } |
| 3883 | 3883 |
| 3884 static v8::Handle<v8::Value> overloadedActivityLoggedMethod2Method(const v8::Arg
uments& args) | 3884 static v8::Handle<v8::Value> overloadedActivityLoggedMethod2Method(const v8::Arg
uments& args) |
| 3885 { | 3885 { |
| 3886 if (args.Length() < 2) | 3886 if (args.Length() < 2) |
| 3887 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3887 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3888 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3888 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3889 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, strArg, args[0]); | 3889 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, strArg, args[0]); |
| 3890 V8TRYCATCH(int, longArg, toInt32(args[1])); | 3890 V8TRYCATCH(int, longArg, toInt32(args[1])); |
| 3891 imp->overloadedActivityLoggedMethod(strArg, longArg); | 3891 imp->overloadedActivityLoggedMethod(strArg, longArg); |
| 3892 return v8Undefined(); | 3892 return v8Undefined(); |
| 3893 } | 3893 } |
| 3894 | 3894 |
| 3895 static v8::Handle<v8::Value> overloadedActivityLoggedMethod2MethodForMainWorld(c
onst v8::Arguments& args) | 3895 static v8::Handle<v8::Value> overloadedActivityLoggedMethod2MethodForMainWorld(c
onst v8::Arguments& args) |
| 3896 { | 3896 { |
| 3897 if (args.Length() < 2) | 3897 if (args.Length() < 2) |
| 3898 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3898 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3899 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3899 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3900 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, strArg, args[0]); | 3900 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, strArg, args[0]); |
| 3901 V8TRYCATCH(int, longArg, toInt32(args[1])); | 3901 V8TRYCATCH(int, longArg, toInt32(args[1])); |
| 3902 imp->overloadedActivityLoggedMethod(strArg, longArg); | 3902 imp->overloadedActivityLoggedMethod(strArg, longArg); |
| 3903 return v8Undefined(); | 3903 return v8Undefined(); |
| 3904 } | 3904 } |
| 3905 | 3905 |
| 3906 static v8::Handle<v8::Value> overloadedActivityLoggedMethodMethod(const v8::Argu
ments& args) | 3906 static v8::Handle<v8::Value> overloadedActivityLoggedMethodMethod(const v8::Argu
ments& args) |
| 3907 { | 3907 { |
| 3908 if (args.Length() == 1) | 3908 if (args.Length() == 1) |
| 3909 return overloadedActivityLoggedMethod1Method(args); | 3909 return overloadedActivityLoggedMethod1Method(args); |
| (...skipping 30 matching lines...) Expand all Loading... |
| 3940 V8PerContextData* contextData = V8PerContextData::from(args.GetIsolate()->Ge
tCurrentContext()); | 3940 V8PerContextData* contextData = V8PerContextData::from(args.GetIsolate()->Ge
tCurrentContext()); |
| 3941 if (contextData && contextData->activityLogger()) { | 3941 if (contextData && contextData->activityLogger()) { |
| 3942 Vector<v8::Handle<v8::Value> > loggerArgs = toVectorOfArguments(args); | 3942 Vector<v8::Handle<v8::Value> > loggerArgs = toVectorOfArguments(args); |
| 3943 contextData->activityLogger()->log("TestObject.overloadedActivityLoggedM
ethod", args.Length(), loggerArgs.data(), "Method"); | 3943 contextData->activityLogger()->log("TestObject.overloadedActivityLoggedM
ethod", args.Length(), loggerArgs.data(), "Method"); |
| 3944 } | 3944 } |
| 3945 return TestObjV8Internal::overloadedActivityLoggedMethodMethodForMainWorld(a
rgs); | 3945 return TestObjV8Internal::overloadedActivityLoggedMethodMethodForMainWorld(a
rgs); |
| 3946 } | 3946 } |
| 3947 | 3947 |
| 3948 static v8::Handle<v8::Value> deprecatedMethodMethod(const v8::Arguments& args) | 3948 static v8::Handle<v8::Value> deprecatedMethodMethod(const v8::Arguments& args) |
| 3949 { | 3949 { |
| 3950 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3950 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3951 imp->deprecatedMethod(); | 3951 imp->deprecatedMethod(); |
| 3952 return v8Undefined(); | 3952 return v8Undefined(); |
| 3953 } | 3953 } |
| 3954 | 3954 |
| 3955 static v8::Handle<v8::Value> deprecatedMethodMethodCallback(const v8::Arguments&
args) | 3955 static v8::Handle<v8::Value> deprecatedMethodMethodCallback(const v8::Arguments&
args) |
| 3956 { | 3956 { |
| 3957 UseCounter::countDeprecation(activeDOMWindow(), UseCounter::Method); | 3957 UseCounter::countDeprecation(activeDOMWindow(), UseCounter::Method); |
| 3958 return TestObjV8Internal::deprecatedMethodMethod(args); | 3958 return TestObjV8Internal::deprecatedMethodMethod(args); |
| 3959 } | 3959 } |
| 3960 | 3960 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 3974 { | 3974 { |
| 3975 if (args.Length() < 1) | 3975 if (args.Length() < 1) |
| 3976 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3976 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3977 if (args.Length() <= 0 || !args[0]->IsFunction()) | 3977 if (args.Length() <= 0 || !args[0]->IsFunction()) |
| 3978 return throwTypeError(0, args.GetIsolate()); | 3978 return throwTypeError(0, args.GetIsolate()); |
| 3979 RefPtr<TestCallback> testCallback = V8TestCallback::create(args[0], getScrip
tExecutionContext()); | 3979 RefPtr<TestCallback> testCallback = V8TestCallback::create(args[0], getScrip
tExecutionContext()); |
| 3980 | 3980 |
| 3981 RefPtr<TestObj> impl = TestObj::create(testCallback); | 3981 RefPtr<TestObj> impl = TestObj::create(testCallback); |
| 3982 v8::Handle<v8::Object> wrapper = args.Holder(); | 3982 v8::Handle<v8::Object> wrapper = args.Holder(); |
| 3983 | 3983 |
| 3984 V8DOMWrapper::associateObjectWithWrapper(impl.release(), &V8TestObj::info, w
rapper, args.GetIsolate(), WrapperConfiguration::Dependent); | 3984 V8DOMWrapper::associateObjectWithWrapper(impl.release(), &V8TestObject::info
, wrapper, args.GetIsolate(), WrapperConfiguration::Dependent); |
| 3985 return wrapper; | 3985 return wrapper; |
| 3986 } | 3986 } |
| 3987 | 3987 |
| 3988 } // namespace TestObjV8Internal | 3988 } // namespace TestObjV8Internal |
| 3989 | 3989 |
| 3990 static const V8DOMConfiguration::BatchedAttribute V8TestObjAttrs[] = { | 3990 static const V8DOMConfiguration::BatchedAttribute V8TestObjectAttrs[] = { |
| 3991 // Attribute 'readOnlyLongAttr' (Type: 'attribute' ExtAttr: '') | 3991 // Attribute 'readOnlyLongAttr' (Type: 'attribute' ExtAttr: '') |
| 3992 {"readOnlyLongAttr", TestObjV8Internal::readOnlyLongAttrAttrGetterCallback,
0, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_ca
st<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | 3992 {"readOnlyLongAttr", TestObjV8Internal::readOnlyLongAttrAttrGetterCallback,
0, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_ca
st<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
| 3993 // Attribute 'readOnlyStringAttr' (Type: 'attribute' ExtAttr: '') | 3993 // Attribute 'readOnlyStringAttr' (Type: 'attribute' ExtAttr: '') |
| 3994 {"readOnlyStringAttr", TestObjV8Internal::readOnlyStringAttrAttrGetterCallba
ck, 0, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), stati
c_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | 3994 {"readOnlyStringAttr", TestObjV8Internal::readOnlyStringAttrAttrGetterCallba
ck, 0, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), stati
c_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
| 3995 // Attribute 'readOnlyTestObjAttr' (Type: 'attribute' ExtAttr: '') | 3995 // Attribute 'readOnlyTestObjectAttr' (Type: 'attribute' ExtAttr: '') |
| 3996 {"readOnlyTestObjAttr", TestObjV8Internal::readOnlyTestObjAttrAttrGetterCall
back, 0, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), sta
tic_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | 3996 {"readOnlyTestObjectAttr", TestObjV8Internal::readOnlyTestObjectAttrAttrGett
erCallback, 0, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT
), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
| 3997 // Attribute 'staticReadOnlyLongAttr' (Type: 'attribute' ExtAttr: '') | 3997 // Attribute 'staticReadOnlyLongAttr' (Type: 'attribute' ExtAttr: '') |
| 3998 {"staticReadOnlyLongAttr", TestObjV8Internal::staticReadOnlyLongAttrAttrGett
erCallback, 0, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT
), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | 3998 {"staticReadOnlyLongAttr", TestObjV8Internal::staticReadOnlyLongAttrAttrGett
erCallback, 0, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT
), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
| 3999 // Attribute 'staticStringAttr' (Type: 'attribute' ExtAttr: '') | 3999 // Attribute 'staticStringAttr' (Type: 'attribute' ExtAttr: '') |
| 4000 {"staticStringAttr", TestObjV8Internal::staticStringAttrAttrGetterCallback,
TestObjV8Internal::staticStringAttrAttrSetterCallback, 0, 0, 0 /* no data */, st
atic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8
::None), 0 /* on instance */}, | 4000 {"staticStringAttr", TestObjV8Internal::staticStringAttrAttrGetterCallback,
TestObjV8Internal::staticStringAttrAttrSetterCallback, 0, 0, 0 /* no data */, st
atic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8
::None), 0 /* on instance */}, |
| 4001 // Attribute 'TestSubObj' (Type: 'attribute' ExtAttr: '') | 4001 // Attribute 'TestSubObj' (Type: 'attribute' ExtAttr: '') |
| 4002 {"TestSubObj", TestObjV8Internal::TestObjConstructorGetter, 0, 0, 0, &V8Test
SubObj::info, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Prope
rtyAttribute>(v8::None | v8::DontEnum), 0 /* on instance */}, | 4002 {"TestSubObj", TestObjV8Internal::TestObjConstructorGetter, 0, 0, 0, &V8Test
SubObj::info, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Prope
rtyAttribute>(v8::None | v8::DontEnum), 0 /* on instance */}, |
| 4003 // Attribute 'enumAttr' (Type: 'attribute' ExtAttr: '') | 4003 // Attribute 'enumAttr' (Type: 'attribute' ExtAttr: '') |
| 4004 {"enumAttr", TestObjV8Internal::enumAttrAttrGetterCallback, TestObjV8Interna
l::enumAttrAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessCont
rol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instanc
e */}, | 4004 {"enumAttr", TestObjV8Internal::enumAttrAttrGetterCallback, TestObjV8Interna
l::enumAttrAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessCont
rol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instanc
e */}, |
| 4005 // Attribute 'readOnlyEnumAttr' (Type: 'attribute' ExtAttr: '') | 4005 // Attribute 'readOnlyEnumAttr' (Type: 'attribute' ExtAttr: '') |
| 4006 {"readOnlyEnumAttr", TestObjV8Internal::readOnlyEnumAttrAttrGetterCallback,
0, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_ca
st<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | 4006 {"readOnlyEnumAttr", TestObjV8Internal::readOnlyEnumAttrAttrGetterCallback,
0, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_ca
st<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4081 #if ENABLE(Condition1) && ENABLE(Condition2) | 4081 #if ENABLE(Condition1) && ENABLE(Condition2) |
| 4082 // Attribute 'conditionalAttr2' (Type: 'attribute' ExtAttr: 'Conditional') | 4082 // Attribute 'conditionalAttr2' (Type: 'attribute' ExtAttr: 'Conditional') |
| 4083 {"conditionalAttr2", TestObjV8Internal::conditionalAttr2AttrGetterCallback,
TestObjV8Internal::conditionalAttr2AttrSetterCallback, 0, 0, 0 /* no data */, st
atic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8
::None), 0 /* on instance */}, | 4083 {"conditionalAttr2", TestObjV8Internal::conditionalAttr2AttrGetterCallback,
TestObjV8Internal::conditionalAttr2AttrSetterCallback, 0, 0, 0 /* no data */, st
atic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8
::None), 0 /* on instance */}, |
| 4084 #endif // ENABLE(Condition1) && ENABLE(Condition2) | 4084 #endif // ENABLE(Condition1) && ENABLE(Condition2) |
| 4085 #if ENABLE(Condition1) || ENABLE(Condition2) | 4085 #if ENABLE(Condition1) || ENABLE(Condition2) |
| 4086 // Attribute 'conditionalAttr3' (Type: 'attribute' ExtAttr: 'Conditional') | 4086 // Attribute 'conditionalAttr3' (Type: 'attribute' ExtAttr: 'Conditional') |
| 4087 {"conditionalAttr3", TestObjV8Internal::conditionalAttr3AttrGetterCallback,
TestObjV8Internal::conditionalAttr3AttrSetterCallback, 0, 0, 0 /* no data */, st
atic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8
::None), 0 /* on instance */}, | 4087 {"conditionalAttr3", TestObjV8Internal::conditionalAttr3AttrGetterCallback,
TestObjV8Internal::conditionalAttr3AttrSetterCallback, 0, 0, 0 /* no data */, st
atic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8
::None), 0 /* on instance */}, |
| 4088 #endif // ENABLE(Condition1) || ENABLE(Condition2) | 4088 #endif // ENABLE(Condition1) || ENABLE(Condition2) |
| 4089 #if ENABLE(Condition1) | 4089 #if ENABLE(Condition1) |
| 4090 // Attribute 'conditionalAttr4' (Type: 'attribute' ExtAttr: 'Conditional') | 4090 // Attribute 'conditionalAttr4' (Type: 'attribute' ExtAttr: 'Conditional') |
| 4091 {"conditionalAttr4", TestObjV8Internal::TestObjConstructorGetter, TestObjV8I
nternal::TestObjReplaceableAttrSetterCallback, 0, 0, &V8TestObjectA::info, stati
c_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::N
one | v8::DontEnum), 0 /* on instance */}, | 4091 {"conditionalAttr4", TestObjV8Internal::TestObjConstructorGetter, TestObjV8I
nternal::TestObjReplaceableAttrSetterCallback, 0, 0, &V8TestObjectectA::info, st
atic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8
::None | v8::DontEnum), 0 /* on instance */}, |
| 4092 #endif // ENABLE(Condition1) | 4092 #endif // ENABLE(Condition1) |
| 4093 #if ENABLE(Condition1) && ENABLE(Condition2) | 4093 #if ENABLE(Condition1) && ENABLE(Condition2) |
| 4094 // Attribute 'conditionalAttr5' (Type: 'attribute' ExtAttr: 'Conditional') | 4094 // Attribute 'conditionalAttr5' (Type: 'attribute' ExtAttr: 'Conditional') |
| 4095 {"conditionalAttr5", TestObjV8Internal::TestObjConstructorGetter, TestObjV8I
nternal::TestObjReplaceableAttrSetterCallback, 0, 0, &V8TestObjectB::info, stati
c_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::N
one | v8::DontEnum), 0 /* on instance */}, | 4095 {"conditionalAttr5", TestObjV8Internal::TestObjConstructorGetter, TestObjV8I
nternal::TestObjReplaceableAttrSetterCallback, 0, 0, &V8TestObjectectB::info, st
atic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8
::None | v8::DontEnum), 0 /* on instance */}, |
| 4096 #endif // ENABLE(Condition1) && ENABLE(Condition2) | 4096 #endif // ENABLE(Condition1) && ENABLE(Condition2) |
| 4097 #if ENABLE(Condition1) || ENABLE(Condition2) | 4097 #if ENABLE(Condition1) || ENABLE(Condition2) |
| 4098 // Attribute 'conditionalAttr6' (Type: 'attribute' ExtAttr: 'Conditional') | 4098 // Attribute 'conditionalAttr6' (Type: 'attribute' ExtAttr: 'Conditional') |
| 4099 {"conditionalAttr6", TestObjV8Internal::TestObjConstructorGetter, TestObjV8I
nternal::TestObjReplaceableAttrSetterCallback, 0, 0, &V8TestObjectC::info, stati
c_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::N
one | v8::DontEnum), 0 /* on instance */}, | 4099 {"conditionalAttr6", TestObjV8Internal::TestObjConstructorGetter, TestObjV8I
nternal::TestObjReplaceableAttrSetterCallback, 0, 0, &V8TestObjectectC::info, st
atic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8
::None | v8::DontEnum), 0 /* on instance */}, |
| 4100 #endif // ENABLE(Condition1) || ENABLE(Condition2) | 4100 #endif // ENABLE(Condition1) || ENABLE(Condition2) |
| 4101 // Attribute 'cachedAttribute1' (Type: 'attribute' ExtAttr: 'CachedAttribute
') | 4101 // Attribute 'cachedAttribute1' (Type: 'attribute' ExtAttr: 'CachedAttribute
') |
| 4102 {"cachedAttribute1", TestObjV8Internal::cachedAttribute1AttrGetterCallback,
0, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_ca
st<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | 4102 {"cachedAttribute1", TestObjV8Internal::cachedAttribute1AttrGetterCallback,
0, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_ca
st<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
| 4103 // Attribute 'cachedAttribute2' (Type: 'attribute' ExtAttr: 'CachedAttribute
') | 4103 // Attribute 'cachedAttribute2' (Type: 'attribute' ExtAttr: 'CachedAttribute
') |
| 4104 {"cachedAttribute2", TestObjV8Internal::cachedAttribute2AttrGetterCallback,
0, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_ca
st<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | 4104 {"cachedAttribute2", TestObjV8Internal::cachedAttribute2AttrGetterCallback,
0, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_ca
st<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
| 4105 // Attribute 'anyAttribute' (Type: 'attribute' ExtAttr: '') | 4105 // Attribute 'anyAttribute' (Type: 'attribute' ExtAttr: '') |
| 4106 {"anyAttribute", TestObjV8Internal::anyAttributeAttrGetterCallback, TestObjV
8Internal::anyAttributeAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8
::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /
* on instance */}, | 4106 {"anyAttribute", TestObjV8Internal::anyAttributeAttrGetterCallback, TestObjV
8Internal::anyAttributeAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8
::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /
* on instance */}, |
| 4107 // Attribute 'floatArray' (Type: 'attribute' ExtAttr: '') | 4107 // Attribute 'floatArray' (Type: 'attribute' ExtAttr: '') |
| 4108 {"floatArray", TestObjV8Internal::floatArrayAttrGetterCallback, TestObjV8Int
ernal::floatArrayAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::Acce
ssControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on i
nstance */}, | 4108 {"floatArray", TestObjV8Internal::floatArrayAttrGetterCallback, TestObjV8Int
ernal::floatArrayAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::Acce
ssControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on i
nstance */}, |
| 4109 // Attribute 'doubleArray' (Type: 'attribute' ExtAttr: '') | 4109 // Attribute 'doubleArray' (Type: 'attribute' ExtAttr: '') |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4163 // Attribute 'deprecatedStaticReadOnlyAttr' (Type: 'attribute' ExtAttr: 'Dep
recateAs') | 4163 // Attribute 'deprecatedStaticReadOnlyAttr' (Type: 'attribute' ExtAttr: 'Dep
recateAs') |
| 4164 {"deprecatedStaticReadOnlyAttr", TestObjV8Internal::deprecatedStaticReadOnly
AttrAttrGetterCallback, 0, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>
(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */
}, | 4164 {"deprecatedStaticReadOnlyAttr", TestObjV8Internal::deprecatedStaticReadOnly
AttrAttrGetterCallback, 0, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>
(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */
}, |
| 4165 // Attribute 'deprecatedStaticAttr' (Type: 'attribute' ExtAttr: 'DeprecateAs
') | 4165 // Attribute 'deprecatedStaticAttr' (Type: 'attribute' ExtAttr: 'DeprecateAs
') |
| 4166 {"deprecatedStaticAttr", TestObjV8Internal::deprecatedStaticAttrAttrGetterCa
llback, TestObjV8Internal::deprecatedStaticAttrAttrSetterCallback, 0, 0, 0 /* no
data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyA
ttribute>(v8::None), 0 /* on instance */}, | 4166 {"deprecatedStaticAttr", TestObjV8Internal::deprecatedStaticAttrAttrGetterCa
llback, TestObjV8Internal::deprecatedStaticAttrAttrSetterCallback, 0, 0, 0 /* no
data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyA
ttribute>(v8::None), 0 /* on instance */}, |
| 4167 // Attribute 'deprecatedReadonlyAttr' (Type: 'attribute' ExtAttr: 'Deprecate
As') | 4167 // Attribute 'deprecatedReadonlyAttr' (Type: 'attribute' ExtAttr: 'Deprecate
As') |
| 4168 {"deprecatedReadonlyAttr", TestObjV8Internal::deprecatedReadonlyAttrAttrGett
erCallback, 0, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT
), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | 4168 {"deprecatedReadonlyAttr", TestObjV8Internal::deprecatedReadonlyAttrAttrGett
erCallback, 0, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT
), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
| 4169 // Attribute 'deprecatedAttr' (Type: 'attribute' ExtAttr: 'DeprecateAs') | 4169 // Attribute 'deprecatedAttr' (Type: 'attribute' ExtAttr: 'DeprecateAs') |
| 4170 {"deprecatedAttr", TestObjV8Internal::deprecatedAttrAttrGetterCallback, Test
ObjV8Internal::deprecatedAttrAttrSetterCallback, 0, 0, 0 /* no data */, static_c
ast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None
), 0 /* on instance */}, | 4170 {"deprecatedAttr", TestObjV8Internal::deprecatedAttrAttrGetterCallback, Test
ObjV8Internal::deprecatedAttrAttrSetterCallback, 0, 0, 0 /* no data */, static_c
ast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None
), 0 /* on instance */}, |
| 4171 }; | 4171 }; |
| 4172 | 4172 |
| 4173 static const V8DOMConfiguration::BatchedMethod V8TestObjMethods[] = { | 4173 static const V8DOMConfiguration::BatchedMethod V8TestObjectMethods[] = { |
| 4174 {"voidMethod", TestObjV8Internal::voidMethodMethodCallback, 0, 0}, | 4174 {"voidMethod", TestObjV8Internal::voidMethodMethodCallback, 0, 0}, |
| 4175 {"longMethod", TestObjV8Internal::longMethodMethodCallback, 0, 0}, | 4175 {"longMethod", TestObjV8Internal::longMethodMethodCallback, 0, 0}, |
| 4176 {"objMethod", TestObjV8Internal::objMethodMethodCallback, 0, 0}, | 4176 {"objMethod", TestObjV8Internal::objMethodMethodCallback, 0, 0}, |
| 4177 {"methodWithSequenceArg", TestObjV8Internal::methodWithSequenceArgMethodCall
back, 0, 1}, | 4177 {"methodWithSequenceArg", TestObjV8Internal::methodWithSequenceArgMethodCall
back, 0, 1}, |
| 4178 {"methodReturningSequence", TestObjV8Internal::methodReturningSequenceMethod
Callback, 0, 1}, | 4178 {"methodReturningSequence", TestObjV8Internal::methodReturningSequenceMethod
Callback, 0, 1}, |
| 4179 {"methodWithEnumArg", TestObjV8Internal::methodWithEnumArgMethodCallback, 0,
1}, | 4179 {"methodWithEnumArg", TestObjV8Internal::methodWithEnumArgMethodCallback, 0,
1}, |
| 4180 {"serializedValue", TestObjV8Internal::serializedValueMethodCallback, 0, 1}, | 4180 {"serializedValue", TestObjV8Internal::serializedValueMethodCallback, 0, 1}, |
| 4181 {"optionsObject", TestObjV8Internal::optionsObjectMethodCallback, 0, 1}, | 4181 {"optionsObject", TestObjV8Internal::optionsObjectMethodCallback, 0, 1}, |
| 4182 {"methodWithException", TestObjV8Internal::methodWithExceptionMethodCallback
, 0, 0}, | 4182 {"methodWithException", TestObjV8Internal::methodWithExceptionMethodCallback
, 0, 0}, |
| 4183 {"customMethod", TestObjV8Internal::customMethodMethodCallback, 0, 0}, | 4183 {"customMethod", TestObjV8Internal::customMethodMethodCallback, 0, 0}, |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4227 {"variadicDoubleMethod", TestObjV8Internal::variadicDoubleMethodMethodCallba
ck, 0, 2}, | 4227 {"variadicDoubleMethod", TestObjV8Internal::variadicDoubleMethodMethodCallba
ck, 0, 2}, |
| 4228 {"perWorldMethod", TestObjV8Internal::perWorldMethodMethodCallback, TestObjV
8Internal::perWorldMethodMethodCallbackForMainWorld, 0}, | 4228 {"perWorldMethod", TestObjV8Internal::perWorldMethodMethodCallback, TestObjV
8Internal::perWorldMethodMethodCallbackForMainWorld, 0}, |
| 4229 {"overloadedPerWorldMethod", TestObjV8Internal::overloadedPerWorldMethodMeth
odCallback, TestObjV8Internal::overloadedPerWorldMethodMethodCallbackForMainWorl
d, 1}, | 4229 {"overloadedPerWorldMethod", TestObjV8Internal::overloadedPerWorldMethodMeth
odCallback, TestObjV8Internal::overloadedPerWorldMethodMethodCallbackForMainWorl
d, 1}, |
| 4230 {"activityLoggedMethod1", TestObjV8Internal::activityLoggedMethod1MethodCall
back, 0, 1}, | 4230 {"activityLoggedMethod1", TestObjV8Internal::activityLoggedMethod1MethodCall
back, 0, 1}, |
| 4231 {"activityLoggedMethod2", TestObjV8Internal::activityLoggedMethod2MethodCall
back, TestObjV8Internal::activityLoggedMethod2MethodCallbackForMainWorld, 1}, | 4231 {"activityLoggedMethod2", TestObjV8Internal::activityLoggedMethod2MethodCall
back, TestObjV8Internal::activityLoggedMethod2MethodCallbackForMainWorld, 1}, |
| 4232 {"activityLoggedInIsolatedWorldMethod", TestObjV8Internal::activityLoggedInI
solatedWorldMethodMethodCallback, TestObjV8Internal::activityLoggedInIsolatedWor
ldMethodMethodCallbackForMainWorld, 1}, | 4232 {"activityLoggedInIsolatedWorldMethod", TestObjV8Internal::activityLoggedInI
solatedWorldMethodMethodCallback, TestObjV8Internal::activityLoggedInIsolatedWor
ldMethodMethodCallbackForMainWorld, 1}, |
| 4233 {"overloadedActivityLoggedMethod", TestObjV8Internal::overloadedActivityLogg
edMethodMethodCallback, TestObjV8Internal::overloadedActivityLoggedMethodMethodC
allbackForMainWorld, 1}, | 4233 {"overloadedActivityLoggedMethod", TestObjV8Internal::overloadedActivityLogg
edMethodMethodCallback, TestObjV8Internal::overloadedActivityLoggedMethodMethodC
allbackForMainWorld, 1}, |
| 4234 {"deprecatedMethod", TestObjV8Internal::deprecatedMethodMethodCallback, 0, 0
}, | 4234 {"deprecatedMethod", TestObjV8Internal::deprecatedMethodMethodCallback, 0, 0
}, |
| 4235 }; | 4235 }; |
| 4236 | 4236 |
| 4237 static const V8DOMConfiguration::BatchedConstant V8TestObjConsts[] = { | 4237 static const V8DOMConfiguration::BatchedConstant V8TestObjectConsts[] = { |
| 4238 #if ENABLE(Condition1) | 4238 #if ENABLE(Condition1) |
| 4239 {"CONDITIONAL_CONST", 0}, | 4239 {"CONDITIONAL_CONST", 0}, |
| 4240 #endif | 4240 #endif |
| 4241 {"CONST_VALUE_0", 0}, | 4241 {"CONST_VALUE_0", 0}, |
| 4242 {"CONST_VALUE_1", 1}, | 4242 {"CONST_VALUE_1", 1}, |
| 4243 {"CONST_VALUE_2", 2}, | 4243 {"CONST_VALUE_2", 2}, |
| 4244 {"CONST_VALUE_4", 4}, | 4244 {"CONST_VALUE_4", 4}, |
| 4245 {"CONST_VALUE_8", 8}, | 4245 {"CONST_VALUE_8", 8}, |
| 4246 {"CONST_VALUE_9", -1}, | 4246 {"CONST_VALUE_9", -1}, |
| 4247 {"CONST_VALUE_10", "my constant string"}, | 4247 {"CONST_VALUE_10", "my constant string"}, |
| (...skipping 16 matching lines...) Expand all Loading... |
| 4264 COMPILE_ASSERT(8 == TestObj::CONST_VALUE_8, TestObjEnumCONST_VALUE_8IsWrongUseDo
NotCheckConstants); | 4264 COMPILE_ASSERT(8 == TestObj::CONST_VALUE_8, TestObjEnumCONST_VALUE_8IsWrongUseDo
NotCheckConstants); |
| 4265 COMPILE_ASSERT(-1 == TestObj::CONST_VALUE_9, TestObjEnumCONST_VALUE_9IsWrongUseD
oNotCheckConstants); | 4265 COMPILE_ASSERT(-1 == TestObj::CONST_VALUE_9, TestObjEnumCONST_VALUE_9IsWrongUseD
oNotCheckConstants); |
| 4266 COMPILE_ASSERT("my constant string" == TestObj::CONST_VALUE_10, TestObjEnumCONST
_VALUE_10IsWrongUseDoNotCheckConstants); | 4266 COMPILE_ASSERT("my constant string" == TestObj::CONST_VALUE_10, TestObjEnumCONST
_VALUE_10IsWrongUseDoNotCheckConstants); |
| 4267 COMPILE_ASSERT(0xffffffff == TestObj::CONST_VALUE_11, TestObjEnumCONST_VALUE_11I
sWrongUseDoNotCheckConstants); | 4267 COMPILE_ASSERT(0xffffffff == TestObj::CONST_VALUE_11, TestObjEnumCONST_VALUE_11I
sWrongUseDoNotCheckConstants); |
| 4268 COMPILE_ASSERT(0x01 == TestObj::CONST_VALUE_12, TestObjEnumCONST_VALUE_12IsWrong
UseDoNotCheckConstants); | 4268 COMPILE_ASSERT(0x01 == TestObj::CONST_VALUE_12, TestObjEnumCONST_VALUE_12IsWrong
UseDoNotCheckConstants); |
| 4269 COMPILE_ASSERT(0X20 == TestObj::CONST_VALUE_13, TestObjEnumCONST_VALUE_13IsWrong
UseDoNotCheckConstants); | 4269 COMPILE_ASSERT(0X20 == TestObj::CONST_VALUE_13, TestObjEnumCONST_VALUE_13IsWrong
UseDoNotCheckConstants); |
| 4270 COMPILE_ASSERT(0x1abc == TestObj::CONST_VALUE_14, TestObjEnumCONST_VALUE_14IsWro
ngUseDoNotCheckConstants); | 4270 COMPILE_ASSERT(0x1abc == TestObj::CONST_VALUE_14, TestObjEnumCONST_VALUE_14IsWro
ngUseDoNotCheckConstants); |
| 4271 COMPILE_ASSERT(15 == TestObj::CONST_IMPL, TestObjEnumCONST_IMPLIsWrongUseDoNotCh
eckConstants); | 4271 COMPILE_ASSERT(15 == TestObj::CONST_IMPL, TestObjEnumCONST_IMPLIsWrongUseDoNotCh
eckConstants); |
| 4272 COMPILE_ASSERT(1 == TestObj::DEPRECATED_CONSTANT, TestObjEnumDEPRECATED_CONSTANT
IsWrongUseDoNotCheckConstants); | 4272 COMPILE_ASSERT(1 == TestObj::DEPRECATED_CONSTANT, TestObjEnumDEPRECATED_CONSTANT
IsWrongUseDoNotCheckConstants); |
| 4273 | 4273 |
| 4274 v8::Handle<v8::Value> V8TestObj::constructorCallback(const v8::Arguments& args) | 4274 v8::Handle<v8::Value> V8TestObject::constructorCallback(const v8::Arguments& arg
s) |
| 4275 { | 4275 { |
| 4276 if (!args.IsConstructCall()) | 4276 if (!args.IsConstructCall()) |
| 4277 return throwTypeError("DOM object constructor cannot be called as a func
tion.", args.GetIsolate()); | 4277 return throwTypeError("DOM object constructor cannot be called as a func
tion.", args.GetIsolate()); |
| 4278 | 4278 |
| 4279 if (ConstructorMode::current() == ConstructorMode::WrapExistingObject) | 4279 if (ConstructorMode::current() == ConstructorMode::WrapExistingObject) |
| 4280 return args.Holder(); | 4280 return args.Holder(); |
| 4281 | 4281 |
| 4282 return TestObjV8Internal::constructor(args); | 4282 return TestObjV8Internal::constructor(args); |
| 4283 } | 4283 } |
| 4284 | 4284 |
| 4285 v8::Handle<v8::Value> V8TestObj::indexedPropertyGetter(uint32_t index, const v8:
:AccessorInfo& info) | 4285 v8::Handle<v8::Value> V8TestObject::indexedPropertyGetter(uint32_t index, const
v8::AccessorInfo& info) |
| 4286 { | 4286 { |
| 4287 ASSERT(V8DOMWrapper::maybeDOMWrapper(info.Holder())); | 4287 ASSERT(V8DOMWrapper::maybeDOMWrapper(info.Holder())); |
| 4288 TestObj* collection = toNative(info.Holder()); | 4288 TestObj* collection = toNative(info.Holder()); |
| 4289 RefPtr<Node> element = collection->item(index); | 4289 RefPtr<Node> element = collection->item(index); |
| 4290 if (!element) | 4290 if (!element) |
| 4291 return v8Undefined(); | 4291 return v8Undefined(); |
| 4292 return toV8Fast(element.release(), info, collection); | 4292 return toV8Fast(element.release(), info, collection); |
| 4293 } | 4293 } |
| 4294 static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestObjTemplate(v8::Persi
stent<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType current
WorldType) | 4294 static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestObjectTemplate(v8::Pe
rsistent<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType curr
entWorldType) |
| 4295 { | 4295 { |
| 4296 desc->ReadOnlyPrototype(); | 4296 desc->ReadOnlyPrototype(); |
| 4297 | 4297 |
| 4298 v8::Local<v8::Signature> defaultSignature; | 4298 v8::Local<v8::Signature> defaultSignature; |
| 4299 defaultSignature = V8DOMConfiguration::configureTemplate(desc, "TestObject",
v8::Persistent<v8::FunctionTemplate>(), V8TestObj::internalFieldCount, | 4299 defaultSignature = V8DOMConfiguration::configureTemplate(desc, "TestObject",
v8::Persistent<v8::FunctionTemplate>(), V8TestObject::internalFieldCount, |
| 4300 V8TestObjAttrs, WTF_ARRAY_LENGTH(V8TestObjAttrs), | 4300 V8TestObjectAttrs, WTF_ARRAY_LENGTH(V8TestObjectAttrs), |
| 4301 V8TestObjMethods, WTF_ARRAY_LENGTH(V8TestObjMethods), isolate, currentWo
rldType); | 4301 V8TestObjectMethods, WTF_ARRAY_LENGTH(V8TestObjectMethods), isolate, cur
rentWorldType); |
| 4302 UNUSED_PARAM(defaultSignature); // In some cases, it will not be used. | 4302 UNUSED_PARAM(defaultSignature); // In some cases, it will not be used. |
| 4303 desc->SetCallHandler(V8TestObj::constructorCallback); | 4303 desc->SetCallHandler(V8TestObject::constructorCallback); |
| 4304 desc->SetLength(1); | 4304 desc->SetLength(1); |
| 4305 v8::Local<v8::ObjectTemplate> instance = desc->InstanceTemplate(); | 4305 v8::Local<v8::ObjectTemplate> instance = desc->InstanceTemplate(); |
| 4306 v8::Local<v8::ObjectTemplate> proto = desc->PrototypeTemplate(); | 4306 v8::Local<v8::ObjectTemplate> proto = desc->PrototypeTemplate(); |
| 4307 UNUSED_PARAM(instance); // In some cases, it will not be used. | 4307 UNUSED_PARAM(instance); // In some cases, it will not be used. |
| 4308 UNUSED_PARAM(proto); // In some cases, it will not be used. | 4308 UNUSED_PARAM(proto); // In some cases, it will not be used. |
| 4309 if (RuntimeEnabledFeatures::enabledAtRuntimeAttr1Enabled()) { | 4309 if (RuntimeEnabledFeatures::enabledAtRuntimeAttr1Enabled()) { |
| 4310 static const V8DOMConfiguration::BatchedAttribute attrData =\ | 4310 static const V8DOMConfiguration::BatchedAttribute attrData =\ |
| 4311 // Attribute 'enabledAtRuntimeAttr1' (Type: 'attribute' ExtAttr: 'Enable
dAtRuntime') | 4311 // Attribute 'enabledAtRuntimeAttr1' (Type: 'attribute' ExtAttr: 'Enable
dAtRuntime') |
| 4312 {"enabledAtRuntimeAttr1", TestObjV8Internal::enabledAtRuntimeAttr1AttrGe
tterCallback, TestObjV8Internal::enabledAtRuntimeAttr1AttrSetterCallback, 0, 0,
0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Pr
opertyAttribute>(v8::None), 0 /* on instance */}; | 4312 {"enabledAtRuntimeAttr1", TestObjV8Internal::enabledAtRuntimeAttr1AttrGe
tterCallback, TestObjV8Internal::enabledAtRuntimeAttr1AttrSetterCallback, 0, 0,
0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Pr
opertyAttribute>(v8::None), 0 /* on instance */}; |
| 4313 V8DOMConfiguration::configureAttribute(instance, proto, attrData, isolat
e, currentWorldType); | 4313 V8DOMConfiguration::configureAttribute(instance, proto, attrData, isolat
e, currentWorldType); |
| 4314 } | 4314 } |
| 4315 if (RuntimeEnabledFeatures::featureNameEnabled()) { | 4315 if (RuntimeEnabledFeatures::featureNameEnabled()) { |
| 4316 static const V8DOMConfiguration::BatchedAttribute attrData =\ | 4316 static const V8DOMConfiguration::BatchedAttribute attrData =\ |
| 4317 // Attribute 'enabledAtRuntimeAttr2' (Type: 'attribute' ExtAttr: 'Enable
dAtRuntime') | 4317 // Attribute 'enabledAtRuntimeAttr2' (Type: 'attribute' ExtAttr: 'Enable
dAtRuntime') |
| 4318 {"enabledAtRuntimeAttr2", TestObjV8Internal::enabledAtRuntimeAttr2AttrGe
tterCallback, TestObjV8Internal::enabledAtRuntimeAttr2AttrSetterCallback, 0, 0,
0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Pr
opertyAttribute>(v8::None), 0 /* on instance */}; | 4318 {"enabledAtRuntimeAttr2", TestObjV8Internal::enabledAtRuntimeAttr2AttrGe
tterCallback, TestObjV8Internal::enabledAtRuntimeAttr2AttrSetterCallback, 0, 0,
0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Pr
opertyAttribute>(v8::None), 0 /* on instance */}; |
| 4319 V8DOMConfiguration::configureAttribute(instance, proto, attrData, isolat
e, currentWorldType); | 4319 V8DOMConfiguration::configureAttribute(instance, proto, attrData, isolat
e, currentWorldType); |
| 4320 } | 4320 } |
| 4321 desc->InstanceTemplate()->SetIndexedPropertyHandler(V8TestObj::indexedProper
tyGetter, 0, 0, 0, nodeCollectionIndexedPropertyEnumerator<TestObj>); | 4321 desc->InstanceTemplate()->SetIndexedPropertyHandler(V8TestObject::indexedPro
pertyGetter, 0, 0, 0, nodeCollectionIndexedPropertyEnumerator<TestObj>); |
| 4322 | 4322 |
| 4323 // Custom Signature 'voidMethodWithArgs' | 4323 // Custom Signature 'voidMethodWithArgs' |
| 4324 const int voidMethodWithArgsArgc = 3; | 4324 const int voidMethodWithArgsArgc = 3; |
| 4325 v8::Handle<v8::FunctionTemplate> voidMethodWithArgsArgv[voidMethodWithArgsAr
gc] = { v8::Handle<v8::FunctionTemplate>(), v8::Handle<v8::FunctionTemplate>(),
V8PerIsolateData::from(isolate)->rawTemplate(&V8TestObj::info, currentWorldType)
}; | 4325 v8::Handle<v8::FunctionTemplate> voidMethodWithArgsArgv[voidMethodWithArgsAr
gc] = { v8::Handle<v8::FunctionTemplate>(), v8::Handle<v8::FunctionTemplate>(),
V8PerIsolateData::from(isolate)->rawTemplate(&V8TestObject::info, currentWorldTy
pe) }; |
| 4326 v8::Handle<v8::Signature> voidMethodWithArgsSignature = v8::Signature::New(d
esc, voidMethodWithArgsArgc, voidMethodWithArgsArgv); | 4326 v8::Handle<v8::Signature> voidMethodWithArgsSignature = v8::Signature::New(d
esc, voidMethodWithArgsArgc, voidMethodWithArgsArgv); |
| 4327 proto->Set(v8::String::NewSymbol("voidMethodWithArgs"), v8::FunctionTemplate
::New(TestObjV8Internal::voidMethodWithArgsMethodCallback, v8Undefined(), voidMe
thodWithArgsSignature, 3)); | 4327 proto->Set(v8::String::NewSymbol("voidMethodWithArgs"), v8::FunctionTemplate
::New(TestObjV8Internal::voidMethodWithArgsMethodCallback, v8Undefined(), voidMe
thodWithArgsSignature, 3)); |
| 4328 | 4328 |
| 4329 // Custom Signature 'longMethodWithArgs' | 4329 // Custom Signature 'longMethodWithArgs' |
| 4330 const int longMethodWithArgsArgc = 3; | 4330 const int longMethodWithArgsArgc = 3; |
| 4331 v8::Handle<v8::FunctionTemplate> longMethodWithArgsArgv[longMethodWithArgsAr
gc] = { v8::Handle<v8::FunctionTemplate>(), v8::Handle<v8::FunctionTemplate>(),
V8PerIsolateData::from(isolate)->rawTemplate(&V8TestObj::info, currentWorldType)
}; | 4331 v8::Handle<v8::FunctionTemplate> longMethodWithArgsArgv[longMethodWithArgsAr
gc] = { v8::Handle<v8::FunctionTemplate>(), v8::Handle<v8::FunctionTemplate>(),
V8PerIsolateData::from(isolate)->rawTemplate(&V8TestObject::info, currentWorldTy
pe) }; |
| 4332 v8::Handle<v8::Signature> longMethodWithArgsSignature = v8::Signature::New(d
esc, longMethodWithArgsArgc, longMethodWithArgsArgv); | 4332 v8::Handle<v8::Signature> longMethodWithArgsSignature = v8::Signature::New(d
esc, longMethodWithArgsArgc, longMethodWithArgsArgv); |
| 4333 proto->Set(v8::String::NewSymbol("longMethodWithArgs"), v8::FunctionTemplate
::New(TestObjV8Internal::longMethodWithArgsMethodCallback, v8Undefined(), longMe
thodWithArgsSignature, 3)); | 4333 proto->Set(v8::String::NewSymbol("longMethodWithArgs"), v8::FunctionTemplate
::New(TestObjV8Internal::longMethodWithArgsMethodCallback, v8Undefined(), longMe
thodWithArgsSignature, 3)); |
| 4334 | 4334 |
| 4335 // Custom Signature 'objMethodWithArgs' | 4335 // Custom Signature 'objMethodWithArgs' |
| 4336 const int objMethodWithArgsArgc = 3; | 4336 const int objMethodWithArgsArgc = 3; |
| 4337 v8::Handle<v8::FunctionTemplate> objMethodWithArgsArgv[objMethodWithArgsArgc
] = { v8::Handle<v8::FunctionTemplate>(), v8::Handle<v8::FunctionTemplate>(), V8
PerIsolateData::from(isolate)->rawTemplate(&V8TestObj::info, currentWorldType) }
; | 4337 v8::Handle<v8::FunctionTemplate> objMethodWithArgsArgv[objMethodWithArgsArgc
] = { v8::Handle<v8::FunctionTemplate>(), v8::Handle<v8::FunctionTemplate>(), V8
PerIsolateData::from(isolate)->rawTemplate(&V8TestObject::info, currentWorldType
) }; |
| 4338 v8::Handle<v8::Signature> objMethodWithArgsSignature = v8::Signature::New(de
sc, objMethodWithArgsArgc, objMethodWithArgsArgv); | 4338 v8::Handle<v8::Signature> objMethodWithArgsSignature = v8::Signature::New(de
sc, objMethodWithArgsArgc, objMethodWithArgsArgv); |
| 4339 proto->Set(v8::String::NewSymbol("objMethodWithArgs"), v8::FunctionTemplate:
:New(TestObjV8Internal::objMethodWithArgsMethodCallback, v8Undefined(), objMetho
dWithArgsSignature, 3)); | 4339 proto->Set(v8::String::NewSymbol("objMethodWithArgs"), v8::FunctionTemplate:
:New(TestObjV8Internal::objMethodWithArgsMethodCallback, v8Undefined(), objMetho
dWithArgsSignature, 3)); |
| 4340 | 4340 |
| 4341 // Custom Signature 'methodThatRequiresAllArgsAndThrows' | 4341 // Custom Signature 'methodThatRequiresAllArgsAndThrows' |
| 4342 const int methodThatRequiresAllArgsAndThrowsArgc = 2; | 4342 const int methodThatRequiresAllArgsAndThrowsArgc = 2; |
| 4343 v8::Handle<v8::FunctionTemplate> methodThatRequiresAllArgsAndThrowsArgv[meth
odThatRequiresAllArgsAndThrowsArgc] = { v8::Handle<v8::FunctionTemplate>(), V8Pe
rIsolateData::from(isolate)->rawTemplate(&V8TestObj::info, currentWorldType) }; | 4343 v8::Handle<v8::FunctionTemplate> methodThatRequiresAllArgsAndThrowsArgv[meth
odThatRequiresAllArgsAndThrowsArgc] = { v8::Handle<v8::FunctionTemplate>(), V8Pe
rIsolateData::from(isolate)->rawTemplate(&V8TestObject::info, currentWorldType)
}; |
| 4344 v8::Handle<v8::Signature> methodThatRequiresAllArgsAndThrowsSignature = v8::
Signature::New(desc, methodThatRequiresAllArgsAndThrowsArgc, methodThatRequiresA
llArgsAndThrowsArgv); | 4344 v8::Handle<v8::Signature> methodThatRequiresAllArgsAndThrowsSignature = v8::
Signature::New(desc, methodThatRequiresAllArgsAndThrowsArgc, methodThatRequiresA
llArgsAndThrowsArgv); |
| 4345 proto->Set(v8::String::NewSymbol("methodThatRequiresAllArgsAndThrows"), v8::
FunctionTemplate::New(TestObjV8Internal::methodThatRequiresAllArgsAndThrowsMetho
dCallback, v8Undefined(), methodThatRequiresAllArgsAndThrowsSignature, 2)); | 4345 proto->Set(v8::String::NewSymbol("methodThatRequiresAllArgsAndThrows"), v8::
FunctionTemplate::New(TestObjV8Internal::methodThatRequiresAllArgsAndThrowsMetho
dCallback, v8Undefined(), methodThatRequiresAllArgsAndThrowsSignature, 2)); |
| 4346 desc->Set(v8::String::NewSymbol("staticMethodWithCallbackAndOptionalArg"), v
8::FunctionTemplate::New(TestObjV8Internal::staticMethodWithCallbackAndOptionalA
rgMethodCallback, v8Undefined(), v8::Local<v8::Signature>(), 0)); | 4346 desc->Set(v8::String::NewSymbol("staticMethodWithCallbackAndOptionalArg"), v
8::FunctionTemplate::New(TestObjV8Internal::staticMethodWithCallbackAndOptionalA
rgMethodCallback, v8Undefined(), v8::Local<v8::Signature>(), 0)); |
| 4347 desc->Set(v8::String::NewSymbol("staticMethodWithCallbackArg"), v8::Function
Template::New(TestObjV8Internal::staticMethodWithCallbackArgMethodCallback, v8Un
defined(), v8::Local<v8::Signature>(), 1)); | 4347 desc->Set(v8::String::NewSymbol("staticMethodWithCallbackArg"), v8::Function
Template::New(TestObjV8Internal::staticMethodWithCallbackArgMethodCallback, v8Un
defined(), v8::Local<v8::Signature>(), 1)); |
| 4348 desc->Set(v8::String::NewSymbol("classMethod"), v8::FunctionTemplate::New(Te
stObjV8Internal::classMethodMethodCallback, v8Undefined(), v8::Local<v8::Signatu
re>(), 0)); | 4348 desc->Set(v8::String::NewSymbol("classMethod"), v8::FunctionTemplate::New(Te
stObjV8Internal::classMethodMethodCallback, v8Undefined(), v8::Local<v8::Signatu
re>(), 0)); |
| 4349 desc->Set(v8::String::NewSymbol("classMethodWithOptional"), v8::FunctionTemp
late::New(TestObjV8Internal::classMethodWithOptionalMethodCallback, v8Undefined(
), v8::Local<v8::Signature>(), 0)); | 4349 desc->Set(v8::String::NewSymbol("classMethodWithOptional"), v8::FunctionTemp
late::New(TestObjV8Internal::classMethodWithOptionalMethodCallback, v8Undefined(
), v8::Local<v8::Signature>(), 0)); |
| 4350 desc->Set(v8::String::NewSymbol("classMethod2"), v8::FunctionTemplate::New(T
estObjV8Internal::classMethod2MethodCallback, v8Undefined(), v8::Local<v8::Signa
ture>(), 1)); | 4350 desc->Set(v8::String::NewSymbol("classMethod2"), v8::FunctionTemplate::New(T
estObjV8Internal::classMethod2MethodCallback, v8Undefined(), v8::Local<v8::Signa
ture>(), 1)); |
| 4351 #if ENABLE(Condition1) | 4351 #if ENABLE(Condition1) |
| 4352 desc->Set(v8::String::NewSymbol("overloadedMethod1"), v8::FunctionTemplate::
New(TestObjV8Internal::overloadedMethod1MethodCallback, v8Undefined(), v8::Local
<v8::Signature>(), 1)); | 4352 desc->Set(v8::String::NewSymbol("overloadedMethod1"), v8::FunctionTemplate::
New(TestObjV8Internal::overloadedMethod1MethodCallback, v8Undefined(), v8::Local
<v8::Signature>(), 1)); |
| 4353 #endif // ENABLE(Condition1) | 4353 #endif // ENABLE(Condition1) |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4385 v8::Handle<v8::FunctionTemplate> convert5Argv[convert5Argc] = { V8PerIsolate
Data::from(isolate)->rawTemplate(&V8TestNode::info, currentWorldType) }; | 4385 v8::Handle<v8::FunctionTemplate> convert5Argv[convert5Argc] = { V8PerIsolate
Data::from(isolate)->rawTemplate(&V8TestNode::info, currentWorldType) }; |
| 4386 v8::Handle<v8::Signature> convert5Signature = v8::Signature::New(desc, conve
rt5Argc, convert5Argv); | 4386 v8::Handle<v8::Signature> convert5Signature = v8::Signature::New(desc, conve
rt5Argc, convert5Argv); |
| 4387 proto->Set(v8::String::NewSymbol("convert5"), v8::FunctionTemplate::New(Test
ObjV8Internal::convert5MethodCallback, v8Undefined(), convert5Signature, 1)); | 4387 proto->Set(v8::String::NewSymbol("convert5"), v8::FunctionTemplate::New(Test
ObjV8Internal::convert5MethodCallback, v8Undefined(), convert5Signature, 1)); |
| 4388 | 4388 |
| 4389 // Custom Signature 'variadicNodeMethod' | 4389 // Custom Signature 'variadicNodeMethod' |
| 4390 const int variadicNodeMethodArgc = 2; | 4390 const int variadicNodeMethodArgc = 2; |
| 4391 v8::Handle<v8::FunctionTemplate> variadicNodeMethodArgv[variadicNodeMethodAr
gc] = { V8PerIsolateData::from(isolate)->rawTemplate(&V8Node::info, currentWorld
Type), V8PerIsolateData::from(isolate)->rawTemplate(&V8Node::info, currentWorldT
ype) }; | 4391 v8::Handle<v8::FunctionTemplate> variadicNodeMethodArgv[variadicNodeMethodAr
gc] = { V8PerIsolateData::from(isolate)->rawTemplate(&V8Node::info, currentWorld
Type), V8PerIsolateData::from(isolate)->rawTemplate(&V8Node::info, currentWorldT
ype) }; |
| 4392 v8::Handle<v8::Signature> variadicNodeMethodSignature = v8::Signature::New(d
esc, variadicNodeMethodArgc, variadicNodeMethodArgv); | 4392 v8::Handle<v8::Signature> variadicNodeMethodSignature = v8::Signature::New(d
esc, variadicNodeMethodArgc, variadicNodeMethodArgv); |
| 4393 proto->Set(v8::String::NewSymbol("variadicNodeMethod"), v8::FunctionTemplate
::New(TestObjV8Internal::variadicNodeMethodMethodCallback, v8Undefined(), variad
icNodeMethodSignature, 2)); | 4393 proto->Set(v8::String::NewSymbol("variadicNodeMethod"), v8::FunctionTemplate
::New(TestObjV8Internal::variadicNodeMethodMethodCallback, v8Undefined(), variad
icNodeMethodSignature, 2)); |
| 4394 desc->Set(v8::String::NewSymbol("deprecatedStaticMethod"), v8::FunctionTempl
ate::New(TestObjV8Internal::deprecatedStaticMethodMethodCallback, v8Undefined(),
v8::Local<v8::Signature>(), 0)); | 4394 desc->Set(v8::String::NewSymbol("deprecatedStaticMethod"), v8::FunctionTempl
ate::New(TestObjV8Internal::deprecatedStaticMethodMethodCallback, v8Undefined(),
v8::Local<v8::Signature>(), 0)); |
| 4395 V8DOMConfiguration::batchConfigureConstants(desc, proto, V8TestObjConsts, WT
F_ARRAY_LENGTH(V8TestObjConsts), isolate); | 4395 V8DOMConfiguration::batchConfigureConstants(desc, proto, V8TestObjectConsts,
WTF_ARRAY_LENGTH(V8TestObjectConsts), isolate); |
| 4396 | 4396 |
| 4397 // Custom toString template | 4397 // Custom toString template |
| 4398 desc->Set(v8::String::NewSymbol("toString"), V8PerIsolateData::current()->to
StringTemplate()); | 4398 desc->Set(v8::String::NewSymbol("toString"), V8PerIsolateData::current()->to
StringTemplate()); |
| 4399 return desc; | 4399 return desc; |
| 4400 } | 4400 } |
| 4401 | 4401 |
| 4402 v8::Persistent<v8::FunctionTemplate> V8TestObj::GetTemplate(v8::Isolate* isolate
, WrapperWorldType currentWorldType) | 4402 v8::Persistent<v8::FunctionTemplate> V8TestObject::GetTemplate(v8::Isolate* isol
ate, WrapperWorldType currentWorldType) |
| 4403 { | 4403 { |
| 4404 V8PerIsolateData* data = V8PerIsolateData::from(isolate); | 4404 V8PerIsolateData* data = V8PerIsolateData::from(isolate); |
| 4405 V8PerIsolateData::TemplateMap::iterator result = data->templateMap(currentWo
rldType).find(&info); | 4405 V8PerIsolateData::TemplateMap::iterator result = data->templateMap(currentWo
rldType).find(&info); |
| 4406 if (result != data->templateMap(currentWorldType).end()) | 4406 if (result != data->templateMap(currentWorldType).end()) |
| 4407 return result->value; | 4407 return result->value; |
| 4408 | 4408 |
| 4409 v8::HandleScope handleScope; | 4409 v8::HandleScope handleScope; |
| 4410 v8::Persistent<v8::FunctionTemplate> templ = | 4410 v8::Persistent<v8::FunctionTemplate> templ = |
| 4411 ConfigureV8TestObjTemplate(data->rawTemplate(&info, currentWorldType), i
solate, currentWorldType); | 4411 ConfigureV8TestObjectTemplate(data->rawTemplate(&info, currentWorldType)
, isolate, currentWorldType); |
| 4412 data->templateMap(currentWorldType).add(&info, templ); | 4412 data->templateMap(currentWorldType).add(&info, templ); |
| 4413 return templ; | 4413 return templ; |
| 4414 } | 4414 } |
| 4415 | 4415 |
| 4416 bool V8TestObj::HasInstance(v8::Handle<v8::Value> value, v8::Isolate* isolate, W
rapperWorldType currentWorldType) | 4416 bool V8TestObject::HasInstance(v8::Handle<v8::Value> value, v8::Isolate* isolate
, WrapperWorldType currentWorldType) |
| 4417 { | 4417 { |
| 4418 return V8PerIsolateData::from(isolate)->hasInstance(&info, value, currentWor
ldType); | 4418 return V8PerIsolateData::from(isolate)->hasInstance(&info, value, currentWor
ldType); |
| 4419 } | 4419 } |
| 4420 | 4420 |
| 4421 bool V8TestObj::HasInstanceInAnyWorld(v8::Handle<v8::Value> value, v8::Isolate*
isolate) | 4421 bool V8TestObject::HasInstanceInAnyWorld(v8::Handle<v8::Value> value, v8::Isolat
e* isolate) |
| 4422 { | 4422 { |
| 4423 return V8PerIsolateData::from(isolate)->hasInstance(&info, value, MainWorld) | 4423 return V8PerIsolateData::from(isolate)->hasInstance(&info, value, MainWorld) |
| 4424 || V8PerIsolateData::from(isolate)->hasInstance(&info, value, IsolatedWo
rld) | 4424 || V8PerIsolateData::from(isolate)->hasInstance(&info, value, IsolatedWo
rld) |
| 4425 || V8PerIsolateData::from(isolate)->hasInstance(&info, value, WorkerWorl
d); | 4425 || V8PerIsolateData::from(isolate)->hasInstance(&info, value, WorkerWorl
d); |
| 4426 } | 4426 } |
| 4427 | 4427 |
| 4428 void V8TestObj::installPerContextProperties(v8::Handle<v8::Object> instance, Tes
tObj* impl, v8::Isolate* isolate) | 4428 void V8TestObject::installPerContextProperties(v8::Handle<v8::Object> instance,
TestObj* impl, v8::Isolate* isolate) |
| 4429 { | 4429 { |
| 4430 v8::Local<v8::Object> proto = v8::Local<v8::Object>::Cast(instance->GetProto
type()); | 4430 v8::Local<v8::Object> proto = v8::Local<v8::Object>::Cast(instance->GetProto
type()); |
| 4431 if (ContextFeatures::enabledPerContextAttr1Enabled(impl->document())) { | 4431 if (ContextFeatures::enabledPerContextAttr1Enabled(impl->document())) { |
| 4432 static const V8DOMConfiguration::BatchedAttribute attrData =\ | 4432 static const V8DOMConfiguration::BatchedAttribute attrData =\ |
| 4433 // Attribute 'enabledPerContextAttr1' (Type: 'attribute' ExtAttr: 'Enabl
edPerContext') | 4433 // Attribute 'enabledPerContextAttr1' (Type: 'attribute' ExtAttr: 'Enabl
edPerContext') |
| 4434 {"enabledPerContextAttr1", TestObjV8Internal::enabledPerContextAttr1Attr
GetterCallback, TestObjV8Internal::enabledPerContextAttr1AttrSetterCallback, 0,
0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8:
:PropertyAttribute>(v8::None), 0 /* on instance */}; | 4434 {"enabledPerContextAttr1", TestObjV8Internal::enabledPerContextAttr1Attr
GetterCallback, TestObjV8Internal::enabledPerContextAttr1AttrSetterCallback, 0,
0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8:
:PropertyAttribute>(v8::None), 0 /* on instance */}; |
| 4435 V8DOMConfiguration::configureAttribute(instance, proto, attrData, isolat
e); | 4435 V8DOMConfiguration::configureAttribute(instance, proto, attrData, isolat
e); |
| 4436 } | 4436 } |
| 4437 if (ContextFeatures::featureNameEnabled(impl->document())) { | 4437 if (ContextFeatures::featureNameEnabled(impl->document())) { |
| 4438 static const V8DOMConfiguration::BatchedAttribute attrData =\ | 4438 static const V8DOMConfiguration::BatchedAttribute attrData =\ |
| 4439 // Attribute 'enabledPerContextAttr2' (Type: 'attribute' ExtAttr: 'Enabl
edPerContext') | 4439 // Attribute 'enabledPerContextAttr2' (Type: 'attribute' ExtAttr: 'Enabl
edPerContext') |
| 4440 {"enabledPerContextAttr2", TestObjV8Internal::enabledPerContextAttr2Attr
GetterCallback, TestObjV8Internal::enabledPerContextAttr2AttrSetterCallback, 0,
0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8:
:PropertyAttribute>(v8::None), 0 /* on instance */}; | 4440 {"enabledPerContextAttr2", TestObjV8Internal::enabledPerContextAttr2Attr
GetterCallback, TestObjV8Internal::enabledPerContextAttr2AttrSetterCallback, 0,
0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8:
:PropertyAttribute>(v8::None), 0 /* on instance */}; |
| 4441 V8DOMConfiguration::configureAttribute(instance, proto, attrData, isolat
e); | 4441 V8DOMConfiguration::configureAttribute(instance, proto, attrData, isolat
e); |
| 4442 } | 4442 } |
| 4443 } | 4443 } |
| 4444 | 4444 |
| 4445 void V8TestObj::installPerContextPrototypeProperties(v8::Handle<v8::Object> prot
o, v8::Isolate* isolate) | 4445 void V8TestObject::installPerContextPrototypeProperties(v8::Handle<v8::Object> p
roto, v8::Isolate* isolate) |
| 4446 { | 4446 { |
| 4447 UNUSED_PARAM(proto); | 4447 UNUSED_PARAM(proto); |
| 4448 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(GetTemplate(i
solate, worldType(isolate))); | 4448 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(GetTemplate(i
solate, worldType(isolate))); |
| 4449 UNUSED_PARAM(defaultSignature); // In some cases, it will not be used. | 4449 UNUSED_PARAM(defaultSignature); // In some cases, it will not be used. |
| 4450 | 4450 |
| 4451 ScriptExecutionContext* context = toScriptExecutionContext(proto->CreationCo
ntext()); | 4451 ScriptExecutionContext* context = toScriptExecutionContext(proto->CreationCo
ntext()); |
| 4452 if (context && context->isDocument() && ContextFeatures::enabledPerContextMe
thod1Enabled(toDocument(context))) { | 4452 if (context && context->isDocument() && ContextFeatures::enabledPerContextMe
thod1Enabled(toDocument(context))) |
| 4453 proto->Set(v8::String::NewSymbol("enabledPerContextMethod1"), v8::Functi
onTemplate::New(TestObjV8Internal::enabledPerContextMethod1MethodCallback, v8Und
efined(), defaultSignature, 1)->GetFunction()); | 4453 proto->Set(v8::String::NewSymbol("enabledPerContextMethod1"), v8::Functi
onTemplate::New(TestObjV8Internal::enabledPerContextMethod1MethodCallback, v8Und
efined(), defaultSignature, 1)->GetFunction()); |
| 4454 } | 4454 if (context && context->isDocument() && ContextFeatures::featureNameEnabled(
toDocument(context))) |
| 4455 if (context && context->isDocument() && ContextFeatures::featureNameEnabled(
toDocument(context))) { | |
| 4456 proto->Set(v8::String::NewSymbol("enabledPerContextMethod2"), v8::Functi
onTemplate::New(TestObjV8Internal::enabledPerContextMethod2MethodCallback, v8Und
efined(), defaultSignature, 1)->GetFunction()); | 4455 proto->Set(v8::String::NewSymbol("enabledPerContextMethod2"), v8::Functi
onTemplate::New(TestObjV8Internal::enabledPerContextMethod2MethodCallback, v8Und
efined(), defaultSignature, 1)->GetFunction()); |
| 4457 } | |
| 4458 } | 4456 } |
| 4459 | 4457 |
| 4460 | 4458 |
| 4461 v8::Handle<v8::Object> V8TestObj::createWrapper(PassRefPtr<TestObj> impl, v8::Ha
ndle<v8::Object> creationContext, v8::Isolate* isolate) | 4459 v8::Handle<v8::Object> V8TestObject::createWrapper(PassRefPtr<TestObj> impl, v8:
:Handle<v8::Object> creationContext, v8::Isolate* isolate) |
| 4462 { | 4460 { |
| 4463 ASSERT(impl.get()); | 4461 ASSERT(impl.get()); |
| 4464 ASSERT(DOMDataStore::getWrapper(impl.get(), isolate).IsEmpty()); | 4462 ASSERT(DOMDataStore::getWrapper(impl.get(), isolate).IsEmpty()); |
| 4465 | 4463 |
| 4466 #if ENABLE(BINDING_INTEGRITY) | 4464 #if ENABLE(BINDING_INTEGRITY) |
| 4467 checkTypeOrDieTrying(impl.get()); | 4465 checkTypeOrDieTrying(impl.get()); |
| 4468 #endif | 4466 #endif |
| 4469 | 4467 |
| 4470 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext
, &info, impl.get(), isolate); | 4468 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext
, &info, impl.get(), isolate); |
| 4471 if (UNLIKELY(wrapper.IsEmpty())) | 4469 if (UNLIKELY(wrapper.IsEmpty())) |
| 4472 return wrapper; | 4470 return wrapper; |
| 4473 | 4471 |
| 4474 installPerContextProperties(wrapper, impl.get(), isolate); | 4472 installPerContextProperties(wrapper, impl.get(), isolate); |
| 4475 V8DOMWrapper::associateObjectWithWrapper(impl, &info, wrapper, isolate, hasD
ependentLifetime ? WrapperConfiguration::Dependent : WrapperConfiguration::Indep
endent); | 4473 V8DOMWrapper::associateObjectWithWrapper(impl, &info, wrapper, isolate, hasD
ependentLifetime ? WrapperConfiguration::Dependent : WrapperConfiguration::Indep
endent); |
| 4476 return wrapper; | 4474 return wrapper; |
| 4477 } | 4475 } |
| 4478 void V8TestObj::derefObject(void* object) | 4476 void V8TestObject::derefObject(void* object) |
| 4479 { | 4477 { |
| 4480 static_cast<TestObj*>(object)->deref(); | 4478 static_cast<TestObj*>(object)->deref(); |
| 4481 } | 4479 } |
| 4482 | 4480 |
| 4483 } // namespace WebCore | 4481 } // namespace WebCore |
| OLD | NEW |