| 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> namedItemMethod(const v8::Arguments& args) | 2550 static v8::Handle<v8::Value> namedItemMethod(const v8::Arguments& args) |
| 2551 { | 2551 { |
| 2552 if (args.Length() < 1) | 2552 if (args.Length() < 1) |
| 2553 return throwNotEnoughArgumentsError(args.GetIsolate()); | 2553 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 2554 TestObj* imp = V8TestObj::toNative(args.Holder()); | 2554 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 2555 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, name, args[0]); | 2555 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, name, args[0]); |
| 2556 return v8String(imp->namedItem(name), args.GetIsolate(), ReturnUnsafeHandle)
; | 2556 return v8String(imp->namedItem(name), args.GetIsolate(), ReturnUnsafeHandle)
; |
| 2557 } | 2557 } |
| 2558 | 2558 |
| 2559 static v8::Handle<v8::Value> namedItemMethodCallback(const v8::Arguments& args) | 2559 static v8::Handle<v8::Value> namedItemMethodCallback(const v8::Arguments& args) |
| 2560 { | 2560 { |
| 2561 return TestObjV8Internal::namedItemMethod(args); | 2561 return TestObjV8Internal::namedItemMethod(args); |
| 2562 } | 2562 } |
| 2563 | 2563 |
| 2564 static v8::Handle<v8::Value> methodWithExceptionMethod(const v8::Arguments& args
) | 2564 static v8::Handle<v8::Value> methodWithExceptionMethod(const v8::Arguments& args
) |
| 2565 { | 2565 { |
| 2566 TestObj* imp = V8TestObj::toNative(args.Holder()); | 2566 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 2567 ExceptionCode ec = 0; | 2567 ExceptionCode ec = 0; |
| 2568 { | 2568 { |
| 2569 imp->methodWithException(ec); | 2569 imp->methodWithException(ec); |
| 2570 if (UNLIKELY(ec)) | 2570 if (UNLIKELY(ec)) |
| 2571 goto fail; | 2571 goto fail; |
| 2572 return v8Undefined(); | 2572 return v8Undefined(); |
| 2573 } | 2573 } |
| 2574 fail: | 2574 fail: |
| 2575 return setDOMException(ec, args.GetIsolate()); | 2575 return setDOMException(ec, args.GetIsolate()); |
| 2576 } | 2576 } |
| 2577 | 2577 |
| 2578 static v8::Handle<v8::Value> methodWithExceptionMethodCallback(const v8::Argumen
ts& args) | 2578 static v8::Handle<v8::Value> methodWithExceptionMethodCallback(const v8::Argumen
ts& args) |
| 2579 { | 2579 { |
| 2580 return TestObjV8Internal::methodWithExceptionMethod(args); | 2580 return TestObjV8Internal::methodWithExceptionMethod(args); |
| 2581 } | 2581 } |
| 2582 | 2582 |
| 2583 static v8::Handle<v8::Value> customMethodMethodCallback(const v8::Arguments& arg
s) | 2583 static v8::Handle<v8::Value> customMethodMethodCallback(const v8::Arguments& arg
s) |
| 2584 { | 2584 { |
| 2585 UseCounter::count(activeDOMWindow(), UseCounter::CustomTestFeature); | 2585 UseCounter::count(activeDOMWindow(), UseCounter::CustomTestFeature); |
| 2586 return V8TestObj::customMethodMethodCustom(args); | 2586 return V8TestObject::customMethodMethodCustom(args); |
| 2587 } | 2587 } |
| 2588 | 2588 |
| 2589 static v8::Handle<v8::Value> customMethodWithArgsMethodCallback(const v8::Argume
nts& args) | 2589 static v8::Handle<v8::Value> customMethodWithArgsMethodCallback(const v8::Argume
nts& args) |
| 2590 { | 2590 { |
| 2591 return V8TestObj::customMethodWithArgsMethodCustom(args); | 2591 return V8TestObject::customMethodWithArgsMethodCustom(args); |
| 2592 } | 2592 } |
| 2593 | 2593 |
| 2594 static v8::Handle<v8::Value> addEventListenerMethod(const v8::Arguments& args) | 2594 static v8::Handle<v8::Value> addEventListenerMethod(const v8::Arguments& args) |
| 2595 { | 2595 { |
| 2596 RefPtr<EventListener> listener = V8EventListenerList::getEventListener(args[
1], false, ListenerFindOrCreate); | 2596 RefPtr<EventListener> listener = V8EventListenerList::getEventListener(args[
1], false, ListenerFindOrCreate); |
| 2597 if (listener) { | 2597 if (listener) { |
| 2598 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<WithNullCheck>, stringR
esource, args[0]); | 2598 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<WithNullCheck>, stringR
esource, args[0]); |
| 2599 V8TestObj::toNative(args.Holder())->addEventListener(stringResource, lis
tener, args[2]->BooleanValue()); | 2599 V8TestObject::toNative(args.Holder())->addEventListener(stringResource,
listener, args[2]->BooleanValue()); |
| 2600 createHiddenDependency(args.Holder(), args[1], V8TestObj::eventListenerC
acheIndex, args.GetIsolate()); | 2600 createHiddenDependency(args.Holder(), args[1], V8TestObject::eventListen
erCacheIndex, args.GetIsolate()); |
| 2601 } | 2601 } |
| 2602 return v8Undefined(); | 2602 return v8Undefined(); |
| 2603 } | 2603 } |
| 2604 | 2604 |
| 2605 static v8::Handle<v8::Value> addEventListenerMethodCallback(const v8::Arguments&
args) | 2605 static v8::Handle<v8::Value> addEventListenerMethodCallback(const v8::Arguments&
args) |
| 2606 { | 2606 { |
| 2607 return TestObjV8Internal::addEventListenerMethod(args); | 2607 return TestObjV8Internal::addEventListenerMethod(args); |
| 2608 } | 2608 } |
| 2609 | 2609 |
| 2610 static v8::Handle<v8::Value> removeEventListenerMethod(const v8::Arguments& args
) | 2610 static v8::Handle<v8::Value> removeEventListenerMethod(const v8::Arguments& args
) |
| 2611 { | 2611 { |
| 2612 RefPtr<EventListener> listener = V8EventListenerList::getEventListener(args[
1], false, ListenerFindOnly); | 2612 RefPtr<EventListener> listener = V8EventListenerList::getEventListener(args[
1], false, ListenerFindOnly); |
| 2613 if (listener) { | 2613 if (listener) { |
| 2614 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<WithNullCheck>, stringR
esource, args[0]); | 2614 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<WithNullCheck>, stringR
esource, args[0]); |
| 2615 V8TestObj::toNative(args.Holder())->removeEventListener(stringResource,
listener.get(), args[2]->BooleanValue()); | 2615 V8TestObject::toNative(args.Holder())->removeEventListener(stringResourc
e, listener.get(), args[2]->BooleanValue()); |
| 2616 removeHiddenDependency(args.Holder(), args[1], V8TestObj::eventListenerC
acheIndex, args.GetIsolate()); | 2616 removeHiddenDependency(args.Holder(), args[1], V8TestObject::eventListen
erCacheIndex, args.GetIsolate()); |
| 2617 } | 2617 } |
| 2618 return v8Undefined(); | 2618 return v8Undefined(); |
| 2619 } | 2619 } |
| 2620 | 2620 |
| 2621 static v8::Handle<v8::Value> removeEventListenerMethodCallback(const v8::Argumen
ts& args) | 2621 static v8::Handle<v8::Value> removeEventListenerMethodCallback(const v8::Argumen
ts& args) |
| 2622 { | 2622 { |
| 2623 return TestObjV8Internal::removeEventListenerMethod(args); | 2623 return TestObjV8Internal::removeEventListenerMethod(args); |
| 2624 } | 2624 } |
| 2625 | 2625 |
| 2626 static v8::Handle<v8::Value> withScriptStateVoidMethod(const v8::Arguments& args
) | 2626 static v8::Handle<v8::Value> withScriptStateVoidMethod(const v8::Arguments& args
) |
| 2627 { | 2627 { |
| 2628 TestObj* imp = V8TestObj::toNative(args.Holder()); | 2628 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 2629 ScriptState* currentState = ScriptState::current(); | 2629 ScriptState* currentState = ScriptState::current(); |
| 2630 if (!currentState) | 2630 if (!currentState) |
| 2631 return v8Undefined(); | 2631 return v8Undefined(); |
| 2632 ScriptState& state = *currentState; | 2632 ScriptState& state = *currentState; |
| 2633 imp->withScriptStateVoid(&state); | 2633 imp->withScriptStateVoid(&state); |
| 2634 if (state.hadException()) { | 2634 if (state.hadException()) { |
| 2635 v8::Local<v8::Value> exception = state.exception(); | 2635 v8::Local<v8::Value> exception = state.exception(); |
| 2636 state.clearException(); | 2636 state.clearException(); |
| 2637 return throwError(exception, args.GetIsolate()); | 2637 return throwError(exception, args.GetIsolate()); |
| 2638 } | 2638 } |
| 2639 return v8Undefined(); | 2639 return v8Undefined(); |
| 2640 } | 2640 } |
| 2641 | 2641 |
| 2642 static v8::Handle<v8::Value> withScriptStateVoidMethodCallback(const v8::Argumen
ts& args) | 2642 static v8::Handle<v8::Value> withScriptStateVoidMethodCallback(const v8::Argumen
ts& args) |
| 2643 { | 2643 { |
| 2644 return TestObjV8Internal::withScriptStateVoidMethod(args); | 2644 return TestObjV8Internal::withScriptStateVoidMethod(args); |
| 2645 } | 2645 } |
| 2646 | 2646 |
| 2647 static v8::Handle<v8::Value> withScriptStateObjMethod(const v8::Arguments& args) | 2647 static v8::Handle<v8::Value> withScriptStateObjMethod(const v8::Arguments& args) |
| 2648 { | 2648 { |
| 2649 TestObj* imp = V8TestObj::toNative(args.Holder()); | 2649 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 2650 ScriptState* currentState = ScriptState::current(); | 2650 ScriptState* currentState = ScriptState::current(); |
| 2651 if (!currentState) | 2651 if (!currentState) |
| 2652 return v8Undefined(); | 2652 return v8Undefined(); |
| 2653 ScriptState& state = *currentState; | 2653 ScriptState& state = *currentState; |
| 2654 RefPtr<TestObj> result = imp->withScriptStateObj(&state); | 2654 RefPtr<TestObj> result = imp->withScriptStateObj(&state); |
| 2655 if (state.hadException()) { | 2655 if (state.hadException()) { |
| 2656 v8::Local<v8::Value> exception = state.exception(); | 2656 v8::Local<v8::Value> exception = state.exception(); |
| 2657 state.clearException(); | 2657 state.clearException(); |
| 2658 return throwError(exception, args.GetIsolate()); | 2658 return throwError(exception, args.GetIsolate()); |
| 2659 } | 2659 } |
| 2660 return toV8(result.release(), args.Holder(), args.GetIsolate()); | 2660 return toV8(result.release(), args.Holder(), args.GetIsolate()); |
| 2661 } | 2661 } |
| 2662 | 2662 |
| 2663 static v8::Handle<v8::Value> withScriptStateObjMethodCallback(const v8::Argument
s& args) | 2663 static v8::Handle<v8::Value> withScriptStateObjMethodCallback(const v8::Argument
s& args) |
| 2664 { | 2664 { |
| 2665 return TestObjV8Internal::withScriptStateObjMethod(args); | 2665 return TestObjV8Internal::withScriptStateObjMethod(args); |
| 2666 } | 2666 } |
| 2667 | 2667 |
| 2668 static v8::Handle<v8::Value> withScriptStateVoidExceptionMethod(const v8::Argume
nts& args) | 2668 static v8::Handle<v8::Value> withScriptStateVoidExceptionMethod(const v8::Argume
nts& args) |
| 2669 { | 2669 { |
| 2670 TestObj* imp = V8TestObj::toNative(args.Holder()); | 2670 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 2671 ExceptionCode ec = 0; | 2671 ExceptionCode ec = 0; |
| 2672 { | 2672 { |
| 2673 ScriptState* currentState = ScriptState::current(); | 2673 ScriptState* currentState = ScriptState::current(); |
| 2674 if (!currentState) | 2674 if (!currentState) |
| 2675 return v8Undefined(); | 2675 return v8Undefined(); |
| 2676 ScriptState& state = *currentState; | 2676 ScriptState& state = *currentState; |
| 2677 imp->withScriptStateVoidException(&state, ec); | 2677 imp->withScriptStateVoidException(&state, ec); |
| 2678 if (UNLIKELY(ec)) | 2678 if (UNLIKELY(ec)) |
| 2679 goto fail; | 2679 goto fail; |
| 2680 if (state.hadException()) { | 2680 if (state.hadException()) { |
| 2681 v8::Local<v8::Value> exception = state.exception(); | 2681 v8::Local<v8::Value> exception = state.exception(); |
| 2682 state.clearException(); | 2682 state.clearException(); |
| 2683 return throwError(exception, args.GetIsolate()); | 2683 return throwError(exception, args.GetIsolate()); |
| 2684 } | 2684 } |
| 2685 return v8Undefined(); | 2685 return v8Undefined(); |
| 2686 } | 2686 } |
| 2687 fail: | 2687 fail: |
| 2688 return setDOMException(ec, args.GetIsolate()); | 2688 return setDOMException(ec, args.GetIsolate()); |
| 2689 } | 2689 } |
| 2690 | 2690 |
| 2691 static v8::Handle<v8::Value> withScriptStateVoidExceptionMethodCallback(const v8
::Arguments& args) | 2691 static v8::Handle<v8::Value> withScriptStateVoidExceptionMethodCallback(const v8
::Arguments& args) |
| 2692 { | 2692 { |
| 2693 return TestObjV8Internal::withScriptStateVoidExceptionMethod(args); | 2693 return TestObjV8Internal::withScriptStateVoidExceptionMethod(args); |
| 2694 } | 2694 } |
| 2695 | 2695 |
| 2696 static v8::Handle<v8::Value> withScriptStateObjExceptionMethod(const v8::Argumen
ts& args) | 2696 static v8::Handle<v8::Value> withScriptStateObjExceptionMethod(const v8::Argumen
ts& args) |
| 2697 { | 2697 { |
| 2698 TestObj* imp = V8TestObj::toNative(args.Holder()); | 2698 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 2699 ExceptionCode ec = 0; | 2699 ExceptionCode ec = 0; |
| 2700 { | 2700 { |
| 2701 ScriptState* currentState = ScriptState::current(); | 2701 ScriptState* currentState = ScriptState::current(); |
| 2702 if (!currentState) | 2702 if (!currentState) |
| 2703 return v8Undefined(); | 2703 return v8Undefined(); |
| 2704 ScriptState& state = *currentState; | 2704 ScriptState& state = *currentState; |
| 2705 RefPtr<TestObj> result = imp->withScriptStateObjException(&state, ec); | 2705 RefPtr<TestObj> result = imp->withScriptStateObjException(&state, ec); |
| 2706 if (UNLIKELY(ec)) | 2706 if (UNLIKELY(ec)) |
| 2707 goto fail; | 2707 goto fail; |
| 2708 if (state.hadException()) { | 2708 if (state.hadException()) { |
| 2709 v8::Local<v8::Value> exception = state.exception(); | 2709 v8::Local<v8::Value> exception = state.exception(); |
| 2710 state.clearException(); | 2710 state.clearException(); |
| 2711 return throwError(exception, args.GetIsolate()); | 2711 return throwError(exception, args.GetIsolate()); |
| 2712 } | 2712 } |
| 2713 return toV8(result.release(), args.Holder(), args.GetIsolate()); | 2713 return toV8(result.release(), args.Holder(), args.GetIsolate()); |
| 2714 } | 2714 } |
| 2715 fail: | 2715 fail: |
| 2716 return setDOMException(ec, args.GetIsolate()); | 2716 return setDOMException(ec, args.GetIsolate()); |
| 2717 } | 2717 } |
| 2718 | 2718 |
| 2719 static v8::Handle<v8::Value> withScriptStateObjExceptionMethodCallback(const v8:
:Arguments& args) | 2719 static v8::Handle<v8::Value> withScriptStateObjExceptionMethodCallback(const v8:
:Arguments& args) |
| 2720 { | 2720 { |
| 2721 return TestObjV8Internal::withScriptStateObjExceptionMethod(args); | 2721 return TestObjV8Internal::withScriptStateObjExceptionMethod(args); |
| 2722 } | 2722 } |
| 2723 | 2723 |
| 2724 static v8::Handle<v8::Value> withScriptExecutionContextMethod(const v8::Argument
s& args) | 2724 static v8::Handle<v8::Value> withScriptExecutionContextMethod(const v8::Argument
s& args) |
| 2725 { | 2725 { |
| 2726 TestObj* imp = V8TestObj::toNative(args.Holder()); | 2726 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 2727 ScriptExecutionContext* scriptContext = getScriptExecutionContext(); | 2727 ScriptExecutionContext* scriptContext = getScriptExecutionContext(); |
| 2728 imp->withScriptExecutionContext(scriptContext); | 2728 imp->withScriptExecutionContext(scriptContext); |
| 2729 return v8Undefined(); | 2729 return v8Undefined(); |
| 2730 } | 2730 } |
| 2731 | 2731 |
| 2732 static v8::Handle<v8::Value> withScriptExecutionContextMethodCallback(const v8::
Arguments& args) | 2732 static v8::Handle<v8::Value> withScriptExecutionContextMethodCallback(const v8::
Arguments& args) |
| 2733 { | 2733 { |
| 2734 return TestObjV8Internal::withScriptExecutionContextMethod(args); | 2734 return TestObjV8Internal::withScriptExecutionContextMethod(args); |
| 2735 } | 2735 } |
| 2736 | 2736 |
| 2737 static v8::Handle<v8::Value> withScriptExecutionContextAndScriptStateMethod(cons
t v8::Arguments& args) | 2737 static v8::Handle<v8::Value> withScriptExecutionContextAndScriptStateMethod(cons
t v8::Arguments& args) |
| 2738 { | 2738 { |
| 2739 TestObj* imp = V8TestObj::toNative(args.Holder()); | 2739 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 2740 ScriptState* currentState = ScriptState::current(); | 2740 ScriptState* currentState = ScriptState::current(); |
| 2741 if (!currentState) | 2741 if (!currentState) |
| 2742 return v8Undefined(); | 2742 return v8Undefined(); |
| 2743 ScriptState& state = *currentState; | 2743 ScriptState& state = *currentState; |
| 2744 ScriptExecutionContext* scriptContext = getScriptExecutionContext(); | 2744 ScriptExecutionContext* scriptContext = getScriptExecutionContext(); |
| 2745 imp->withScriptExecutionContextAndScriptState(&state, scriptContext); | 2745 imp->withScriptExecutionContextAndScriptState(&state, scriptContext); |
| 2746 if (state.hadException()) { | 2746 if (state.hadException()) { |
| 2747 v8::Local<v8::Value> exception = state.exception(); | 2747 v8::Local<v8::Value> exception = state.exception(); |
| 2748 state.clearException(); | 2748 state.clearException(); |
| 2749 return throwError(exception, args.GetIsolate()); | 2749 return throwError(exception, args.GetIsolate()); |
| 2750 } | 2750 } |
| 2751 return v8Undefined(); | 2751 return v8Undefined(); |
| 2752 } | 2752 } |
| 2753 | 2753 |
| 2754 static v8::Handle<v8::Value> withScriptExecutionContextAndScriptStateMethodCallb
ack(const v8::Arguments& args) | 2754 static v8::Handle<v8::Value> withScriptExecutionContextAndScriptStateMethodCallb
ack(const v8::Arguments& args) |
| 2755 { | 2755 { |
| 2756 return TestObjV8Internal::withScriptExecutionContextAndScriptStateMethod(arg
s); | 2756 return TestObjV8Internal::withScriptExecutionContextAndScriptStateMethod(arg
s); |
| 2757 } | 2757 } |
| 2758 | 2758 |
| 2759 static v8::Handle<v8::Value> withScriptExecutionContextAndScriptStateObjExceptio
nMethod(const v8::Arguments& args) | 2759 static v8::Handle<v8::Value> withScriptExecutionContextAndScriptStateObjExceptio
nMethod(const v8::Arguments& args) |
| 2760 { | 2760 { |
| 2761 TestObj* imp = V8TestObj::toNative(args.Holder()); | 2761 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 2762 ExceptionCode ec = 0; | 2762 ExceptionCode ec = 0; |
| 2763 { | 2763 { |
| 2764 ScriptState* currentState = ScriptState::current(); | 2764 ScriptState* currentState = ScriptState::current(); |
| 2765 if (!currentState) | 2765 if (!currentState) |
| 2766 return v8Undefined(); | 2766 return v8Undefined(); |
| 2767 ScriptState& state = *currentState; | 2767 ScriptState& state = *currentState; |
| 2768 ScriptExecutionContext* scriptContext = getScriptExecutionContext(); | 2768 ScriptExecutionContext* scriptContext = getScriptExecutionContext(); |
| 2769 RefPtr<TestObj> result = imp->withScriptExecutionContextAndScriptStateObjExc
eption(&state, scriptContext, ec); | 2769 RefPtr<TestObj> result = imp->withScriptExecutionContextAndScriptStateObjExc
eption(&state, scriptContext, ec); |
| 2770 if (UNLIKELY(ec)) | 2770 if (UNLIKELY(ec)) |
| 2771 goto fail; | 2771 goto fail; |
| 2772 if (state.hadException()) { | 2772 if (state.hadException()) { |
| 2773 v8::Local<v8::Value> exception = state.exception(); | 2773 v8::Local<v8::Value> exception = state.exception(); |
| 2774 state.clearException(); | 2774 state.clearException(); |
| 2775 return throwError(exception, args.GetIsolate()); | 2775 return throwError(exception, args.GetIsolate()); |
| 2776 } | 2776 } |
| 2777 return toV8(result.release(), args.Holder(), args.GetIsolate()); | 2777 return toV8(result.release(), args.Holder(), args.GetIsolate()); |
| 2778 } | 2778 } |
| 2779 fail: | 2779 fail: |
| 2780 return setDOMException(ec, args.GetIsolate()); | 2780 return setDOMException(ec, args.GetIsolate()); |
| 2781 } | 2781 } |
| 2782 | 2782 |
| 2783 static v8::Handle<v8::Value> withScriptExecutionContextAndScriptStateObjExceptio
nMethodCallback(const v8::Arguments& args) | 2783 static v8::Handle<v8::Value> withScriptExecutionContextAndScriptStateObjExceptio
nMethodCallback(const v8::Arguments& args) |
| 2784 { | 2784 { |
| 2785 return TestObjV8Internal::withScriptExecutionContextAndScriptStateObjExcepti
onMethod(args); | 2785 return TestObjV8Internal::withScriptExecutionContextAndScriptStateObjExcepti
onMethod(args); |
| 2786 } | 2786 } |
| 2787 | 2787 |
| 2788 static v8::Handle<v8::Value> withScriptExecutionContextAndScriptStateWithSpacesM
ethod(const v8::Arguments& args) | 2788 static v8::Handle<v8::Value> withScriptExecutionContextAndScriptStateWithSpacesM
ethod(const v8::Arguments& args) |
| 2789 { | 2789 { |
| 2790 TestObj* imp = V8TestObj::toNative(args.Holder()); | 2790 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 2791 ScriptState* currentState = ScriptState::current(); | 2791 ScriptState* currentState = ScriptState::current(); |
| 2792 if (!currentState) | 2792 if (!currentState) |
| 2793 return v8Undefined(); | 2793 return v8Undefined(); |
| 2794 ScriptState& state = *currentState; | 2794 ScriptState& state = *currentState; |
| 2795 ScriptExecutionContext* scriptContext = getScriptExecutionContext(); | 2795 ScriptExecutionContext* scriptContext = getScriptExecutionContext(); |
| 2796 RefPtr<TestObj> result = imp->withScriptExecutionContextAndScriptStateWithSp
aces(&state, scriptContext); | 2796 RefPtr<TestObj> result = imp->withScriptExecutionContextAndScriptStateWithSp
aces(&state, scriptContext); |
| 2797 if (state.hadException()) { | 2797 if (state.hadException()) { |
| 2798 v8::Local<v8::Value> exception = state.exception(); | 2798 v8::Local<v8::Value> exception = state.exception(); |
| 2799 state.clearException(); | 2799 state.clearException(); |
| 2800 return throwError(exception, args.GetIsolate()); | 2800 return throwError(exception, args.GetIsolate()); |
| 2801 } | 2801 } |
| 2802 return toV8(result.release(), args.Holder(), args.GetIsolate()); | 2802 return toV8(result.release(), args.Holder(), args.GetIsolate()); |
| 2803 } | 2803 } |
| 2804 | 2804 |
| 2805 static v8::Handle<v8::Value> withScriptExecutionContextAndScriptStateWithSpacesM
ethodCallback(const v8::Arguments& args) | 2805 static v8::Handle<v8::Value> withScriptExecutionContextAndScriptStateWithSpacesM
ethodCallback(const v8::Arguments& args) |
| 2806 { | 2806 { |
| 2807 return TestObjV8Internal::withScriptExecutionContextAndScriptStateWithSpaces
Method(args); | 2807 return TestObjV8Internal::withScriptExecutionContextAndScriptStateWithSpaces
Method(args); |
| 2808 } | 2808 } |
| 2809 | 2809 |
| 2810 static v8::Handle<v8::Value> methodWithOptionalArgMethod(const v8::Arguments& ar
gs) | 2810 static v8::Handle<v8::Value> methodWithOptionalArgMethod(const v8::Arguments& ar
gs) |
| 2811 { | 2811 { |
| 2812 TestObj* imp = V8TestObj::toNative(args.Holder()); | 2812 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 2813 if (args.Length() <= 0) { | 2813 if (args.Length() <= 0) { |
| 2814 imp->methodWithOptionalArg(); | 2814 imp->methodWithOptionalArg(); |
| 2815 return v8Undefined(); | 2815 return v8Undefined(); |
| 2816 } | 2816 } |
| 2817 V8TRYCATCH(int, opt, toInt32(args[0])); | 2817 V8TRYCATCH(int, opt, toInt32(args[0])); |
| 2818 imp->methodWithOptionalArg(opt); | 2818 imp->methodWithOptionalArg(opt); |
| 2819 return v8Undefined(); | 2819 return v8Undefined(); |
| 2820 } | 2820 } |
| 2821 | 2821 |
| 2822 static v8::Handle<v8::Value> methodWithOptionalArgMethodCallback(const v8::Argum
ents& args) | 2822 static v8::Handle<v8::Value> methodWithOptionalArgMethodCallback(const v8::Argum
ents& args) |
| 2823 { | 2823 { |
| 2824 return TestObjV8Internal::methodWithOptionalArgMethod(args); | 2824 return TestObjV8Internal::methodWithOptionalArgMethod(args); |
| 2825 } | 2825 } |
| 2826 | 2826 |
| 2827 static v8::Handle<v8::Value> methodWithNonOptionalArgAndOptionalArgMethod(const
v8::Arguments& args) | 2827 static v8::Handle<v8::Value> methodWithNonOptionalArgAndOptionalArgMethod(const
v8::Arguments& args) |
| 2828 { | 2828 { |
| 2829 if (args.Length() < 1) | 2829 if (args.Length() < 1) |
| 2830 return throwNotEnoughArgumentsError(args.GetIsolate()); | 2830 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 2831 TestObj* imp = V8TestObj::toNative(args.Holder()); | 2831 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 2832 V8TRYCATCH(int, nonOpt, toInt32(args[0])); | 2832 V8TRYCATCH(int, nonOpt, toInt32(args[0])); |
| 2833 if (args.Length() <= 1) { | 2833 if (args.Length() <= 1) { |
| 2834 imp->methodWithNonOptionalArgAndOptionalArg(nonOpt); | 2834 imp->methodWithNonOptionalArgAndOptionalArg(nonOpt); |
| 2835 return v8Undefined(); | 2835 return v8Undefined(); |
| 2836 } | 2836 } |
| 2837 V8TRYCATCH(int, opt, toInt32(args[1])); | 2837 V8TRYCATCH(int, opt, toInt32(args[1])); |
| 2838 imp->methodWithNonOptionalArgAndOptionalArg(nonOpt, opt); | 2838 imp->methodWithNonOptionalArgAndOptionalArg(nonOpt, opt); |
| 2839 return v8Undefined(); | 2839 return v8Undefined(); |
| 2840 } | 2840 } |
| 2841 | 2841 |
| 2842 static v8::Handle<v8::Value> methodWithNonOptionalArgAndOptionalArgMethodCallbac
k(const v8::Arguments& args) | 2842 static v8::Handle<v8::Value> methodWithNonOptionalArgAndOptionalArgMethodCallbac
k(const v8::Arguments& args) |
| 2843 { | 2843 { |
| 2844 return TestObjV8Internal::methodWithNonOptionalArgAndOptionalArgMethod(args)
; | 2844 return TestObjV8Internal::methodWithNonOptionalArgAndOptionalArgMethod(args)
; |
| 2845 } | 2845 } |
| 2846 | 2846 |
| 2847 static v8::Handle<v8::Value> methodWithNonOptionalArgAndTwoOptionalArgsMethod(co
nst v8::Arguments& args) | 2847 static v8::Handle<v8::Value> methodWithNonOptionalArgAndTwoOptionalArgsMethod(co
nst v8::Arguments& args) |
| 2848 { | 2848 { |
| 2849 if (args.Length() < 1) | 2849 if (args.Length() < 1) |
| 2850 return throwNotEnoughArgumentsError(args.GetIsolate()); | 2850 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 2851 TestObj* imp = V8TestObj::toNative(args.Holder()); | 2851 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 2852 V8TRYCATCH(int, nonOpt, toInt32(args[0])); | 2852 V8TRYCATCH(int, nonOpt, toInt32(args[0])); |
| 2853 if (args.Length() <= 1) { | 2853 if (args.Length() <= 1) { |
| 2854 imp->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt); | 2854 imp->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt); |
| 2855 return v8Undefined(); | 2855 return v8Undefined(); |
| 2856 } | 2856 } |
| 2857 V8TRYCATCH(int, opt1, toInt32(args[1])); | 2857 V8TRYCATCH(int, opt1, toInt32(args[1])); |
| 2858 if (args.Length() <= 2) { | 2858 if (args.Length() <= 2) { |
| 2859 imp->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt, opt1); | 2859 imp->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt, opt1); |
| 2860 return v8Undefined(); | 2860 return v8Undefined(); |
| 2861 } | 2861 } |
| 2862 V8TRYCATCH(int, opt2, toInt32(args[2])); | 2862 V8TRYCATCH(int, opt2, toInt32(args[2])); |
| 2863 imp->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt, opt1, opt2); | 2863 imp->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt, opt1, opt2); |
| 2864 return v8Undefined(); | 2864 return v8Undefined(); |
| 2865 } | 2865 } |
| 2866 | 2866 |
| 2867 static v8::Handle<v8::Value> methodWithNonOptionalArgAndTwoOptionalArgsMethodCal
lback(const v8::Arguments& args) | 2867 static v8::Handle<v8::Value> methodWithNonOptionalArgAndTwoOptionalArgsMethodCal
lback(const v8::Arguments& args) |
| 2868 { | 2868 { |
| 2869 return TestObjV8Internal::methodWithNonOptionalArgAndTwoOptionalArgsMethod(a
rgs); | 2869 return TestObjV8Internal::methodWithNonOptionalArgAndTwoOptionalArgsMethod(a
rgs); |
| 2870 } | 2870 } |
| 2871 | 2871 |
| 2872 static v8::Handle<v8::Value> methodWithOptionalStringMethod(const v8::Arguments&
args) | 2872 static v8::Handle<v8::Value> methodWithOptionalStringMethod(const v8::Arguments&
args) |
| 2873 { | 2873 { |
| 2874 TestObj* imp = V8TestObj::toNative(args.Holder()); | 2874 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 2875 if (args.Length() <= 0) { | 2875 if (args.Length() <= 0) { |
| 2876 imp->methodWithOptionalString(); | 2876 imp->methodWithOptionalString(); |
| 2877 return v8Undefined(); | 2877 return v8Undefined(); |
| 2878 } | 2878 } |
| 2879 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, str, args[0]); | 2879 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, str, args[0]); |
| 2880 imp->methodWithOptionalString(str); | 2880 imp->methodWithOptionalString(str); |
| 2881 return v8Undefined(); | 2881 return v8Undefined(); |
| 2882 } | 2882 } |
| 2883 | 2883 |
| 2884 static v8::Handle<v8::Value> methodWithOptionalStringMethodCallback(const v8::Ar
guments& args) | 2884 static v8::Handle<v8::Value> methodWithOptionalStringMethodCallback(const v8::Ar
guments& args) |
| 2885 { | 2885 { |
| 2886 return TestObjV8Internal::methodWithOptionalStringMethod(args); | 2886 return TestObjV8Internal::methodWithOptionalStringMethod(args); |
| 2887 } | 2887 } |
| 2888 | 2888 |
| 2889 static v8::Handle<v8::Value> methodWithOptionalStringIsUndefinedMethod(const v8:
:Arguments& args) | 2889 static v8::Handle<v8::Value> methodWithOptionalStringIsUndefinedMethod(const v8:
:Arguments& args) |
| 2890 { | 2890 { |
| 2891 TestObj* imp = V8TestObj::toNative(args.Holder()); | 2891 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 2892 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, str, args[0]); | 2892 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, str, args[0]); |
| 2893 imp->methodWithOptionalStringIsUndefined(str); | 2893 imp->methodWithOptionalStringIsUndefined(str); |
| 2894 return v8Undefined(); | 2894 return v8Undefined(); |
| 2895 } | 2895 } |
| 2896 | 2896 |
| 2897 static v8::Handle<v8::Value> methodWithOptionalStringIsUndefinedMethodCallback(c
onst v8::Arguments& args) | 2897 static v8::Handle<v8::Value> methodWithOptionalStringIsUndefinedMethodCallback(c
onst v8::Arguments& args) |
| 2898 { | 2898 { |
| 2899 return TestObjV8Internal::methodWithOptionalStringIsUndefinedMethod(args); | 2899 return TestObjV8Internal::methodWithOptionalStringIsUndefinedMethod(args); |
| 2900 } | 2900 } |
| 2901 | 2901 |
| 2902 static v8::Handle<v8::Value> methodWithOptionalStringIsNullStringMethod(const v8
::Arguments& args) | 2902 static v8::Handle<v8::Value> methodWithOptionalStringIsNullStringMethod(const v8
::Arguments& args) |
| 2903 { | 2903 { |
| 2904 TestObj* imp = V8TestObj::toNative(args.Holder()); | 2904 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 2905 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, str, argumentOrNull(args
, 0)); | 2905 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, str, argumentOrNull(args
, 0)); |
| 2906 imp->methodWithOptionalStringIsNullString(str); | 2906 imp->methodWithOptionalStringIsNullString(str); |
| 2907 return v8Undefined(); | 2907 return v8Undefined(); |
| 2908 } | 2908 } |
| 2909 | 2909 |
| 2910 static v8::Handle<v8::Value> methodWithOptionalStringIsNullStringMethodCallback(
const v8::Arguments& args) | 2910 static v8::Handle<v8::Value> methodWithOptionalStringIsNullStringMethodCallback(
const v8::Arguments& args) |
| 2911 { | 2911 { |
| 2912 return TestObjV8Internal::methodWithOptionalStringIsNullStringMethod(args); | 2912 return TestObjV8Internal::methodWithOptionalStringIsNullStringMethod(args); |
| 2913 } | 2913 } |
| 2914 | 2914 |
| 2915 static v8::Handle<v8::Value> methodWithCallbackArgMethod(const v8::Arguments& ar
gs) | 2915 static v8::Handle<v8::Value> methodWithCallbackArgMethod(const v8::Arguments& ar
gs) |
| 2916 { | 2916 { |
| 2917 if (args.Length() < 1) | 2917 if (args.Length() < 1) |
| 2918 return throwNotEnoughArgumentsError(args.GetIsolate()); | 2918 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 2919 TestObj* imp = V8TestObj::toNative(args.Holder()); | 2919 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 2920 if (args.Length() <= 0 || !args[0]->IsFunction()) | 2920 if (args.Length() <= 0 || !args[0]->IsFunction()) |
| 2921 return throwTypeError(0, args.GetIsolate()); | 2921 return throwTypeError(0, args.GetIsolate()); |
| 2922 RefPtr<TestCallback> callback = V8TestCallback::create(args[0], getScriptExe
cutionContext()); | 2922 RefPtr<TestCallback> callback = V8TestCallback::create(args[0], getScriptExe
cutionContext()); |
| 2923 imp->methodWithCallbackArg(callback); | 2923 imp->methodWithCallbackArg(callback); |
| 2924 return v8Undefined(); | 2924 return v8Undefined(); |
| 2925 } | 2925 } |
| 2926 | 2926 |
| 2927 static v8::Handle<v8::Value> methodWithCallbackArgMethodCallback(const v8::Argum
ents& args) | 2927 static v8::Handle<v8::Value> methodWithCallbackArgMethodCallback(const v8::Argum
ents& args) |
| 2928 { | 2928 { |
| 2929 return TestObjV8Internal::methodWithCallbackArgMethod(args); | 2929 return TestObjV8Internal::methodWithCallbackArgMethod(args); |
| 2930 } | 2930 } |
| 2931 | 2931 |
| 2932 static v8::Handle<v8::Value> methodWithNonCallbackArgAndCallbackArgMethod(const
v8::Arguments& args) | 2932 static v8::Handle<v8::Value> methodWithNonCallbackArgAndCallbackArgMethod(const
v8::Arguments& args) |
| 2933 { | 2933 { |
| 2934 if (args.Length() < 2) | 2934 if (args.Length() < 2) |
| 2935 return throwNotEnoughArgumentsError(args.GetIsolate()); | 2935 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 2936 TestObj* imp = V8TestObj::toNative(args.Holder()); | 2936 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 2937 V8TRYCATCH(int, nonCallback, toInt32(args[0])); | 2937 V8TRYCATCH(int, nonCallback, toInt32(args[0])); |
| 2938 if (args.Length() <= 1 || !args[1]->IsFunction()) | 2938 if (args.Length() <= 1 || !args[1]->IsFunction()) |
| 2939 return throwTypeError(0, args.GetIsolate()); | 2939 return throwTypeError(0, args.GetIsolate()); |
| 2940 RefPtr<TestCallback> callback = V8TestCallback::create(args[1], getScriptExe
cutionContext()); | 2940 RefPtr<TestCallback> callback = V8TestCallback::create(args[1], getScriptExe
cutionContext()); |
| 2941 imp->methodWithNonCallbackArgAndCallbackArg(nonCallback, callback); | 2941 imp->methodWithNonCallbackArgAndCallbackArg(nonCallback, callback); |
| 2942 return v8Undefined(); | 2942 return v8Undefined(); |
| 2943 } | 2943 } |
| 2944 | 2944 |
| 2945 static v8::Handle<v8::Value> methodWithNonCallbackArgAndCallbackArgMethodCallbac
k(const v8::Arguments& args) | 2945 static v8::Handle<v8::Value> methodWithNonCallbackArgAndCallbackArgMethodCallbac
k(const v8::Arguments& args) |
| 2946 { | 2946 { |
| 2947 return TestObjV8Internal::methodWithNonCallbackArgAndCallbackArgMethod(args)
; | 2947 return TestObjV8Internal::methodWithNonCallbackArgAndCallbackArgMethod(args)
; |
| 2948 } | 2948 } |
| 2949 | 2949 |
| 2950 static v8::Handle<v8::Value> methodWithCallbackAndOptionalArgMethod(const v8::Ar
guments& args) | 2950 static v8::Handle<v8::Value> methodWithCallbackAndOptionalArgMethod(const v8::Ar
guments& args) |
| 2951 { | 2951 { |
| 2952 TestObj* imp = V8TestObj::toNative(args.Holder()); | 2952 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 2953 RefPtr<TestCallback> callback; | 2953 RefPtr<TestCallback> callback; |
| 2954 if (args.Length() > 0 && !args[0]->IsNull() && !args[0]->IsUndefined()) { | 2954 if (args.Length() > 0 && !args[0]->IsNull() && !args[0]->IsUndefined()) { |
| 2955 if (!args[0]->IsFunction()) | 2955 if (!args[0]->IsFunction()) |
| 2956 return throwTypeError(0, args.GetIsolate()); | 2956 return throwTypeError(0, args.GetIsolate()); |
| 2957 callback = V8TestCallback::create(args[0], getScriptExecutionContext()); | 2957 callback = V8TestCallback::create(args[0], getScriptExecutionContext()); |
| 2958 } | 2958 } |
| 2959 imp->methodWithCallbackAndOptionalArg(callback); | 2959 imp->methodWithCallbackAndOptionalArg(callback); |
| 2960 return v8Undefined(); | 2960 return v8Undefined(); |
| 2961 } | 2961 } |
| 2962 | 2962 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2995 | 2995 |
| 2996 static v8::Handle<v8::Value> staticMethodWithCallbackArgMethodCallback(const v8:
:Arguments& args) | 2996 static v8::Handle<v8::Value> staticMethodWithCallbackArgMethodCallback(const v8:
:Arguments& args) |
| 2997 { | 2997 { |
| 2998 return TestObjV8Internal::staticMethodWithCallbackArgMethod(args); | 2998 return TestObjV8Internal::staticMethodWithCallbackArgMethod(args); |
| 2999 } | 2999 } |
| 3000 | 3000 |
| 3001 static v8::Handle<v8::Value> methodWithEnforceRangeInt32Method(const v8::Argumen
ts& args) | 3001 static v8::Handle<v8::Value> methodWithEnforceRangeInt32Method(const v8::Argumen
ts& args) |
| 3002 { | 3002 { |
| 3003 if (args.Length() < 1) | 3003 if (args.Length() < 1) |
| 3004 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3004 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3005 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3005 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3006 V8TRYCATCH_WITH_TYPECHECK(int, value, toInt32(args[0], EnforceRange, ok), ar
gs.GetIsolate()); | 3006 V8TRYCATCH_WITH_TYPECHECK(int, value, toInt32(args[0], EnforceRange, ok), ar
gs.GetIsolate()); |
| 3007 imp->methodWithEnforceRangeInt32(value); | 3007 imp->methodWithEnforceRangeInt32(value); |
| 3008 return v8Undefined(); | 3008 return v8Undefined(); |
| 3009 } | 3009 } |
| 3010 | 3010 |
| 3011 static v8::Handle<v8::Value> methodWithEnforceRangeInt32MethodCallback(const v8:
:Arguments& args) | 3011 static v8::Handle<v8::Value> methodWithEnforceRangeInt32MethodCallback(const v8:
:Arguments& args) |
| 3012 { | 3012 { |
| 3013 return TestObjV8Internal::methodWithEnforceRangeInt32Method(args); | 3013 return TestObjV8Internal::methodWithEnforceRangeInt32Method(args); |
| 3014 } | 3014 } |
| 3015 | 3015 |
| 3016 static v8::Handle<v8::Value> methodWithEnforceRangeUInt32Method(const v8::Argume
nts& args) | 3016 static v8::Handle<v8::Value> methodWithEnforceRangeUInt32Method(const v8::Argume
nts& args) |
| 3017 { | 3017 { |
| 3018 if (args.Length() < 1) | 3018 if (args.Length() < 1) |
| 3019 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3019 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3020 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3020 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3021 V8TRYCATCH_WITH_TYPECHECK(unsigned, value, toUInt32(args[0], EnforceRange, o
k), args.GetIsolate()); | 3021 V8TRYCATCH_WITH_TYPECHECK(unsigned, value, toUInt32(args[0], EnforceRange, o
k), args.GetIsolate()); |
| 3022 imp->methodWithEnforceRangeUInt32(value); | 3022 imp->methodWithEnforceRangeUInt32(value); |
| 3023 return v8Undefined(); | 3023 return v8Undefined(); |
| 3024 } | 3024 } |
| 3025 | 3025 |
| 3026 static v8::Handle<v8::Value> methodWithEnforceRangeUInt32MethodCallback(const v8
::Arguments& args) | 3026 static v8::Handle<v8::Value> methodWithEnforceRangeUInt32MethodCallback(const v8
::Arguments& args) |
| 3027 { | 3027 { |
| 3028 return TestObjV8Internal::methodWithEnforceRangeUInt32Method(args); | 3028 return TestObjV8Internal::methodWithEnforceRangeUInt32Method(args); |
| 3029 } | 3029 } |
| 3030 | 3030 |
| 3031 static v8::Handle<v8::Value> methodWithEnforceRangeInt64Method(const v8::Argumen
ts& args) | 3031 static v8::Handle<v8::Value> methodWithEnforceRangeInt64Method(const v8::Argumen
ts& args) |
| 3032 { | 3032 { |
| 3033 if (args.Length() < 1) | 3033 if (args.Length() < 1) |
| 3034 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3034 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3035 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3035 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3036 V8TRYCATCH_WITH_TYPECHECK(long long, value, toInt64(args[0], EnforceRange, o
k), args.GetIsolate()); | 3036 V8TRYCATCH_WITH_TYPECHECK(long long, value, toInt64(args[0], EnforceRange, o
k), args.GetIsolate()); |
| 3037 imp->methodWithEnforceRangeInt64(value); | 3037 imp->methodWithEnforceRangeInt64(value); |
| 3038 return v8Undefined(); | 3038 return v8Undefined(); |
| 3039 } | 3039 } |
| 3040 | 3040 |
| 3041 static v8::Handle<v8::Value> methodWithEnforceRangeInt64MethodCallback(const v8:
:Arguments& args) | 3041 static v8::Handle<v8::Value> methodWithEnforceRangeInt64MethodCallback(const v8:
:Arguments& args) |
| 3042 { | 3042 { |
| 3043 return TestObjV8Internal::methodWithEnforceRangeInt64Method(args); | 3043 return TestObjV8Internal::methodWithEnforceRangeInt64Method(args); |
| 3044 } | 3044 } |
| 3045 | 3045 |
| 3046 static v8::Handle<v8::Value> methodWithEnforceRangeUInt64Method(const v8::Argume
nts& args) | 3046 static v8::Handle<v8::Value> methodWithEnforceRangeUInt64Method(const v8::Argume
nts& args) |
| 3047 { | 3047 { |
| 3048 if (args.Length() < 1) | 3048 if (args.Length() < 1) |
| 3049 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3049 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3050 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3050 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3051 V8TRYCATCH_WITH_TYPECHECK(unsigned long long, value, toUInt64(args[0], Enfor
ceRange, ok), args.GetIsolate()); | 3051 V8TRYCATCH_WITH_TYPECHECK(unsigned long long, value, toUInt64(args[0], Enfor
ceRange, ok), args.GetIsolate()); |
| 3052 imp->methodWithEnforceRangeUInt64(value); | 3052 imp->methodWithEnforceRangeUInt64(value); |
| 3053 return v8Undefined(); | 3053 return v8Undefined(); |
| 3054 } | 3054 } |
| 3055 | 3055 |
| 3056 static v8::Handle<v8::Value> methodWithEnforceRangeUInt64MethodCallback(const v8
::Arguments& args) | 3056 static v8::Handle<v8::Value> methodWithEnforceRangeUInt64MethodCallback(const v8
::Arguments& args) |
| 3057 { | 3057 { |
| 3058 return TestObjV8Internal::methodWithEnforceRangeUInt64Method(args); | 3058 return TestObjV8Internal::methodWithEnforceRangeUInt64Method(args); |
| 3059 } | 3059 } |
| 3060 | 3060 |
| 3061 #if ENABLE(Condition1) | 3061 #if ENABLE(Condition1) |
| 3062 | 3062 |
| 3063 static v8::Handle<v8::Value> conditionalMethod1Method(const v8::Arguments& args) | 3063 static v8::Handle<v8::Value> conditionalMethod1Method(const v8::Arguments& args) |
| 3064 { | 3064 { |
| 3065 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3065 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3066 return v8String(imp->conditionalMethod1(), args.GetIsolate(), ReturnUnsafeHa
ndle); | 3066 return v8String(imp->conditionalMethod1(), args.GetIsolate(), ReturnUnsafeHa
ndle); |
| 3067 } | 3067 } |
| 3068 | 3068 |
| 3069 #endif // ENABLE(Condition1) | 3069 #endif // ENABLE(Condition1) |
| 3070 | 3070 |
| 3071 #if ENABLE(Condition1) | 3071 #if ENABLE(Condition1) |
| 3072 | 3072 |
| 3073 static v8::Handle<v8::Value> conditionalMethod1MethodCallback(const v8::Argument
s& args) | 3073 static v8::Handle<v8::Value> conditionalMethod1MethodCallback(const v8::Argument
s& args) |
| 3074 { | 3074 { |
| 3075 return TestObjV8Internal::conditionalMethod1Method(args); | 3075 return TestObjV8Internal::conditionalMethod1Method(args); |
| 3076 } | 3076 } |
| 3077 | 3077 |
| 3078 #endif // ENABLE(Condition1) | 3078 #endif // ENABLE(Condition1) |
| 3079 | 3079 |
| 3080 #if ENABLE(Condition1) && ENABLE(Condition2) | 3080 #if ENABLE(Condition1) && ENABLE(Condition2) |
| 3081 | 3081 |
| 3082 static v8::Handle<v8::Value> conditionalMethod2Method(const v8::Arguments& args) | 3082 static v8::Handle<v8::Value> conditionalMethod2Method(const v8::Arguments& args) |
| 3083 { | 3083 { |
| 3084 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3084 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3085 imp->conditionalMethod2(); | 3085 imp->conditionalMethod2(); |
| 3086 return v8Undefined(); | 3086 return v8Undefined(); |
| 3087 } | 3087 } |
| 3088 | 3088 |
| 3089 #endif // ENABLE(Condition1) && ENABLE(Condition2) | 3089 #endif // ENABLE(Condition1) && ENABLE(Condition2) |
| 3090 | 3090 |
| 3091 #if ENABLE(Condition1) && ENABLE(Condition2) | 3091 #if ENABLE(Condition1) && ENABLE(Condition2) |
| 3092 | 3092 |
| 3093 static v8::Handle<v8::Value> conditionalMethod2MethodCallback(const v8::Argument
s& args) | 3093 static v8::Handle<v8::Value> conditionalMethod2MethodCallback(const v8::Argument
s& args) |
| 3094 { | 3094 { |
| 3095 return TestObjV8Internal::conditionalMethod2Method(args); | 3095 return TestObjV8Internal::conditionalMethod2Method(args); |
| 3096 } | 3096 } |
| 3097 | 3097 |
| 3098 #endif // ENABLE(Condition1) && ENABLE(Condition2) | 3098 #endif // ENABLE(Condition1) && ENABLE(Condition2) |
| 3099 | 3099 |
| 3100 #if ENABLE(Condition1) || ENABLE(Condition2) | 3100 #if ENABLE(Condition1) || ENABLE(Condition2) |
| 3101 | 3101 |
| 3102 static v8::Handle<v8::Value> conditionalMethod3Method(const v8::Arguments& args) | 3102 static v8::Handle<v8::Value> conditionalMethod3Method(const v8::Arguments& args) |
| 3103 { | 3103 { |
| 3104 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3104 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3105 imp->conditionalMethod3(); | 3105 imp->conditionalMethod3(); |
| 3106 return v8Undefined(); | 3106 return v8Undefined(); |
| 3107 } | 3107 } |
| 3108 | 3108 |
| 3109 #endif // ENABLE(Condition1) || ENABLE(Condition2) | 3109 #endif // ENABLE(Condition1) || ENABLE(Condition2) |
| 3110 | 3110 |
| 3111 #if ENABLE(Condition1) || ENABLE(Condition2) | 3111 #if ENABLE(Condition1) || ENABLE(Condition2) |
| 3112 | 3112 |
| 3113 static v8::Handle<v8::Value> conditionalMethod3MethodCallback(const v8::Argument
s& args) | 3113 static v8::Handle<v8::Value> conditionalMethod3MethodCallback(const v8::Argument
s& args) |
| 3114 { | 3114 { |
| 3115 return TestObjV8Internal::conditionalMethod3Method(args); | 3115 return TestObjV8Internal::conditionalMethod3Method(args); |
| 3116 } | 3116 } |
| 3117 | 3117 |
| 3118 #endif // ENABLE(Condition1) || ENABLE(Condition2) | 3118 #endif // ENABLE(Condition1) || ENABLE(Condition2) |
| 3119 | 3119 |
| 3120 static v8::Handle<v8::Value> overloadedMethod1Method(const v8::Arguments& args) | 3120 static v8::Handle<v8::Value> overloadedMethod1Method(const v8::Arguments& args) |
| 3121 { | 3121 { |
| 3122 if (args.Length() < 2) | 3122 if (args.Length() < 2) |
| 3123 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3123 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3124 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3124 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3125 V8TRYCATCH(TestObj*, objArg, V8TestObj::HasInstance(args[0], args.GetIsolate
(), worldType(args.GetIsolate())) ? V8TestObj::toNative(v8::Handle<v8::Object>::
Cast(args[0])) : 0); | 3125 V8TRYCATCH(TestObj*, objArg, V8TestObject::HasInstance(args[0], args.GetIsol
ate(), worldType(args.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Obj
ect>::Cast(args[0])) : 0); |
| 3126 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, strArg, args[1]); | 3126 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, strArg, args[1]); |
| 3127 imp->overloadedMethod(objArg, strArg); | 3127 imp->overloadedMethod(objArg, strArg); |
| 3128 return v8Undefined(); | 3128 return v8Undefined(); |
| 3129 } | 3129 } |
| 3130 | 3130 |
| 3131 static v8::Handle<v8::Value> overloadedMethod2Method(const v8::Arguments& args) | 3131 static v8::Handle<v8::Value> overloadedMethod2Method(const v8::Arguments& args) |
| 3132 { | 3132 { |
| 3133 if (args.Length() < 1) | 3133 if (args.Length() < 1) |
| 3134 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3134 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3135 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3135 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3136 V8TRYCATCH(TestObj*, objArg, V8TestObj::HasInstance(args[0], args.GetIsolate
(), worldType(args.GetIsolate())) ? V8TestObj::toNative(v8::Handle<v8::Object>::
Cast(args[0])) : 0); | 3136 V8TRYCATCH(TestObj*, objArg, V8TestObject::HasInstance(args[0], args.GetIsol
ate(), worldType(args.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Obj
ect>::Cast(args[0])) : 0); |
| 3137 if (args.Length() <= 1) { | 3137 if (args.Length() <= 1) { |
| 3138 imp->overloadedMethod(objArg); | 3138 imp->overloadedMethod(objArg); |
| 3139 return v8Undefined(); | 3139 return v8Undefined(); |
| 3140 } | 3140 } |
| 3141 V8TRYCATCH(int, longArg, toInt32(args[1])); | 3141 V8TRYCATCH(int, longArg, toInt32(args[1])); |
| 3142 imp->overloadedMethod(objArg, longArg); | 3142 imp->overloadedMethod(objArg, longArg); |
| 3143 return v8Undefined(); | 3143 return v8Undefined(); |
| 3144 } | 3144 } |
| 3145 | 3145 |
| 3146 static v8::Handle<v8::Value> overloadedMethod3Method(const v8::Arguments& args) | 3146 static v8::Handle<v8::Value> overloadedMethod3Method(const v8::Arguments& args) |
| 3147 { | 3147 { |
| 3148 if (args.Length() < 1) | 3148 if (args.Length() < 1) |
| 3149 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3149 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3150 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3150 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3151 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, strArg, args[0]); | 3151 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, strArg, args[0]); |
| 3152 imp->overloadedMethod(strArg); | 3152 imp->overloadedMethod(strArg); |
| 3153 return v8Undefined(); | 3153 return v8Undefined(); |
| 3154 } | 3154 } |
| 3155 | 3155 |
| 3156 static v8::Handle<v8::Value> overloadedMethod4Method(const v8::Arguments& args) | 3156 static v8::Handle<v8::Value> overloadedMethod4Method(const v8::Arguments& args) |
| 3157 { | 3157 { |
| 3158 if (args.Length() < 1) | 3158 if (args.Length() < 1) |
| 3159 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3159 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3160 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3160 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3161 V8TRYCATCH(int, longArg, toInt32(args[0])); | 3161 V8TRYCATCH(int, longArg, toInt32(args[0])); |
| 3162 imp->overloadedMethod(longArg); | 3162 imp->overloadedMethod(longArg); |
| 3163 return v8Undefined(); | 3163 return v8Undefined(); |
| 3164 } | 3164 } |
| 3165 | 3165 |
| 3166 static v8::Handle<v8::Value> overloadedMethod5Method(const v8::Arguments& args) | 3166 static v8::Handle<v8::Value> overloadedMethod5Method(const v8::Arguments& args) |
| 3167 { | 3167 { |
| 3168 if (args.Length() < 1) | 3168 if (args.Length() < 1) |
| 3169 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3169 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3170 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3170 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3171 if (args.Length() <= 0 || !args[0]->IsFunction()) | 3171 if (args.Length() <= 0 || !args[0]->IsFunction()) |
| 3172 return throwTypeError(0, args.GetIsolate()); | 3172 return throwTypeError(0, args.GetIsolate()); |
| 3173 RefPtr<TestCallback> callback = V8TestCallback::create(args[0], getScriptExe
cutionContext()); | 3173 RefPtr<TestCallback> callback = V8TestCallback::create(args[0], getScriptExe
cutionContext()); |
| 3174 imp->overloadedMethod(callback); | 3174 imp->overloadedMethod(callback); |
| 3175 return v8Undefined(); | 3175 return v8Undefined(); |
| 3176 } | 3176 } |
| 3177 | 3177 |
| 3178 static v8::Handle<v8::Value> overloadedMethod6Method(const v8::Arguments& args) | 3178 static v8::Handle<v8::Value> overloadedMethod6Method(const v8::Arguments& args) |
| 3179 { | 3179 { |
| 3180 if (args.Length() < 1) | 3180 if (args.Length() < 1) |
| 3181 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3181 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3182 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3182 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3183 V8TRYCATCH(RefPtr<DOMStringList>, listArg, toDOMStringList(args[0], args.Get
Isolate())); | 3183 V8TRYCATCH(RefPtr<DOMStringList>, listArg, toDOMStringList(args[0], args.Get
Isolate())); |
| 3184 imp->overloadedMethod(listArg); | 3184 imp->overloadedMethod(listArg); |
| 3185 return v8Undefined(); | 3185 return v8Undefined(); |
| 3186 } | 3186 } |
| 3187 | 3187 |
| 3188 static v8::Handle<v8::Value> overloadedMethod7Method(const v8::Arguments& args) | 3188 static v8::Handle<v8::Value> overloadedMethod7Method(const v8::Arguments& args) |
| 3189 { | 3189 { |
| 3190 if (args.Length() < 1) | 3190 if (args.Length() < 1) |
| 3191 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3191 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3192 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3192 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3193 V8TRYCATCH(Vector<String>, arrayArg, toNativeArray<String>(args[0])); | 3193 V8TRYCATCH(Vector<String>, arrayArg, toNativeArray<String>(args[0])); |
| 3194 imp->overloadedMethod(arrayArg); | 3194 imp->overloadedMethod(arrayArg); |
| 3195 return v8Undefined(); | 3195 return v8Undefined(); |
| 3196 } | 3196 } |
| 3197 | 3197 |
| 3198 static v8::Handle<v8::Value> overloadedMethod8Method(const v8::Arguments& args) | 3198 static v8::Handle<v8::Value> overloadedMethod8Method(const v8::Arguments& args) |
| 3199 { | 3199 { |
| 3200 if (args.Length() < 1) | 3200 if (args.Length() < 1) |
| 3201 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3201 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3202 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3202 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3203 V8TRYCATCH(TestObj*, objArg, V8TestObj::HasInstance(args[0], args.GetIsolate
(), worldType(args.GetIsolate())) ? V8TestObj::toNative(v8::Handle<v8::Object>::
Cast(args[0])) : 0); | 3203 V8TRYCATCH(TestObj*, objArg, V8TestObject::HasInstance(args[0], args.GetIsol
ate(), worldType(args.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Obj
ect>::Cast(args[0])) : 0); |
| 3204 imp->overloadedMethod(objArg); | 3204 imp->overloadedMethod(objArg); |
| 3205 return v8Undefined(); | 3205 return v8Undefined(); |
| 3206 } | 3206 } |
| 3207 | 3207 |
| 3208 static v8::Handle<v8::Value> overloadedMethod9Method(const v8::Arguments& args) | 3208 static v8::Handle<v8::Value> overloadedMethod9Method(const v8::Arguments& args) |
| 3209 { | 3209 { |
| 3210 if (args.Length() < 1) | 3210 if (args.Length() < 1) |
| 3211 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3211 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3212 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3212 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3213 V8TRYCATCH(Vector<String>, arrayArg, toNativeArray<String>(args[0])); | 3213 V8TRYCATCH(Vector<String>, arrayArg, toNativeArray<String>(args[0])); |
| 3214 imp->overloadedMethod(arrayArg); | 3214 imp->overloadedMethod(arrayArg); |
| 3215 return v8Undefined(); | 3215 return v8Undefined(); |
| 3216 } | 3216 } |
| 3217 | 3217 |
| 3218 static v8::Handle<v8::Value> overloadedMethod10Method(const v8::Arguments& args) | 3218 static v8::Handle<v8::Value> overloadedMethod10Method(const v8::Arguments& args) |
| 3219 { | 3219 { |
| 3220 if (args.Length() < 1) | 3220 if (args.Length() < 1) |
| 3221 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3221 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3222 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3222 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3223 V8TRYCATCH(Vector<unsigned>, arrayArg, toNativeArray<unsigned>(args[0])); | 3223 V8TRYCATCH(Vector<unsigned>, arrayArg, toNativeArray<unsigned>(args[0])); |
| 3224 imp->overloadedMethod(arrayArg); | 3224 imp->overloadedMethod(arrayArg); |
| 3225 return v8Undefined(); | 3225 return v8Undefined(); |
| 3226 } | 3226 } |
| 3227 | 3227 |
| 3228 static v8::Handle<v8::Value> overloadedMethod11Method(const v8::Arguments& args) | 3228 static v8::Handle<v8::Value> overloadedMethod11Method(const v8::Arguments& args) |
| 3229 { | 3229 { |
| 3230 if (args.Length() < 1) | 3230 if (args.Length() < 1) |
| 3231 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3231 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3232 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3232 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3233 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, strArg, args[0]); | 3233 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, strArg, args[0]); |
| 3234 imp->overloadedMethod(strArg); | 3234 imp->overloadedMethod(strArg); |
| 3235 return v8Undefined(); | 3235 return v8Undefined(); |
| 3236 } | 3236 } |
| 3237 | 3237 |
| 3238 static v8::Handle<v8::Value> overloadedMethodMethod(const v8::Arguments& args) | 3238 static v8::Handle<v8::Value> overloadedMethodMethod(const v8::Arguments& args) |
| 3239 { | 3239 { |
| 3240 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()))) | 3240 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()))) |
| 3241 return overloadedMethod1Method(args); | 3241 return overloadedMethod1Method(args); |
| 3242 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()))))) | 3242 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()))))) |
| 3243 return overloadedMethod2Method(args); | 3243 return overloadedMethod2Method(args); |
| 3244 if ((args.Length() == 1 && (args[0]->IsNull() || args[0]->IsUndefined() || a
rgs[0]->IsString() || args[0]->IsObject()))) | 3244 if ((args.Length() == 1 && (args[0]->IsNull() || args[0]->IsUndefined() || a
rgs[0]->IsString() || args[0]->IsObject()))) |
| 3245 return overloadedMethod3Method(args); | 3245 return overloadedMethod3Method(args); |
| 3246 if (args.Length() == 1) | 3246 if (args.Length() == 1) |
| 3247 return overloadedMethod4Method(args); | 3247 return overloadedMethod4Method(args); |
| 3248 if ((args.Length() == 1 && (args[0]->IsNull() || args[0]->IsFunction()))) | 3248 if ((args.Length() == 1 && (args[0]->IsNull() || args[0]->IsFunction()))) |
| 3249 return overloadedMethod5Method(args); | 3249 return overloadedMethod5Method(args); |
| 3250 if ((args.Length() == 1 && (args[0]->IsNull() || V8DOMStringList::HasInstanc
e(args[0], args.GetIsolate(), worldType(args.GetIsolate()))))) | 3250 if ((args.Length() == 1 && (args[0]->IsNull() || V8DOMStringList::HasInstanc
e(args[0], args.GetIsolate(), worldType(args.GetIsolate()))))) |
| 3251 return overloadedMethod6Method(args); | 3251 return overloadedMethod6Method(args); |
| 3252 if ((args.Length() == 1 && (args[0]->IsNull() || args[0]->IsArray()))) | 3252 if ((args.Length() == 1 && (args[0]->IsNull() || args[0]->IsArray()))) |
| 3253 return overloadedMethod7Method(args); | 3253 return overloadedMethod7Method(args); |
| 3254 if ((args.Length() == 1 && (V8TestObj::HasInstance(args[0], args.GetIsolate(
), worldType(args.GetIsolate()))))) | 3254 if ((args.Length() == 1 && (V8TestObject::HasInstance(args[0], args.GetIsola
te(), worldType(args.GetIsolate()))))) |
| 3255 return overloadedMethod8Method(args); | 3255 return overloadedMethod8Method(args); |
| 3256 if ((args.Length() == 1 && (args[0]->IsArray()))) | 3256 if ((args.Length() == 1 && (args[0]->IsArray()))) |
| 3257 return overloadedMethod9Method(args); | 3257 return overloadedMethod9Method(args); |
| 3258 if ((args.Length() == 1 && (args[0]->IsArray()))) | 3258 if ((args.Length() == 1 && (args[0]->IsArray()))) |
| 3259 return overloadedMethod10Method(args); | 3259 return overloadedMethod10Method(args); |
| 3260 if (args.Length() == 1) | 3260 if (args.Length() == 1) |
| 3261 return overloadedMethod11Method(args); | 3261 return overloadedMethod11Method(args); |
| 3262 if (args.Length() < 1) | 3262 if (args.Length() < 1) |
| 3263 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3263 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3264 return throwTypeError(0, args.GetIsolate()); | 3264 return throwTypeError(0, args.GetIsolate()); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 3275 return v8Undefined(); | 3275 return v8Undefined(); |
| 3276 } | 3276 } |
| 3277 | 3277 |
| 3278 static v8::Handle<v8::Value> classMethodMethodCallback(const v8::Arguments& args
) | 3278 static v8::Handle<v8::Value> classMethodMethodCallback(const v8::Arguments& args
) |
| 3279 { | 3279 { |
| 3280 return TestObjV8Internal::classMethodMethod(args); | 3280 return TestObjV8Internal::classMethodMethod(args); |
| 3281 } | 3281 } |
| 3282 | 3282 |
| 3283 static v8::Handle<v8::Value> classMethodWithOptionalMethod(const v8::Arguments&
args) | 3283 static v8::Handle<v8::Value> classMethodWithOptionalMethod(const v8::Arguments&
args) |
| 3284 { | 3284 { |
| 3285 if (args.Length() <= 0) { | 3285 if (args.Length() <= 0) |
| 3286 return v8Integer(TestObj::classMethodWithOptional(), args.GetIsolate()); | 3286 return v8Integer(TestObj::classMethodWithOptional(), args.GetIsolate()); |
| 3287 } | 3287 |
| 3288 V8TRYCATCH(int, arg, toInt32(args[0])); | 3288 V8TRYCATCH(int, arg, toInt32(args[0])); |
| 3289 return v8Integer(TestObj::classMethodWithOptional(arg), args.GetIsolate()); | 3289 return v8Integer(TestObj::classMethodWithOptional(arg), args.GetIsolate()); |
| 3290 } | 3290 } |
| 3291 | 3291 |
| 3292 static v8::Handle<v8::Value> classMethodWithOptionalMethodCallback(const v8::Arg
uments& args) | 3292 static v8::Handle<v8::Value> classMethodWithOptionalMethodCallback(const v8::Arg
uments& args) |
| 3293 { | 3293 { |
| 3294 return TestObjV8Internal::classMethodWithOptionalMethod(args); | 3294 return TestObjV8Internal::classMethodWithOptionalMethod(args); |
| 3295 } | 3295 } |
| 3296 | 3296 |
| 3297 static v8::Handle<v8::Value> classMethod2MethodCallback(const v8::Arguments& arg
s) | 3297 static v8::Handle<v8::Value> classMethod2MethodCallback(const v8::Arguments& arg
s) |
| 3298 { | 3298 { |
| 3299 return V8TestObj::classMethod2MethodCustom(args); | 3299 return V8TestObject::classMethod2MethodCustom(args); |
| 3300 } | 3300 } |
| 3301 | 3301 |
| 3302 #if ENABLE(Condition1) | 3302 #if ENABLE(Condition1) |
| 3303 | 3303 |
| 3304 static v8::Handle<v8::Value> overloadedMethod11Method(const v8::Arguments& args) | 3304 static v8::Handle<v8::Value> overloadedMethod11Method(const v8::Arguments& args) |
| 3305 { | 3305 { |
| 3306 if (args.Length() < 1) | 3306 if (args.Length() < 1) |
| 3307 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3307 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3308 V8TRYCATCH(int, arg, toInt32(args[0])); | 3308 V8TRYCATCH(int, arg, toInt32(args[0])); |
| 3309 TestObj::overloadedMethod1(arg); | 3309 TestObj::overloadedMethod1(arg); |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3346 { | 3346 { |
| 3347 return TestObjV8Internal::overloadedMethod1Method(args); | 3347 return TestObjV8Internal::overloadedMethod1Method(args); |
| 3348 } | 3348 } |
| 3349 | 3349 |
| 3350 #endif // ENABLE(Condition1) | 3350 #endif // ENABLE(Condition1) |
| 3351 | 3351 |
| 3352 static v8::Handle<v8::Value> classMethodWithClampMethod(const v8::Arguments& arg
s) | 3352 static v8::Handle<v8::Value> classMethodWithClampMethod(const v8::Arguments& arg
s) |
| 3353 { | 3353 { |
| 3354 if (args.Length() < 2) | 3354 if (args.Length() < 2) |
| 3355 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3355 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3356 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3356 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3357 unsigned short objArgsShort = 0; | 3357 unsigned short objArgsShort = 0; |
| 3358 V8TRYCATCH(double, objArgsShortNativeValue, args[0]->NumberValue()); | 3358 V8TRYCATCH(double, objArgsShortNativeValue, args[0]->NumberValue()); |
| 3359 if (!std::isnan(objArgsShortNativeValue)) | 3359 if (!std::isnan(objArgsShortNativeValue)) |
| 3360 objArgsShort = clampTo<unsigned short>(objArgsShortNativeValue); | 3360 objArgsShort = clampTo<unsigned short>(objArgsShortNativeValue); |
| 3361 unsigned long objArgsLong = 0; | 3361 unsigned long objArgsLong = 0; |
| 3362 V8TRYCATCH(double, objArgsLongNativeValue, args[1]->NumberValue()); | 3362 V8TRYCATCH(double, objArgsLongNativeValue, args[1]->NumberValue()); |
| 3363 if (!std::isnan(objArgsLongNativeValue)) | 3363 if (!std::isnan(objArgsLongNativeValue)) |
| 3364 objArgsLong = clampTo<unsigned long>(objArgsLongNativeValue); | 3364 objArgsLong = clampTo<unsigned long>(objArgsLongNativeValue); |
| 3365 imp->classMethodWithClamp(objArgsShort, objArgsLong); | 3365 imp->classMethodWithClamp(objArgsShort, objArgsLong); |
| 3366 return v8Undefined(); | 3366 return v8Undefined(); |
| 3367 } | 3367 } |
| 3368 | 3368 |
| 3369 static v8::Handle<v8::Value> classMethodWithClampMethodCallback(const v8::Argume
nts& args) | 3369 static v8::Handle<v8::Value> classMethodWithClampMethodCallback(const v8::Argume
nts& args) |
| 3370 { | 3370 { |
| 3371 return TestObjV8Internal::classMethodWithClampMethod(args); | 3371 return TestObjV8Internal::classMethodWithClampMethod(args); |
| 3372 } | 3372 } |
| 3373 | 3373 |
| 3374 static v8::Handle<v8::Value> enabledAtRuntimeMethod1Method(const v8::Arguments&
args) | 3374 static v8::Handle<v8::Value> enabledAtRuntimeMethod1Method(const v8::Arguments&
args) |
| 3375 { | 3375 { |
| 3376 if (args.Length() < 1) | 3376 if (args.Length() < 1) |
| 3377 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3377 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3378 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3378 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3379 V8TRYCATCH(int, longArg, toInt32(args[0])); | 3379 V8TRYCATCH(int, longArg, toInt32(args[0])); |
| 3380 imp->enabledAtRuntimeMethod1(longArg); | 3380 imp->enabledAtRuntimeMethod1(longArg); |
| 3381 return v8Undefined(); | 3381 return v8Undefined(); |
| 3382 } | 3382 } |
| 3383 | 3383 |
| 3384 static v8::Handle<v8::Value> enabledAtRuntimeMethod1MethodCallback(const v8::Arg
uments& args) | 3384 static v8::Handle<v8::Value> enabledAtRuntimeMethod1MethodCallback(const v8::Arg
uments& args) |
| 3385 { | 3385 { |
| 3386 return TestObjV8Internal::enabledAtRuntimeMethod1Method(args); | 3386 return TestObjV8Internal::enabledAtRuntimeMethod1Method(args); |
| 3387 } | 3387 } |
| 3388 | 3388 |
| 3389 static v8::Handle<v8::Value> enabledAtRuntimeMethod2Method(const v8::Arguments&
args) | 3389 static v8::Handle<v8::Value> enabledAtRuntimeMethod2Method(const v8::Arguments&
args) |
| 3390 { | 3390 { |
| 3391 if (args.Length() < 1) | 3391 if (args.Length() < 1) |
| 3392 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3392 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3393 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3393 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3394 V8TRYCATCH(int, longArg, toInt32(args[0])); | 3394 V8TRYCATCH(int, longArg, toInt32(args[0])); |
| 3395 imp->enabledAtRuntimeMethod2(longArg); | 3395 imp->enabledAtRuntimeMethod2(longArg); |
| 3396 return v8Undefined(); | 3396 return v8Undefined(); |
| 3397 } | 3397 } |
| 3398 | 3398 |
| 3399 static v8::Handle<v8::Value> enabledAtRuntimeMethod2MethodCallback(const v8::Arg
uments& args) | 3399 static v8::Handle<v8::Value> enabledAtRuntimeMethod2MethodCallback(const v8::Arg
uments& args) |
| 3400 { | 3400 { |
| 3401 return TestObjV8Internal::enabledAtRuntimeMethod2Method(args); | 3401 return TestObjV8Internal::enabledAtRuntimeMethod2Method(args); |
| 3402 } | 3402 } |
| 3403 | 3403 |
| 3404 static v8::Handle<v8::Value> enabledPerContextMethod1Method(const v8::Arguments&
args) | 3404 static v8::Handle<v8::Value> enabledPerContextMethod1Method(const v8::Arguments&
args) |
| 3405 { | 3405 { |
| 3406 if (args.Length() < 1) | 3406 if (args.Length() < 1) |
| 3407 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3407 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3408 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3408 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3409 V8TRYCATCH(int, longArg, toInt32(args[0])); | 3409 V8TRYCATCH(int, longArg, toInt32(args[0])); |
| 3410 imp->enabledPerContextMethod1(longArg); | 3410 imp->enabledPerContextMethod1(longArg); |
| 3411 return v8Undefined(); | 3411 return v8Undefined(); |
| 3412 } | 3412 } |
| 3413 | 3413 |
| 3414 static v8::Handle<v8::Value> enabledPerContextMethod1MethodCallback(const v8::Ar
guments& args) | 3414 static v8::Handle<v8::Value> enabledPerContextMethod1MethodCallback(const v8::Ar
guments& args) |
| 3415 { | 3415 { |
| 3416 return TestObjV8Internal::enabledPerContextMethod1Method(args); | 3416 return TestObjV8Internal::enabledPerContextMethod1Method(args); |
| 3417 } | 3417 } |
| 3418 | 3418 |
| 3419 static v8::Handle<v8::Value> enabledPerContextMethod2Method(const v8::Arguments&
args) | 3419 static v8::Handle<v8::Value> enabledPerContextMethod2Method(const v8::Arguments&
args) |
| 3420 { | 3420 { |
| 3421 if (args.Length() < 1) | 3421 if (args.Length() < 1) |
| 3422 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3422 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3423 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3423 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3424 V8TRYCATCH(int, longArg, toInt32(args[0])); | 3424 V8TRYCATCH(int, longArg, toInt32(args[0])); |
| 3425 imp->enabledPerContextMethod2(longArg); | 3425 imp->enabledPerContextMethod2(longArg); |
| 3426 return v8Undefined(); | 3426 return v8Undefined(); |
| 3427 } | 3427 } |
| 3428 | 3428 |
| 3429 static v8::Handle<v8::Value> enabledPerContextMethod2MethodCallback(const v8::Ar
guments& args) | 3429 static v8::Handle<v8::Value> enabledPerContextMethod2MethodCallback(const v8::Ar
guments& args) |
| 3430 { | 3430 { |
| 3431 return TestObjV8Internal::enabledPerContextMethod2Method(args); | 3431 return TestObjV8Internal::enabledPerContextMethod2Method(args); |
| 3432 } | 3432 } |
| 3433 | 3433 |
| 3434 static v8::Handle<v8::Value> methodWithUnsignedLongSequenceMethod(const v8::Argu
ments& args) | 3434 static v8::Handle<v8::Value> methodWithUnsignedLongSequenceMethod(const v8::Argu
ments& args) |
| 3435 { | 3435 { |
| 3436 if (args.Length() < 1) | 3436 if (args.Length() < 1) |
| 3437 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3437 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3438 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3438 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3439 V8TRYCATCH(Vector<unsigned>, unsignedLongSequence, toNativeArray<unsigned>(a
rgs[0])); | 3439 V8TRYCATCH(Vector<unsigned>, unsignedLongSequence, toNativeArray<unsigned>(a
rgs[0])); |
| 3440 imp->methodWithUnsignedLongSequence(unsignedLongSequence); | 3440 imp->methodWithUnsignedLongSequence(unsignedLongSequence); |
| 3441 return v8Undefined(); | 3441 return v8Undefined(); |
| 3442 } | 3442 } |
| 3443 | 3443 |
| 3444 static v8::Handle<v8::Value> methodWithUnsignedLongSequenceMethodCallback(const
v8::Arguments& args) | 3444 static v8::Handle<v8::Value> methodWithUnsignedLongSequenceMethodCallback(const
v8::Arguments& args) |
| 3445 { | 3445 { |
| 3446 return TestObjV8Internal::methodWithUnsignedLongSequenceMethod(args); | 3446 return TestObjV8Internal::methodWithUnsignedLongSequenceMethod(args); |
| 3447 } | 3447 } |
| 3448 | 3448 |
| 3449 static v8::Handle<v8::Value> stringArrayFunctionMethod(const v8::Arguments& args
) | 3449 static v8::Handle<v8::Value> stringArrayFunctionMethod(const v8::Arguments& args
) |
| 3450 { | 3450 { |
| 3451 if (args.Length() < 1) | 3451 if (args.Length() < 1) |
| 3452 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3452 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3453 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3453 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3454 ExceptionCode ec = 0; | 3454 ExceptionCode ec = 0; |
| 3455 { | 3455 { |
| 3456 V8TRYCATCH(Vector<String>, values, toNativeArray<String>(args[0])); | 3456 V8TRYCATCH(Vector<String>, values, toNativeArray<String>(args[0])); |
| 3457 Vector<String> result = imp->stringArrayFunction(values, ec); | 3457 Vector<String> result = imp->stringArrayFunction(values, ec); |
| 3458 if (UNLIKELY(ec)) | 3458 if (UNLIKELY(ec)) |
| 3459 goto fail; | 3459 goto fail; |
| 3460 return v8Array(result, args.GetIsolate()); | 3460 return v8Array(result, args.GetIsolate()); |
| 3461 } | 3461 } |
| 3462 fail: | 3462 fail: |
| 3463 return setDOMException(ec, args.GetIsolate()); | 3463 return setDOMException(ec, args.GetIsolate()); |
| 3464 } | 3464 } |
| 3465 | 3465 |
| 3466 static v8::Handle<v8::Value> stringArrayFunctionMethodCallback(const v8::Argumen
ts& args) | 3466 static v8::Handle<v8::Value> stringArrayFunctionMethodCallback(const v8::Argumen
ts& args) |
| 3467 { | 3467 { |
| 3468 return TestObjV8Internal::stringArrayFunctionMethod(args); | 3468 return TestObjV8Internal::stringArrayFunctionMethod(args); |
| 3469 } | 3469 } |
| 3470 | 3470 |
| 3471 static v8::Handle<v8::Value> domStringListFunctionMethod(const v8::Arguments& ar
gs) | 3471 static v8::Handle<v8::Value> domStringListFunctionMethod(const v8::Arguments& ar
gs) |
| 3472 { | 3472 { |
| 3473 if (args.Length() < 1) | 3473 if (args.Length() < 1) |
| 3474 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3474 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3475 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3475 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3476 ExceptionCode ec = 0; | 3476 ExceptionCode ec = 0; |
| 3477 { | 3477 { |
| 3478 V8TRYCATCH(RefPtr<DOMStringList>, values, toDOMStringList(args[0], args.GetI
solate())); | 3478 V8TRYCATCH(RefPtr<DOMStringList>, values, toDOMStringList(args[0], args.GetI
solate())); |
| 3479 RefPtr<DOMStringList> result = imp->domStringListFunction(values, ec); | 3479 RefPtr<DOMStringList> result = imp->domStringListFunction(values, ec); |
| 3480 if (UNLIKELY(ec)) | 3480 if (UNLIKELY(ec)) |
| 3481 goto fail; | 3481 goto fail; |
| 3482 return toV8(result.release(), args.Holder(), args.GetIsolate()); | 3482 return toV8(result.release(), args.Holder(), args.GetIsolate()); |
| 3483 } | 3483 } |
| 3484 fail: | 3484 fail: |
| 3485 return setDOMException(ec, args.GetIsolate()); | 3485 return setDOMException(ec, args.GetIsolate()); |
| 3486 } | 3486 } |
| 3487 | 3487 |
| 3488 static v8::Handle<v8::Value> domStringListFunctionMethodCallback(const v8::Argum
ents& args) | 3488 static v8::Handle<v8::Value> domStringListFunctionMethodCallback(const v8::Argum
ents& args) |
| 3489 { | 3489 { |
| 3490 return TestObjV8Internal::domStringListFunctionMethod(args); | 3490 return TestObjV8Internal::domStringListFunctionMethod(args); |
| 3491 } | 3491 } |
| 3492 | 3492 |
| 3493 static v8::Handle<v8::Value> getSVGDocumentMethod(const v8::Arguments& args) | 3493 static v8::Handle<v8::Value> getSVGDocumentMethod(const v8::Arguments& args) |
| 3494 { | 3494 { |
| 3495 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3495 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3496 ExceptionCode ec = 0; | 3496 ExceptionCode ec = 0; |
| 3497 { | 3497 { |
| 3498 if (!BindingSecurity::shouldAllowAccessToNode(imp->getSVGDocument(ec))) | 3498 if (!BindingSecurity::shouldAllowAccessToNode(imp->getSVGDocument(ec))) |
| 3499 return v8::Handle<v8::Value>(v8Null(args.GetIsolate())); | 3499 return v8::Handle<v8::Value>(v8Null(args.GetIsolate())); |
| 3500 RefPtr<SVGDocument> result = imp->getSVGDocument(ec); | 3500 RefPtr<SVGDocument> result = imp->getSVGDocument(ec); |
| 3501 if (UNLIKELY(ec)) | 3501 if (UNLIKELY(ec)) |
| 3502 goto fail; | 3502 goto fail; |
| 3503 return toV8(result.release(), args.Holder(), args.GetIsolate()); | 3503 return toV8(result.release(), args.Holder(), args.GetIsolate()); |
| 3504 } | 3504 } |
| 3505 fail: | 3505 fail: |
| 3506 return setDOMException(ec, args.GetIsolate()); | 3506 return setDOMException(ec, args.GetIsolate()); |
| 3507 } | 3507 } |
| 3508 | 3508 |
| 3509 static v8::Handle<v8::Value> getSVGDocumentMethodCallback(const v8::Arguments& a
rgs) | 3509 static v8::Handle<v8::Value> getSVGDocumentMethodCallback(const v8::Arguments& a
rgs) |
| 3510 { | 3510 { |
| 3511 return TestObjV8Internal::getSVGDocumentMethod(args); | 3511 return TestObjV8Internal::getSVGDocumentMethod(args); |
| 3512 } | 3512 } |
| 3513 | 3513 |
| 3514 static v8::Handle<v8::Value> convert1Method(const v8::Arguments& args) | 3514 static v8::Handle<v8::Value> convert1Method(const v8::Arguments& args) |
| 3515 { | 3515 { |
| 3516 if (args.Length() < 1) | 3516 if (args.Length() < 1) |
| 3517 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3517 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3518 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3518 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3519 V8TRYCATCH(TestNode*, value, V8TestNode::HasInstance(args[0], args.GetIsolat
e(), worldType(args.GetIsolate())) ? V8TestNode::toNative(v8::Handle<v8::Object>
::Cast(args[0])) : 0); | 3519 V8TRYCATCH(TestNode*, value, V8TestNode::HasInstance(args[0], args.GetIsolat
e(), worldType(args.GetIsolate())) ? V8TestNode::toNative(v8::Handle<v8::Object>
::Cast(args[0])) : 0); |
| 3520 imp->convert1(value); | 3520 imp->convert1(value); |
| 3521 return v8Undefined(); | 3521 return v8Undefined(); |
| 3522 } | 3522 } |
| 3523 | 3523 |
| 3524 static v8::Handle<v8::Value> convert1MethodCallback(const v8::Arguments& args) | 3524 static v8::Handle<v8::Value> convert1MethodCallback(const v8::Arguments& args) |
| 3525 { | 3525 { |
| 3526 return TestObjV8Internal::convert1Method(args); | 3526 return TestObjV8Internal::convert1Method(args); |
| 3527 } | 3527 } |
| 3528 | 3528 |
| 3529 static v8::Handle<v8::Value> convert2Method(const v8::Arguments& args) | 3529 static v8::Handle<v8::Value> convert2Method(const v8::Arguments& args) |
| 3530 { | 3530 { |
| 3531 if (args.Length() < 1) | 3531 if (args.Length() < 1) |
| 3532 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3532 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3533 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3533 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3534 V8TRYCATCH(TestNode*, value, V8TestNode::HasInstance(args[0], args.GetIsolat
e(), worldType(args.GetIsolate())) ? V8TestNode::toNative(v8::Handle<v8::Object>
::Cast(args[0])) : 0); | 3534 V8TRYCATCH(TestNode*, value, V8TestNode::HasInstance(args[0], args.GetIsolat
e(), worldType(args.GetIsolate())) ? V8TestNode::toNative(v8::Handle<v8::Object>
::Cast(args[0])) : 0); |
| 3535 imp->convert2(value); | 3535 imp->convert2(value); |
| 3536 return v8Undefined(); | 3536 return v8Undefined(); |
| 3537 } | 3537 } |
| 3538 | 3538 |
| 3539 static v8::Handle<v8::Value> convert2MethodCallback(const v8::Arguments& args) | 3539 static v8::Handle<v8::Value> convert2MethodCallback(const v8::Arguments& args) |
| 3540 { | 3540 { |
| 3541 return TestObjV8Internal::convert2Method(args); | 3541 return TestObjV8Internal::convert2Method(args); |
| 3542 } | 3542 } |
| 3543 | 3543 |
| 3544 static v8::Handle<v8::Value> convert4Method(const v8::Arguments& args) | 3544 static v8::Handle<v8::Value> convert4Method(const v8::Arguments& args) |
| 3545 { | 3545 { |
| 3546 if (args.Length() < 1) | 3546 if (args.Length() < 1) |
| 3547 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3547 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3548 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3548 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3549 V8TRYCATCH(TestNode*, value, V8TestNode::HasInstance(args[0], args.GetIsolat
e(), worldType(args.GetIsolate())) ? V8TestNode::toNative(v8::Handle<v8::Object>
::Cast(args[0])) : 0); | 3549 V8TRYCATCH(TestNode*, value, V8TestNode::HasInstance(args[0], args.GetIsolat
e(), worldType(args.GetIsolate())) ? V8TestNode::toNative(v8::Handle<v8::Object>
::Cast(args[0])) : 0); |
| 3550 imp->convert4(value); | 3550 imp->convert4(value); |
| 3551 return v8Undefined(); | 3551 return v8Undefined(); |
| 3552 } | 3552 } |
| 3553 | 3553 |
| 3554 static v8::Handle<v8::Value> convert4MethodCallback(const v8::Arguments& args) | 3554 static v8::Handle<v8::Value> convert4MethodCallback(const v8::Arguments& args) |
| 3555 { | 3555 { |
| 3556 return TestObjV8Internal::convert4Method(args); | 3556 return TestObjV8Internal::convert4Method(args); |
| 3557 } | 3557 } |
| 3558 | 3558 |
| 3559 static v8::Handle<v8::Value> convert5Method(const v8::Arguments& args) | 3559 static v8::Handle<v8::Value> convert5Method(const v8::Arguments& args) |
| 3560 { | 3560 { |
| 3561 if (args.Length() < 1) | 3561 if (args.Length() < 1) |
| 3562 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3562 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3563 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3563 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3564 V8TRYCATCH(TestNode*, value, V8TestNode::HasInstance(args[0], args.GetIsolat
e(), worldType(args.GetIsolate())) ? V8TestNode::toNative(v8::Handle<v8::Object>
::Cast(args[0])) : 0); | 3564 V8TRYCATCH(TestNode*, value, V8TestNode::HasInstance(args[0], args.GetIsolat
e(), worldType(args.GetIsolate())) ? V8TestNode::toNative(v8::Handle<v8::Object>
::Cast(args[0])) : 0); |
| 3565 imp->convert5(value); | 3565 imp->convert5(value); |
| 3566 return v8Undefined(); | 3566 return v8Undefined(); |
| 3567 } | 3567 } |
| 3568 | 3568 |
| 3569 static v8::Handle<v8::Value> convert5MethodCallback(const v8::Arguments& args) | 3569 static v8::Handle<v8::Value> convert5MethodCallback(const v8::Arguments& args) |
| 3570 { | 3570 { |
| 3571 return TestObjV8Internal::convert5Method(args); | 3571 return TestObjV8Internal::convert5Method(args); |
| 3572 } | 3572 } |
| 3573 | 3573 |
| 3574 static v8::Handle<v8::Value> mutablePointFunctionMethod(const v8::Arguments& arg
s) | 3574 static v8::Handle<v8::Value> mutablePointFunctionMethod(const v8::Arguments& arg
s) |
| 3575 { | 3575 { |
| 3576 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3576 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3577 return toV8(WTF::getPtr(SVGPropertyTearOff<FloatPoint>::create(imp->mutableP
ointFunction())), args.Holder(), args.GetIsolate()); | 3577 return toV8(WTF::getPtr(SVGPropertyTearOff<FloatPoint>::create(imp->mutableP
ointFunction())), args.Holder(), args.GetIsolate()); |
| 3578 } | 3578 } |
| 3579 | 3579 |
| 3580 static v8::Handle<v8::Value> mutablePointFunctionMethodCallback(const v8::Argume
nts& args) | 3580 static v8::Handle<v8::Value> mutablePointFunctionMethodCallback(const v8::Argume
nts& args) |
| 3581 { | 3581 { |
| 3582 return TestObjV8Internal::mutablePointFunctionMethod(args); | 3582 return TestObjV8Internal::mutablePointFunctionMethod(args); |
| 3583 } | 3583 } |
| 3584 | 3584 |
| 3585 static v8::Handle<v8::Value> immutablePointFunctionMethod(const v8::Arguments& a
rgs) | 3585 static v8::Handle<v8::Value> immutablePointFunctionMethod(const v8::Arguments& a
rgs) |
| 3586 { | 3586 { |
| 3587 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3587 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3588 return toV8(WTF::getPtr(SVGPropertyTearOff<FloatPoint>::create(imp->immutabl
ePointFunction())), args.Holder(), args.GetIsolate()); | 3588 return toV8(WTF::getPtr(SVGPropertyTearOff<FloatPoint>::create(imp->immutabl
ePointFunction())), args.Holder(), args.GetIsolate()); |
| 3589 } | 3589 } |
| 3590 | 3590 |
| 3591 static v8::Handle<v8::Value> immutablePointFunctionMethodCallback(const v8::Argu
ments& args) | 3591 static v8::Handle<v8::Value> immutablePointFunctionMethodCallback(const v8::Argu
ments& args) |
| 3592 { | 3592 { |
| 3593 return TestObjV8Internal::immutablePointFunctionMethod(args); | 3593 return TestObjV8Internal::immutablePointFunctionMethod(args); |
| 3594 } | 3594 } |
| 3595 | 3595 |
| 3596 static v8::Handle<v8::Value> orangeMethod(const v8::Arguments& args) | 3596 static v8::Handle<v8::Value> orangeMethod(const v8::Arguments& args) |
| 3597 { | 3597 { |
| 3598 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3598 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3599 imp->banana(); | 3599 imp->banana(); |
| 3600 return v8Undefined(); | 3600 return v8Undefined(); |
| 3601 } | 3601 } |
| 3602 | 3602 |
| 3603 static v8::Handle<v8::Value> orangeMethodCallback(const v8::Arguments& args) | 3603 static v8::Handle<v8::Value> orangeMethodCallback(const v8::Arguments& args) |
| 3604 { | 3604 { |
| 3605 return TestObjV8Internal::orangeMethod(args); | 3605 return TestObjV8Internal::orangeMethod(args); |
| 3606 } | 3606 } |
| 3607 | 3607 |
| 3608 static v8::Handle<v8::Value> strictFunctionMethod(const v8::Arguments& args) | 3608 static v8::Handle<v8::Value> strictFunctionMethod(const v8::Arguments& args) |
| 3609 { | 3609 { |
| 3610 if (args.Length() < 3) | 3610 if (args.Length() < 3) |
| 3611 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3611 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3612 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3612 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3613 ExceptionCode ec = 0; | 3613 ExceptionCode ec = 0; |
| 3614 { | 3614 { |
| 3615 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, str, args[0]); | 3615 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, str, args[0]); |
| 3616 V8TRYCATCH(float, a, static_cast<float>(args[1]->NumberValue())); | 3616 V8TRYCATCH(float, a, static_cast<float>(args[1]->NumberValue())); |
| 3617 V8TRYCATCH(int, b, toInt32(args[2])); | 3617 V8TRYCATCH(int, b, toInt32(args[2])); |
| 3618 bool result = imp->strictFunction(str, a, b, ec); | 3618 bool result = imp->strictFunction(str, a, b, ec); |
| 3619 if (UNLIKELY(ec)) | 3619 if (UNLIKELY(ec)) |
| 3620 goto fail; | 3620 goto fail; |
| 3621 return v8Boolean(result, args.GetIsolate()); | 3621 return v8Boolean(result, args.GetIsolate()); |
| 3622 } | 3622 } |
| 3623 fail: | 3623 fail: |
| 3624 return setDOMException(ec, args.GetIsolate()); | 3624 return setDOMException(ec, args.GetIsolate()); |
| 3625 } | 3625 } |
| 3626 | 3626 |
| 3627 static v8::Handle<v8::Value> strictFunctionMethodCallback(const v8::Arguments& a
rgs) | 3627 static v8::Handle<v8::Value> strictFunctionMethodCallback(const v8::Arguments& a
rgs) |
| 3628 { | 3628 { |
| 3629 return TestObjV8Internal::strictFunctionMethod(args); | 3629 return TestObjV8Internal::strictFunctionMethod(args); |
| 3630 } | 3630 } |
| 3631 | 3631 |
| 3632 static v8::Handle<v8::Value> variadicStringMethodMethod(const v8::Arguments& arg
s) | 3632 static v8::Handle<v8::Value> variadicStringMethodMethod(const v8::Arguments& arg
s) |
| 3633 { | 3633 { |
| 3634 if (args.Length() < 1) | 3634 if (args.Length() < 1) |
| 3635 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3635 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3636 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3636 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3637 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, head, args[0]); | 3637 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, head, args[0]); |
| 3638 V8TRYCATCH(Vector<String>, tail, toNativeArguments<String>(args, 1)); | 3638 V8TRYCATCH(Vector<String>, tail, toNativeArguments<String>(args, 1)); |
| 3639 imp->variadicStringMethod(head, tail); | 3639 imp->variadicStringMethod(head, tail); |
| 3640 return v8Undefined(); | 3640 return v8Undefined(); |
| 3641 } | 3641 } |
| 3642 | 3642 |
| 3643 static v8::Handle<v8::Value> variadicStringMethodMethodCallback(const v8::Argume
nts& args) | 3643 static v8::Handle<v8::Value> variadicStringMethodMethodCallback(const v8::Argume
nts& args) |
| 3644 { | 3644 { |
| 3645 return TestObjV8Internal::variadicStringMethodMethod(args); | 3645 return TestObjV8Internal::variadicStringMethodMethod(args); |
| 3646 } | 3646 } |
| 3647 | 3647 |
| 3648 static v8::Handle<v8::Value> variadicDoubleMethodMethod(const v8::Arguments& arg
s) | 3648 static v8::Handle<v8::Value> variadicDoubleMethodMethod(const v8::Arguments& arg
s) |
| 3649 { | 3649 { |
| 3650 if (args.Length() < 1) | 3650 if (args.Length() < 1) |
| 3651 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3651 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3652 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3652 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3653 V8TRYCATCH(double, head, static_cast<double>(args[0]->NumberValue())); | 3653 V8TRYCATCH(double, head, static_cast<double>(args[0]->NumberValue())); |
| 3654 V8TRYCATCH(Vector<double>, tail, toNativeArguments<double>(args, 1)); | 3654 V8TRYCATCH(Vector<double>, tail, toNativeArguments<double>(args, 1)); |
| 3655 imp->variadicDoubleMethod(head, tail); | 3655 imp->variadicDoubleMethod(head, tail); |
| 3656 return v8Undefined(); | 3656 return v8Undefined(); |
| 3657 } | 3657 } |
| 3658 | 3658 |
| 3659 static v8::Handle<v8::Value> variadicDoubleMethodMethodCallback(const v8::Argume
nts& args) | 3659 static v8::Handle<v8::Value> variadicDoubleMethodMethodCallback(const v8::Argume
nts& args) |
| 3660 { | 3660 { |
| 3661 return TestObjV8Internal::variadicDoubleMethodMethod(args); | 3661 return TestObjV8Internal::variadicDoubleMethodMethod(args); |
| 3662 } | 3662 } |
| 3663 | 3663 |
| 3664 static v8::Handle<v8::Value> variadicNodeMethodMethod(const v8::Arguments& args) | 3664 static v8::Handle<v8::Value> variadicNodeMethodMethod(const v8::Arguments& args) |
| 3665 { | 3665 { |
| 3666 if (args.Length() < 1) | 3666 if (args.Length() < 1) |
| 3667 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3667 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3668 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3668 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3669 V8TRYCATCH(Node*, head, V8Node::HasInstance(args[0], args.GetIsolate(), worl
dType(args.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(args[0
])) : 0); | 3669 V8TRYCATCH(Node*, head, V8Node::HasInstance(args[0], args.GetIsolate(), worl
dType(args.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(args[0
])) : 0); |
| 3670 Vector<RefPtr<Node> > tail; | 3670 Vector<RefPtr<Node> > tail; |
| 3671 for (int i = 1; i < args.Length(); ++i) { | 3671 for (int i = 1; i < args.Length(); ++i) { |
| 3672 if (!V8Node::HasInstance(args[i], args.GetIsolate(), worldType(args.GetI
solate()))) | 3672 if (!V8Node::HasInstance(args[i], args.GetIsolate(), worldType(args.GetI
solate()))) |
| 3673 return throwTypeError(0, args.GetIsolate()); | 3673 return throwTypeError(0, args.GetIsolate()); |
| 3674 tail.append(V8Node::toNative(v8::Handle<v8::Object>::Cast(args[i]))); | 3674 tail.append(V8Node::toNative(v8::Handle<v8::Object>::Cast(args[i]))); |
| 3675 } | 3675 } |
| 3676 imp->variadicNodeMethod(head, tail); | 3676 imp->variadicNodeMethod(head, tail); |
| 3677 return v8Undefined(); | 3677 return v8Undefined(); |
| 3678 } | 3678 } |
| 3679 | 3679 |
| 3680 static v8::Handle<v8::Value> variadicNodeMethodMethodCallback(const v8::Argument
s& args) | 3680 static v8::Handle<v8::Value> variadicNodeMethodMethodCallback(const v8::Argument
s& args) |
| 3681 { | 3681 { |
| 3682 return TestObjV8Internal::variadicNodeMethodMethod(args); | 3682 return TestObjV8Internal::variadicNodeMethodMethod(args); |
| 3683 } | 3683 } |
| 3684 | 3684 |
| 3685 static v8::Handle<v8::Value> perWorldMethodMethod(const v8::Arguments& args) | 3685 static v8::Handle<v8::Value> perWorldMethodMethod(const v8::Arguments& args) |
| 3686 { | 3686 { |
| 3687 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3687 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3688 imp->perWorldMethod(); | 3688 imp->perWorldMethod(); |
| 3689 return v8Undefined(); | 3689 return v8Undefined(); |
| 3690 } | 3690 } |
| 3691 | 3691 |
| 3692 static v8::Handle<v8::Value> perWorldMethodMethodForMainWorld(const v8::Argument
s& args) | 3692 static v8::Handle<v8::Value> perWorldMethodMethodForMainWorld(const v8::Argument
s& args) |
| 3693 { | 3693 { |
| 3694 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3694 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3695 imp->perWorldMethod(); | 3695 imp->perWorldMethod(); |
| 3696 return v8Undefined(); | 3696 return v8Undefined(); |
| 3697 } | 3697 } |
| 3698 | 3698 |
| 3699 static v8::Handle<v8::Value> perWorldMethodMethodCallback(const v8::Arguments& a
rgs) | 3699 static v8::Handle<v8::Value> perWorldMethodMethodCallback(const v8::Arguments& a
rgs) |
| 3700 { | 3700 { |
| 3701 return TestObjV8Internal::perWorldMethodMethod(args); | 3701 return TestObjV8Internal::perWorldMethodMethod(args); |
| 3702 } | 3702 } |
| 3703 | 3703 |
| 3704 static v8::Handle<v8::Value> perWorldMethodMethodCallbackForMainWorld(const v8::
Arguments& args) | 3704 static v8::Handle<v8::Value> perWorldMethodMethodCallbackForMainWorld(const v8::
Arguments& args) |
| 3705 { | 3705 { |
| 3706 return TestObjV8Internal::perWorldMethodMethodForMainWorld(args); | 3706 return TestObjV8Internal::perWorldMethodMethodForMainWorld(args); |
| 3707 } | 3707 } |
| 3708 | 3708 |
| 3709 static v8::Handle<v8::Value> overloadedPerWorldMethod1Method(const v8::Arguments
& args) | 3709 static v8::Handle<v8::Value> overloadedPerWorldMethod1Method(const v8::Arguments
& args) |
| 3710 { | 3710 { |
| 3711 if (args.Length() < 1) | 3711 if (args.Length() < 1) |
| 3712 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3712 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3713 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3713 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3714 V8TRYCATCH(int, longArg, toInt32(args[0])); | 3714 V8TRYCATCH(int, longArg, toInt32(args[0])); |
| 3715 imp->overloadedPerWorldMethod(longArg); | 3715 imp->overloadedPerWorldMethod(longArg); |
| 3716 return v8Undefined(); | 3716 return v8Undefined(); |
| 3717 } | 3717 } |
| 3718 | 3718 |
| 3719 static v8::Handle<v8::Value> overloadedPerWorldMethod1MethodForMainWorld(const v
8::Arguments& args) | 3719 static v8::Handle<v8::Value> overloadedPerWorldMethod1MethodForMainWorld(const v
8::Arguments& args) |
| 3720 { | 3720 { |
| 3721 if (args.Length() < 1) | 3721 if (args.Length() < 1) |
| 3722 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3722 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3723 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3723 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3724 V8TRYCATCH(int, longArg, toInt32(args[0])); | 3724 V8TRYCATCH(int, longArg, toInt32(args[0])); |
| 3725 imp->overloadedPerWorldMethod(longArg); | 3725 imp->overloadedPerWorldMethod(longArg); |
| 3726 return v8Undefined(); | 3726 return v8Undefined(); |
| 3727 } | 3727 } |
| 3728 | 3728 |
| 3729 static v8::Handle<v8::Value> overloadedPerWorldMethod2Method(const v8::Arguments
& args) | 3729 static v8::Handle<v8::Value> overloadedPerWorldMethod2Method(const v8::Arguments
& args) |
| 3730 { | 3730 { |
| 3731 if (args.Length() < 2) | 3731 if (args.Length() < 2) |
| 3732 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3732 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3733 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3733 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3734 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, strArg, args[0]); | 3734 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, strArg, args[0]); |
| 3735 V8TRYCATCH(int, longArg, toInt32(args[1])); | 3735 V8TRYCATCH(int, longArg, toInt32(args[1])); |
| 3736 imp->overloadedPerWorldMethod(strArg, longArg); | 3736 imp->overloadedPerWorldMethod(strArg, longArg); |
| 3737 return v8Undefined(); | 3737 return v8Undefined(); |
| 3738 } | 3738 } |
| 3739 | 3739 |
| 3740 static v8::Handle<v8::Value> overloadedPerWorldMethod2MethodForMainWorld(const v
8::Arguments& args) | 3740 static v8::Handle<v8::Value> overloadedPerWorldMethod2MethodForMainWorld(const v
8::Arguments& args) |
| 3741 { | 3741 { |
| 3742 if (args.Length() < 2) | 3742 if (args.Length() < 2) |
| 3743 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3743 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3744 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3744 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3745 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, strArg, args[0]); | 3745 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, strArg, args[0]); |
| 3746 V8TRYCATCH(int, longArg, toInt32(args[1])); | 3746 V8TRYCATCH(int, longArg, toInt32(args[1])); |
| 3747 imp->overloadedPerWorldMethod(strArg, longArg); | 3747 imp->overloadedPerWorldMethod(strArg, longArg); |
| 3748 return v8Undefined(); | 3748 return v8Undefined(); |
| 3749 } | 3749 } |
| 3750 | 3750 |
| 3751 static v8::Handle<v8::Value> overloadedPerWorldMethodMethod(const v8::Arguments&
args) | 3751 static v8::Handle<v8::Value> overloadedPerWorldMethodMethod(const v8::Arguments&
args) |
| 3752 { | 3752 { |
| 3753 if (args.Length() == 1) | 3753 if (args.Length() == 1) |
| 3754 return overloadedPerWorldMethod1Method(args); | 3754 return overloadedPerWorldMethod1Method(args); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 3777 | 3777 |
| 3778 static v8::Handle<v8::Value> overloadedPerWorldMethodMethodCallbackForMainWorld(
const v8::Arguments& args) | 3778 static v8::Handle<v8::Value> overloadedPerWorldMethodMethodCallbackForMainWorld(
const v8::Arguments& args) |
| 3779 { | 3779 { |
| 3780 return TestObjV8Internal::overloadedPerWorldMethodMethodForMainWorld(args); | 3780 return TestObjV8Internal::overloadedPerWorldMethodMethodForMainWorld(args); |
| 3781 } | 3781 } |
| 3782 | 3782 |
| 3783 static v8::Handle<v8::Value> activityLoggedMethod1Method(const v8::Arguments& ar
gs) | 3783 static v8::Handle<v8::Value> activityLoggedMethod1Method(const v8::Arguments& ar
gs) |
| 3784 { | 3784 { |
| 3785 if (args.Length() < 1) | 3785 if (args.Length() < 1) |
| 3786 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3786 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3787 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3787 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3788 V8TRYCATCH(int, longArg, toInt32(args[0])); | 3788 V8TRYCATCH(int, longArg, toInt32(args[0])); |
| 3789 imp->activityLoggedMethod1(longArg); | 3789 imp->activityLoggedMethod1(longArg); |
| 3790 return v8Undefined(); | 3790 return v8Undefined(); |
| 3791 } | 3791 } |
| 3792 | 3792 |
| 3793 static v8::Handle<v8::Value> activityLoggedMethod1MethodCallback(const v8::Argum
ents& args) | 3793 static v8::Handle<v8::Value> activityLoggedMethod1MethodCallback(const v8::Argum
ents& args) |
| 3794 { | 3794 { |
| 3795 V8PerContextData* contextData = V8PerContextData::from(args.GetIsolate()->Ge
tCurrentContext()); | 3795 V8PerContextData* contextData = V8PerContextData::from(args.GetIsolate()->Ge
tCurrentContext()); |
| 3796 if (contextData && contextData->activityLogger()) { | 3796 if (contextData && contextData->activityLogger()) { |
| 3797 Vector<v8::Handle<v8::Value> > loggerArgs = toVectorOfArguments(args); | 3797 Vector<v8::Handle<v8::Value> > loggerArgs = toVectorOfArguments(args); |
| 3798 contextData->activityLogger()->log("TestObject.activityLoggedMethod1", a
rgs.Length(), loggerArgs.data(), "Method"); | 3798 contextData->activityLogger()->log("TestObject.activityLoggedMethod1", a
rgs.Length(), loggerArgs.data(), "Method"); |
| 3799 } | 3799 } |
| 3800 return TestObjV8Internal::activityLoggedMethod1Method(args); | 3800 return TestObjV8Internal::activityLoggedMethod1Method(args); |
| 3801 } | 3801 } |
| 3802 | 3802 |
| 3803 static v8::Handle<v8::Value> activityLoggedMethod2Method(const v8::Arguments& ar
gs) | 3803 static v8::Handle<v8::Value> activityLoggedMethod2Method(const v8::Arguments& ar
gs) |
| 3804 { | 3804 { |
| 3805 if (args.Length() < 1) | 3805 if (args.Length() < 1) |
| 3806 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3806 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3807 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3807 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3808 V8TRYCATCH(int, longArg, toInt32(args[0])); | 3808 V8TRYCATCH(int, longArg, toInt32(args[0])); |
| 3809 imp->activityLoggedMethod2(longArg); | 3809 imp->activityLoggedMethod2(longArg); |
| 3810 return v8Undefined(); | 3810 return v8Undefined(); |
| 3811 } | 3811 } |
| 3812 | 3812 |
| 3813 static v8::Handle<v8::Value> activityLoggedMethod2MethodForMainWorld(const v8::A
rguments& args) | 3813 static v8::Handle<v8::Value> activityLoggedMethod2MethodForMainWorld(const v8::A
rguments& args) |
| 3814 { | 3814 { |
| 3815 if (args.Length() < 1) | 3815 if (args.Length() < 1) |
| 3816 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3816 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3817 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3817 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3818 V8TRYCATCH(int, longArg, toInt32(args[0])); | 3818 V8TRYCATCH(int, longArg, toInt32(args[0])); |
| 3819 imp->activityLoggedMethod2(longArg); | 3819 imp->activityLoggedMethod2(longArg); |
| 3820 return v8Undefined(); | 3820 return v8Undefined(); |
| 3821 } | 3821 } |
| 3822 | 3822 |
| 3823 static v8::Handle<v8::Value> activityLoggedMethod2MethodCallback(const v8::Argum
ents& args) | 3823 static v8::Handle<v8::Value> activityLoggedMethod2MethodCallback(const v8::Argum
ents& args) |
| 3824 { | 3824 { |
| 3825 V8PerContextData* contextData = V8PerContextData::from(args.GetIsolate()->Ge
tCurrentContext()); | 3825 V8PerContextData* contextData = V8PerContextData::from(args.GetIsolate()->Ge
tCurrentContext()); |
| 3826 if (contextData && contextData->activityLogger()) { | 3826 if (contextData && contextData->activityLogger()) { |
| 3827 Vector<v8::Handle<v8::Value> > loggerArgs = toVectorOfArguments(args); | 3827 Vector<v8::Handle<v8::Value> > loggerArgs = toVectorOfArguments(args); |
| 3828 contextData->activityLogger()->log("TestObject.activityLoggedMethod2", a
rgs.Length(), loggerArgs.data(), "Method"); | 3828 contextData->activityLogger()->log("TestObject.activityLoggedMethod2", a
rgs.Length(), loggerArgs.data(), "Method"); |
| 3829 } | 3829 } |
| 3830 return TestObjV8Internal::activityLoggedMethod2Method(args); | 3830 return TestObjV8Internal::activityLoggedMethod2Method(args); |
| 3831 } | 3831 } |
| 3832 | 3832 |
| 3833 static v8::Handle<v8::Value> activityLoggedMethod2MethodCallbackForMainWorld(con
st v8::Arguments& args) | 3833 static v8::Handle<v8::Value> activityLoggedMethod2MethodCallbackForMainWorld(con
st v8::Arguments& args) |
| 3834 { | 3834 { |
| 3835 V8PerContextData* contextData = V8PerContextData::from(args.GetIsolate()->Ge
tCurrentContext()); | 3835 V8PerContextData* contextData = V8PerContextData::from(args.GetIsolate()->Ge
tCurrentContext()); |
| 3836 if (contextData && contextData->activityLogger()) { | 3836 if (contextData && contextData->activityLogger()) { |
| 3837 Vector<v8::Handle<v8::Value> > loggerArgs = toVectorOfArguments(args); | 3837 Vector<v8::Handle<v8::Value> > loggerArgs = toVectorOfArguments(args); |
| 3838 contextData->activityLogger()->log("TestObject.activityLoggedMethod2", a
rgs.Length(), loggerArgs.data(), "Method"); | 3838 contextData->activityLogger()->log("TestObject.activityLoggedMethod2", a
rgs.Length(), loggerArgs.data(), "Method"); |
| 3839 } | 3839 } |
| 3840 return TestObjV8Internal::activityLoggedMethod2MethodForMainWorld(args); | 3840 return TestObjV8Internal::activityLoggedMethod2MethodForMainWorld(args); |
| 3841 } | 3841 } |
| 3842 | 3842 |
| 3843 static v8::Handle<v8::Value> activityLoggedInIsolatedWorldMethodMethod(const v8:
:Arguments& args) | 3843 static v8::Handle<v8::Value> activityLoggedInIsolatedWorldMethodMethod(const v8:
:Arguments& args) |
| 3844 { | 3844 { |
| 3845 if (args.Length() < 1) | 3845 if (args.Length() < 1) |
| 3846 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3846 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3847 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3847 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3848 V8TRYCATCH(int, longArg, toInt32(args[0])); | 3848 V8TRYCATCH(int, longArg, toInt32(args[0])); |
| 3849 imp->activityLoggedInIsolatedWorldMethod(longArg); | 3849 imp->activityLoggedInIsolatedWorldMethod(longArg); |
| 3850 return v8Undefined(); | 3850 return v8Undefined(); |
| 3851 } | 3851 } |
| 3852 | 3852 |
| 3853 static v8::Handle<v8::Value> activityLoggedInIsolatedWorldMethodMethodForMainWor
ld(const v8::Arguments& args) | 3853 static v8::Handle<v8::Value> activityLoggedInIsolatedWorldMethodMethodForMainWor
ld(const v8::Arguments& args) |
| 3854 { | 3854 { |
| 3855 if (args.Length() < 1) | 3855 if (args.Length() < 1) |
| 3856 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3856 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3857 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3857 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3858 V8TRYCATCH(int, longArg, toInt32(args[0])); | 3858 V8TRYCATCH(int, longArg, toInt32(args[0])); |
| 3859 imp->activityLoggedInIsolatedWorldMethod(longArg); | 3859 imp->activityLoggedInIsolatedWorldMethod(longArg); |
| 3860 return v8Undefined(); | 3860 return v8Undefined(); |
| 3861 } | 3861 } |
| 3862 | 3862 |
| 3863 static v8::Handle<v8::Value> activityLoggedInIsolatedWorldMethodMethodCallback(c
onst v8::Arguments& args) | 3863 static v8::Handle<v8::Value> activityLoggedInIsolatedWorldMethodMethodCallback(c
onst v8::Arguments& args) |
| 3864 { | 3864 { |
| 3865 V8PerContextData* contextData = V8PerContextData::from(args.GetIsolate()->Ge
tCurrentContext()); | 3865 V8PerContextData* contextData = V8PerContextData::from(args.GetIsolate()->Ge
tCurrentContext()); |
| 3866 if (contextData && contextData->activityLogger()) { | 3866 if (contextData && contextData->activityLogger()) { |
| 3867 Vector<v8::Handle<v8::Value> > loggerArgs = toVectorOfArguments(args); | 3867 Vector<v8::Handle<v8::Value> > loggerArgs = toVectorOfArguments(args); |
| 3868 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW
orldMethod", args.Length(), loggerArgs.data(), "Method"); | 3868 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW
orldMethod", args.Length(), loggerArgs.data(), "Method"); |
| 3869 } | 3869 } |
| 3870 return TestObjV8Internal::activityLoggedInIsolatedWorldMethodMethod(args); | 3870 return TestObjV8Internal::activityLoggedInIsolatedWorldMethodMethod(args); |
| 3871 } | 3871 } |
| 3872 | 3872 |
| 3873 static v8::Handle<v8::Value> activityLoggedInIsolatedWorldMethodMethodCallbackFo
rMainWorld(const v8::Arguments& args) | 3873 static v8::Handle<v8::Value> activityLoggedInIsolatedWorldMethodMethodCallbackFo
rMainWorld(const v8::Arguments& args) |
| 3874 { | 3874 { |
| 3875 return TestObjV8Internal::activityLoggedInIsolatedWorldMethodMethodForMainWo
rld(args); | 3875 return TestObjV8Internal::activityLoggedInIsolatedWorldMethodMethodForMainWo
rld(args); |
| 3876 } | 3876 } |
| 3877 | 3877 |
| 3878 static v8::Handle<v8::Value> overloadedActivityLoggedMethod1Method(const v8::Arg
uments& args) | 3878 static v8::Handle<v8::Value> overloadedActivityLoggedMethod1Method(const v8::Arg
uments& args) |
| 3879 { | 3879 { |
| 3880 if (args.Length() < 1) | 3880 if (args.Length() < 1) |
| 3881 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3881 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3882 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3882 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3883 V8TRYCATCH(int, longArg, toInt32(args[0])); | 3883 V8TRYCATCH(int, longArg, toInt32(args[0])); |
| 3884 imp->overloadedActivityLoggedMethod(longArg); | 3884 imp->overloadedActivityLoggedMethod(longArg); |
| 3885 return v8Undefined(); | 3885 return v8Undefined(); |
| 3886 } | 3886 } |
| 3887 | 3887 |
| 3888 static v8::Handle<v8::Value> overloadedActivityLoggedMethod1MethodForMainWorld(c
onst v8::Arguments& args) | 3888 static v8::Handle<v8::Value> overloadedActivityLoggedMethod1MethodForMainWorld(c
onst v8::Arguments& args) |
| 3889 { | 3889 { |
| 3890 if (args.Length() < 1) | 3890 if (args.Length() < 1) |
| 3891 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3891 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3892 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3892 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3893 V8TRYCATCH(int, longArg, toInt32(args[0])); | 3893 V8TRYCATCH(int, longArg, toInt32(args[0])); |
| 3894 imp->overloadedActivityLoggedMethod(longArg); | 3894 imp->overloadedActivityLoggedMethod(longArg); |
| 3895 return v8Undefined(); | 3895 return v8Undefined(); |
| 3896 } | 3896 } |
| 3897 | 3897 |
| 3898 static v8::Handle<v8::Value> overloadedActivityLoggedMethod2Method(const v8::Arg
uments& args) | 3898 static v8::Handle<v8::Value> overloadedActivityLoggedMethod2Method(const v8::Arg
uments& args) |
| 3899 { | 3899 { |
| 3900 if (args.Length() < 2) | 3900 if (args.Length() < 2) |
| 3901 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3901 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3902 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3902 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3903 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, strArg, args[0]); | 3903 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, strArg, args[0]); |
| 3904 V8TRYCATCH(int, longArg, toInt32(args[1])); | 3904 V8TRYCATCH(int, longArg, toInt32(args[1])); |
| 3905 imp->overloadedActivityLoggedMethod(strArg, longArg); | 3905 imp->overloadedActivityLoggedMethod(strArg, longArg); |
| 3906 return v8Undefined(); | 3906 return v8Undefined(); |
| 3907 } | 3907 } |
| 3908 | 3908 |
| 3909 static v8::Handle<v8::Value> overloadedActivityLoggedMethod2MethodForMainWorld(c
onst v8::Arguments& args) | 3909 static v8::Handle<v8::Value> overloadedActivityLoggedMethod2MethodForMainWorld(c
onst v8::Arguments& args) |
| 3910 { | 3910 { |
| 3911 if (args.Length() < 2) | 3911 if (args.Length() < 2) |
| 3912 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3912 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3913 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3913 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3914 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, strArg, args[0]); | 3914 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, strArg, args[0]); |
| 3915 V8TRYCATCH(int, longArg, toInt32(args[1])); | 3915 V8TRYCATCH(int, longArg, toInt32(args[1])); |
| 3916 imp->overloadedActivityLoggedMethod(strArg, longArg); | 3916 imp->overloadedActivityLoggedMethod(strArg, longArg); |
| 3917 return v8Undefined(); | 3917 return v8Undefined(); |
| 3918 } | 3918 } |
| 3919 | 3919 |
| 3920 static v8::Handle<v8::Value> overloadedActivityLoggedMethodMethod(const v8::Argu
ments& args) | 3920 static v8::Handle<v8::Value> overloadedActivityLoggedMethodMethod(const v8::Argu
ments& args) |
| 3921 { | 3921 { |
| 3922 if (args.Length() == 1) | 3922 if (args.Length() == 1) |
| 3923 return overloadedActivityLoggedMethod1Method(args); | 3923 return overloadedActivityLoggedMethod1Method(args); |
| (...skipping 30 matching lines...) Expand all Loading... |
| 3954 V8PerContextData* contextData = V8PerContextData::from(args.GetIsolate()->Ge
tCurrentContext()); | 3954 V8PerContextData* contextData = V8PerContextData::from(args.GetIsolate()->Ge
tCurrentContext()); |
| 3955 if (contextData && contextData->activityLogger()) { | 3955 if (contextData && contextData->activityLogger()) { |
| 3956 Vector<v8::Handle<v8::Value> > loggerArgs = toVectorOfArguments(args); | 3956 Vector<v8::Handle<v8::Value> > loggerArgs = toVectorOfArguments(args); |
| 3957 contextData->activityLogger()->log("TestObject.overloadedActivityLoggedM
ethod", args.Length(), loggerArgs.data(), "Method"); | 3957 contextData->activityLogger()->log("TestObject.overloadedActivityLoggedM
ethod", args.Length(), loggerArgs.data(), "Method"); |
| 3958 } | 3958 } |
| 3959 return TestObjV8Internal::overloadedActivityLoggedMethodMethodForMainWorld(a
rgs); | 3959 return TestObjV8Internal::overloadedActivityLoggedMethodMethodForMainWorld(a
rgs); |
| 3960 } | 3960 } |
| 3961 | 3961 |
| 3962 static v8::Handle<v8::Value> deprecatedMethodMethod(const v8::Arguments& args) | 3962 static v8::Handle<v8::Value> deprecatedMethodMethod(const v8::Arguments& args) |
| 3963 { | 3963 { |
| 3964 TestObj* imp = V8TestObj::toNative(args.Holder()); | 3964 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3965 imp->deprecatedMethod(); | 3965 imp->deprecatedMethod(); |
| 3966 return v8Undefined(); | 3966 return v8Undefined(); |
| 3967 } | 3967 } |
| 3968 | 3968 |
| 3969 static v8::Handle<v8::Value> deprecatedMethodMethodCallback(const v8::Arguments&
args) | 3969 static v8::Handle<v8::Value> deprecatedMethodMethodCallback(const v8::Arguments&
args) |
| 3970 { | 3970 { |
| 3971 UseCounter::countDeprecation(activeDOMWindow(), UseCounter::Method); | 3971 UseCounter::countDeprecation(activeDOMWindow(), UseCounter::Method); |
| 3972 return TestObjV8Internal::deprecatedMethodMethod(args); | 3972 return TestObjV8Internal::deprecatedMethodMethod(args); |
| 3973 } | 3973 } |
| 3974 | 3974 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 3988 { | 3988 { |
| 3989 if (args.Length() < 1) | 3989 if (args.Length() < 1) |
| 3990 return throwNotEnoughArgumentsError(args.GetIsolate()); | 3990 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3991 if (args.Length() <= 0 || !args[0]->IsFunction()) | 3991 if (args.Length() <= 0 || !args[0]->IsFunction()) |
| 3992 return throwTypeError(0, args.GetIsolate()); | 3992 return throwTypeError(0, args.GetIsolate()); |
| 3993 RefPtr<TestCallback> testCallback = V8TestCallback::create(args[0], getScrip
tExecutionContext()); | 3993 RefPtr<TestCallback> testCallback = V8TestCallback::create(args[0], getScrip
tExecutionContext()); |
| 3994 | 3994 |
| 3995 RefPtr<TestObj> impl = TestObj::create(testCallback); | 3995 RefPtr<TestObj> impl = TestObj::create(testCallback); |
| 3996 v8::Handle<v8::Object> wrapper = args.Holder(); | 3996 v8::Handle<v8::Object> wrapper = args.Holder(); |
| 3997 | 3997 |
| 3998 V8DOMWrapper::associateObjectWithWrapper(impl.release(), &V8TestObj::info, w
rapper, args.GetIsolate(), WrapperConfiguration::Dependent); | 3998 V8DOMWrapper::associateObjectWithWrapper(impl.release(), &V8TestObject::info
, wrapper, args.GetIsolate(), WrapperConfiguration::Dependent); |
| 3999 return wrapper; | 3999 return wrapper; |
| 4000 } | 4000 } |
| 4001 | 4001 |
| 4002 } // namespace TestObjV8Internal | 4002 } // namespace TestObjV8Internal |
| 4003 | 4003 |
| 4004 static const V8DOMConfiguration::BatchedAttribute V8TestObjAttrs[] = { | 4004 static const V8DOMConfiguration::BatchedAttribute V8TestObjectAttrs[] = { |
| 4005 // Attribute 'readOnlyLongAttr' (Type: 'attribute' ExtAttr: '') | 4005 // Attribute 'readOnlyLongAttr' (Type: 'attribute' ExtAttr: '') |
| 4006 {"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 */}, | 4006 {"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 */}, |
| 4007 // Attribute 'readOnlyStringAttr' (Type: 'attribute' ExtAttr: '') | 4007 // Attribute 'readOnlyStringAttr' (Type: 'attribute' ExtAttr: '') |
| 4008 {"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 */}, | 4008 {"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 */}, |
| 4009 // Attribute 'readOnlyTestObjAttr' (Type: 'attribute' ExtAttr: '') | 4009 // Attribute 'readOnlyTestObjectAttr' (Type: 'attribute' ExtAttr: '') |
| 4010 {"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 */}, | 4010 {"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 */}, |
| 4011 // Attribute 'staticReadOnlyLongAttr' (Type: 'attribute' ExtAttr: '') | 4011 // Attribute 'staticReadOnlyLongAttr' (Type: 'attribute' ExtAttr: '') |
| 4012 {"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 */}, | 4012 {"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 */}, |
| 4013 // Attribute 'staticStringAttr' (Type: 'attribute' ExtAttr: '') | 4013 // Attribute 'staticStringAttr' (Type: 'attribute' ExtAttr: '') |
| 4014 {"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 */}, | 4014 {"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 */}, |
| 4015 // Attribute 'TestSubObj' (Type: 'attribute' ExtAttr: '') | 4015 // Attribute 'TestSubObj' (Type: 'attribute' ExtAttr: '') |
| 4016 {"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 */}, | 4016 {"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 */}, |
| 4017 // Attribute 'enumAttr' (Type: 'attribute' ExtAttr: '') | 4017 // Attribute 'enumAttr' (Type: 'attribute' ExtAttr: '') |
| 4018 {"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 */}, | 4018 {"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 */}, |
| 4019 // Attribute 'readOnlyEnumAttr' (Type: 'attribute' ExtAttr: '') | 4019 // Attribute 'readOnlyEnumAttr' (Type: 'attribute' ExtAttr: '') |
| 4020 {"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 */}, | 4020 {"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... |
| 4095 #if ENABLE(Condition1) && ENABLE(Condition2) | 4095 #if ENABLE(Condition1) && ENABLE(Condition2) |
| 4096 // Attribute 'conditionalAttr2' (Type: 'attribute' ExtAttr: 'Conditional') | 4096 // Attribute 'conditionalAttr2' (Type: 'attribute' ExtAttr: 'Conditional') |
| 4097 {"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 */}, | 4097 {"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 */}, |
| 4098 #endif // ENABLE(Condition1) && ENABLE(Condition2) | 4098 #endif // ENABLE(Condition1) && ENABLE(Condition2) |
| 4099 #if ENABLE(Condition1) || ENABLE(Condition2) | 4099 #if ENABLE(Condition1) || ENABLE(Condition2) |
| 4100 // Attribute 'conditionalAttr3' (Type: 'attribute' ExtAttr: 'Conditional') | 4100 // Attribute 'conditionalAttr3' (Type: 'attribute' ExtAttr: 'Conditional') |
| 4101 {"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 */}, | 4101 {"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 */}, |
| 4102 #endif // ENABLE(Condition1) || ENABLE(Condition2) | 4102 #endif // ENABLE(Condition1) || ENABLE(Condition2) |
| 4103 #if ENABLE(Condition1) | 4103 #if ENABLE(Condition1) |
| 4104 // Attribute 'conditionalAttr4' (Type: 'attribute' ExtAttr: 'Conditional') | 4104 // Attribute 'conditionalAttr4' (Type: 'attribute' ExtAttr: 'Conditional') |
| 4105 {"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 */}, | 4105 {"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 */}, |
| 4106 #endif // ENABLE(Condition1) | 4106 #endif // ENABLE(Condition1) |
| 4107 #if ENABLE(Condition1) && ENABLE(Condition2) | 4107 #if ENABLE(Condition1) && ENABLE(Condition2) |
| 4108 // Attribute 'conditionalAttr5' (Type: 'attribute' ExtAttr: 'Conditional') | 4108 // Attribute 'conditionalAttr5' (Type: 'attribute' ExtAttr: 'Conditional') |
| 4109 {"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 */}, | 4109 {"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 */}, |
| 4110 #endif // ENABLE(Condition1) && ENABLE(Condition2) | 4110 #endif // ENABLE(Condition1) && ENABLE(Condition2) |
| 4111 #if ENABLE(Condition1) || ENABLE(Condition2) | 4111 #if ENABLE(Condition1) || ENABLE(Condition2) |
| 4112 // Attribute 'conditionalAttr6' (Type: 'attribute' ExtAttr: 'Conditional') | 4112 // Attribute 'conditionalAttr6' (Type: 'attribute' ExtAttr: 'Conditional') |
| 4113 {"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 */}, | 4113 {"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 */}, |
| 4114 #endif // ENABLE(Condition1) || ENABLE(Condition2) | 4114 #endif // ENABLE(Condition1) || ENABLE(Condition2) |
| 4115 // Attribute 'cachedAttribute1' (Type: 'attribute' ExtAttr: 'CachedAttribute
') | 4115 // Attribute 'cachedAttribute1' (Type: 'attribute' ExtAttr: 'CachedAttribute
') |
| 4116 {"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 */}, | 4116 {"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 */}, |
| 4117 // Attribute 'cachedAttribute2' (Type: 'attribute' ExtAttr: 'CachedAttribute
') | 4117 // Attribute 'cachedAttribute2' (Type: 'attribute' ExtAttr: 'CachedAttribute
') |
| 4118 {"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 */}, | 4118 {"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 */}, |
| 4119 // Attribute 'anyAttribute' (Type: 'attribute' ExtAttr: '') | 4119 // Attribute 'anyAttribute' (Type: 'attribute' ExtAttr: '') |
| 4120 {"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 */}, | 4120 {"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 */}, |
| 4121 // Attribute 'floatArray' (Type: 'attribute' ExtAttr: '') | 4121 // Attribute 'floatArray' (Type: 'attribute' ExtAttr: '') |
| 4122 {"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 */}, | 4122 {"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 */}, |
| 4123 // Attribute 'doubleArray' (Type: 'attribute' ExtAttr: '') | 4123 // Attribute 'doubleArray' (Type: 'attribute' ExtAttr: '') |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4177 // Attribute 'deprecatedStaticReadOnlyAttr' (Type: 'attribute' ExtAttr: 'Dep
recateAs') | 4177 // Attribute 'deprecatedStaticReadOnlyAttr' (Type: 'attribute' ExtAttr: 'Dep
recateAs') |
| 4178 {"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 */
}, | 4178 {"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 */
}, |
| 4179 // Attribute 'deprecatedStaticAttr' (Type: 'attribute' ExtAttr: 'DeprecateAs
') | 4179 // Attribute 'deprecatedStaticAttr' (Type: 'attribute' ExtAttr: 'DeprecateAs
') |
| 4180 {"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 */}, | 4180 {"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 */}, |
| 4181 // Attribute 'deprecatedReadonlyAttr' (Type: 'attribute' ExtAttr: 'Deprecate
As') | 4181 // Attribute 'deprecatedReadonlyAttr' (Type: 'attribute' ExtAttr: 'Deprecate
As') |
| 4182 {"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 */}, | 4182 {"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 */}, |
| 4183 // Attribute 'deprecatedAttr' (Type: 'attribute' ExtAttr: 'DeprecateAs') | 4183 // Attribute 'deprecatedAttr' (Type: 'attribute' ExtAttr: 'DeprecateAs') |
| 4184 {"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 */}, | 4184 {"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 */}, |
| 4185 }; | 4185 }; |
| 4186 | 4186 |
| 4187 static const V8DOMConfiguration::BatchedMethod V8TestObjMethods[] = { | 4187 static const V8DOMConfiguration::BatchedMethod V8TestObjectMethods[] = { |
| 4188 {"voidMethod", TestObjV8Internal::voidMethodMethodCallback, 0, 0}, | 4188 {"voidMethod", TestObjV8Internal::voidMethodMethodCallback, 0, 0}, |
| 4189 {"longMethod", TestObjV8Internal::longMethodMethodCallback, 0, 0}, | 4189 {"longMethod", TestObjV8Internal::longMethodMethodCallback, 0, 0}, |
| 4190 {"objMethod", TestObjV8Internal::objMethodMethodCallback, 0, 0}, | 4190 {"objMethod", TestObjV8Internal::objMethodMethodCallback, 0, 0}, |
| 4191 {"methodWithSequenceArg", TestObjV8Internal::methodWithSequenceArgMethodCall
back, 0, 1}, | 4191 {"methodWithSequenceArg", TestObjV8Internal::methodWithSequenceArgMethodCall
back, 0, 1}, |
| 4192 {"methodReturningSequence", TestObjV8Internal::methodReturningSequenceMethod
Callback, 0, 1}, | 4192 {"methodReturningSequence", TestObjV8Internal::methodReturningSequenceMethod
Callback, 0, 1}, |
| 4193 {"methodWithEnumArg", TestObjV8Internal::methodWithEnumArgMethodCallback, 0,
1}, | 4193 {"methodWithEnumArg", TestObjV8Internal::methodWithEnumArgMethodCallback, 0,
1}, |
| 4194 {"serializedValue", TestObjV8Internal::serializedValueMethodCallback, 0, 1}, | 4194 {"serializedValue", TestObjV8Internal::serializedValueMethodCallback, 0, 1}, |
| 4195 {"optionsObject", TestObjV8Internal::optionsObjectMethodCallback, 0, 1}, | 4195 {"optionsObject", TestObjV8Internal::optionsObjectMethodCallback, 0, 1}, |
| 4196 {"namedItem", TestObjV8Internal::namedItemMethodCallback, 0, 1}, | 4196 {"namedItem", TestObjV8Internal::namedItemMethodCallback, 0, 1}, |
| 4197 {"methodWithException", TestObjV8Internal::methodWithExceptionMethodCallback
, 0, 0}, | 4197 {"methodWithException", TestObjV8Internal::methodWithExceptionMethodCallback
, 0, 0}, |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4242 {"variadicDoubleMethod", TestObjV8Internal::variadicDoubleMethodMethodCallba
ck, 0, 2}, | 4242 {"variadicDoubleMethod", TestObjV8Internal::variadicDoubleMethodMethodCallba
ck, 0, 2}, |
| 4243 {"perWorldMethod", TestObjV8Internal::perWorldMethodMethodCallback, TestObjV
8Internal::perWorldMethodMethodCallbackForMainWorld, 0}, | 4243 {"perWorldMethod", TestObjV8Internal::perWorldMethodMethodCallback, TestObjV
8Internal::perWorldMethodMethodCallbackForMainWorld, 0}, |
| 4244 {"overloadedPerWorldMethod", TestObjV8Internal::overloadedPerWorldMethodMeth
odCallback, TestObjV8Internal::overloadedPerWorldMethodMethodCallbackForMainWorl
d, 1}, | 4244 {"overloadedPerWorldMethod", TestObjV8Internal::overloadedPerWorldMethodMeth
odCallback, TestObjV8Internal::overloadedPerWorldMethodMethodCallbackForMainWorl
d, 1}, |
| 4245 {"activityLoggedMethod1", TestObjV8Internal::activityLoggedMethod1MethodCall
back, 0, 1}, | 4245 {"activityLoggedMethod1", TestObjV8Internal::activityLoggedMethod1MethodCall
back, 0, 1}, |
| 4246 {"activityLoggedMethod2", TestObjV8Internal::activityLoggedMethod2MethodCall
back, TestObjV8Internal::activityLoggedMethod2MethodCallbackForMainWorld, 1}, | 4246 {"activityLoggedMethod2", TestObjV8Internal::activityLoggedMethod2MethodCall
back, TestObjV8Internal::activityLoggedMethod2MethodCallbackForMainWorld, 1}, |
| 4247 {"activityLoggedInIsolatedWorldMethod", TestObjV8Internal::activityLoggedInI
solatedWorldMethodMethodCallback, TestObjV8Internal::activityLoggedInIsolatedWor
ldMethodMethodCallbackForMainWorld, 1}, | 4247 {"activityLoggedInIsolatedWorldMethod", TestObjV8Internal::activityLoggedInI
solatedWorldMethodMethodCallback, TestObjV8Internal::activityLoggedInIsolatedWor
ldMethodMethodCallbackForMainWorld, 1}, |
| 4248 {"overloadedActivityLoggedMethod", TestObjV8Internal::overloadedActivityLogg
edMethodMethodCallback, TestObjV8Internal::overloadedActivityLoggedMethodMethodC
allbackForMainWorld, 1}, | 4248 {"overloadedActivityLoggedMethod", TestObjV8Internal::overloadedActivityLogg
edMethodMethodCallback, TestObjV8Internal::overloadedActivityLoggedMethodMethodC
allbackForMainWorld, 1}, |
| 4249 {"deprecatedMethod", TestObjV8Internal::deprecatedMethodMethodCallback, 0, 0
}, | 4249 {"deprecatedMethod", TestObjV8Internal::deprecatedMethodMethodCallback, 0, 0
}, |
| 4250 }; | 4250 }; |
| 4251 | 4251 |
| 4252 static const V8DOMConfiguration::BatchedConstant V8TestObjConsts[] = { | 4252 static const V8DOMConfiguration::BatchedConstant V8TestObjectConsts[] = { |
| 4253 #if ENABLE(Condition1) | 4253 #if ENABLE(Condition1) |
| 4254 {"CONDITIONAL_CONST", 0}, | 4254 {"CONDITIONAL_CONST", 0}, |
| 4255 #endif | 4255 #endif |
| 4256 {"CONST_VALUE_0", 0}, | 4256 {"CONST_VALUE_0", 0}, |
| 4257 {"CONST_VALUE_1", 1}, | 4257 {"CONST_VALUE_1", 1}, |
| 4258 {"CONST_VALUE_2", 2}, | 4258 {"CONST_VALUE_2", 2}, |
| 4259 {"CONST_VALUE_4", 4}, | 4259 {"CONST_VALUE_4", 4}, |
| 4260 {"CONST_VALUE_8", 8}, | 4260 {"CONST_VALUE_8", 8}, |
| 4261 {"CONST_VALUE_9", -1}, | 4261 {"CONST_VALUE_9", -1}, |
| 4262 {"CONST_VALUE_10", "my constant string"}, | 4262 {"CONST_VALUE_10", "my constant string"}, |
| (...skipping 16 matching lines...) Expand all Loading... |
| 4279 COMPILE_ASSERT(8 == TestObj::CONST_VALUE_8, TestObjEnumCONST_VALUE_8IsWrongUseDo
NotCheckConstants); | 4279 COMPILE_ASSERT(8 == TestObj::CONST_VALUE_8, TestObjEnumCONST_VALUE_8IsWrongUseDo
NotCheckConstants); |
| 4280 COMPILE_ASSERT(-1 == TestObj::CONST_VALUE_9, TestObjEnumCONST_VALUE_9IsWrongUseD
oNotCheckConstants); | 4280 COMPILE_ASSERT(-1 == TestObj::CONST_VALUE_9, TestObjEnumCONST_VALUE_9IsWrongUseD
oNotCheckConstants); |
| 4281 COMPILE_ASSERT("my constant string" == TestObj::CONST_VALUE_10, TestObjEnumCONST
_VALUE_10IsWrongUseDoNotCheckConstants); | 4281 COMPILE_ASSERT("my constant string" == TestObj::CONST_VALUE_10, TestObjEnumCONST
_VALUE_10IsWrongUseDoNotCheckConstants); |
| 4282 COMPILE_ASSERT(0xffffffff == TestObj::CONST_VALUE_11, TestObjEnumCONST_VALUE_11I
sWrongUseDoNotCheckConstants); | 4282 COMPILE_ASSERT(0xffffffff == TestObj::CONST_VALUE_11, TestObjEnumCONST_VALUE_11I
sWrongUseDoNotCheckConstants); |
| 4283 COMPILE_ASSERT(0x01 == TestObj::CONST_VALUE_12, TestObjEnumCONST_VALUE_12IsWrong
UseDoNotCheckConstants); | 4283 COMPILE_ASSERT(0x01 == TestObj::CONST_VALUE_12, TestObjEnumCONST_VALUE_12IsWrong
UseDoNotCheckConstants); |
| 4284 COMPILE_ASSERT(0X20 == TestObj::CONST_VALUE_13, TestObjEnumCONST_VALUE_13IsWrong
UseDoNotCheckConstants); | 4284 COMPILE_ASSERT(0X20 == TestObj::CONST_VALUE_13, TestObjEnumCONST_VALUE_13IsWrong
UseDoNotCheckConstants); |
| 4285 COMPILE_ASSERT(0x1abc == TestObj::CONST_VALUE_14, TestObjEnumCONST_VALUE_14IsWro
ngUseDoNotCheckConstants); | 4285 COMPILE_ASSERT(0x1abc == TestObj::CONST_VALUE_14, TestObjEnumCONST_VALUE_14IsWro
ngUseDoNotCheckConstants); |
| 4286 COMPILE_ASSERT(15 == TestObj::CONST_IMPL, TestObjEnumCONST_IMPLIsWrongUseDoNotCh
eckConstants); | 4286 COMPILE_ASSERT(15 == TestObj::CONST_IMPL, TestObjEnumCONST_IMPLIsWrongUseDoNotCh
eckConstants); |
| 4287 COMPILE_ASSERT(1 == TestObj::DEPRECATED_CONSTANT, TestObjEnumDEPRECATED_CONSTANT
IsWrongUseDoNotCheckConstants); | 4287 COMPILE_ASSERT(1 == TestObj::DEPRECATED_CONSTANT, TestObjEnumDEPRECATED_CONSTANT
IsWrongUseDoNotCheckConstants); |
| 4288 | 4288 |
| 4289 v8::Handle<v8::Value> V8TestObj::constructorCallback(const v8::Arguments& args) | 4289 v8::Handle<v8::Value> V8TestObject::constructorCallback(const v8::Arguments& arg
s) |
| 4290 { | 4290 { |
| 4291 if (!args.IsConstructCall()) | 4291 if (!args.IsConstructCall()) |
| 4292 return throwTypeError("DOM object constructor cannot be called as a func
tion.", args.GetIsolate()); | 4292 return throwTypeError("DOM object constructor cannot be called as a func
tion.", args.GetIsolate()); |
| 4293 | 4293 |
| 4294 if (ConstructorMode::current() == ConstructorMode::WrapExistingObject) | 4294 if (ConstructorMode::current() == ConstructorMode::WrapExistingObject) |
| 4295 return args.Holder(); | 4295 return args.Holder(); |
| 4296 | 4296 |
| 4297 return TestObjV8Internal::constructor(args); | 4297 return TestObjV8Internal::constructor(args); |
| 4298 } | 4298 } |
| 4299 | 4299 |
| 4300 v8::Handle<v8::Value> V8TestObj::indexedPropertyGetter(uint32_t index, const v8:
:AccessorInfo& info) | 4300 v8::Handle<v8::Value> V8TestObject::indexedPropertyGetter(uint32_t index, const
v8::AccessorInfo& info) |
| 4301 { | 4301 { |
| 4302 ASSERT(V8DOMWrapper::maybeDOMWrapper(info.Holder())); | 4302 ASSERT(V8DOMWrapper::maybeDOMWrapper(info.Holder())); |
| 4303 TestObj* collection = toNative(info.Holder()); | 4303 TestObj* collection = toNative(info.Holder()); |
| 4304 RefPtr<Node> element = collection->item(index); | 4304 RefPtr<Node> element = collection->item(index); |
| 4305 if (!element) | 4305 if (!element) |
| 4306 return v8Undefined(); | 4306 return v8Undefined(); |
| 4307 return toV8Fast(element.release(), info, collection); | 4307 return toV8Fast(element.release(), info, collection); |
| 4308 } | 4308 } |
| 4309 | 4309 |
| 4310 v8::Handle<v8::Value> V8TestObj::namedPropertyGetter(v8::Local<v8::String> name,
const v8::AccessorInfo& info) | 4310 v8::Handle<v8::Value> V8TestObject::namedPropertyGetter(v8::Local<v8::String> na
me, const v8::AccessorInfo& info) |
| 4311 { | 4311 { |
| 4312 if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(name).IsEmpty()) | 4312 if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(name).IsEmpty()) |
| 4313 return v8Undefined(); | 4313 return v8Undefined(); |
| 4314 if (info.Holder()->HasRealNamedCallbackProperty(name)) | 4314 if (info.Holder()->HasRealNamedCallbackProperty(name)) |
| 4315 return v8Undefined(); | 4315 return v8Undefined(); |
| 4316 | 4316 |
| 4317 ASSERT(V8DOMWrapper::maybeDOMWrapper(info.Holder())); | 4317 ASSERT(V8DOMWrapper::maybeDOMWrapper(info.Holder())); |
| 4318 TestObj* collection = toNative(info.Holder()); | 4318 TestObj* collection = toNative(info.Holder()); |
| 4319 AtomicString propertyName = toWebCoreAtomicString(name); | 4319 AtomicString propertyName = toWebCoreAtomicString(name); |
| 4320 String element = collection->namedItem(propertyName); | 4320 String element = collection->namedItem(propertyName); |
| 4321 if (element.isNull()) | 4321 if (element.isNull()) |
| 4322 return v8Undefined(); | 4322 return v8Undefined(); |
| 4323 return v8String(element, info.GetIsolate()); | 4323 return v8String(element, info.GetIsolate()); |
| 4324 } | 4324 } |
| 4325 | 4325 |
| 4326 static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestObjTemplate(v8::Persi
stent<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType current
WorldType) | 4326 static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestObjectTemplate(v8::Pe
rsistent<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType curr
entWorldType) |
| 4327 { | 4327 { |
| 4328 desc->ReadOnlyPrototype(); | 4328 desc->ReadOnlyPrototype(); |
| 4329 | 4329 |
| 4330 v8::Local<v8::Signature> defaultSignature; | 4330 v8::Local<v8::Signature> defaultSignature; |
| 4331 defaultSignature = V8DOMConfiguration::configureTemplate(desc, "TestObject",
v8::Persistent<v8::FunctionTemplate>(), V8TestObj::internalFieldCount, | 4331 defaultSignature = V8DOMConfiguration::configureTemplate(desc, "TestObject",
v8::Persistent<v8::FunctionTemplate>(), V8TestObject::internalFieldCount, |
| 4332 V8TestObjAttrs, WTF_ARRAY_LENGTH(V8TestObjAttrs), | 4332 V8TestObjectAttrs, WTF_ARRAY_LENGTH(V8TestObjectAttrs), |
| 4333 V8TestObjMethods, WTF_ARRAY_LENGTH(V8TestObjMethods), isolate, currentWo
rldType); | 4333 V8TestObjectMethods, WTF_ARRAY_LENGTH(V8TestObjectMethods), isolate, cur
rentWorldType); |
| 4334 UNUSED_PARAM(defaultSignature); // In some cases, it will not be used. | 4334 UNUSED_PARAM(defaultSignature); // In some cases, it will not be used. |
| 4335 desc->SetCallHandler(V8TestObj::constructorCallback); | 4335 desc->SetCallHandler(V8TestObject::constructorCallback); |
| 4336 desc->SetLength(1); | 4336 desc->SetLength(1); |
| 4337 v8::Local<v8::ObjectTemplate> instance = desc->InstanceTemplate(); | 4337 v8::Local<v8::ObjectTemplate> instance = desc->InstanceTemplate(); |
| 4338 v8::Local<v8::ObjectTemplate> proto = desc->PrototypeTemplate(); | 4338 v8::Local<v8::ObjectTemplate> proto = desc->PrototypeTemplate(); |
| 4339 UNUSED_PARAM(instance); // In some cases, it will not be used. | 4339 UNUSED_PARAM(instance); // In some cases, it will not be used. |
| 4340 UNUSED_PARAM(proto); // In some cases, it will not be used. | 4340 UNUSED_PARAM(proto); // In some cases, it will not be used. |
| 4341 if (RuntimeEnabledFeatures::enabledAtRuntimeAttr1Enabled()) { | 4341 if (RuntimeEnabledFeatures::enabledAtRuntimeAttr1Enabled()) { |
| 4342 static const V8DOMConfiguration::BatchedAttribute attrData =\ | 4342 static const V8DOMConfiguration::BatchedAttribute attrData =\ |
| 4343 // Attribute 'enabledAtRuntimeAttr1' (Type: 'attribute' ExtAttr: 'Enable
dAtRuntime') | 4343 // Attribute 'enabledAtRuntimeAttr1' (Type: 'attribute' ExtAttr: 'Enable
dAtRuntime') |
| 4344 {"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 */}; | 4344 {"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 */}; |
| 4345 V8DOMConfiguration::configureAttribute(instance, proto, attrData, isolat
e, currentWorldType); | 4345 V8DOMConfiguration::configureAttribute(instance, proto, attrData, isolat
e, currentWorldType); |
| 4346 } | 4346 } |
| 4347 if (RuntimeEnabledFeatures::featureNameEnabled()) { | 4347 if (RuntimeEnabledFeatures::featureNameEnabled()) { |
| 4348 static const V8DOMConfiguration::BatchedAttribute attrData =\ | 4348 static const V8DOMConfiguration::BatchedAttribute attrData =\ |
| 4349 // Attribute 'enabledAtRuntimeAttr2' (Type: 'attribute' ExtAttr: 'Enable
dAtRuntime') | 4349 // Attribute 'enabledAtRuntimeAttr2' (Type: 'attribute' ExtAttr: 'Enable
dAtRuntime') |
| 4350 {"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 */}; | 4350 {"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 */}; |
| 4351 V8DOMConfiguration::configureAttribute(instance, proto, attrData, isolat
e, currentWorldType); | 4351 V8DOMConfiguration::configureAttribute(instance, proto, attrData, isolat
e, currentWorldType); |
| 4352 } | 4352 } |
| 4353 desc->InstanceTemplate()->SetIndexedPropertyHandler(V8TestObj::indexedProper
tyGetter, 0, 0, 0, nodeCollectionIndexedPropertyEnumerator<TestObj>); | 4353 desc->InstanceTemplate()->SetIndexedPropertyHandler(V8TestObject::indexedPro
pertyGetter, 0, 0, 0, nodeCollectionIndexedPropertyEnumerator<TestObj>); |
| 4354 desc->InstanceTemplate()->SetNamedPropertyHandler(V8TestObj::namedPropertyGe
tter, 0, 0, 0, 0); | 4354 desc->InstanceTemplate()->SetNamedPropertyHandler(V8TestObject::namedPropert
yGetter, 0, 0, 0, 0); |
| 4355 | 4355 |
| 4356 // Custom Signature 'voidMethodWithArgs' | 4356 // Custom Signature 'voidMethodWithArgs' |
| 4357 const int voidMethodWithArgsArgc = 3; | 4357 const int voidMethodWithArgsArgc = 3; |
| 4358 v8::Handle<v8::FunctionTemplate> voidMethodWithArgsArgv[voidMethodWithArgsAr
gc] = { v8::Handle<v8::FunctionTemplate>(), v8::Handle<v8::FunctionTemplate>(),
V8PerIsolateData::from(isolate)->rawTemplate(&V8TestObj::info, currentWorldType)
}; | 4358 v8::Handle<v8::FunctionTemplate> voidMethodWithArgsArgv[voidMethodWithArgsAr
gc] = { v8::Handle<v8::FunctionTemplate>(), v8::Handle<v8::FunctionTemplate>(),
V8PerIsolateData::from(isolate)->rawTemplate(&V8TestObject::info, currentWorldTy
pe) }; |
| 4359 v8::Handle<v8::Signature> voidMethodWithArgsSignature = v8::Signature::New(d
esc, voidMethodWithArgsArgc, voidMethodWithArgsArgv); | 4359 v8::Handle<v8::Signature> voidMethodWithArgsSignature = v8::Signature::New(d
esc, voidMethodWithArgsArgc, voidMethodWithArgsArgv); |
| 4360 proto->Set(v8::String::NewSymbol("voidMethodWithArgs"), v8::FunctionTemplate
::New(TestObjV8Internal::voidMethodWithArgsMethodCallback, v8Undefined(), voidMe
thodWithArgsSignature, 3)); | 4360 proto->Set(v8::String::NewSymbol("voidMethodWithArgs"), v8::FunctionTemplate
::New(TestObjV8Internal::voidMethodWithArgsMethodCallback, v8Undefined(), voidMe
thodWithArgsSignature, 3)); |
| 4361 | 4361 |
| 4362 // Custom Signature 'longMethodWithArgs' | 4362 // Custom Signature 'longMethodWithArgs' |
| 4363 const int longMethodWithArgsArgc = 3; | 4363 const int longMethodWithArgsArgc = 3; |
| 4364 v8::Handle<v8::FunctionTemplate> longMethodWithArgsArgv[longMethodWithArgsAr
gc] = { v8::Handle<v8::FunctionTemplate>(), v8::Handle<v8::FunctionTemplate>(),
V8PerIsolateData::from(isolate)->rawTemplate(&V8TestObj::info, currentWorldType)
}; | 4364 v8::Handle<v8::FunctionTemplate> longMethodWithArgsArgv[longMethodWithArgsAr
gc] = { v8::Handle<v8::FunctionTemplate>(), v8::Handle<v8::FunctionTemplate>(),
V8PerIsolateData::from(isolate)->rawTemplate(&V8TestObject::info, currentWorldTy
pe) }; |
| 4365 v8::Handle<v8::Signature> longMethodWithArgsSignature = v8::Signature::New(d
esc, longMethodWithArgsArgc, longMethodWithArgsArgv); | 4365 v8::Handle<v8::Signature> longMethodWithArgsSignature = v8::Signature::New(d
esc, longMethodWithArgsArgc, longMethodWithArgsArgv); |
| 4366 proto->Set(v8::String::NewSymbol("longMethodWithArgs"), v8::FunctionTemplate
::New(TestObjV8Internal::longMethodWithArgsMethodCallback, v8Undefined(), longMe
thodWithArgsSignature, 3)); | 4366 proto->Set(v8::String::NewSymbol("longMethodWithArgs"), v8::FunctionTemplate
::New(TestObjV8Internal::longMethodWithArgsMethodCallback, v8Undefined(), longMe
thodWithArgsSignature, 3)); |
| 4367 | 4367 |
| 4368 // Custom Signature 'objMethodWithArgs' | 4368 // Custom Signature 'objMethodWithArgs' |
| 4369 const int objMethodWithArgsArgc = 3; | 4369 const int objMethodWithArgsArgc = 3; |
| 4370 v8::Handle<v8::FunctionTemplate> objMethodWithArgsArgv[objMethodWithArgsArgc
] = { v8::Handle<v8::FunctionTemplate>(), v8::Handle<v8::FunctionTemplate>(), V8
PerIsolateData::from(isolate)->rawTemplate(&V8TestObj::info, currentWorldType) }
; | 4370 v8::Handle<v8::FunctionTemplate> objMethodWithArgsArgv[objMethodWithArgsArgc
] = { v8::Handle<v8::FunctionTemplate>(), v8::Handle<v8::FunctionTemplate>(), V8
PerIsolateData::from(isolate)->rawTemplate(&V8TestObject::info, currentWorldType
) }; |
| 4371 v8::Handle<v8::Signature> objMethodWithArgsSignature = v8::Signature::New(de
sc, objMethodWithArgsArgc, objMethodWithArgsArgv); | 4371 v8::Handle<v8::Signature> objMethodWithArgsSignature = v8::Signature::New(de
sc, objMethodWithArgsArgc, objMethodWithArgsArgv); |
| 4372 proto->Set(v8::String::NewSymbol("objMethodWithArgs"), v8::FunctionTemplate:
:New(TestObjV8Internal::objMethodWithArgsMethodCallback, v8Undefined(), objMetho
dWithArgsSignature, 3)); | 4372 proto->Set(v8::String::NewSymbol("objMethodWithArgs"), v8::FunctionTemplate:
:New(TestObjV8Internal::objMethodWithArgsMethodCallback, v8Undefined(), objMetho
dWithArgsSignature, 3)); |
| 4373 | 4373 |
| 4374 // Custom Signature 'methodThatRequiresAllArgsAndThrows' | 4374 // Custom Signature 'methodThatRequiresAllArgsAndThrows' |
| 4375 const int methodThatRequiresAllArgsAndThrowsArgc = 2; | 4375 const int methodThatRequiresAllArgsAndThrowsArgc = 2; |
| 4376 v8::Handle<v8::FunctionTemplate> methodThatRequiresAllArgsAndThrowsArgv[meth
odThatRequiresAllArgsAndThrowsArgc] = { v8::Handle<v8::FunctionTemplate>(), V8Pe
rIsolateData::from(isolate)->rawTemplate(&V8TestObj::info, currentWorldType) }; | 4376 v8::Handle<v8::FunctionTemplate> methodThatRequiresAllArgsAndThrowsArgv[meth
odThatRequiresAllArgsAndThrowsArgc] = { v8::Handle<v8::FunctionTemplate>(), V8Pe
rIsolateData::from(isolate)->rawTemplate(&V8TestObject::info, currentWorldType)
}; |
| 4377 v8::Handle<v8::Signature> methodThatRequiresAllArgsAndThrowsSignature = v8::
Signature::New(desc, methodThatRequiresAllArgsAndThrowsArgc, methodThatRequiresA
llArgsAndThrowsArgv); | 4377 v8::Handle<v8::Signature> methodThatRequiresAllArgsAndThrowsSignature = v8::
Signature::New(desc, methodThatRequiresAllArgsAndThrowsArgc, methodThatRequiresA
llArgsAndThrowsArgv); |
| 4378 proto->Set(v8::String::NewSymbol("methodThatRequiresAllArgsAndThrows"), v8::
FunctionTemplate::New(TestObjV8Internal::methodThatRequiresAllArgsAndThrowsMetho
dCallback, v8Undefined(), methodThatRequiresAllArgsAndThrowsSignature, 2)); | 4378 proto->Set(v8::String::NewSymbol("methodThatRequiresAllArgsAndThrows"), v8::
FunctionTemplate::New(TestObjV8Internal::methodThatRequiresAllArgsAndThrowsMetho
dCallback, v8Undefined(), methodThatRequiresAllArgsAndThrowsSignature, 2)); |
| 4379 desc->Set(v8::String::NewSymbol("staticMethodWithCallbackAndOptionalArg"), v
8::FunctionTemplate::New(TestObjV8Internal::staticMethodWithCallbackAndOptionalA
rgMethodCallback, v8Undefined(), v8::Local<v8::Signature>(), 0)); | 4379 desc->Set(v8::String::NewSymbol("staticMethodWithCallbackAndOptionalArg"), v
8::FunctionTemplate::New(TestObjV8Internal::staticMethodWithCallbackAndOptionalA
rgMethodCallback, v8Undefined(), v8::Local<v8::Signature>(), 0)); |
| 4380 desc->Set(v8::String::NewSymbol("staticMethodWithCallbackArg"), v8::Function
Template::New(TestObjV8Internal::staticMethodWithCallbackArgMethodCallback, v8Un
defined(), v8::Local<v8::Signature>(), 1)); | 4380 desc->Set(v8::String::NewSymbol("staticMethodWithCallbackArg"), v8::Function
Template::New(TestObjV8Internal::staticMethodWithCallbackArgMethodCallback, v8Un
defined(), v8::Local<v8::Signature>(), 1)); |
| 4381 desc->Set(v8::String::NewSymbol("classMethod"), v8::FunctionTemplate::New(Te
stObjV8Internal::classMethodMethodCallback, v8Undefined(), v8::Local<v8::Signatu
re>(), 0)); | 4381 desc->Set(v8::String::NewSymbol("classMethod"), v8::FunctionTemplate::New(Te
stObjV8Internal::classMethodMethodCallback, v8Undefined(), v8::Local<v8::Signatu
re>(), 0)); |
| 4382 desc->Set(v8::String::NewSymbol("classMethodWithOptional"), v8::FunctionTemp
late::New(TestObjV8Internal::classMethodWithOptionalMethodCallback, v8Undefined(
), v8::Local<v8::Signature>(), 0)); | 4382 desc->Set(v8::String::NewSymbol("classMethodWithOptional"), v8::FunctionTemp
late::New(TestObjV8Internal::classMethodWithOptionalMethodCallback, v8Undefined(
), v8::Local<v8::Signature>(), 0)); |
| 4383 desc->Set(v8::String::NewSymbol("classMethod2"), v8::FunctionTemplate::New(T
estObjV8Internal::classMethod2MethodCallback, v8Undefined(), v8::Local<v8::Signa
ture>(), 1)); | 4383 desc->Set(v8::String::NewSymbol("classMethod2"), v8::FunctionTemplate::New(T
estObjV8Internal::classMethod2MethodCallback, v8Undefined(), v8::Local<v8::Signa
ture>(), 1)); |
| 4384 #if ENABLE(Condition1) | 4384 #if ENABLE(Condition1) |
| 4385 desc->Set(v8::String::NewSymbol("overloadedMethod1"), v8::FunctionTemplate::
New(TestObjV8Internal::overloadedMethod1MethodCallback, v8Undefined(), v8::Local
<v8::Signature>(), 1)); | 4385 desc->Set(v8::String::NewSymbol("overloadedMethod1"), v8::FunctionTemplate::
New(TestObjV8Internal::overloadedMethod1MethodCallback, v8Undefined(), v8::Local
<v8::Signature>(), 1)); |
| 4386 #endif // ENABLE(Condition1) | 4386 #endif // ENABLE(Condition1) |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4418 v8::Handle<v8::FunctionTemplate> convert5Argv[convert5Argc] = { V8PerIsolate
Data::from(isolate)->rawTemplate(&V8TestNode::info, currentWorldType) }; | 4418 v8::Handle<v8::FunctionTemplate> convert5Argv[convert5Argc] = { V8PerIsolate
Data::from(isolate)->rawTemplate(&V8TestNode::info, currentWorldType) }; |
| 4419 v8::Handle<v8::Signature> convert5Signature = v8::Signature::New(desc, conve
rt5Argc, convert5Argv); | 4419 v8::Handle<v8::Signature> convert5Signature = v8::Signature::New(desc, conve
rt5Argc, convert5Argv); |
| 4420 proto->Set(v8::String::NewSymbol("convert5"), v8::FunctionTemplate::New(Test
ObjV8Internal::convert5MethodCallback, v8Undefined(), convert5Signature, 1)); | 4420 proto->Set(v8::String::NewSymbol("convert5"), v8::FunctionTemplate::New(Test
ObjV8Internal::convert5MethodCallback, v8Undefined(), convert5Signature, 1)); |
| 4421 | 4421 |
| 4422 // Custom Signature 'variadicNodeMethod' | 4422 // Custom Signature 'variadicNodeMethod' |
| 4423 const int variadicNodeMethodArgc = 2; | 4423 const int variadicNodeMethodArgc = 2; |
| 4424 v8::Handle<v8::FunctionTemplate> variadicNodeMethodArgv[variadicNodeMethodAr
gc] = { V8PerIsolateData::from(isolate)->rawTemplate(&V8Node::info, currentWorld
Type), V8PerIsolateData::from(isolate)->rawTemplate(&V8Node::info, currentWorldT
ype) }; | 4424 v8::Handle<v8::FunctionTemplate> variadicNodeMethodArgv[variadicNodeMethodAr
gc] = { V8PerIsolateData::from(isolate)->rawTemplate(&V8Node::info, currentWorld
Type), V8PerIsolateData::from(isolate)->rawTemplate(&V8Node::info, currentWorldT
ype) }; |
| 4425 v8::Handle<v8::Signature> variadicNodeMethodSignature = v8::Signature::New(d
esc, variadicNodeMethodArgc, variadicNodeMethodArgv); | 4425 v8::Handle<v8::Signature> variadicNodeMethodSignature = v8::Signature::New(d
esc, variadicNodeMethodArgc, variadicNodeMethodArgv); |
| 4426 proto->Set(v8::String::NewSymbol("variadicNodeMethod"), v8::FunctionTemplate
::New(TestObjV8Internal::variadicNodeMethodMethodCallback, v8Undefined(), variad
icNodeMethodSignature, 2)); | 4426 proto->Set(v8::String::NewSymbol("variadicNodeMethod"), v8::FunctionTemplate
::New(TestObjV8Internal::variadicNodeMethodMethodCallback, v8Undefined(), variad
icNodeMethodSignature, 2)); |
| 4427 desc->Set(v8::String::NewSymbol("deprecatedStaticMethod"), v8::FunctionTempl
ate::New(TestObjV8Internal::deprecatedStaticMethodMethodCallback, v8Undefined(),
v8::Local<v8::Signature>(), 0)); | 4427 desc->Set(v8::String::NewSymbol("deprecatedStaticMethod"), v8::FunctionTempl
ate::New(TestObjV8Internal::deprecatedStaticMethodMethodCallback, v8Undefined(),
v8::Local<v8::Signature>(), 0)); |
| 4428 V8DOMConfiguration::batchConfigureConstants(desc, proto, V8TestObjConsts, WT
F_ARRAY_LENGTH(V8TestObjConsts), isolate); | 4428 V8DOMConfiguration::batchConfigureConstants(desc, proto, V8TestObjectConsts,
WTF_ARRAY_LENGTH(V8TestObjectConsts), isolate); |
| 4429 | 4429 |
| 4430 // Custom toString template | 4430 // Custom toString template |
| 4431 desc->Set(v8::String::NewSymbol("toString"), V8PerIsolateData::current()->to
StringTemplate()); | 4431 desc->Set(v8::String::NewSymbol("toString"), V8PerIsolateData::current()->to
StringTemplate()); |
| 4432 return desc; | 4432 return desc; |
| 4433 } | 4433 } |
| 4434 | 4434 |
| 4435 v8::Persistent<v8::FunctionTemplate> V8TestObj::GetTemplate(v8::Isolate* isolate
, WrapperWorldType currentWorldType) | 4435 v8::Persistent<v8::FunctionTemplate> V8TestObject::GetTemplate(v8::Isolate* isol
ate, WrapperWorldType currentWorldType) |
| 4436 { | 4436 { |
| 4437 V8PerIsolateData* data = V8PerIsolateData::from(isolate); | 4437 V8PerIsolateData* data = V8PerIsolateData::from(isolate); |
| 4438 V8PerIsolateData::TemplateMap::iterator result = data->templateMap(currentWo
rldType).find(&info); | 4438 V8PerIsolateData::TemplateMap::iterator result = data->templateMap(currentWo
rldType).find(&info); |
| 4439 if (result != data->templateMap(currentWorldType).end()) | 4439 if (result != data->templateMap(currentWorldType).end()) |
| 4440 return result->value; | 4440 return result->value; |
| 4441 | 4441 |
| 4442 v8::HandleScope handleScope; | 4442 v8::HandleScope handleScope; |
| 4443 v8::Persistent<v8::FunctionTemplate> templ = | 4443 v8::Persistent<v8::FunctionTemplate> templ = |
| 4444 ConfigureV8TestObjTemplate(data->rawTemplate(&info, currentWorldType), i
solate, currentWorldType); | 4444 ConfigureV8TestObjectTemplate(data->rawTemplate(&info, currentWorldType)
, isolate, currentWorldType); |
| 4445 data->templateMap(currentWorldType).add(&info, templ); | 4445 data->templateMap(currentWorldType).add(&info, templ); |
| 4446 return templ; | 4446 return templ; |
| 4447 } | 4447 } |
| 4448 | 4448 |
| 4449 bool V8TestObj::HasInstance(v8::Handle<v8::Value> value, v8::Isolate* isolate, W
rapperWorldType currentWorldType) | 4449 bool V8TestObject::HasInstance(v8::Handle<v8::Value> value, v8::Isolate* isolate
, WrapperWorldType currentWorldType) |
| 4450 { | 4450 { |
| 4451 return V8PerIsolateData::from(isolate)->hasInstance(&info, value, currentWor
ldType); | 4451 return V8PerIsolateData::from(isolate)->hasInstance(&info, value, currentWor
ldType); |
| 4452 } | 4452 } |
| 4453 | 4453 |
| 4454 bool V8TestObj::HasInstanceInAnyWorld(v8::Handle<v8::Value> value, v8::Isolate*
isolate) | 4454 bool V8TestObject::HasInstanceInAnyWorld(v8::Handle<v8::Value> value, v8::Isolat
e* isolate) |
| 4455 { | 4455 { |
| 4456 return V8PerIsolateData::from(isolate)->hasInstance(&info, value, MainWorld) | 4456 return V8PerIsolateData::from(isolate)->hasInstance(&info, value, MainWorld) |
| 4457 || V8PerIsolateData::from(isolate)->hasInstance(&info, value, IsolatedWo
rld) | 4457 || V8PerIsolateData::from(isolate)->hasInstance(&info, value, IsolatedWo
rld) |
| 4458 || V8PerIsolateData::from(isolate)->hasInstance(&info, value, WorkerWorl
d); | 4458 || V8PerIsolateData::from(isolate)->hasInstance(&info, value, WorkerWorl
d); |
| 4459 } | 4459 } |
| 4460 | 4460 |
| 4461 void V8TestObj::installPerContextProperties(v8::Handle<v8::Object> instance, Tes
tObj* impl, v8::Isolate* isolate) | 4461 void V8TestObject::installPerContextProperties(v8::Handle<v8::Object> instance,
TestObj* impl, v8::Isolate* isolate) |
| 4462 { | 4462 { |
| 4463 v8::Local<v8::Object> proto = v8::Local<v8::Object>::Cast(instance->GetProto
type()); | 4463 v8::Local<v8::Object> proto = v8::Local<v8::Object>::Cast(instance->GetProto
type()); |
| 4464 if (ContextFeatures::enabledPerContextAttr1Enabled(impl->document())) { | 4464 if (ContextFeatures::enabledPerContextAttr1Enabled(impl->document())) { |
| 4465 static const V8DOMConfiguration::BatchedAttribute attrData =\ | 4465 static const V8DOMConfiguration::BatchedAttribute attrData =\ |
| 4466 // Attribute 'enabledPerContextAttr1' (Type: 'attribute' ExtAttr: 'Enabl
edPerContext') | 4466 // Attribute 'enabledPerContextAttr1' (Type: 'attribute' ExtAttr: 'Enabl
edPerContext') |
| 4467 {"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 */}; | 4467 {"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 */}; |
| 4468 V8DOMConfiguration::configureAttribute(instance, proto, attrData, isolat
e); | 4468 V8DOMConfiguration::configureAttribute(instance, proto, attrData, isolat
e); |
| 4469 } | 4469 } |
| 4470 if (ContextFeatures::featureNameEnabled(impl->document())) { | 4470 if (ContextFeatures::featureNameEnabled(impl->document())) { |
| 4471 static const V8DOMConfiguration::BatchedAttribute attrData =\ | 4471 static const V8DOMConfiguration::BatchedAttribute attrData =\ |
| 4472 // Attribute 'enabledPerContextAttr2' (Type: 'attribute' ExtAttr: 'Enabl
edPerContext') | 4472 // Attribute 'enabledPerContextAttr2' (Type: 'attribute' ExtAttr: 'Enabl
edPerContext') |
| 4473 {"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 */}; | 4473 {"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 */}; |
| 4474 V8DOMConfiguration::configureAttribute(instance, proto, attrData, isolat
e); | 4474 V8DOMConfiguration::configureAttribute(instance, proto, attrData, isolat
e); |
| 4475 } | 4475 } |
| 4476 } | 4476 } |
| 4477 | 4477 |
| 4478 void V8TestObj::installPerContextPrototypeProperties(v8::Handle<v8::Object> prot
o, v8::Isolate* isolate) | 4478 void V8TestObject::installPerContextPrototypeProperties(v8::Handle<v8::Object> p
roto, v8::Isolate* isolate) |
| 4479 { | 4479 { |
| 4480 UNUSED_PARAM(proto); | 4480 UNUSED_PARAM(proto); |
| 4481 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(GetTemplate(i
solate, worldType(isolate))); | 4481 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(GetTemplate(i
solate, worldType(isolate))); |
| 4482 UNUSED_PARAM(defaultSignature); // In some cases, it will not be used. | 4482 UNUSED_PARAM(defaultSignature); // In some cases, it will not be used. |
| 4483 | 4483 |
| 4484 ScriptExecutionContext* context = toScriptExecutionContext(proto->CreationCo
ntext()); | 4484 ScriptExecutionContext* context = toScriptExecutionContext(proto->CreationCo
ntext()); |
| 4485 if (context && context->isDocument() && ContextFeatures::enabledPerContextMe
thod1Enabled(toDocument(context))) { | 4485 if (context && context->isDocument() && ContextFeatures::enabledPerContextMe
thod1Enabled(toDocument(context))) |
| 4486 proto->Set(v8::String::NewSymbol("enabledPerContextMethod1"), v8::Functi
onTemplate::New(TestObjV8Internal::enabledPerContextMethod1MethodCallback, v8Und
efined(), defaultSignature, 1)->GetFunction()); | 4486 proto->Set(v8::String::NewSymbol("enabledPerContextMethod1"), v8::Functi
onTemplate::New(TestObjV8Internal::enabledPerContextMethod1MethodCallback, v8Und
efined(), defaultSignature, 1)->GetFunction()); |
| 4487 } | 4487 if (context && context->isDocument() && ContextFeatures::featureNameEnabled(
toDocument(context))) |
| 4488 if (context && context->isDocument() && ContextFeatures::featureNameEnabled(
toDocument(context))) { | |
| 4489 proto->Set(v8::String::NewSymbol("enabledPerContextMethod2"), v8::Functi
onTemplate::New(TestObjV8Internal::enabledPerContextMethod2MethodCallback, v8Und
efined(), defaultSignature, 1)->GetFunction()); | 4488 proto->Set(v8::String::NewSymbol("enabledPerContextMethod2"), v8::Functi
onTemplate::New(TestObjV8Internal::enabledPerContextMethod2MethodCallback, v8Und
efined(), defaultSignature, 1)->GetFunction()); |
| 4490 } | |
| 4491 } | 4489 } |
| 4492 | 4490 |
| 4493 | 4491 |
| 4494 v8::Handle<v8::Object> V8TestObj::createWrapper(PassRefPtr<TestObj> impl, v8::Ha
ndle<v8::Object> creationContext, v8::Isolate* isolate) | 4492 v8::Handle<v8::Object> V8TestObject::createWrapper(PassRefPtr<TestObj> impl, v8:
:Handle<v8::Object> creationContext, v8::Isolate* isolate) |
| 4495 { | 4493 { |
| 4496 ASSERT(impl.get()); | 4494 ASSERT(impl.get()); |
| 4497 ASSERT(DOMDataStore::getWrapper(impl.get(), isolate).IsEmpty()); | 4495 ASSERT(DOMDataStore::getWrapper(impl.get(), isolate).IsEmpty()); |
| 4498 | 4496 |
| 4499 #if ENABLE(BINDING_INTEGRITY) | 4497 #if ENABLE(BINDING_INTEGRITY) |
| 4500 checkTypeOrDieTrying(impl.get()); | 4498 checkTypeOrDieTrying(impl.get()); |
| 4501 #endif | 4499 #endif |
| 4502 | 4500 |
| 4503 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext
, &info, impl.get(), isolate); | 4501 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext
, &info, impl.get(), isolate); |
| 4504 if (UNLIKELY(wrapper.IsEmpty())) | 4502 if (UNLIKELY(wrapper.IsEmpty())) |
| 4505 return wrapper; | 4503 return wrapper; |
| 4506 | 4504 |
| 4507 installPerContextProperties(wrapper, impl.get(), isolate); | 4505 installPerContextProperties(wrapper, impl.get(), isolate); |
| 4508 V8DOMWrapper::associateObjectWithWrapper(impl, &info, wrapper, isolate, hasD
ependentLifetime ? WrapperConfiguration::Dependent : WrapperConfiguration::Indep
endent); | 4506 V8DOMWrapper::associateObjectWithWrapper(impl, &info, wrapper, isolate, hasD
ependentLifetime ? WrapperConfiguration::Dependent : WrapperConfiguration::Indep
endent); |
| 4509 return wrapper; | 4507 return wrapper; |
| 4510 } | 4508 } |
| 4511 void V8TestObj::derefObject(void* object) | 4509 void V8TestObject::derefObject(void* object) |
| 4512 { | 4510 { |
| 4513 static_cast<TestObj*>(object)->deref(); | 4511 static_cast<TestObj*>(object)->deref(); |
| 4514 } | 4512 } |
| 4515 | 4513 |
| 4516 } // namespace WebCore | 4514 } // namespace WebCore |
| OLD | NEW |