| 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, |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 WrapperTypeInfo V8TestObject::info = { V8TestObject::GetTemplate, V8TestObject::
derefObject, 0, V8TestObject::toEventTarget, 0, V8TestObject::installPerContextP
rototypeProperties, &V8EventTarget::info, WrapperTypeObjectPrototype }; | 92 WrapperTypeInfo V8TestObject::info = { V8TestObject::GetTemplate, V8TestObject::
derefObject, 0, V8TestObject::toEventTarget, 0, V8TestObject::installPerContextP
rototypeProperties, &V8EventTarget::info, WrapperTypeObjectPrototype }; |
| 93 | 93 |
| 94 namespace TestObjV8Internal { | 94 namespace TestObjV8Internal { |
| 95 | 95 |
| 96 template <typename T> void V8_USE(T) { } | 96 template <typename T> void V8_USE(T) { } |
| 97 | 97 |
| 98 static void readOnlyLongAttrAttributeGetter(v8::Local<v8::String> name, const v8
::PropertyCallbackInfo<v8::Value>& info) | 98 static void readOnlyLongAttrAttributeGetter(v8::Local<v8::String> name, const v8
::PropertyCallbackInfo<v8::Value>& info) |
| 99 { | 99 { |
| 100 TestObj* imp = V8TestObject::toNative(info.Holder()); | 100 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 101 v8SetReturnValueInt(info, imp->readOnlyLongAttr()); | 101 v8SetReturnValueInt(info, imp->readOnlyLongAttr()); |
| 102 return; | |
| 103 } | 102 } |
| 104 | 103 |
| 105 static void readOnlyLongAttrAttributeGetterCallback(v8::Local<v8::String> name,
const v8::PropertyCallbackInfo<v8::Value>& info) | 104 static void readOnlyLongAttrAttributeGetterCallback(v8::Local<v8::String> name,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 106 { | 105 { |
| 107 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 106 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 108 TestObjV8Internal::readOnlyLongAttrAttributeGetter(name, info); | 107 TestObjV8Internal::readOnlyLongAttrAttributeGetter(name, info); |
| 109 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 108 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 110 } | 109 } |
| 111 | 110 |
| 112 static void readOnlyStringAttrAttributeGetter(v8::Local<v8::String> name, const
v8::PropertyCallbackInfo<v8::Value>& info) | 111 static void readOnlyStringAttrAttributeGetter(v8::Local<v8::String> name, const
v8::PropertyCallbackInfo<v8::Value>& info) |
| 113 { | 112 { |
| 114 TestObj* imp = V8TestObject::toNative(info.Holder()); | 113 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 115 v8SetReturnValueString(info, imp->readOnlyStringAttr(), info.GetIsolate()); | 114 v8SetReturnValueString(info, imp->readOnlyStringAttr(), info.GetIsolate()); |
| 116 return; | |
| 117 } | 115 } |
| 118 | 116 |
| 119 static void readOnlyStringAttrAttributeGetterCallback(v8::Local<v8::String> name
, const v8::PropertyCallbackInfo<v8::Value>& info) | 117 static void readOnlyStringAttrAttributeGetterCallback(v8::Local<v8::String> name
, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 120 { | 118 { |
| 121 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 119 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 122 TestObjV8Internal::readOnlyStringAttrAttributeGetter(name, info); | 120 TestObjV8Internal::readOnlyStringAttrAttributeGetter(name, info); |
| 123 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 121 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 124 } | 122 } |
| 125 | 123 |
| 126 static void readOnlyTestObjectAttrAttributeGetter(v8::Local<v8::String> name, co
nst v8::PropertyCallbackInfo<v8::Value>& info) | 124 static void readOnlyTestObjectAttrAttributeGetter(v8::Local<v8::String> name, co
nst v8::PropertyCallbackInfo<v8::Value>& info) |
| 127 { | 125 { |
| 128 TestObj* imp = V8TestObject::toNative(info.Holder()); | 126 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 129 RefPtr<TestObj> result = imp->readOnlyTestObjectAttr(); | 127 RefPtr<TestObj> result = imp->readOnlyTestObjectAttr(); |
| 130 if (result.get() && DOMDataStore::setReturnValueFromWrapper<V8TestObject>(in
fo.GetReturnValue(), result.get())) | 128 if (result.get() && DOMDataStore::setReturnValueFromWrapper<V8TestObject>(in
fo.GetReturnValue(), result.get())) |
| 131 return; | 129 return; |
| 132 v8::Handle<v8::Value> wrapper = toV8(result.get(), info.Holder(), info.GetIs
olate()); | 130 v8::Handle<v8::Value> wrapper = toV8(result.get(), info.Holder(), info.GetIs
olate()); |
| 133 if (!wrapper.IsEmpty()) { | 131 if (!wrapper.IsEmpty()) { |
| 134 V8HiddenPropertyName::setNamedHiddenReference(info.Holder(), "readOnlyTe
stObjectAttr", wrapper); | 132 V8HiddenPropertyName::setNamedHiddenReference(info.Holder(), "readOnlyTe
stObjectAttr", wrapper); |
| 135 v8SetReturnValue(info, wrapper); | 133 v8SetReturnValue(info, wrapper); |
| 136 } | 134 } |
| 137 return; | |
| 138 } | 135 } |
| 139 | 136 |
| 140 static void readOnlyTestObjectAttrAttributeGetterCallback(v8::Local<v8::String>
name, const v8::PropertyCallbackInfo<v8::Value>& info) | 137 static void readOnlyTestObjectAttrAttributeGetterCallback(v8::Local<v8::String>
name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 141 { | 138 { |
| 142 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 139 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 143 TestObjV8Internal::readOnlyTestObjectAttrAttributeGetter(name, info); | 140 TestObjV8Internal::readOnlyTestObjectAttrAttributeGetter(name, info); |
| 144 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 141 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 145 } | 142 } |
| 146 | 143 |
| 147 static void staticReadOnlyLongAttrAttributeGetter(v8::Local<v8::String> name, co
nst v8::PropertyCallbackInfo<v8::Value>& info) | 144 static void staticReadOnlyLongAttrAttributeGetter(v8::Local<v8::String> name, co
nst v8::PropertyCallbackInfo<v8::Value>& info) |
| 148 { | 145 { |
| 149 v8SetReturnValueInt(info, TestObj::staticReadOnlyLongAttr()); | 146 v8SetReturnValueInt(info, TestObj::staticReadOnlyLongAttr()); |
| 150 return; | |
| 151 } | 147 } |
| 152 | 148 |
| 153 static void staticReadOnlyLongAttrAttributeGetterCallback(v8::Local<v8::String>
name, const v8::PropertyCallbackInfo<v8::Value>& info) | 149 static void staticReadOnlyLongAttrAttributeGetterCallback(v8::Local<v8::String>
name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 154 { | 150 { |
| 155 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 151 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 156 TestObjV8Internal::staticReadOnlyLongAttrAttributeGetter(name, info); | 152 TestObjV8Internal::staticReadOnlyLongAttrAttributeGetter(name, info); |
| 157 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 153 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 158 } | 154 } |
| 159 | 155 |
| 160 static void staticStringAttrAttributeGetter(v8::Local<v8::String> name, const v8
::PropertyCallbackInfo<v8::Value>& info) | 156 static void staticStringAttrAttributeGetter(v8::Local<v8::String> name, const v8
::PropertyCallbackInfo<v8::Value>& info) |
| 161 { | 157 { |
| 162 v8SetReturnValueString(info, TestObj::staticStringAttr(), info.GetIsolate())
; | 158 v8SetReturnValueString(info, TestObj::staticStringAttr(), info.GetIsolate())
; |
| 163 return; | |
| 164 } | 159 } |
| 165 | 160 |
| 166 static void staticStringAttrAttributeGetterCallback(v8::Local<v8::String> name,
const v8::PropertyCallbackInfo<v8::Value>& info) | 161 static void staticStringAttrAttributeGetterCallback(v8::Local<v8::String> name,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 167 { | 162 { |
| 168 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 163 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 169 TestObjV8Internal::staticStringAttrAttributeGetter(name, info); | 164 TestObjV8Internal::staticStringAttrAttributeGetter(name, info); |
| 170 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 165 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 171 } | 166 } |
| 172 | 167 |
| 173 static void staticStringAttrAttributeSetter(v8::Local<v8::String> name, v8::Loca
l<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 168 static void staticStringAttrAttributeSetter(v8::Local<v8::String> name, v8::Loca
l<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 174 { | 169 { |
| 175 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, v, value); | 170 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, v, value); |
| 176 TestObj::setStaticStringAttr(v); | 171 TestObj::setStaticStringAttr(v); |
| 177 return; | |
| 178 } | 172 } |
| 179 | 173 |
| 180 static void staticStringAttrAttributeSetterCallback(v8::Local<v8::String> name,
v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 174 static void staticStringAttrAttributeSetterCallback(v8::Local<v8::String> name,
v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 181 { | 175 { |
| 182 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 176 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 183 TestObjV8Internal::staticStringAttrAttributeSetter(name, value, info); | 177 TestObjV8Internal::staticStringAttrAttributeSetter(name, value, info); |
| 184 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 178 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 185 } | 179 } |
| 186 | 180 |
| 187 static void enumAttrAttributeGetter(v8::Local<v8::String> name, const v8::Proper
tyCallbackInfo<v8::Value>& info) | 181 static void enumAttrAttributeGetter(v8::Local<v8::String> name, const v8::Proper
tyCallbackInfo<v8::Value>& info) |
| 188 { | 182 { |
| 189 TestObj* imp = V8TestObject::toNative(info.Holder()); | 183 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 190 v8SetReturnValueString(info, imp->enumAttr(), info.GetIsolate()); | 184 v8SetReturnValueString(info, imp->enumAttr(), info.GetIsolate()); |
| 191 return; | |
| 192 } | 185 } |
| 193 | 186 |
| 194 static void enumAttrAttributeGetterCallback(v8::Local<v8::String> name, const v8
::PropertyCallbackInfo<v8::Value>& info) | 187 static void enumAttrAttributeGetterCallback(v8::Local<v8::String> name, const v8
::PropertyCallbackInfo<v8::Value>& info) |
| 195 { | 188 { |
| 196 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 189 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 197 TestObjV8Internal::enumAttrAttributeGetter(name, info); | 190 TestObjV8Internal::enumAttrAttributeGetter(name, info); |
| 198 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 191 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 199 } | 192 } |
| 200 | 193 |
| 201 static void enumAttrAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Va
lue> value, const v8::PropertyCallbackInfo<void>& info) | 194 static void enumAttrAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Va
lue> value, const v8::PropertyCallbackInfo<void>& info) |
| 202 { | 195 { |
| 203 TestObj* imp = V8TestObject::toNative(info.Holder()); | 196 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 204 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, v, value); | 197 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, v, value); |
| 205 String string = v; | 198 String string = v; |
| 206 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" || st
ring == "EnumValue3")) | 199 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" || st
ring == "EnumValue3")) |
| 207 return; | 200 return; |
| 208 imp->setEnumAttr(v); | 201 imp->setEnumAttr(v); |
| 209 return; | |
| 210 } | 202 } |
| 211 | 203 |
| 212 static void enumAttrAttributeSetterCallback(v8::Local<v8::String> name, v8::Loca
l<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 204 static void enumAttrAttributeSetterCallback(v8::Local<v8::String> name, v8::Loca
l<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 213 { | 205 { |
| 214 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 206 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 215 TestObjV8Internal::enumAttrAttributeSetter(name, value, info); | 207 TestObjV8Internal::enumAttrAttributeSetter(name, value, info); |
| 216 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 208 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 217 } | 209 } |
| 218 | 210 |
| 219 static void readOnlyEnumAttrAttributeGetter(v8::Local<v8::String> name, const v8
::PropertyCallbackInfo<v8::Value>& info) | 211 static void readOnlyEnumAttrAttributeGetter(v8::Local<v8::String> name, const v8
::PropertyCallbackInfo<v8::Value>& info) |
| 220 { | 212 { |
| 221 TestObj* imp = V8TestObject::toNative(info.Holder()); | 213 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 222 v8SetReturnValueString(info, imp->readOnlyEnumAttr(), info.GetIsolate()); | 214 v8SetReturnValueString(info, imp->readOnlyEnumAttr(), info.GetIsolate()); |
| 223 return; | |
| 224 } | 215 } |
| 225 | 216 |
| 226 static void readOnlyEnumAttrAttributeGetterCallback(v8::Local<v8::String> name,
const v8::PropertyCallbackInfo<v8::Value>& info) | 217 static void readOnlyEnumAttrAttributeGetterCallback(v8::Local<v8::String> name,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 227 { | 218 { |
| 228 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 219 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 229 TestObjV8Internal::readOnlyEnumAttrAttributeGetter(name, info); | 220 TestObjV8Internal::readOnlyEnumAttrAttributeGetter(name, info); |
| 230 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 221 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 231 } | 222 } |
| 232 | 223 |
| 233 static void byteAttrAttributeGetter(v8::Local<v8::String> name, const v8::Proper
tyCallbackInfo<v8::Value>& info) | 224 static void byteAttrAttributeGetter(v8::Local<v8::String> name, const v8::Proper
tyCallbackInfo<v8::Value>& info) |
| 234 { | 225 { |
| 235 TestObj* imp = V8TestObject::toNative(info.Holder()); | 226 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 236 v8SetReturnValueInt(info, imp->byteAttr()); | 227 v8SetReturnValueInt(info, imp->byteAttr()); |
| 237 return; | |
| 238 } | 228 } |
| 239 | 229 |
| 240 static void byteAttrAttributeGetterCallback(v8::Local<v8::String> name, const v8
::PropertyCallbackInfo<v8::Value>& info) | 230 static void byteAttrAttributeGetterCallback(v8::Local<v8::String> name, const v8
::PropertyCallbackInfo<v8::Value>& info) |
| 241 { | 231 { |
| 242 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 232 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 243 TestObjV8Internal::byteAttrAttributeGetter(name, info); | 233 TestObjV8Internal::byteAttrAttributeGetter(name, info); |
| 244 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 234 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 245 } | 235 } |
| 246 | 236 |
| 247 static void byteAttrAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Va
lue> value, const v8::PropertyCallbackInfo<void>& info) | 237 static void byteAttrAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Va
lue> value, const v8::PropertyCallbackInfo<void>& info) |
| 248 { | 238 { |
| 249 TestObj* imp = V8TestObject::toNative(info.Holder()); | 239 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 250 V8TRYCATCH_VOID(int, v, toInt8(value)); | 240 V8TRYCATCH_VOID(int, v, toInt8(value)); |
| 251 imp->setByteAttr(v); | 241 imp->setByteAttr(v); |
| 252 return; | |
| 253 } | 242 } |
| 254 | 243 |
| 255 static void byteAttrAttributeSetterCallback(v8::Local<v8::String> name, v8::Loca
l<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 244 static void byteAttrAttributeSetterCallback(v8::Local<v8::String> name, v8::Loca
l<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 256 { | 245 { |
| 257 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 246 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 258 TestObjV8Internal::byteAttrAttributeSetter(name, value, info); | 247 TestObjV8Internal::byteAttrAttributeSetter(name, value, info); |
| 259 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 248 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 260 } | 249 } |
| 261 | 250 |
| 262 static void octetAttrAttributeGetter(v8::Local<v8::String> name, const v8::Prope
rtyCallbackInfo<v8::Value>& info) | 251 static void octetAttrAttributeGetter(v8::Local<v8::String> name, const v8::Prope
rtyCallbackInfo<v8::Value>& info) |
| 263 { | 252 { |
| 264 TestObj* imp = V8TestObject::toNative(info.Holder()); | 253 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 265 v8SetReturnValueUnsigned(info, imp->octetAttr()); | 254 v8SetReturnValueUnsigned(info, imp->octetAttr()); |
| 266 return; | |
| 267 } | 255 } |
| 268 | 256 |
| 269 static void octetAttrAttributeGetterCallback(v8::Local<v8::String> name, const v
8::PropertyCallbackInfo<v8::Value>& info) | 257 static void octetAttrAttributeGetterCallback(v8::Local<v8::String> name, const v
8::PropertyCallbackInfo<v8::Value>& info) |
| 270 { | 258 { |
| 271 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 259 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 272 TestObjV8Internal::octetAttrAttributeGetter(name, info); | 260 TestObjV8Internal::octetAttrAttributeGetter(name, info); |
| 273 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 261 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 274 } | 262 } |
| 275 | 263 |
| 276 static void octetAttrAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::V
alue> value, const v8::PropertyCallbackInfo<void>& info) | 264 static void octetAttrAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::V
alue> value, const v8::PropertyCallbackInfo<void>& info) |
| 277 { | 265 { |
| 278 TestObj* imp = V8TestObject::toNative(info.Holder()); | 266 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 279 V8TRYCATCH_VOID(unsigned, v, toUInt8(value)); | 267 V8TRYCATCH_VOID(unsigned, v, toUInt8(value)); |
| 280 imp->setOctetAttr(v); | 268 imp->setOctetAttr(v); |
| 281 return; | |
| 282 } | 269 } |
| 283 | 270 |
| 284 static void octetAttrAttributeSetterCallback(v8::Local<v8::String> name, v8::Loc
al<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 271 static void octetAttrAttributeSetterCallback(v8::Local<v8::String> name, v8::Loc
al<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 285 { | 272 { |
| 286 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 273 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 287 TestObjV8Internal::octetAttrAttributeSetter(name, value, info); | 274 TestObjV8Internal::octetAttrAttributeSetter(name, value, info); |
| 288 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 275 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 289 } | 276 } |
| 290 | 277 |
| 291 static void shortAttrAttributeGetter(v8::Local<v8::String> name, const v8::Prope
rtyCallbackInfo<v8::Value>& info) | 278 static void shortAttrAttributeGetter(v8::Local<v8::String> name, const v8::Prope
rtyCallbackInfo<v8::Value>& info) |
| 292 { | 279 { |
| 293 TestObj* imp = V8TestObject::toNative(info.Holder()); | 280 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 294 v8SetReturnValueInt(info, imp->shortAttr()); | 281 v8SetReturnValueInt(info, imp->shortAttr()); |
| 295 return; | |
| 296 } | 282 } |
| 297 | 283 |
| 298 static void shortAttrAttributeGetterCallback(v8::Local<v8::String> name, const v
8::PropertyCallbackInfo<v8::Value>& info) | 284 static void shortAttrAttributeGetterCallback(v8::Local<v8::String> name, const v
8::PropertyCallbackInfo<v8::Value>& info) |
| 299 { | 285 { |
| 300 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 286 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 301 TestObjV8Internal::shortAttrAttributeGetter(name, info); | 287 TestObjV8Internal::shortAttrAttributeGetter(name, info); |
| 302 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 288 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 303 } | 289 } |
| 304 | 290 |
| 305 static void shortAttrAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::V
alue> value, const v8::PropertyCallbackInfo<void>& info) | 291 static void shortAttrAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::V
alue> value, const v8::PropertyCallbackInfo<void>& info) |
| 306 { | 292 { |
| 307 TestObj* imp = V8TestObject::toNative(info.Holder()); | 293 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 308 V8TRYCATCH_VOID(int, v, toInt32(value)); | 294 V8TRYCATCH_VOID(int, v, toInt32(value)); |
| 309 imp->setShortAttr(v); | 295 imp->setShortAttr(v); |
| 310 return; | |
| 311 } | 296 } |
| 312 | 297 |
| 313 static void shortAttrAttributeSetterCallback(v8::Local<v8::String> name, v8::Loc
al<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 298 static void shortAttrAttributeSetterCallback(v8::Local<v8::String> name, v8::Loc
al<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 314 { | 299 { |
| 315 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 300 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 316 TestObjV8Internal::shortAttrAttributeSetter(name, value, info); | 301 TestObjV8Internal::shortAttrAttributeSetter(name, value, info); |
| 317 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 302 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 318 } | 303 } |
| 319 | 304 |
| 320 static void unsignedShortAttrAttributeGetter(v8::Local<v8::String> name, const v
8::PropertyCallbackInfo<v8::Value>& info) | 305 static void unsignedShortAttrAttributeGetter(v8::Local<v8::String> name, const v
8::PropertyCallbackInfo<v8::Value>& info) |
| 321 { | 306 { |
| 322 TestObj* imp = V8TestObject::toNative(info.Holder()); | 307 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 323 v8SetReturnValueUnsigned(info, imp->unsignedShortAttr()); | 308 v8SetReturnValueUnsigned(info, imp->unsignedShortAttr()); |
| 324 return; | |
| 325 } | 309 } |
| 326 | 310 |
| 327 static void unsignedShortAttrAttributeGetterCallback(v8::Local<v8::String> name,
const v8::PropertyCallbackInfo<v8::Value>& info) | 311 static void unsignedShortAttrAttributeGetterCallback(v8::Local<v8::String> name,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 328 { | 312 { |
| 329 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 313 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 330 TestObjV8Internal::unsignedShortAttrAttributeGetter(name, info); | 314 TestObjV8Internal::unsignedShortAttrAttributeGetter(name, info); |
| 331 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 315 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 332 } | 316 } |
| 333 | 317 |
| 334 static void unsignedShortAttrAttributeSetter(v8::Local<v8::String> name, v8::Loc
al<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 318 static void unsignedShortAttrAttributeSetter(v8::Local<v8::String> name, v8::Loc
al<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 335 { | 319 { |
| 336 TestObj* imp = V8TestObject::toNative(info.Holder()); | 320 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 337 V8TRYCATCH_VOID(unsigned, v, toUInt32(value)); | 321 V8TRYCATCH_VOID(unsigned, v, toUInt32(value)); |
| 338 imp->setUnsignedShortAttr(v); | 322 imp->setUnsignedShortAttr(v); |
| 339 return; | |
| 340 } | 323 } |
| 341 | 324 |
| 342 static void unsignedShortAttrAttributeSetterCallback(v8::Local<v8::String> name,
v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 325 static void unsignedShortAttrAttributeSetterCallback(v8::Local<v8::String> name,
v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 343 { | 326 { |
| 344 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 327 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 345 TestObjV8Internal::unsignedShortAttrAttributeSetter(name, value, info); | 328 TestObjV8Internal::unsignedShortAttrAttributeSetter(name, value, info); |
| 346 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 329 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 347 } | 330 } |
| 348 | 331 |
| 349 static void longAttrAttributeGetter(v8::Local<v8::String> name, const v8::Proper
tyCallbackInfo<v8::Value>& info) | 332 static void longAttrAttributeGetter(v8::Local<v8::String> name, const v8::Proper
tyCallbackInfo<v8::Value>& info) |
| 350 { | 333 { |
| 351 TestObj* imp = V8TestObject::toNative(info.Holder()); | 334 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 352 v8SetReturnValueInt(info, imp->longAttr()); | 335 v8SetReturnValueInt(info, imp->longAttr()); |
| 353 return; | |
| 354 } | 336 } |
| 355 | 337 |
| 356 static void longAttrAttributeGetterCallback(v8::Local<v8::String> name, const v8
::PropertyCallbackInfo<v8::Value>& info) | 338 static void longAttrAttributeGetterCallback(v8::Local<v8::String> name, const v8
::PropertyCallbackInfo<v8::Value>& info) |
| 357 { | 339 { |
| 358 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 340 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 359 TestObjV8Internal::longAttrAttributeGetter(name, info); | 341 TestObjV8Internal::longAttrAttributeGetter(name, info); |
| 360 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 342 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 361 } | 343 } |
| 362 | 344 |
| 363 static void longAttrAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Va
lue> value, const v8::PropertyCallbackInfo<void>& info) | 345 static void longAttrAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Va
lue> value, const v8::PropertyCallbackInfo<void>& info) |
| 364 { | 346 { |
| 365 TestObj* imp = V8TestObject::toNative(info.Holder()); | 347 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 366 V8TRYCATCH_VOID(int, v, toInt32(value)); | 348 V8TRYCATCH_VOID(int, v, toInt32(value)); |
| 367 imp->setLongAttr(v); | 349 imp->setLongAttr(v); |
| 368 return; | |
| 369 } | 350 } |
| 370 | 351 |
| 371 static void longAttrAttributeSetterCallback(v8::Local<v8::String> name, v8::Loca
l<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 352 static void longAttrAttributeSetterCallback(v8::Local<v8::String> name, v8::Loca
l<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 372 { | 353 { |
| 373 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 354 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 374 TestObjV8Internal::longAttrAttributeSetter(name, value, info); | 355 TestObjV8Internal::longAttrAttributeSetter(name, value, info); |
| 375 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 356 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 376 } | 357 } |
| 377 | 358 |
| 378 static void longLongAttrAttributeGetter(v8::Local<v8::String> name, const v8::Pr
opertyCallbackInfo<v8::Value>& info) | 359 static void longLongAttrAttributeGetter(v8::Local<v8::String> name, const v8::Pr
opertyCallbackInfo<v8::Value>& info) |
| 379 { | 360 { |
| 380 TestObj* imp = V8TestObject::toNative(info.Holder()); | 361 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 381 v8SetReturnValue(info, static_cast<double>(imp->longLongAttr())); | 362 v8SetReturnValue(info, static_cast<double>(imp->longLongAttr())); |
| 382 return; | |
| 383 } | 363 } |
| 384 | 364 |
| 385 static void longLongAttrAttributeGetterCallback(v8::Local<v8::String> name, cons
t v8::PropertyCallbackInfo<v8::Value>& info) | 365 static void longLongAttrAttributeGetterCallback(v8::Local<v8::String> name, cons
t v8::PropertyCallbackInfo<v8::Value>& info) |
| 386 { | 366 { |
| 387 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 367 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 388 TestObjV8Internal::longLongAttrAttributeGetter(name, info); | 368 TestObjV8Internal::longLongAttrAttributeGetter(name, info); |
| 389 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 369 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 390 } | 370 } |
| 391 | 371 |
| 392 static void longLongAttrAttributeSetter(v8::Local<v8::String> name, v8::Local<v8
::Value> value, const v8::PropertyCallbackInfo<void>& info) | 372 static void longLongAttrAttributeSetter(v8::Local<v8::String> name, v8::Local<v8
::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 393 { | 373 { |
| 394 TestObj* imp = V8TestObject::toNative(info.Holder()); | 374 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 395 V8TRYCATCH_VOID(long long, v, toInt64(value)); | 375 V8TRYCATCH_VOID(long long, v, toInt64(value)); |
| 396 imp->setLongLongAttr(v); | 376 imp->setLongLongAttr(v); |
| 397 return; | |
| 398 } | 377 } |
| 399 | 378 |
| 400 static void longLongAttrAttributeSetterCallback(v8::Local<v8::String> name, v8::
Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 379 static void longLongAttrAttributeSetterCallback(v8::Local<v8::String> name, v8::
Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 401 { | 380 { |
| 402 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 381 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 403 TestObjV8Internal::longLongAttrAttributeSetter(name, value, info); | 382 TestObjV8Internal::longLongAttrAttributeSetter(name, value, info); |
| 404 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 383 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 405 } | 384 } |
| 406 | 385 |
| 407 static void unsignedLongLongAttrAttributeGetter(v8::Local<v8::String> name, cons
t v8::PropertyCallbackInfo<v8::Value>& info) | 386 static void unsignedLongLongAttrAttributeGetter(v8::Local<v8::String> name, cons
t v8::PropertyCallbackInfo<v8::Value>& info) |
| 408 { | 387 { |
| 409 TestObj* imp = V8TestObject::toNative(info.Holder()); | 388 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 410 v8SetReturnValue(info, static_cast<double>(imp->unsignedLongLongAttr())); | 389 v8SetReturnValue(info, static_cast<double>(imp->unsignedLongLongAttr())); |
| 411 return; | |
| 412 } | 390 } |
| 413 | 391 |
| 414 static void unsignedLongLongAttrAttributeGetterCallback(v8::Local<v8::String> na
me, const v8::PropertyCallbackInfo<v8::Value>& info) | 392 static void unsignedLongLongAttrAttributeGetterCallback(v8::Local<v8::String> na
me, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 415 { | 393 { |
| 416 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 394 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 417 TestObjV8Internal::unsignedLongLongAttrAttributeGetter(name, info); | 395 TestObjV8Internal::unsignedLongLongAttrAttributeGetter(name, info); |
| 418 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 396 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 419 } | 397 } |
| 420 | 398 |
| 421 static void unsignedLongLongAttrAttributeSetter(v8::Local<v8::String> name, v8::
Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 399 static void unsignedLongLongAttrAttributeSetter(v8::Local<v8::String> name, v8::
Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 422 { | 400 { |
| 423 TestObj* imp = V8TestObject::toNative(info.Holder()); | 401 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 424 V8TRYCATCH_VOID(unsigned long long, v, toUInt64(value)); | 402 V8TRYCATCH_VOID(unsigned long long, v, toUInt64(value)); |
| 425 imp->setUnsignedLongLongAttr(v); | 403 imp->setUnsignedLongLongAttr(v); |
| 426 return; | |
| 427 } | 404 } |
| 428 | 405 |
| 429 static void unsignedLongLongAttrAttributeSetterCallback(v8::Local<v8::String> na
me, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 406 static void unsignedLongLongAttrAttributeSetterCallback(v8::Local<v8::String> na
me, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 430 { | 407 { |
| 431 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 408 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 432 TestObjV8Internal::unsignedLongLongAttrAttributeSetter(name, value, info); | 409 TestObjV8Internal::unsignedLongLongAttrAttributeSetter(name, value, info); |
| 433 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 410 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 434 } | 411 } |
| 435 | 412 |
| 436 static void stringAttrAttributeGetter(v8::Local<v8::String> name, const v8::Prop
ertyCallbackInfo<v8::Value>& info) | 413 static void stringAttrAttributeGetter(v8::Local<v8::String> name, const v8::Prop
ertyCallbackInfo<v8::Value>& info) |
| 437 { | 414 { |
| 438 TestObj* imp = V8TestObject::toNative(info.Holder()); | 415 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 439 v8SetReturnValueString(info, imp->stringAttr(), info.GetIsolate()); | 416 v8SetReturnValueString(info, imp->stringAttr(), info.GetIsolate()); |
| 440 return; | |
| 441 } | 417 } |
| 442 | 418 |
| 443 static void stringAttrAttributeGetterCallback(v8::Local<v8::String> name, const
v8::PropertyCallbackInfo<v8::Value>& info) | 419 static void stringAttrAttributeGetterCallback(v8::Local<v8::String> name, const
v8::PropertyCallbackInfo<v8::Value>& info) |
| 444 { | 420 { |
| 445 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 421 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 446 TestObjV8Internal::stringAttrAttributeGetter(name, info); | 422 TestObjV8Internal::stringAttrAttributeGetter(name, info); |
| 447 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 423 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 448 } | 424 } |
| 449 | 425 |
| 450 static void stringAttrAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::
Value> value, const v8::PropertyCallbackInfo<void>& info) | 426 static void stringAttrAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::
Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 451 { | 427 { |
| 452 TestObj* imp = V8TestObject::toNative(info.Holder()); | 428 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 453 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, v, value); | 429 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, v, value); |
| 454 imp->setStringAttr(v); | 430 imp->setStringAttr(v); |
| 455 return; | |
| 456 } | 431 } |
| 457 | 432 |
| 458 static void stringAttrAttributeSetterCallback(v8::Local<v8::String> name, v8::Lo
cal<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 433 static void stringAttrAttributeSetterCallback(v8::Local<v8::String> name, v8::Lo
cal<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 459 { | 434 { |
| 460 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 435 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 461 TestObjV8Internal::stringAttrAttributeSetter(name, value, info); | 436 TestObjV8Internal::stringAttrAttributeSetter(name, value, info); |
| 462 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 437 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 463 } | 438 } |
| 464 | 439 |
| 465 static void eventHandlerAttrAttributeGetter(v8::Local<v8::String> name, const v8
::PropertyCallbackInfo<v8::Value>& info) | 440 static void eventHandlerAttrAttributeGetter(v8::Local<v8::String> name, const v8
::PropertyCallbackInfo<v8::Value>& info) |
| 466 { | 441 { |
| 467 TestObj* imp = V8TestObject::toNative(info.Holder()); | 442 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 468 EventListener* listener = imp->eventHandlerAttr(isolatedWorldForIsolate(info
.GetIsolate())); | 443 EventListener* listener = imp->eventHandlerAttr(isolatedWorldForIsolate(info
.GetIsolate())); |
| 469 v8SetReturnValue(info, listener ? v8::Handle<v8::Value>(V8AbstractEventListe
ner::cast(listener)->getListenerObject(imp->scriptExecutionContext())) : v8::Han
dle<v8::Value>(v8::Null(info.GetIsolate()))); | 444 v8SetReturnValue(info, listener ? v8::Handle<v8::Value>(V8AbstractEventListe
ner::cast(listener)->getListenerObject(imp->scriptExecutionContext())) : v8::Han
dle<v8::Value>(v8::Null(info.GetIsolate()))); |
| 470 return; | |
| 471 } | 445 } |
| 472 | 446 |
| 473 static void eventHandlerAttrAttributeGetterCallback(v8::Local<v8::String> name,
const v8::PropertyCallbackInfo<v8::Value>& info) | 447 static void eventHandlerAttrAttributeGetterCallback(v8::Local<v8::String> name,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 474 { | 448 { |
| 475 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 449 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 476 TestObjV8Internal::eventHandlerAttrAttributeGetter(name, info); | 450 TestObjV8Internal::eventHandlerAttrAttributeGetter(name, info); |
| 477 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 451 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 478 } | 452 } |
| 479 | 453 |
| 480 static void eventHandlerAttrAttributeSetter(v8::Local<v8::String> name, v8::Loca
l<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 454 static void eventHandlerAttrAttributeSetter(v8::Local<v8::String> name, v8::Loca
l<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 481 { | 455 { |
| 482 TestObj* imp = V8TestObject::toNative(info.Holder()); | 456 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 483 if (!value->IsNull() && !value->IsFunction()) | 457 if (!value->IsNull() && !value->IsFunction()) |
| 484 value = v8::Null(info.GetIsolate()); | 458 value = v8::Null(info.GetIsolate()); |
| 485 transferHiddenDependency(info.Holder(), imp->eventHandlerAttr(isolatedWorldF
orIsolate(info.GetIsolate())), value, V8TestObject::eventListenerCacheIndex, inf
o.GetIsolate()); | 459 transferHiddenDependency(info.Holder(), imp->eventHandlerAttr(isolatedWorldF
orIsolate(info.GetIsolate())), value, V8TestObject::eventListenerCacheIndex, inf
o.GetIsolate()); |
| 486 imp->setEventHandlerAttr(V8EventListenerList::getEventListener(value, true,
ListenerFindOrCreate), isolatedWorldForIsolate(info.GetIsolate())); | 460 imp->setEventHandlerAttr(V8EventListenerList::getEventListener(value, true,
ListenerFindOrCreate), isolatedWorldForIsolate(info.GetIsolate())); |
| 487 return; | |
| 488 } | 461 } |
| 489 | 462 |
| 490 static void eventHandlerAttrAttributeSetterCallback(v8::Local<v8::String> name,
v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 463 static void eventHandlerAttrAttributeSetterCallback(v8::Local<v8::String> name,
v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 491 { | 464 { |
| 492 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 465 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 493 TestObjV8Internal::eventHandlerAttrAttributeSetter(name, value, info); | 466 TestObjV8Internal::eventHandlerAttrAttributeSetter(name, value, info); |
| 494 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 467 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 495 } | 468 } |
| 496 | 469 |
| 497 static void testObjAttrAttributeGetter(v8::Local<v8::String> name, const v8::Pro
pertyCallbackInfo<v8::Value>& info) | 470 static void testObjAttrAttributeGetter(v8::Local<v8::String> name, const v8::Pro
pertyCallbackInfo<v8::Value>& info) |
| 498 { | 471 { |
| 499 TestObj* imp = V8TestObject::toNative(info.Holder()); | 472 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 500 v8SetReturnValueFast(info, imp->testObjAttr(), imp); | 473 v8SetReturnValueFast(info, imp->testObjAttr(), imp); |
| 501 return; | |
| 502 } | 474 } |
| 503 | 475 |
| 504 static void testObjAttrAttributeGetterCallback(v8::Local<v8::String> name, const
v8::PropertyCallbackInfo<v8::Value>& info) | 476 static void testObjAttrAttributeGetterCallback(v8::Local<v8::String> name, const
v8::PropertyCallbackInfo<v8::Value>& info) |
| 505 { | 477 { |
| 506 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 478 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 507 UseCounter::count(activeDOMWindow(), UseCounter::TestFeature); | 479 UseCounter::count(activeDOMWindow(), UseCounter::TestFeature); |
| 508 TestObjV8Internal::testObjAttrAttributeGetter(name, info); | 480 TestObjV8Internal::testObjAttrAttributeGetter(name, info); |
| 509 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 481 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 510 } | 482 } |
| 511 | 483 |
| 512 static void testObjAttrAttributeSetter(v8::Local<v8::String> name, v8::Local<v8:
:Value> value, const v8::PropertyCallbackInfo<void>& info) | 484 static void testObjAttrAttributeSetter(v8::Local<v8::String> name, v8::Local<v8:
:Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 513 { | 485 { |
| 514 TestObj* imp = V8TestObject::toNative(info.Holder()); | 486 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 515 V8TRYCATCH_VOID(TestObj*, v, V8TestObject::HasInstance(value, info.GetIsolat
e(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Objec
t>::Cast(value)) : 0); | 487 V8TRYCATCH_VOID(TestObj*, v, V8TestObject::HasInstance(value, info.GetIsolat
e(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Objec
t>::Cast(value)) : 0); |
| 516 imp->setTestObjAttr(WTF::getPtr(v)); | 488 imp->setTestObjAttr(WTF::getPtr(v)); |
| 517 return; | |
| 518 } | 489 } |
| 519 | 490 |
| 520 static void testObjAttrAttributeSetterCallback(v8::Local<v8::String> name, v8::L
ocal<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 491 static void testObjAttrAttributeSetterCallback(v8::Local<v8::String> name, v8::L
ocal<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 521 { | 492 { |
| 522 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 493 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 523 UseCounter::count(activeDOMWindow(), UseCounter::TestFeature); | 494 UseCounter::count(activeDOMWindow(), UseCounter::TestFeature); |
| 524 TestObjV8Internal::testObjAttrAttributeSetter(name, value, info); | 495 TestObjV8Internal::testObjAttrAttributeSetter(name, value, info); |
| 525 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 496 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 526 } | 497 } |
| 527 | 498 |
| 528 static void XMLObjAttrAttributeGetter(v8::Local<v8::String> name, const v8::Prop
ertyCallbackInfo<v8::Value>& info) | 499 static void XMLObjAttrAttributeGetter(v8::Local<v8::String> name, const v8::Prop
ertyCallbackInfo<v8::Value>& info) |
| 529 { | 500 { |
| 530 TestObj* imp = V8TestObject::toNative(info.Holder()); | 501 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 531 v8SetReturnValueFast(info, imp->xmlObjAttr(), imp); | 502 v8SetReturnValueFast(info, imp->xmlObjAttr(), imp); |
| 532 return; | |
| 533 } | 503 } |
| 534 | 504 |
| 535 static void XMLObjAttrAttributeGetterCallback(v8::Local<v8::String> name, const
v8::PropertyCallbackInfo<v8::Value>& info) | 505 static void XMLObjAttrAttributeGetterCallback(v8::Local<v8::String> name, const
v8::PropertyCallbackInfo<v8::Value>& info) |
| 536 { | 506 { |
| 537 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 507 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 538 TestObjV8Internal::XMLObjAttrAttributeGetter(name, info); | 508 TestObjV8Internal::XMLObjAttrAttributeGetter(name, info); |
| 539 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 509 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 540 } | 510 } |
| 541 | 511 |
| 542 static void XMLObjAttrAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::
Value> value, const v8::PropertyCallbackInfo<void>& info) | 512 static void XMLObjAttrAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::
Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 543 { | 513 { |
| 544 TestObj* imp = V8TestObject::toNative(info.Holder()); | 514 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 545 V8TRYCATCH_VOID(TestObj*, v, V8TestObject::HasInstance(value, info.GetIsolat
e(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Objec
t>::Cast(value)) : 0); | 515 V8TRYCATCH_VOID(TestObj*, v, V8TestObject::HasInstance(value, info.GetIsolat
e(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Objec
t>::Cast(value)) : 0); |
| 546 imp->setXMLObjAttr(WTF::getPtr(v)); | 516 imp->setXMLObjAttr(WTF::getPtr(v)); |
| 547 return; | |
| 548 } | 517 } |
| 549 | 518 |
| 550 static void XMLObjAttrAttributeSetterCallback(v8::Local<v8::String> name, v8::Lo
cal<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 519 static void XMLObjAttrAttributeSetterCallback(v8::Local<v8::String> name, v8::Lo
cal<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 551 { | 520 { |
| 552 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 521 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 553 TestObjV8Internal::XMLObjAttrAttributeSetter(name, value, info); | 522 TestObjV8Internal::XMLObjAttrAttributeSetter(name, value, info); |
| 554 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 523 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 555 } | 524 } |
| 556 | 525 |
| 557 static void createAttributeGetter(v8::Local<v8::String> name, const v8::Property
CallbackInfo<v8::Value>& info) | 526 static void createAttributeGetter(v8::Local<v8::String> name, const v8::Property
CallbackInfo<v8::Value>& info) |
| 558 { | 527 { |
| 559 TestObj* imp = V8TestObject::toNative(info.Holder()); | 528 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 560 v8SetReturnValueBool(info, imp->isCreate()); | 529 v8SetReturnValueBool(info, imp->isCreate()); |
| 561 return; | |
| 562 } | 530 } |
| 563 | 531 |
| 564 static void createAttributeGetterCallback(v8::Local<v8::String> name, const v8::
PropertyCallbackInfo<v8::Value>& info) | 532 static void createAttributeGetterCallback(v8::Local<v8::String> name, const v8::
PropertyCallbackInfo<v8::Value>& info) |
| 565 { | 533 { |
| 566 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 534 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 567 TestObjV8Internal::createAttributeGetter(name, info); | 535 TestObjV8Internal::createAttributeGetter(name, info); |
| 568 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 536 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 569 } | 537 } |
| 570 | 538 |
| 571 static void createAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Valu
e> value, const v8::PropertyCallbackInfo<void>& info) | 539 static void createAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Valu
e> value, const v8::PropertyCallbackInfo<void>& info) |
| 572 { | 540 { |
| 573 TestObj* imp = V8TestObject::toNative(info.Holder()); | 541 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 574 V8TRYCATCH_VOID(bool, v, value->BooleanValue()); | 542 V8TRYCATCH_VOID(bool, v, value->BooleanValue()); |
| 575 imp->setCreate(v); | 543 imp->setCreate(v); |
| 576 return; | |
| 577 } | 544 } |
| 578 | 545 |
| 579 static void createAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<
v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 546 static void createAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<
v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 580 { | 547 { |
| 581 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 548 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 582 TestObjV8Internal::createAttributeSetter(name, value, info); | 549 TestObjV8Internal::createAttributeSetter(name, value, info); |
| 583 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 550 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 584 } | 551 } |
| 585 | 552 |
| 586 static void reflectedStringAttrAttributeGetter(v8::Local<v8::String> name, const
v8::PropertyCallbackInfo<v8::Value>& info) | 553 static void reflectedStringAttrAttributeGetter(v8::Local<v8::String> name, const
v8::PropertyCallbackInfo<v8::Value>& info) |
| 587 { | 554 { |
| 588 TestObj* imp = V8TestObject::toNative(info.Holder()); | 555 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 589 v8SetReturnValueString(info, imp->fastGetAttribute(WebCore::HTMLNames::refle
ctedstringattrAttr), info.GetIsolate()); | 556 v8SetReturnValueString(info, imp->fastGetAttribute(WebCore::HTMLNames::refle
ctedstringattrAttr), info.GetIsolate()); |
| 590 return; | |
| 591 } | 557 } |
| 592 | 558 |
| 593 static void reflectedStringAttrAttributeGetterCallback(v8::Local<v8::String> nam
e, const v8::PropertyCallbackInfo<v8::Value>& info) | 559 static void reflectedStringAttrAttributeGetterCallback(v8::Local<v8::String> nam
e, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 594 { | 560 { |
| 595 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 561 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 596 TestObjV8Internal::reflectedStringAttrAttributeGetter(name, info); | 562 TestObjV8Internal::reflectedStringAttrAttributeGetter(name, info); |
| 597 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 563 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 598 } | 564 } |
| 599 | 565 |
| 600 static void reflectedStringAttrAttributeSetter(v8::Local<v8::String> name, v8::L
ocal<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 566 static void reflectedStringAttrAttributeSetter(v8::Local<v8::String> name, v8::L
ocal<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 601 { | 567 { |
| 602 TestObj* imp = V8TestObject::toNative(info.Holder()); | 568 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 603 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, v, val
ue); | 569 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, v, val
ue); |
| 604 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 570 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
| 605 imp->setAttribute(WebCore::HTMLNames::reflectedstringattrAttr, v); | 571 imp->setAttribute(WebCore::HTMLNames::reflectedstringattrAttr, v); |
| 606 return; | |
| 607 } | 572 } |
| 608 | 573 |
| 609 static void reflectedStringAttrAttributeSetterCallback(v8::Local<v8::String> nam
e, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 574 static void reflectedStringAttrAttributeSetterCallback(v8::Local<v8::String> nam
e, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 610 { | 575 { |
| 611 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 576 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 612 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 577 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
| 613 TestObjV8Internal::reflectedStringAttrAttributeSetter(name, value, info); | 578 TestObjV8Internal::reflectedStringAttrAttributeSetter(name, value, info); |
| 614 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 579 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 615 } | 580 } |
| 616 | 581 |
| 617 static void reflectedIntegralAttrAttributeGetter(v8::Local<v8::String> name, con
st v8::PropertyCallbackInfo<v8::Value>& info) | 582 static void reflectedIntegralAttrAttributeGetter(v8::Local<v8::String> name, con
st v8::PropertyCallbackInfo<v8::Value>& info) |
| 618 { | 583 { |
| 619 TestObj* imp = V8TestObject::toNative(info.Holder()); | 584 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 620 v8SetReturnValueInt(info, imp->getIntegralAttribute(WebCore::HTMLNames::refl
ectedintegralattrAttr)); | 585 v8SetReturnValueInt(info, imp->getIntegralAttribute(WebCore::HTMLNames::refl
ectedintegralattrAttr)); |
| 621 return; | |
| 622 } | 586 } |
| 623 | 587 |
| 624 static void reflectedIntegralAttrAttributeGetterCallback(v8::Local<v8::String> n
ame, const v8::PropertyCallbackInfo<v8::Value>& info) | 588 static void reflectedIntegralAttrAttributeGetterCallback(v8::Local<v8::String> n
ame, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 625 { | 589 { |
| 626 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 590 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 627 TestObjV8Internal::reflectedIntegralAttrAttributeGetter(name, info); | 591 TestObjV8Internal::reflectedIntegralAttrAttributeGetter(name, info); |
| 628 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 592 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 629 } | 593 } |
| 630 | 594 |
| 631 static void reflectedIntegralAttrAttributeSetter(v8::Local<v8::String> name, v8:
:Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 595 static void reflectedIntegralAttrAttributeSetter(v8::Local<v8::String> name, v8:
:Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 632 { | 596 { |
| 633 TestObj* imp = V8TestObject::toNative(info.Holder()); | 597 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 634 V8TRYCATCH_VOID(int, v, toInt32(value)); | 598 V8TRYCATCH_VOID(int, v, toInt32(value)); |
| 635 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 599 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
| 636 imp->setIntegralAttribute(WebCore::HTMLNames::reflectedintegralattrAttr, v); | 600 imp->setIntegralAttribute(WebCore::HTMLNames::reflectedintegralattrAttr, v); |
| 637 return; | |
| 638 } | 601 } |
| 639 | 602 |
| 640 static void reflectedIntegralAttrAttributeSetterCallback(v8::Local<v8::String> n
ame, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 603 static void reflectedIntegralAttrAttributeSetterCallback(v8::Local<v8::String> n
ame, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 641 { | 604 { |
| 642 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 605 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 643 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 606 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
| 644 TestObjV8Internal::reflectedIntegralAttrAttributeSetter(name, value, info); | 607 TestObjV8Internal::reflectedIntegralAttrAttributeSetter(name, value, info); |
| 645 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 608 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 646 } | 609 } |
| 647 | 610 |
| 648 static void reflectedUnsignedIntegralAttrAttributeGetter(v8::Local<v8::String> n
ame, const v8::PropertyCallbackInfo<v8::Value>& info) | 611 static void reflectedUnsignedIntegralAttrAttributeGetter(v8::Local<v8::String> n
ame, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 649 { | 612 { |
| 650 TestObj* imp = V8TestObject::toNative(info.Holder()); | 613 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 651 v8SetReturnValueUnsigned(info, std::max(0, imp->getIntegralAttribute(WebCore
::HTMLNames::reflectedunsignedintegralattrAttr))); | 614 v8SetReturnValueUnsigned(info, std::max(0, imp->getIntegralAttribute(WebCore
::HTMLNames::reflectedunsignedintegralattrAttr))); |
| 652 return; | |
| 653 } | 615 } |
| 654 | 616 |
| 655 static void reflectedUnsignedIntegralAttrAttributeGetterCallback(v8::Local<v8::S
tring> name, const v8::PropertyCallbackInfo<v8::Value>& info) | 617 static void reflectedUnsignedIntegralAttrAttributeGetterCallback(v8::Local<v8::S
tring> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 656 { | 618 { |
| 657 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 619 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 658 TestObjV8Internal::reflectedUnsignedIntegralAttrAttributeGetter(name, info); | 620 TestObjV8Internal::reflectedUnsignedIntegralAttrAttributeGetter(name, info); |
| 659 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 621 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 660 } | 622 } |
| 661 | 623 |
| 662 static void reflectedUnsignedIntegralAttrAttributeSetter(v8::Local<v8::String> n
ame, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 624 static void reflectedUnsignedIntegralAttrAttributeSetter(v8::Local<v8::String> n
ame, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 663 { | 625 { |
| 664 TestObj* imp = V8TestObject::toNative(info.Holder()); | 626 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 665 V8TRYCATCH_VOID(unsigned, v, toUInt32(value)); | 627 V8TRYCATCH_VOID(unsigned, v, toUInt32(value)); |
| 666 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 628 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
| 667 imp->setUnsignedIntegralAttribute(WebCore::HTMLNames::reflectedunsignedinteg
ralattrAttr, v); | 629 imp->setUnsignedIntegralAttribute(WebCore::HTMLNames::reflectedunsignedinteg
ralattrAttr, v); |
| 668 return; | |
| 669 } | 630 } |
| 670 | 631 |
| 671 static void reflectedUnsignedIntegralAttrAttributeSetterCallback(v8::Local<v8::S
tring> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& i
nfo) | 632 static void reflectedUnsignedIntegralAttrAttributeSetterCallback(v8::Local<v8::S
tring> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& i
nfo) |
| 672 { | 633 { |
| 673 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 634 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 674 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 635 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
| 675 TestObjV8Internal::reflectedUnsignedIntegralAttrAttributeSetter(name, value,
info); | 636 TestObjV8Internal::reflectedUnsignedIntegralAttrAttributeSetter(name, value,
info); |
| 676 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 637 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 677 } | 638 } |
| 678 | 639 |
| 679 static void reflectedBooleanAttrAttributeGetter(v8::Local<v8::String> name, cons
t v8::PropertyCallbackInfo<v8::Value>& info) | 640 static void reflectedBooleanAttrAttributeGetter(v8::Local<v8::String> name, cons
t v8::PropertyCallbackInfo<v8::Value>& info) |
| 680 { | 641 { |
| 681 TestObj* imp = V8TestObject::toNative(info.Holder()); | 642 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 682 v8SetReturnValueBool(info, imp->fastHasAttribute(WebCore::HTMLNames::reflect
edbooleanattrAttr)); | 643 v8SetReturnValueBool(info, imp->fastHasAttribute(WebCore::HTMLNames::reflect
edbooleanattrAttr)); |
| 683 return; | |
| 684 } | 644 } |
| 685 | 645 |
| 686 static void reflectedBooleanAttrAttributeGetterCallback(v8::Local<v8::String> na
me, const v8::PropertyCallbackInfo<v8::Value>& info) | 646 static void reflectedBooleanAttrAttributeGetterCallback(v8::Local<v8::String> na
me, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 687 { | 647 { |
| 688 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 648 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 689 TestObjV8Internal::reflectedBooleanAttrAttributeGetter(name, info); | 649 TestObjV8Internal::reflectedBooleanAttrAttributeGetter(name, info); |
| 690 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 650 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 691 } | 651 } |
| 692 | 652 |
| 693 static void reflectedBooleanAttrAttributeSetter(v8::Local<v8::String> name, v8::
Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 653 static void reflectedBooleanAttrAttributeSetter(v8::Local<v8::String> name, v8::
Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 694 { | 654 { |
| 695 TestObj* imp = V8TestObject::toNative(info.Holder()); | 655 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 696 V8TRYCATCH_VOID(bool, v, value->BooleanValue()); | 656 V8TRYCATCH_VOID(bool, v, value->BooleanValue()); |
| 697 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 657 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
| 698 imp->setBooleanAttribute(WebCore::HTMLNames::reflectedbooleanattrAttr, v); | 658 imp->setBooleanAttribute(WebCore::HTMLNames::reflectedbooleanattrAttr, v); |
| 699 return; | |
| 700 } | 659 } |
| 701 | 660 |
| 702 static void reflectedBooleanAttrAttributeSetterCallback(v8::Local<v8::String> na
me, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 661 static void reflectedBooleanAttrAttributeSetterCallback(v8::Local<v8::String> na
me, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 703 { | 662 { |
| 704 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 663 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 705 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 664 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
| 706 TestObjV8Internal::reflectedBooleanAttrAttributeSetter(name, value, info); | 665 TestObjV8Internal::reflectedBooleanAttrAttributeSetter(name, value, info); |
| 707 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 666 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 708 } | 667 } |
| 709 | 668 |
| 710 static void reflectedURLAttrAttributeGetter(v8::Local<v8::String> name, const v8
::PropertyCallbackInfo<v8::Value>& info) | 669 static void reflectedURLAttrAttributeGetter(v8::Local<v8::String> name, const v8
::PropertyCallbackInfo<v8::Value>& info) |
| 711 { | 670 { |
| 712 TestObj* imp = V8TestObject::toNative(info.Holder()); | 671 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 713 v8SetReturnValueString(info, imp->getURLAttribute(WebCore::HTMLNames::reflec
tedurlattrAttr), info.GetIsolate()); | 672 v8SetReturnValueString(info, imp->getURLAttribute(WebCore::HTMLNames::reflec
tedurlattrAttr), info.GetIsolate()); |
| 714 return; | |
| 715 } | 673 } |
| 716 | 674 |
| 717 static void reflectedURLAttrAttributeGetterCallback(v8::Local<v8::String> name,
const v8::PropertyCallbackInfo<v8::Value>& info) | 675 static void reflectedURLAttrAttributeGetterCallback(v8::Local<v8::String> name,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 718 { | 676 { |
| 719 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 677 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 720 TestObjV8Internal::reflectedURLAttrAttributeGetter(name, info); | 678 TestObjV8Internal::reflectedURLAttrAttributeGetter(name, info); |
| 721 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 679 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 722 } | 680 } |
| 723 | 681 |
| 724 static void reflectedURLAttrAttributeSetter(v8::Local<v8::String> name, v8::Loca
l<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 682 static void reflectedURLAttrAttributeSetter(v8::Local<v8::String> name, v8::Loca
l<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 725 { | 683 { |
| 726 TestObj* imp = V8TestObject::toNative(info.Holder()); | 684 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 727 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, v, val
ue); | 685 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, v, val
ue); |
| 728 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 686 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
| 729 imp->setAttribute(WebCore::HTMLNames::reflectedurlattrAttr, v); | 687 imp->setAttribute(WebCore::HTMLNames::reflectedurlattrAttr, v); |
| 730 return; | |
| 731 } | 688 } |
| 732 | 689 |
| 733 static void reflectedURLAttrAttributeSetterCallback(v8::Local<v8::String> name,
v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 690 static void reflectedURLAttrAttributeSetterCallback(v8::Local<v8::String> name,
v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 734 { | 691 { |
| 735 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 692 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 736 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 693 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
| 737 TestObjV8Internal::reflectedURLAttrAttributeSetter(name, value, info); | 694 TestObjV8Internal::reflectedURLAttrAttributeSetter(name, value, info); |
| 738 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 695 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 739 } | 696 } |
| 740 | 697 |
| 741 static void reflectedStringAttrAttributeGetter(v8::Local<v8::String> name, const
v8::PropertyCallbackInfo<v8::Value>& info) | 698 static void reflectedStringAttrAttributeGetter(v8::Local<v8::String> name, const
v8::PropertyCallbackInfo<v8::Value>& info) |
| 742 { | 699 { |
| 743 TestObj* imp = V8TestObject::toNative(info.Holder()); | 700 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 744 v8SetReturnValueString(info, imp->fastGetAttribute(WebCore::HTMLNames::custo
mContentStringAttrAttr), info.GetIsolate()); | 701 v8SetReturnValueString(info, imp->fastGetAttribute(WebCore::HTMLNames::custo
mContentStringAttrAttr), info.GetIsolate()); |
| 745 return; | |
| 746 } | 702 } |
| 747 | 703 |
| 748 static void reflectedStringAttrAttributeGetterCallback(v8::Local<v8::String> nam
e, const v8::PropertyCallbackInfo<v8::Value>& info) | 704 static void reflectedStringAttrAttributeGetterCallback(v8::Local<v8::String> nam
e, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 749 { | 705 { |
| 750 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 706 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 751 TestObjV8Internal::reflectedStringAttrAttributeGetter(name, info); | 707 TestObjV8Internal::reflectedStringAttrAttributeGetter(name, info); |
| 752 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 708 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 753 } | 709 } |
| 754 | 710 |
| 755 static void reflectedStringAttrAttributeSetter(v8::Local<v8::String> name, v8::L
ocal<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 711 static void reflectedStringAttrAttributeSetter(v8::Local<v8::String> name, v8::L
ocal<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 756 { | 712 { |
| 757 TestObj* imp = V8TestObject::toNative(info.Holder()); | 713 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 758 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, v, val
ue); | 714 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, v, val
ue); |
| 759 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 715 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
| 760 imp->setAttribute(WebCore::HTMLNames::customContentStringAttrAttr, v); | 716 imp->setAttribute(WebCore::HTMLNames::customContentStringAttrAttr, v); |
| 761 return; | |
| 762 } | 717 } |
| 763 | 718 |
| 764 static void reflectedStringAttrAttributeSetterCallback(v8::Local<v8::String> nam
e, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 719 static void reflectedStringAttrAttributeSetterCallback(v8::Local<v8::String> nam
e, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 765 { | 720 { |
| 766 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 721 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 767 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 722 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
| 768 TestObjV8Internal::reflectedStringAttrAttributeSetter(name, value, info); | 723 TestObjV8Internal::reflectedStringAttrAttributeSetter(name, value, info); |
| 769 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 724 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 770 } | 725 } |
| 771 | 726 |
| 772 static void reflectedCustomIntegralAttrAttributeGetter(v8::Local<v8::String> nam
e, const v8::PropertyCallbackInfo<v8::Value>& info) | 727 static void reflectedCustomIntegralAttrAttributeGetter(v8::Local<v8::String> nam
e, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 773 { | 728 { |
| 774 TestObj* imp = V8TestObject::toNative(info.Holder()); | 729 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 775 v8SetReturnValueInt(info, imp->getIntegralAttribute(WebCore::HTMLNames::cust
omContentIntegralAttrAttr)); | 730 v8SetReturnValueInt(info, imp->getIntegralAttribute(WebCore::HTMLNames::cust
omContentIntegralAttrAttr)); |
| 776 return; | |
| 777 } | 731 } |
| 778 | 732 |
| 779 static void reflectedCustomIntegralAttrAttributeGetterCallback(v8::Local<v8::Str
ing> name, const v8::PropertyCallbackInfo<v8::Value>& info) | 733 static void reflectedCustomIntegralAttrAttributeGetterCallback(v8::Local<v8::Str
ing> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 780 { | 734 { |
| 781 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 735 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 782 TestObjV8Internal::reflectedCustomIntegralAttrAttributeGetter(name, info); | 736 TestObjV8Internal::reflectedCustomIntegralAttrAttributeGetter(name, info); |
| 783 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 737 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 784 } | 738 } |
| 785 | 739 |
| 786 static void reflectedCustomIntegralAttrAttributeSetter(v8::Local<v8::String> nam
e, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 740 static void reflectedCustomIntegralAttrAttributeSetter(v8::Local<v8::String> nam
e, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 787 { | 741 { |
| 788 TestObj* imp = V8TestObject::toNative(info.Holder()); | 742 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 789 V8TRYCATCH_VOID(int, v, toInt32(value)); | 743 V8TRYCATCH_VOID(int, v, toInt32(value)); |
| 790 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 744 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
| 791 imp->setIntegralAttribute(WebCore::HTMLNames::customContentIntegralAttrAttr,
v); | 745 imp->setIntegralAttribute(WebCore::HTMLNames::customContentIntegralAttrAttr,
v); |
| 792 return; | |
| 793 } | 746 } |
| 794 | 747 |
| 795 static void reflectedCustomIntegralAttrAttributeSetterCallback(v8::Local<v8::Str
ing> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& inf
o) | 748 static void reflectedCustomIntegralAttrAttributeSetterCallback(v8::Local<v8::Str
ing> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& inf
o) |
| 796 { | 749 { |
| 797 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 750 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 798 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 751 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
| 799 TestObjV8Internal::reflectedCustomIntegralAttrAttributeSetter(name, value, i
nfo); | 752 TestObjV8Internal::reflectedCustomIntegralAttrAttributeSetter(name, value, i
nfo); |
| 800 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 753 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 801 } | 754 } |
| 802 | 755 |
| 803 static void reflectedCustomBooleanAttrAttributeGetter(v8::Local<v8::String> name
, const v8::PropertyCallbackInfo<v8::Value>& info) | 756 static void reflectedCustomBooleanAttrAttributeGetter(v8::Local<v8::String> name
, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 804 { | 757 { |
| 805 TestObj* imp = V8TestObject::toNative(info.Holder()); | 758 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 806 v8SetReturnValueBool(info, imp->fastHasAttribute(WebCore::HTMLNames::customC
ontentBooleanAttrAttr)); | 759 v8SetReturnValueBool(info, imp->fastHasAttribute(WebCore::HTMLNames::customC
ontentBooleanAttrAttr)); |
| 807 return; | |
| 808 } | 760 } |
| 809 | 761 |
| 810 static void reflectedCustomBooleanAttrAttributeGetterCallback(v8::Local<v8::Stri
ng> name, const v8::PropertyCallbackInfo<v8::Value>& info) | 762 static void reflectedCustomBooleanAttrAttributeGetterCallback(v8::Local<v8::Stri
ng> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 811 { | 763 { |
| 812 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 764 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 813 TestObjV8Internal::reflectedCustomBooleanAttrAttributeGetter(name, info); | 765 TestObjV8Internal::reflectedCustomBooleanAttrAttributeGetter(name, info); |
| 814 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 766 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 815 } | 767 } |
| 816 | 768 |
| 817 static void reflectedCustomBooleanAttrAttributeSetter(v8::Local<v8::String> name
, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 769 static void reflectedCustomBooleanAttrAttributeSetter(v8::Local<v8::String> name
, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 818 { | 770 { |
| 819 TestObj* imp = V8TestObject::toNative(info.Holder()); | 771 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 820 V8TRYCATCH_VOID(bool, v, value->BooleanValue()); | 772 V8TRYCATCH_VOID(bool, v, value->BooleanValue()); |
| 821 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 773 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
| 822 imp->setBooleanAttribute(WebCore::HTMLNames::customContentBooleanAttrAttr, v
); | 774 imp->setBooleanAttribute(WebCore::HTMLNames::customContentBooleanAttrAttr, v
); |
| 823 return; | |
| 824 } | 775 } |
| 825 | 776 |
| 826 static void reflectedCustomBooleanAttrAttributeSetterCallback(v8::Local<v8::Stri
ng> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info
) | 777 static void reflectedCustomBooleanAttrAttributeSetterCallback(v8::Local<v8::Stri
ng> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info
) |
| 827 { | 778 { |
| 828 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 779 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 829 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 780 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
| 830 TestObjV8Internal::reflectedCustomBooleanAttrAttributeSetter(name, value, in
fo); | 781 TestObjV8Internal::reflectedCustomBooleanAttrAttributeSetter(name, value, in
fo); |
| 831 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 782 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 832 } | 783 } |
| 833 | 784 |
| 834 static void reflectedCustomURLAttrAttributeGetter(v8::Local<v8::String> name, co
nst v8::PropertyCallbackInfo<v8::Value>& info) | 785 static void reflectedCustomURLAttrAttributeGetter(v8::Local<v8::String> name, co
nst v8::PropertyCallbackInfo<v8::Value>& info) |
| 835 { | 786 { |
| 836 TestObj* imp = V8TestObject::toNative(info.Holder()); | 787 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 837 v8SetReturnValueString(info, imp->getURLAttribute(WebCore::HTMLNames::custom
ContentURLAttrAttr), info.GetIsolate()); | 788 v8SetReturnValueString(info, imp->getURLAttribute(WebCore::HTMLNames::custom
ContentURLAttrAttr), info.GetIsolate()); |
| 838 return; | |
| 839 } | 789 } |
| 840 | 790 |
| 841 static void reflectedCustomURLAttrAttributeGetterCallback(v8::Local<v8::String>
name, const v8::PropertyCallbackInfo<v8::Value>& info) | 791 static void reflectedCustomURLAttrAttributeGetterCallback(v8::Local<v8::String>
name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 842 { | 792 { |
| 843 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 793 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 844 TestObjV8Internal::reflectedCustomURLAttrAttributeGetter(name, info); | 794 TestObjV8Internal::reflectedCustomURLAttrAttributeGetter(name, info); |
| 845 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 795 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 846 } | 796 } |
| 847 | 797 |
| 848 static void reflectedCustomURLAttrAttributeSetter(v8::Local<v8::String> name, v8
::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 798 static void reflectedCustomURLAttrAttributeSetter(v8::Local<v8::String> name, v8
::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 849 { | 799 { |
| 850 TestObj* imp = V8TestObject::toNative(info.Holder()); | 800 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 851 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, v, val
ue); | 801 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, v, val
ue); |
| 852 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 802 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
| 853 imp->setAttribute(WebCore::HTMLNames::customContentURLAttrAttr, v); | 803 imp->setAttribute(WebCore::HTMLNames::customContentURLAttrAttr, v); |
| 854 return; | |
| 855 } | 804 } |
| 856 | 805 |
| 857 static void reflectedCustomURLAttrAttributeSetterCallback(v8::Local<v8::String>
name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 806 static void reflectedCustomURLAttrAttributeSetterCallback(v8::Local<v8::String>
name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 858 { | 807 { |
| 859 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 808 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 860 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 809 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
| 861 TestObjV8Internal::reflectedCustomURLAttrAttributeSetter(name, value, info); | 810 TestObjV8Internal::reflectedCustomURLAttrAttributeSetter(name, value, info); |
| 862 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 811 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 863 } | 812 } |
| 864 | 813 |
| 865 static void typedArrayAttrAttributeGetter(v8::Local<v8::String> name, const v8::
PropertyCallbackInfo<v8::Value>& info) | 814 static void typedArrayAttrAttributeGetter(v8::Local<v8::String> name, const v8::
PropertyCallbackInfo<v8::Value>& info) |
| 866 { | 815 { |
| 867 TestObj* imp = V8TestObject::toNative(info.Holder()); | 816 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 868 v8SetReturnValueFast(info, imp->typedArrayAttr(), imp); | 817 v8SetReturnValueFast(info, imp->typedArrayAttr(), imp); |
| 869 return; | |
| 870 } | 818 } |
| 871 | 819 |
| 872 static void typedArrayAttrAttributeGetterCallback(v8::Local<v8::String> name, co
nst v8::PropertyCallbackInfo<v8::Value>& info) | 820 static void typedArrayAttrAttributeGetterCallback(v8::Local<v8::String> name, co
nst v8::PropertyCallbackInfo<v8::Value>& info) |
| 873 { | 821 { |
| 874 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 822 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 875 TestObjV8Internal::typedArrayAttrAttributeGetter(name, info); | 823 TestObjV8Internal::typedArrayAttrAttributeGetter(name, info); |
| 876 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 824 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 877 } | 825 } |
| 878 | 826 |
| 879 static void typedArrayAttrAttributeSetter(v8::Local<v8::String> name, v8::Local<
v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 827 static void typedArrayAttrAttributeSetter(v8::Local<v8::String> name, v8::Local<
v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 880 { | 828 { |
| 881 TestObj* imp = V8TestObject::toNative(info.Holder()); | 829 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 882 V8TRYCATCH_VOID(Float32Array*, v, value->IsFloat32Array() ? V8Float32Array::
toNative(v8::Handle<v8::Float32Array>::Cast(value)) : 0); | 830 V8TRYCATCH_VOID(Float32Array*, v, value->IsFloat32Array() ? V8Float32Array::
toNative(v8::Handle<v8::Float32Array>::Cast(value)) : 0); |
| 883 imp->setTypedArrayAttr(WTF::getPtr(v)); | 831 imp->setTypedArrayAttr(WTF::getPtr(v)); |
| 884 return; | |
| 885 } | 832 } |
| 886 | 833 |
| 887 static void typedArrayAttrAttributeSetterCallback(v8::Local<v8::String> name, v8
::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 834 static void typedArrayAttrAttributeSetterCallback(v8::Local<v8::String> name, v8
::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 888 { | 835 { |
| 889 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 836 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 890 TestObjV8Internal::typedArrayAttrAttributeSetter(name, value, info); | 837 TestObjV8Internal::typedArrayAttrAttributeSetter(name, value, info); |
| 891 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 838 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 892 } | 839 } |
| 893 | 840 |
| 894 static void attrWithGetterExceptionAttributeGetter(v8::Local<v8::String> name, c
onst v8::PropertyCallbackInfo<v8::Value>& info) | 841 static void attrWithGetterExceptionAttributeGetter(v8::Local<v8::String> name, c
onst v8::PropertyCallbackInfo<v8::Value>& info) |
| 895 { | 842 { |
| 896 TestObj* imp = V8TestObject::toNative(info.Holder()); | 843 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 897 ExceptionState es(info.GetIsolate()); | 844 ExceptionState es(info.GetIsolate()); |
| 898 int value = imp->attrWithGetterException(es); | 845 int value = imp->attrWithGetterException(es); |
| 899 if (UNLIKELY(es.throwIfNeeded())) | 846 if (UNLIKELY(es.throwIfNeeded())) |
| 900 return; | 847 return; |
| 901 v8SetReturnValueInt(info, value); | 848 v8SetReturnValueInt(info, value); |
| 902 return; | |
| 903 } | 849 } |
| 904 | 850 |
| 905 static void attrWithGetterExceptionAttributeGetterCallback(v8::Local<v8::String>
name, const v8::PropertyCallbackInfo<v8::Value>& info) | 851 static void attrWithGetterExceptionAttributeGetterCallback(v8::Local<v8::String>
name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 906 { | 852 { |
| 907 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 853 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 908 TestObjV8Internal::attrWithGetterExceptionAttributeGetter(name, info); | 854 TestObjV8Internal::attrWithGetterExceptionAttributeGetter(name, info); |
| 909 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 855 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 910 } | 856 } |
| 911 | 857 |
| 912 static void attrWithGetterExceptionAttributeSetter(v8::Local<v8::String> name, v
8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 858 static void attrWithGetterExceptionAttributeSetter(v8::Local<v8::String> name, v
8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 913 { | 859 { |
| 914 TestObj* imp = V8TestObject::toNative(info.Holder()); | 860 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 915 V8TRYCATCH_VOID(int, v, toInt32(value)); | 861 V8TRYCATCH_VOID(int, v, toInt32(value)); |
| 916 imp->setAttrWithGetterException(v); | 862 imp->setAttrWithGetterException(v); |
| 917 return; | |
| 918 } | 863 } |
| 919 | 864 |
| 920 static void attrWithGetterExceptionAttributeSetterCallback(v8::Local<v8::String>
name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 865 static void attrWithGetterExceptionAttributeSetterCallback(v8::Local<v8::String>
name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 921 { | 866 { |
| 922 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 867 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 923 TestObjV8Internal::attrWithGetterExceptionAttributeSetter(name, value, info)
; | 868 TestObjV8Internal::attrWithGetterExceptionAttributeSetter(name, value, info)
; |
| 924 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 869 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 925 } | 870 } |
| 926 | 871 |
| 927 static void attrWithSetterExceptionAttributeGetter(v8::Local<v8::String> name, c
onst v8::PropertyCallbackInfo<v8::Value>& info) | 872 static void attrWithSetterExceptionAttributeGetter(v8::Local<v8::String> name, c
onst v8::PropertyCallbackInfo<v8::Value>& info) |
| 928 { | 873 { |
| 929 TestObj* imp = V8TestObject::toNative(info.Holder()); | 874 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 930 v8SetReturnValueInt(info, imp->attrWithSetterException()); | 875 v8SetReturnValueInt(info, imp->attrWithSetterException()); |
| 931 return; | |
| 932 } | 876 } |
| 933 | 877 |
| 934 static void attrWithSetterExceptionAttributeGetterCallback(v8::Local<v8::String>
name, const v8::PropertyCallbackInfo<v8::Value>& info) | 878 static void attrWithSetterExceptionAttributeGetterCallback(v8::Local<v8::String>
name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 935 { | 879 { |
| 936 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 880 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 937 TestObjV8Internal::attrWithSetterExceptionAttributeGetter(name, info); | 881 TestObjV8Internal::attrWithSetterExceptionAttributeGetter(name, info); |
| 938 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 882 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 939 } | 883 } |
| 940 | 884 |
| 941 static void attrWithSetterExceptionAttributeSetter(v8::Local<v8::String> name, v
8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 885 static void attrWithSetterExceptionAttributeSetter(v8::Local<v8::String> name, v
8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 942 { | 886 { |
| 943 TestObj* imp = V8TestObject::toNative(info.Holder()); | 887 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 944 V8TRYCATCH_VOID(int, v, toInt32(value)); | 888 V8TRYCATCH_VOID(int, v, toInt32(value)); |
| 945 ExceptionState es(info.GetIsolate()); | 889 ExceptionState es(info.GetIsolate()); |
| 946 imp->setAttrWithSetterException(v, es); | 890 imp->setAttrWithSetterException(v, es); |
| 947 es.throwIfNeeded(); | 891 es.throwIfNeeded(); |
| 948 return; | |
| 949 } | 892 } |
| 950 | 893 |
| 951 static void attrWithSetterExceptionAttributeSetterCallback(v8::Local<v8::String>
name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 894 static void attrWithSetterExceptionAttributeSetterCallback(v8::Local<v8::String>
name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 952 { | 895 { |
| 953 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 896 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 954 TestObjV8Internal::attrWithSetterExceptionAttributeSetter(name, value, info)
; | 897 TestObjV8Internal::attrWithSetterExceptionAttributeSetter(name, value, info)
; |
| 955 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 898 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 956 } | 899 } |
| 957 | 900 |
| 958 static void stringAttrWithGetterExceptionAttributeGetter(v8::Local<v8::String> n
ame, const v8::PropertyCallbackInfo<v8::Value>& info) | 901 static void stringAttrWithGetterExceptionAttributeGetter(v8::Local<v8::String> n
ame, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 959 { | 902 { |
| 960 TestObj* imp = V8TestObject::toNative(info.Holder()); | 903 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 961 ExceptionState es(info.GetIsolate()); | 904 ExceptionState es(info.GetIsolate()); |
| 962 String value = imp->stringAttrWithGetterException(es); | 905 String value = imp->stringAttrWithGetterException(es); |
| 963 if (UNLIKELY(es.throwIfNeeded())) | 906 if (UNLIKELY(es.throwIfNeeded())) |
| 964 return; | 907 return; |
| 965 v8SetReturnValueString(info, value, info.GetIsolate()); | 908 v8SetReturnValueString(info, value, info.GetIsolate()); |
| 966 return; | |
| 967 } | 909 } |
| 968 | 910 |
| 969 static void stringAttrWithGetterExceptionAttributeGetterCallback(v8::Local<v8::S
tring> name, const v8::PropertyCallbackInfo<v8::Value>& info) | 911 static void stringAttrWithGetterExceptionAttributeGetterCallback(v8::Local<v8::S
tring> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 970 { | 912 { |
| 971 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 913 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 972 TestObjV8Internal::stringAttrWithGetterExceptionAttributeGetter(name, info); | 914 TestObjV8Internal::stringAttrWithGetterExceptionAttributeGetter(name, info); |
| 973 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 915 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 974 } | 916 } |
| 975 | 917 |
| 976 static void stringAttrWithGetterExceptionAttributeSetter(v8::Local<v8::String> n
ame, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 918 static void stringAttrWithGetterExceptionAttributeSetter(v8::Local<v8::String> n
ame, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 977 { | 919 { |
| 978 TestObj* imp = V8TestObject::toNative(info.Holder()); | 920 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 979 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, v, value); | 921 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, v, value); |
| 980 imp->setStringAttrWithGetterException(v); | 922 imp->setStringAttrWithGetterException(v); |
| 981 return; | |
| 982 } | 923 } |
| 983 | 924 |
| 984 static void stringAttrWithGetterExceptionAttributeSetterCallback(v8::Local<v8::S
tring> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& i
nfo) | 925 static void stringAttrWithGetterExceptionAttributeSetterCallback(v8::Local<v8::S
tring> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& i
nfo) |
| 985 { | 926 { |
| 986 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 927 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 987 TestObjV8Internal::stringAttrWithGetterExceptionAttributeSetter(name, value,
info); | 928 TestObjV8Internal::stringAttrWithGetterExceptionAttributeSetter(name, value,
info); |
| 988 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 929 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 989 } | 930 } |
| 990 | 931 |
| 991 static void stringAttrWithSetterExceptionAttributeGetter(v8::Local<v8::String> n
ame, const v8::PropertyCallbackInfo<v8::Value>& info) | 932 static void stringAttrWithSetterExceptionAttributeGetter(v8::Local<v8::String> n
ame, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 992 { | 933 { |
| 993 TestObj* imp = V8TestObject::toNative(info.Holder()); | 934 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 994 v8SetReturnValueString(info, imp->stringAttrWithSetterException(), info.GetI
solate()); | 935 v8SetReturnValueString(info, imp->stringAttrWithSetterException(), info.GetI
solate()); |
| 995 return; | |
| 996 } | 936 } |
| 997 | 937 |
| 998 static void stringAttrWithSetterExceptionAttributeGetterCallback(v8::Local<v8::S
tring> name, const v8::PropertyCallbackInfo<v8::Value>& info) | 938 static void stringAttrWithSetterExceptionAttributeGetterCallback(v8::Local<v8::S
tring> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 999 { | 939 { |
| 1000 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 940 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 1001 TestObjV8Internal::stringAttrWithSetterExceptionAttributeGetter(name, info); | 941 TestObjV8Internal::stringAttrWithSetterExceptionAttributeGetter(name, info); |
| 1002 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 942 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 1003 } | 943 } |
| 1004 | 944 |
| 1005 static void stringAttrWithSetterExceptionAttributeSetter(v8::Local<v8::String> n
ame, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 945 static void stringAttrWithSetterExceptionAttributeSetter(v8::Local<v8::String> n
ame, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 1006 { | 946 { |
| 1007 TestObj* imp = V8TestObject::toNative(info.Holder()); | 947 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1008 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, v, value); | 948 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, v, value); |
| 1009 ExceptionState es(info.GetIsolate()); | 949 ExceptionState es(info.GetIsolate()); |
| 1010 imp->setStringAttrWithSetterException(v, es); | 950 imp->setStringAttrWithSetterException(v, es); |
| 1011 es.throwIfNeeded(); | 951 es.throwIfNeeded(); |
| 1012 return; | |
| 1013 } | 952 } |
| 1014 | 953 |
| 1015 static void stringAttrWithSetterExceptionAttributeSetterCallback(v8::Local<v8::S
tring> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& i
nfo) | 954 static void stringAttrWithSetterExceptionAttributeSetterCallback(v8::Local<v8::S
tring> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& i
nfo) |
| 1016 { | 955 { |
| 1017 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 956 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 1018 TestObjV8Internal::stringAttrWithSetterExceptionAttributeSetter(name, value,
info); | 957 TestObjV8Internal::stringAttrWithSetterExceptionAttributeSetter(name, value,
info); |
| 1019 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 958 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 1020 } | 959 } |
| 1021 | 960 |
| 1022 static void customAttrAttributeGetterCallback(v8::Local<v8::String> name, const
v8::PropertyCallbackInfo<v8::Value>& info) | 961 static void customAttrAttributeGetterCallback(v8::Local<v8::String> name, const
v8::PropertyCallbackInfo<v8::Value>& info) |
| (...skipping 11 matching lines...) Expand all Loading... |
| 1034 } | 973 } |
| 1035 | 974 |
| 1036 static void withScriptStateAttributeAttributeGetter(v8::Local<v8::String> name,
const v8::PropertyCallbackInfo<v8::Value>& info) | 975 static void withScriptStateAttributeAttributeGetter(v8::Local<v8::String> name,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1037 { | 976 { |
| 1038 TestObj* imp = V8TestObject::toNative(info.Holder()); | 977 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1039 ScriptState* currentState = ScriptState::current(); | 978 ScriptState* currentState = ScriptState::current(); |
| 1040 if (!currentState) | 979 if (!currentState) |
| 1041 return v8Undefined(); | 980 return v8Undefined(); |
| 1042 ScriptState& state = *currentState; | 981 ScriptState& state = *currentState; |
| 1043 v8SetReturnValueInt(info, imp->withScriptStateAttribute(&state)); | 982 v8SetReturnValueInt(info, imp->withScriptStateAttribute(&state)); |
| 1044 return; | |
| 1045 } | 983 } |
| 1046 | 984 |
| 1047 static void withScriptStateAttributeAttributeGetterCallback(v8::Local<v8::String
> name, const v8::PropertyCallbackInfo<v8::Value>& info) | 985 static void withScriptStateAttributeAttributeGetterCallback(v8::Local<v8::String
> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1048 { | 986 { |
| 1049 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 987 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 1050 TestObjV8Internal::withScriptStateAttributeAttributeGetter(name, info); | 988 TestObjV8Internal::withScriptStateAttributeAttributeGetter(name, info); |
| 1051 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 989 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 1052 } | 990 } |
| 1053 | 991 |
| 1054 static void withScriptStateAttributeAttributeSetter(v8::Local<v8::String> name,
v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 992 static void withScriptStateAttributeAttributeSetter(v8::Local<v8::String> name,
v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 1055 { | 993 { |
| 1056 TestObj* imp = V8TestObject::toNative(info.Holder()); | 994 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1057 V8TRYCATCH_VOID(int, v, toInt32(value)); | 995 V8TRYCATCH_VOID(int, v, toInt32(value)); |
| 1058 ScriptState* currentState = ScriptState::current(); | 996 ScriptState* currentState = ScriptState::current(); |
| 1059 if (!currentState) | 997 if (!currentState) |
| 1060 return; | 998 return; |
| 1061 ScriptState& state = *currentState; | 999 ScriptState& state = *currentState; |
| 1062 imp->setWithScriptStateAttribute(&state, v); | 1000 imp->setWithScriptStateAttribute(&state, v); |
| 1063 if (state.hadException()) | 1001 if (state.hadException()) |
| 1064 throwError(state.exception(), info.GetIsolate()); | 1002 throwError(state.exception(), info.GetIsolate()); |
| 1065 return; | |
| 1066 } | 1003 } |
| 1067 | 1004 |
| 1068 static void withScriptStateAttributeAttributeSetterCallback(v8::Local<v8::String
> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 1005 static void withScriptStateAttributeAttributeSetterCallback(v8::Local<v8::String
> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 1069 { | 1006 { |
| 1070 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1007 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 1071 TestObjV8Internal::withScriptStateAttributeAttributeSetter(name, value, info
); | 1008 TestObjV8Internal::withScriptStateAttributeAttributeSetter(name, value, info
); |
| 1072 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 1009 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 1073 } | 1010 } |
| 1074 | 1011 |
| 1075 static void withScriptExecutionContextAttributeAttributeGetter(v8::Local<v8::Str
ing> name, const v8::PropertyCallbackInfo<v8::Value>& info) | 1012 static void withScriptExecutionContextAttributeAttributeGetter(v8::Local<v8::Str
ing> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1076 { | 1013 { |
| 1077 TestObj* imp = V8TestObject::toNative(info.Holder()); | 1014 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1078 ScriptExecutionContext* scriptContext = getScriptExecutionContext(); | 1015 ScriptExecutionContext* scriptContext = getScriptExecutionContext(); |
| 1079 v8SetReturnValueFast(info, imp->withScriptExecutionContextAttribute(scriptCo
ntext), imp); | 1016 v8SetReturnValueFast(info, imp->withScriptExecutionContextAttribute(scriptCo
ntext), imp); |
| 1080 return; | |
| 1081 } | 1017 } |
| 1082 | 1018 |
| 1083 static void withScriptExecutionContextAttributeAttributeGetterCallback(v8::Local
<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) | 1019 static void withScriptExecutionContextAttributeAttributeGetterCallback(v8::Local
<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1084 { | 1020 { |
| 1085 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1021 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 1086 TestObjV8Internal::withScriptExecutionContextAttributeAttributeGetter(name,
info); | 1022 TestObjV8Internal::withScriptExecutionContextAttributeAttributeGetter(name,
info); |
| 1087 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 1023 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 1088 } | 1024 } |
| 1089 | 1025 |
| 1090 static void withScriptExecutionContextAttributeAttributeSetter(v8::Local<v8::Str
ing> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& inf
o) | 1026 static void withScriptExecutionContextAttributeAttributeSetter(v8::Local<v8::Str
ing> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& inf
o) |
| 1091 { | 1027 { |
| 1092 TestObj* imp = V8TestObject::toNative(info.Holder()); | 1028 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1093 V8TRYCATCH_VOID(TestObj*, v, V8TestObject::HasInstance(value, info.GetIsolat
e(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Objec
t>::Cast(value)) : 0); | 1029 V8TRYCATCH_VOID(TestObj*, v, V8TestObject::HasInstance(value, info.GetIsolat
e(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Objec
t>::Cast(value)) : 0); |
| 1094 ScriptExecutionContext* scriptContext = getScriptExecutionContext(); | 1030 ScriptExecutionContext* scriptContext = getScriptExecutionContext(); |
| 1095 imp->setWithScriptExecutionContextAttribute(scriptContext, WTF::getPtr(v)); | 1031 imp->setWithScriptExecutionContextAttribute(scriptContext, WTF::getPtr(v)); |
| 1096 return; | |
| 1097 } | 1032 } |
| 1098 | 1033 |
| 1099 static void withScriptExecutionContextAttributeAttributeSetterCallback(v8::Local
<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<vo
id>& info) | 1034 static void withScriptExecutionContextAttributeAttributeSetterCallback(v8::Local
<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<vo
id>& info) |
| 1100 { | 1035 { |
| 1101 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1036 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 1102 TestObjV8Internal::withScriptExecutionContextAttributeAttributeSetter(name,
value, info); | 1037 TestObjV8Internal::withScriptExecutionContextAttributeAttributeSetter(name,
value, info); |
| 1103 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 1038 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 1104 } | 1039 } |
| 1105 | 1040 |
| 1106 static void withActiveWindowAndFirstWindowAttributeAttributeGetter(v8::Local<v8:
:String> name, const v8::PropertyCallbackInfo<v8::Value>& info) | 1041 static void withActiveWindowAndFirstWindowAttributeAttributeGetter(v8::Local<v8:
:String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1107 { | 1042 { |
| 1108 TestObj* imp = V8TestObject::toNative(info.Holder()); | 1043 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1109 v8SetReturnValueFast(info, imp->withActiveWindowAndFirstWindowAttribute(), i
mp); | 1044 v8SetReturnValueFast(info, imp->withActiveWindowAndFirstWindowAttribute(), i
mp); |
| 1110 return; | |
| 1111 } | 1045 } |
| 1112 | 1046 |
| 1113 static void withActiveWindowAndFirstWindowAttributeAttributeGetterCallback(v8::L
ocal<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) | 1047 static void withActiveWindowAndFirstWindowAttributeAttributeGetterCallback(v8::L
ocal<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1114 { | 1048 { |
| 1115 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1049 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 1116 TestObjV8Internal::withActiveWindowAndFirstWindowAttributeAttributeGetter(na
me, info); | 1050 TestObjV8Internal::withActiveWindowAndFirstWindowAttributeAttributeGetter(na
me, info); |
| 1117 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 1051 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 1118 } | 1052 } |
| 1119 | 1053 |
| 1120 static void withActiveWindowAndFirstWindowAttributeAttributeSetter(v8::Local<v8:
:String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>&
info) | 1054 static void withActiveWindowAndFirstWindowAttributeAttributeSetter(v8::Local<v8:
:String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>&
info) |
| 1121 { | 1055 { |
| 1122 TestObj* imp = V8TestObject::toNative(info.Holder()); | 1056 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1123 V8TRYCATCH_VOID(TestObj*, v, V8TestObject::HasInstance(value, info.GetIsolat
e(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Objec
t>::Cast(value)) : 0); | 1057 V8TRYCATCH_VOID(TestObj*, v, V8TestObject::HasInstance(value, info.GetIsolat
e(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Objec
t>::Cast(value)) : 0); |
| 1124 imp->setWithActiveWindowAndFirstWindowAttribute(activeDOMWindow(), firstDOMW
indow(), WTF::getPtr(v)); | 1058 imp->setWithActiveWindowAndFirstWindowAttribute(activeDOMWindow(), firstDOMW
indow(), WTF::getPtr(v)); |
| 1125 return; | |
| 1126 } | 1059 } |
| 1127 | 1060 |
| 1128 static void withActiveWindowAndFirstWindowAttributeAttributeSetterCallback(v8::L
ocal<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInf
o<void>& info) | 1061 static void withActiveWindowAndFirstWindowAttributeAttributeSetterCallback(v8::L
ocal<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInf
o<void>& info) |
| 1129 { | 1062 { |
| 1130 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1063 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 1131 TestObjV8Internal::withActiveWindowAndFirstWindowAttributeAttributeSetter(na
me, value, info); | 1064 TestObjV8Internal::withActiveWindowAndFirstWindowAttributeAttributeSetter(na
me, value, info); |
| 1132 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 1065 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 1133 } | 1066 } |
| 1134 | 1067 |
| 1135 static void withScriptStateAttributeRaisesAttributeGetter(v8::Local<v8::String>
name, const v8::PropertyCallbackInfo<v8::Value>& info) | 1068 static void withScriptStateAttributeRaisesAttributeGetter(v8::Local<v8::String>
name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1136 { | 1069 { |
| 1137 TestObj* imp = V8TestObject::toNative(info.Holder()); | 1070 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1138 ExceptionState es(info.GetIsolate()); | 1071 ExceptionState es(info.GetIsolate()); |
| 1139 ScriptState* currentState = ScriptState::current(); | 1072 ScriptState* currentState = ScriptState::current(); |
| 1140 if (!currentState) | 1073 if (!currentState) |
| 1141 return v8Undefined(); | 1074 return v8Undefined(); |
| 1142 ScriptState& state = *currentState; | 1075 ScriptState& state = *currentState; |
| 1143 RefPtr<TestObj> value = imp->withScriptStateAttributeRaises(&state, es); | 1076 RefPtr<TestObj> value = imp->withScriptStateAttributeRaises(&state, es); |
| 1144 if (UNLIKELY(es.throwIfNeeded())) | 1077 if (UNLIKELY(es.throwIfNeeded())) |
| 1145 return; | 1078 return; |
| 1146 if (state.hadException()) { | 1079 if (state.hadException()) { |
| 1147 throwError(state.exception(), info.GetIsolate()); | 1080 throwError(state.exception(), info.GetIsolate()); |
| 1148 return; | 1081 return; |
| 1149 } | 1082 } |
| 1150 v8SetReturnValueFast(info, value.release(), imp); | 1083 v8SetReturnValueFast(info, value.release(), imp); |
| 1151 return; | |
| 1152 } | 1084 } |
| 1153 | 1085 |
| 1154 static void withScriptStateAttributeRaisesAttributeGetterCallback(v8::Local<v8::
String> name, const v8::PropertyCallbackInfo<v8::Value>& info) | 1086 static void withScriptStateAttributeRaisesAttributeGetterCallback(v8::Local<v8::
String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1155 { | 1087 { |
| 1156 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1088 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 1157 TestObjV8Internal::withScriptStateAttributeRaisesAttributeGetter(name, info)
; | 1089 TestObjV8Internal::withScriptStateAttributeRaisesAttributeGetter(name, info)
; |
| 1158 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 1090 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 1159 } | 1091 } |
| 1160 | 1092 |
| 1161 static void withScriptStateAttributeRaisesAttributeSetter(v8::Local<v8::String>
name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 1093 static void withScriptStateAttributeRaisesAttributeSetter(v8::Local<v8::String>
name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 1162 { | 1094 { |
| 1163 TestObj* imp = V8TestObject::toNative(info.Holder()); | 1095 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1164 V8TRYCATCH_VOID(TestObj*, v, V8TestObject::HasInstance(value, info.GetIsolat
e(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Objec
t>::Cast(value)) : 0); | 1096 V8TRYCATCH_VOID(TestObj*, v, V8TestObject::HasInstance(value, info.GetIsolat
e(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Objec
t>::Cast(value)) : 0); |
| 1165 ScriptState* currentState = ScriptState::current(); | 1097 ScriptState* currentState = ScriptState::current(); |
| 1166 if (!currentState) | 1098 if (!currentState) |
| 1167 return; | 1099 return; |
| 1168 ScriptState& state = *currentState; | 1100 ScriptState& state = *currentState; |
| 1169 imp->setWithScriptStateAttributeRaises(&state, WTF::getPtr(v)); | 1101 imp->setWithScriptStateAttributeRaises(&state, WTF::getPtr(v)); |
| 1170 if (state.hadException()) | 1102 if (state.hadException()) |
| 1171 throwError(state.exception(), info.GetIsolate()); | 1103 throwError(state.exception(), info.GetIsolate()); |
| 1172 return; | |
| 1173 } | 1104 } |
| 1174 | 1105 |
| 1175 static void withScriptStateAttributeRaisesAttributeSetterCallback(v8::Local<v8::
String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>&
info) | 1106 static void withScriptStateAttributeRaisesAttributeSetterCallback(v8::Local<v8::
String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>&
info) |
| 1176 { | 1107 { |
| 1177 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1108 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 1178 TestObjV8Internal::withScriptStateAttributeRaisesAttributeSetter(name, value
, info); | 1109 TestObjV8Internal::withScriptStateAttributeRaisesAttributeSetter(name, value
, info); |
| 1179 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 1110 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 1180 } | 1111 } |
| 1181 | 1112 |
| 1182 static void withScriptExecutionContextAttributeRaisesAttributeGetter(v8::Local<v
8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) | 1113 static void withScriptExecutionContextAttributeRaisesAttributeGetter(v8::Local<v
8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1183 { | 1114 { |
| 1184 TestObj* imp = V8TestObject::toNative(info.Holder()); | 1115 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1185 ExceptionState es(info.GetIsolate()); | 1116 ExceptionState es(info.GetIsolate()); |
| 1186 ScriptExecutionContext* scriptContext = getScriptExecutionContext(); | 1117 ScriptExecutionContext* scriptContext = getScriptExecutionContext(); |
| 1187 RefPtr<TestObj> value = imp->withScriptExecutionContextAttributeRaises(scrip
tContext, es); | 1118 RefPtr<TestObj> value = imp->withScriptExecutionContextAttributeRaises(scrip
tContext, es); |
| 1188 if (UNLIKELY(es.throwIfNeeded())) | 1119 if (UNLIKELY(es.throwIfNeeded())) |
| 1189 return; | 1120 return; |
| 1190 v8SetReturnValueFast(info, value.release(), imp); | 1121 v8SetReturnValueFast(info, value.release(), imp); |
| 1191 return; | |
| 1192 } | 1122 } |
| 1193 | 1123 |
| 1194 static void withScriptExecutionContextAttributeRaisesAttributeGetterCallback(v8:
:Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) | 1124 static void withScriptExecutionContextAttributeRaisesAttributeGetterCallback(v8:
:Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1195 { | 1125 { |
| 1196 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1126 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 1197 TestObjV8Internal::withScriptExecutionContextAttributeRaisesAttributeGetter(
name, info); | 1127 TestObjV8Internal::withScriptExecutionContextAttributeRaisesAttributeGetter(
name, info); |
| 1198 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 1128 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 1199 } | 1129 } |
| 1200 | 1130 |
| 1201 static void withScriptExecutionContextAttributeRaisesAttributeSetter(v8::Local<v
8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void
>& info) | 1131 static void withScriptExecutionContextAttributeRaisesAttributeSetter(v8::Local<v
8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void
>& info) |
| 1202 { | 1132 { |
| 1203 TestObj* imp = V8TestObject::toNative(info.Holder()); | 1133 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1204 V8TRYCATCH_VOID(TestObj*, v, V8TestObject::HasInstance(value, info.GetIsolat
e(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Objec
t>::Cast(value)) : 0); | 1134 V8TRYCATCH_VOID(TestObj*, v, V8TestObject::HasInstance(value, info.GetIsolat
e(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Objec
t>::Cast(value)) : 0); |
| 1205 ScriptExecutionContext* scriptContext = getScriptExecutionContext(); | 1135 ScriptExecutionContext* scriptContext = getScriptExecutionContext(); |
| 1206 imp->setWithScriptExecutionContextAttributeRaises(scriptContext, WTF::getPtr
(v)); | 1136 imp->setWithScriptExecutionContextAttributeRaises(scriptContext, WTF::getPtr
(v)); |
| 1207 return; | |
| 1208 } | 1137 } |
| 1209 | 1138 |
| 1210 static void withScriptExecutionContextAttributeRaisesAttributeSetterCallback(v8:
:Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackI
nfo<void>& info) | 1139 static void withScriptExecutionContextAttributeRaisesAttributeSetterCallback(v8:
:Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackI
nfo<void>& info) |
| 1211 { | 1140 { |
| 1212 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1141 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 1213 TestObjV8Internal::withScriptExecutionContextAttributeRaisesAttributeSetter(
name, value, info); | 1142 TestObjV8Internal::withScriptExecutionContextAttributeRaisesAttributeSetter(
name, value, info); |
| 1214 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 1143 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 1215 } | 1144 } |
| 1216 | 1145 |
| 1217 static void withScriptExecutionContextAndScriptStateAttributeAttributeGetter(v8:
:Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) | 1146 static void withScriptExecutionContextAndScriptStateAttributeAttributeGetter(v8:
:Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1218 { | 1147 { |
| 1219 TestObj* imp = V8TestObject::toNative(info.Holder()); | 1148 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1220 ScriptState* currentState = ScriptState::current(); | 1149 ScriptState* currentState = ScriptState::current(); |
| 1221 if (!currentState) | 1150 if (!currentState) |
| 1222 return v8Undefined(); | 1151 return v8Undefined(); |
| 1223 ScriptState& state = *currentState; | 1152 ScriptState& state = *currentState; |
| 1224 ScriptExecutionContext* scriptContext = getScriptExecutionContext(); | 1153 ScriptExecutionContext* scriptContext = getScriptExecutionContext(); |
| 1225 v8SetReturnValueFast(info, imp->withScriptExecutionContextAndScriptStateAttr
ibute(&state, scriptContext), imp); | 1154 v8SetReturnValueFast(info, imp->withScriptExecutionContextAndScriptStateAttr
ibute(&state, scriptContext), imp); |
| 1226 return; | |
| 1227 } | 1155 } |
| 1228 | 1156 |
| 1229 static void withScriptExecutionContextAndScriptStateAttributeAttributeGetterCall
back(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info
) | 1157 static void withScriptExecutionContextAndScriptStateAttributeAttributeGetterCall
back(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info
) |
| 1230 { | 1158 { |
| 1231 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1159 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 1232 TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeAttribut
eGetter(name, info); | 1160 TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeAttribut
eGetter(name, info); |
| 1233 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 1161 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 1234 } | 1162 } |
| 1235 | 1163 |
| 1236 static void withScriptExecutionContextAndScriptStateAttributeAttributeSetter(v8:
:Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackI
nfo<void>& info) | 1164 static void withScriptExecutionContextAndScriptStateAttributeAttributeSetter(v8:
:Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackI
nfo<void>& info) |
| 1237 { | 1165 { |
| 1238 TestObj* imp = V8TestObject::toNative(info.Holder()); | 1166 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1239 V8TRYCATCH_VOID(TestObj*, v, V8TestObject::HasInstance(value, info.GetIsolat
e(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Objec
t>::Cast(value)) : 0); | 1167 V8TRYCATCH_VOID(TestObj*, v, V8TestObject::HasInstance(value, info.GetIsolat
e(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Objec
t>::Cast(value)) : 0); |
| 1240 ScriptState* currentState = ScriptState::current(); | 1168 ScriptState* currentState = ScriptState::current(); |
| 1241 if (!currentState) | 1169 if (!currentState) |
| 1242 return; | 1170 return; |
| 1243 ScriptState& state = *currentState; | 1171 ScriptState& state = *currentState; |
| 1244 ScriptExecutionContext* scriptContext = getScriptExecutionContext(); | 1172 ScriptExecutionContext* scriptContext = getScriptExecutionContext(); |
| 1245 imp->setWithScriptExecutionContextAndScriptStateAttribute(&state, scriptCont
ext, WTF::getPtr(v)); | 1173 imp->setWithScriptExecutionContextAndScriptStateAttribute(&state, scriptCont
ext, WTF::getPtr(v)); |
| 1246 if (state.hadException()) | 1174 if (state.hadException()) |
| 1247 throwError(state.exception(), info.GetIsolate()); | 1175 throwError(state.exception(), info.GetIsolate()); |
| 1248 return; | |
| 1249 } | 1176 } |
| 1250 | 1177 |
| 1251 static void withScriptExecutionContextAndScriptStateAttributeAttributeSetterCall
back(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyC
allbackInfo<void>& info) | 1178 static void withScriptExecutionContextAndScriptStateAttributeAttributeSetterCall
back(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyC
allbackInfo<void>& info) |
| 1252 { | 1179 { |
| 1253 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1180 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 1254 TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeAttribut
eSetter(name, value, info); | 1181 TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeAttribut
eSetter(name, value, info); |
| 1255 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 1182 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 1256 } | 1183 } |
| 1257 | 1184 |
| 1258 static void withScriptExecutionContextAndScriptStateAttributeRaisesAttributeGett
er(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) | 1185 static void withScriptExecutionContextAndScriptStateAttributeRaisesAttributeGett
er(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1259 { | 1186 { |
| 1260 TestObj* imp = V8TestObject::toNative(info.Holder()); | 1187 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1261 ExceptionState es(info.GetIsolate()); | 1188 ExceptionState es(info.GetIsolate()); |
| 1262 ScriptState* currentState = ScriptState::current(); | 1189 ScriptState* currentState = ScriptState::current(); |
| 1263 if (!currentState) | 1190 if (!currentState) |
| 1264 return v8Undefined(); | 1191 return v8Undefined(); |
| 1265 ScriptState& state = *currentState; | 1192 ScriptState& state = *currentState; |
| 1266 ScriptExecutionContext* scriptContext = getScriptExecutionContext(); | 1193 ScriptExecutionContext* scriptContext = getScriptExecutionContext(); |
| 1267 RefPtr<TestObj> value = imp->withScriptExecutionContextAndScriptStateAttribu
teRaises(&state, scriptContext, es); | 1194 RefPtr<TestObj> value = imp->withScriptExecutionContextAndScriptStateAttribu
teRaises(&state, scriptContext, es); |
| 1268 if (UNLIKELY(es.throwIfNeeded())) | 1195 if (UNLIKELY(es.throwIfNeeded())) |
| 1269 return; | 1196 return; |
| 1270 if (state.hadException()) { | 1197 if (state.hadException()) { |
| 1271 throwError(state.exception(), info.GetIsolate()); | 1198 throwError(state.exception(), info.GetIsolate()); |
| 1272 return; | 1199 return; |
| 1273 } | 1200 } |
| 1274 v8SetReturnValueFast(info, value.release(), imp); | 1201 v8SetReturnValueFast(info, value.release(), imp); |
| 1275 return; | |
| 1276 } | 1202 } |
| 1277 | 1203 |
| 1278 static void withScriptExecutionContextAndScriptStateAttributeRaisesAttributeGett
erCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>
& info) | 1204 static void withScriptExecutionContextAndScriptStateAttributeRaisesAttributeGett
erCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>
& info) |
| 1279 { | 1205 { |
| 1280 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1206 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 1281 TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeRaisesAt
tributeGetter(name, info); | 1207 TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeRaisesAt
tributeGetter(name, info); |
| 1282 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 1208 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 1283 } | 1209 } |
| 1284 | 1210 |
| 1285 static void withScriptExecutionContextAndScriptStateAttributeRaisesAttributeSett
er(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCal
lbackInfo<void>& info) | 1211 static void withScriptExecutionContextAndScriptStateAttributeRaisesAttributeSett
er(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCal
lbackInfo<void>& info) |
| 1286 { | 1212 { |
| 1287 TestObj* imp = V8TestObject::toNative(info.Holder()); | 1213 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1288 V8TRYCATCH_VOID(TestObj*, v, V8TestObject::HasInstance(value, info.GetIsolat
e(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Objec
t>::Cast(value)) : 0); | 1214 V8TRYCATCH_VOID(TestObj*, v, V8TestObject::HasInstance(value, info.GetIsolat
e(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Objec
t>::Cast(value)) : 0); |
| 1289 ScriptState* currentState = ScriptState::current(); | 1215 ScriptState* currentState = ScriptState::current(); |
| 1290 if (!currentState) | 1216 if (!currentState) |
| 1291 return; | 1217 return; |
| 1292 ScriptState& state = *currentState; | 1218 ScriptState& state = *currentState; |
| 1293 ScriptExecutionContext* scriptContext = getScriptExecutionContext(); | 1219 ScriptExecutionContext* scriptContext = getScriptExecutionContext(); |
| 1294 imp->setWithScriptExecutionContextAndScriptStateAttributeRaises(&state, scri
ptContext, WTF::getPtr(v)); | 1220 imp->setWithScriptExecutionContextAndScriptStateAttributeRaises(&state, scri
ptContext, WTF::getPtr(v)); |
| 1295 if (state.hadException()) | 1221 if (state.hadException()) |
| 1296 throwError(state.exception(), info.GetIsolate()); | 1222 throwError(state.exception(), info.GetIsolate()); |
| 1297 return; | |
| 1298 } | 1223 } |
| 1299 | 1224 |
| 1300 static void withScriptExecutionContextAndScriptStateAttributeRaisesAttributeSett
erCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::Pro
pertyCallbackInfo<void>& info) | 1225 static void withScriptExecutionContextAndScriptStateAttributeRaisesAttributeSett
erCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::Pro
pertyCallbackInfo<void>& info) |
| 1301 { | 1226 { |
| 1302 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1227 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 1303 TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeRaisesAt
tributeSetter(name, value, info); | 1228 TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeRaisesAt
tributeSetter(name, value, info); |
| 1304 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 1229 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 1305 } | 1230 } |
| 1306 | 1231 |
| 1307 static void withScriptExecutionContextAndScriptStateWithSpacesAttributeAttribute
Getter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& in
fo) | 1232 static void withScriptExecutionContextAndScriptStateWithSpacesAttributeAttribute
Getter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& in
fo) |
| 1308 { | 1233 { |
| 1309 TestObj* imp = V8TestObject::toNative(info.Holder()); | 1234 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1310 ScriptState* currentState = ScriptState::current(); | 1235 ScriptState* currentState = ScriptState::current(); |
| 1311 if (!currentState) | 1236 if (!currentState) |
| 1312 return v8Undefined(); | 1237 return v8Undefined(); |
| 1313 ScriptState& state = *currentState; | 1238 ScriptState& state = *currentState; |
| 1314 ScriptExecutionContext* scriptContext = getScriptExecutionContext(); | 1239 ScriptExecutionContext* scriptContext = getScriptExecutionContext(); |
| 1315 v8SetReturnValueFast(info, imp->withScriptExecutionContextAndScriptStateWith
SpacesAttribute(&state, scriptContext), imp); | 1240 v8SetReturnValueFast(info, imp->withScriptExecutionContextAndScriptStateWith
SpacesAttribute(&state, scriptContext), imp); |
| 1316 return; | |
| 1317 } | 1241 } |
| 1318 | 1242 |
| 1319 static void withScriptExecutionContextAndScriptStateWithSpacesAttributeAttribute
GetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Va
lue>& info) | 1243 static void withScriptExecutionContextAndScriptStateWithSpacesAttributeAttribute
GetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Va
lue>& info) |
| 1320 { | 1244 { |
| 1321 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1245 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 1322 TestObjV8Internal::withScriptExecutionContextAndScriptStateWithSpacesAttribu
teAttributeGetter(name, info); | 1246 TestObjV8Internal::withScriptExecutionContextAndScriptStateWithSpacesAttribu
teAttributeGetter(name, info); |
| 1323 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 1247 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 1324 } | 1248 } |
| 1325 | 1249 |
| 1326 static void withScriptExecutionContextAndScriptStateWithSpacesAttributeAttribute
Setter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::Propert
yCallbackInfo<void>& info) | 1250 static void withScriptExecutionContextAndScriptStateWithSpacesAttributeAttribute
Setter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::Propert
yCallbackInfo<void>& info) |
| 1327 { | 1251 { |
| 1328 TestObj* imp = V8TestObject::toNative(info.Holder()); | 1252 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1329 V8TRYCATCH_VOID(TestObj*, v, V8TestObject::HasInstance(value, info.GetIsolat
e(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Objec
t>::Cast(value)) : 0); | 1253 V8TRYCATCH_VOID(TestObj*, v, V8TestObject::HasInstance(value, info.GetIsolat
e(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Objec
t>::Cast(value)) : 0); |
| 1330 ScriptState* currentState = ScriptState::current(); | 1254 ScriptState* currentState = ScriptState::current(); |
| 1331 if (!currentState) | 1255 if (!currentState) |
| 1332 return; | 1256 return; |
| 1333 ScriptState& state = *currentState; | 1257 ScriptState& state = *currentState; |
| 1334 ScriptExecutionContext* scriptContext = getScriptExecutionContext(); | 1258 ScriptExecutionContext* scriptContext = getScriptExecutionContext(); |
| 1335 imp->setWithScriptExecutionContextAndScriptStateWithSpacesAttribute(&state,
scriptContext, WTF::getPtr(v)); | 1259 imp->setWithScriptExecutionContextAndScriptStateWithSpacesAttribute(&state,
scriptContext, WTF::getPtr(v)); |
| 1336 if (state.hadException()) | 1260 if (state.hadException()) |
| 1337 throwError(state.exception(), info.GetIsolate()); | 1261 throwError(state.exception(), info.GetIsolate()); |
| 1338 return; | |
| 1339 } | 1262 } |
| 1340 | 1263 |
| 1341 static void withScriptExecutionContextAndScriptStateWithSpacesAttributeAttribute
SetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8:
:PropertyCallbackInfo<void>& info) | 1264 static void withScriptExecutionContextAndScriptStateWithSpacesAttributeAttribute
SetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8:
:PropertyCallbackInfo<void>& info) |
| 1342 { | 1265 { |
| 1343 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1266 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 1344 TestObjV8Internal::withScriptExecutionContextAndScriptStateWithSpacesAttribu
teAttributeSetter(name, value, info); | 1267 TestObjV8Internal::withScriptExecutionContextAndScriptStateWithSpacesAttribu
teAttributeSetter(name, value, info); |
| 1345 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 1268 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 1346 } | 1269 } |
| 1347 | 1270 |
| 1348 static void enforcedRangeByteAttrAttributeGetter(v8::Local<v8::String> name, con
st v8::PropertyCallbackInfo<v8::Value>& info) | 1271 static void enforcedRangeByteAttrAttributeGetter(v8::Local<v8::String> name, con
st v8::PropertyCallbackInfo<v8::Value>& info) |
| 1349 { | 1272 { |
| 1350 TestObj* imp = V8TestObject::toNative(info.Holder()); | 1273 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1351 v8SetReturnValueInt(info, imp->enforcedRangeByteAttr()); | 1274 v8SetReturnValueInt(info, imp->enforcedRangeByteAttr()); |
| 1352 return; | |
| 1353 } | 1275 } |
| 1354 | 1276 |
| 1355 static void enforcedRangeByteAttrAttributeGetterCallback(v8::Local<v8::String> n
ame, const v8::PropertyCallbackInfo<v8::Value>& info) | 1277 static void enforcedRangeByteAttrAttributeGetterCallback(v8::Local<v8::String> n
ame, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1356 { | 1278 { |
| 1357 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1279 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 1358 TestObjV8Internal::enforcedRangeByteAttrAttributeGetter(name, info); | 1280 TestObjV8Internal::enforcedRangeByteAttrAttributeGetter(name, info); |
| 1359 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 1281 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 1360 } | 1282 } |
| 1361 | 1283 |
| 1362 static void enforcedRangeByteAttrAttributeSetter(v8::Local<v8::String> name, v8:
:Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 1284 static void enforcedRangeByteAttrAttributeSetter(v8::Local<v8::String> name, v8:
:Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 1363 { | 1285 { |
| 1364 TestObj* imp = V8TestObject::toNative(info.Holder()); | 1286 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1365 V8TRYCATCH_WITH_TYPECHECK_VOID(int, v, toInt8(value, EnforceRange, ok), info
.GetIsolate()); | 1287 V8TRYCATCH_WITH_TYPECHECK_VOID(int, v, toInt8(value, EnforceRange, ok), info
.GetIsolate()); |
| 1366 imp->setEnforcedRangeByteAttr(v); | 1288 imp->setEnforcedRangeByteAttr(v); |
| 1367 return; | |
| 1368 } | 1289 } |
| 1369 | 1290 |
| 1370 static void enforcedRangeByteAttrAttributeSetterCallback(v8::Local<v8::String> n
ame, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 1291 static void enforcedRangeByteAttrAttributeSetterCallback(v8::Local<v8::String> n
ame, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 1371 { | 1292 { |
| 1372 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1293 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 1373 TestObjV8Internal::enforcedRangeByteAttrAttributeSetter(name, value, info); | 1294 TestObjV8Internal::enforcedRangeByteAttrAttributeSetter(name, value, info); |
| 1374 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 1295 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 1375 } | 1296 } |
| 1376 | 1297 |
| 1377 static void enforcedRangeOctetAttrAttributeGetter(v8::Local<v8::String> name, co
nst v8::PropertyCallbackInfo<v8::Value>& info) | 1298 static void enforcedRangeOctetAttrAttributeGetter(v8::Local<v8::String> name, co
nst v8::PropertyCallbackInfo<v8::Value>& info) |
| 1378 { | 1299 { |
| 1379 TestObj* imp = V8TestObject::toNative(info.Holder()); | 1300 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1380 v8SetReturnValueUnsigned(info, imp->enforcedRangeOctetAttr()); | 1301 v8SetReturnValueUnsigned(info, imp->enforcedRangeOctetAttr()); |
| 1381 return; | |
| 1382 } | 1302 } |
| 1383 | 1303 |
| 1384 static void enforcedRangeOctetAttrAttributeGetterCallback(v8::Local<v8::String>
name, const v8::PropertyCallbackInfo<v8::Value>& info) | 1304 static void enforcedRangeOctetAttrAttributeGetterCallback(v8::Local<v8::String>
name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1385 { | 1305 { |
| 1386 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1306 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 1387 TestObjV8Internal::enforcedRangeOctetAttrAttributeGetter(name, info); | 1307 TestObjV8Internal::enforcedRangeOctetAttrAttributeGetter(name, info); |
| 1388 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 1308 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 1389 } | 1309 } |
| 1390 | 1310 |
| 1391 static void enforcedRangeOctetAttrAttributeSetter(v8::Local<v8::String> name, v8
::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 1311 static void enforcedRangeOctetAttrAttributeSetter(v8::Local<v8::String> name, v8
::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 1392 { | 1312 { |
| 1393 TestObj* imp = V8TestObject::toNative(info.Holder()); | 1313 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1394 V8TRYCATCH_WITH_TYPECHECK_VOID(unsigned, v, toUInt8(value, EnforceRange, ok)
, info.GetIsolate()); | 1314 V8TRYCATCH_WITH_TYPECHECK_VOID(unsigned, v, toUInt8(value, EnforceRange, ok)
, info.GetIsolate()); |
| 1395 imp->setEnforcedRangeOctetAttr(v); | 1315 imp->setEnforcedRangeOctetAttr(v); |
| 1396 return; | |
| 1397 } | 1316 } |
| 1398 | 1317 |
| 1399 static void enforcedRangeOctetAttrAttributeSetterCallback(v8::Local<v8::String>
name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 1318 static void enforcedRangeOctetAttrAttributeSetterCallback(v8::Local<v8::String>
name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 1400 { | 1319 { |
| 1401 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1320 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 1402 TestObjV8Internal::enforcedRangeOctetAttrAttributeSetter(name, value, info); | 1321 TestObjV8Internal::enforcedRangeOctetAttrAttributeSetter(name, value, info); |
| 1403 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 1322 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 1404 } | 1323 } |
| 1405 | 1324 |
| 1406 static void enforcedRangeLongAttrAttributeGetter(v8::Local<v8::String> name, con
st v8::PropertyCallbackInfo<v8::Value>& info) | 1325 static void enforcedRangeLongAttrAttributeGetter(v8::Local<v8::String> name, con
st v8::PropertyCallbackInfo<v8::Value>& info) |
| 1407 { | 1326 { |
| 1408 TestObj* imp = V8TestObject::toNative(info.Holder()); | 1327 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1409 v8SetReturnValueInt(info, imp->enforcedRangeLongAttr()); | 1328 v8SetReturnValueInt(info, imp->enforcedRangeLongAttr()); |
| 1410 return; | |
| 1411 } | 1329 } |
| 1412 | 1330 |
| 1413 static void enforcedRangeLongAttrAttributeGetterCallback(v8::Local<v8::String> n
ame, const v8::PropertyCallbackInfo<v8::Value>& info) | 1331 static void enforcedRangeLongAttrAttributeGetterCallback(v8::Local<v8::String> n
ame, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1414 { | 1332 { |
| 1415 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1333 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 1416 TestObjV8Internal::enforcedRangeLongAttrAttributeGetter(name, info); | 1334 TestObjV8Internal::enforcedRangeLongAttrAttributeGetter(name, info); |
| 1417 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 1335 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 1418 } | 1336 } |
| 1419 | 1337 |
| 1420 static void enforcedRangeLongAttrAttributeSetter(v8::Local<v8::String> name, v8:
:Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 1338 static void enforcedRangeLongAttrAttributeSetter(v8::Local<v8::String> name, v8:
:Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 1421 { | 1339 { |
| 1422 TestObj* imp = V8TestObject::toNative(info.Holder()); | 1340 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1423 V8TRYCATCH_WITH_TYPECHECK_VOID(int, v, toInt32(value, EnforceRange, ok), inf
o.GetIsolate()); | 1341 V8TRYCATCH_WITH_TYPECHECK_VOID(int, v, toInt32(value, EnforceRange, ok), inf
o.GetIsolate()); |
| 1424 imp->setEnforcedRangeLongAttr(v); | 1342 imp->setEnforcedRangeLongAttr(v); |
| 1425 return; | |
| 1426 } | 1343 } |
| 1427 | 1344 |
| 1428 static void enforcedRangeLongAttrAttributeSetterCallback(v8::Local<v8::String> n
ame, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 1345 static void enforcedRangeLongAttrAttributeSetterCallback(v8::Local<v8::String> n
ame, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 1429 { | 1346 { |
| 1430 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1347 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 1431 TestObjV8Internal::enforcedRangeLongAttrAttributeSetter(name, value, info); | 1348 TestObjV8Internal::enforcedRangeLongAttrAttributeSetter(name, value, info); |
| 1432 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 1349 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 1433 } | 1350 } |
| 1434 | 1351 |
| 1435 static void enforcedRangeUnsignedLongAttrAttributeGetter(v8::Local<v8::String> n
ame, const v8::PropertyCallbackInfo<v8::Value>& info) | 1352 static void enforcedRangeUnsignedLongAttrAttributeGetter(v8::Local<v8::String> n
ame, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1436 { | 1353 { |
| 1437 TestObj* imp = V8TestObject::toNative(info.Holder()); | 1354 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1438 v8SetReturnValueUnsigned(info, imp->enforcedRangeUnsignedLongAttr()); | 1355 v8SetReturnValueUnsigned(info, imp->enforcedRangeUnsignedLongAttr()); |
| 1439 return; | |
| 1440 } | 1356 } |
| 1441 | 1357 |
| 1442 static void enforcedRangeUnsignedLongAttrAttributeGetterCallback(v8::Local<v8::S
tring> name, const v8::PropertyCallbackInfo<v8::Value>& info) | 1358 static void enforcedRangeUnsignedLongAttrAttributeGetterCallback(v8::Local<v8::S
tring> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1443 { | 1359 { |
| 1444 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1360 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 1445 TestObjV8Internal::enforcedRangeUnsignedLongAttrAttributeGetter(name, info); | 1361 TestObjV8Internal::enforcedRangeUnsignedLongAttrAttributeGetter(name, info); |
| 1446 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 1362 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 1447 } | 1363 } |
| 1448 | 1364 |
| 1449 static void enforcedRangeUnsignedLongAttrAttributeSetter(v8::Local<v8::String> n
ame, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 1365 static void enforcedRangeUnsignedLongAttrAttributeSetter(v8::Local<v8::String> n
ame, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 1450 { | 1366 { |
| 1451 TestObj* imp = V8TestObject::toNative(info.Holder()); | 1367 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1452 V8TRYCATCH_WITH_TYPECHECK_VOID(unsigned, v, toUInt32(value, EnforceRange, ok
), info.GetIsolate()); | 1368 V8TRYCATCH_WITH_TYPECHECK_VOID(unsigned, v, toUInt32(value, EnforceRange, ok
), info.GetIsolate()); |
| 1453 imp->setEnforcedRangeUnsignedLongAttr(v); | 1369 imp->setEnforcedRangeUnsignedLongAttr(v); |
| 1454 return; | |
| 1455 } | 1370 } |
| 1456 | 1371 |
| 1457 static void enforcedRangeUnsignedLongAttrAttributeSetterCallback(v8::Local<v8::S
tring> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& i
nfo) | 1372 static void enforcedRangeUnsignedLongAttrAttributeSetterCallback(v8::Local<v8::S
tring> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& i
nfo) |
| 1458 { | 1373 { |
| 1459 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1374 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 1460 TestObjV8Internal::enforcedRangeUnsignedLongAttrAttributeSetter(name, value,
info); | 1375 TestObjV8Internal::enforcedRangeUnsignedLongAttrAttributeSetter(name, value,
info); |
| 1461 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 1376 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 1462 } | 1377 } |
| 1463 | 1378 |
| 1464 static void enforcedRangeLongLongAttrAttributeGetter(v8::Local<v8::String> name,
const v8::PropertyCallbackInfo<v8::Value>& info) | 1379 static void enforcedRangeLongLongAttrAttributeGetter(v8::Local<v8::String> name,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1465 { | 1380 { |
| 1466 TestObj* imp = V8TestObject::toNative(info.Holder()); | 1381 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1467 v8SetReturnValue(info, static_cast<double>(imp->enforcedRangeLongLongAttr())
); | 1382 v8SetReturnValue(info, static_cast<double>(imp->enforcedRangeLongLongAttr())
); |
| 1468 return; | |
| 1469 } | 1383 } |
| 1470 | 1384 |
| 1471 static void enforcedRangeLongLongAttrAttributeGetterCallback(v8::Local<v8::Strin
g> name, const v8::PropertyCallbackInfo<v8::Value>& info) | 1385 static void enforcedRangeLongLongAttrAttributeGetterCallback(v8::Local<v8::Strin
g> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1472 { | 1386 { |
| 1473 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1387 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 1474 TestObjV8Internal::enforcedRangeLongLongAttrAttributeGetter(name, info); | 1388 TestObjV8Internal::enforcedRangeLongLongAttrAttributeGetter(name, info); |
| 1475 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 1389 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 1476 } | 1390 } |
| 1477 | 1391 |
| 1478 static void enforcedRangeLongLongAttrAttributeSetter(v8::Local<v8::String> name,
v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 1392 static void enforcedRangeLongLongAttrAttributeSetter(v8::Local<v8::String> name,
v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 1479 { | 1393 { |
| 1480 TestObj* imp = V8TestObject::toNative(info.Holder()); | 1394 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1481 V8TRYCATCH_WITH_TYPECHECK_VOID(long long, v, toInt64(value, EnforceRange, ok
), info.GetIsolate()); | 1395 V8TRYCATCH_WITH_TYPECHECK_VOID(long long, v, toInt64(value, EnforceRange, ok
), info.GetIsolate()); |
| 1482 imp->setEnforcedRangeLongLongAttr(v); | 1396 imp->setEnforcedRangeLongLongAttr(v); |
| 1483 return; | |
| 1484 } | 1397 } |
| 1485 | 1398 |
| 1486 static void enforcedRangeLongLongAttrAttributeSetterCallback(v8::Local<v8::Strin
g> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 1399 static void enforcedRangeLongLongAttrAttributeSetterCallback(v8::Local<v8::Strin
g> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 1487 { | 1400 { |
| 1488 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1401 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 1489 TestObjV8Internal::enforcedRangeLongLongAttrAttributeSetter(name, value, inf
o); | 1402 TestObjV8Internal::enforcedRangeLongLongAttrAttributeSetter(name, value, inf
o); |
| 1490 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 1403 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 1491 } | 1404 } |
| 1492 | 1405 |
| 1493 static void enforcedRangeUnsignedLongLongAttrAttributeGetter(v8::Local<v8::Strin
g> name, const v8::PropertyCallbackInfo<v8::Value>& info) | 1406 static void enforcedRangeUnsignedLongLongAttrAttributeGetter(v8::Local<v8::Strin
g> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1494 { | 1407 { |
| 1495 TestObj* imp = V8TestObject::toNative(info.Holder()); | 1408 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1496 v8SetReturnValue(info, static_cast<double>(imp->enforcedRangeUnsignedLongLon
gAttr())); | 1409 v8SetReturnValue(info, static_cast<double>(imp->enforcedRangeUnsignedLongLon
gAttr())); |
| 1497 return; | |
| 1498 } | 1410 } |
| 1499 | 1411 |
| 1500 static void enforcedRangeUnsignedLongLongAttrAttributeGetterCallback(v8::Local<v
8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) | 1412 static void enforcedRangeUnsignedLongLongAttrAttributeGetterCallback(v8::Local<v
8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1501 { | 1413 { |
| 1502 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1414 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 1503 TestObjV8Internal::enforcedRangeUnsignedLongLongAttrAttributeGetter(name, in
fo); | 1415 TestObjV8Internal::enforcedRangeUnsignedLongLongAttrAttributeGetter(name, in
fo); |
| 1504 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 1416 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 1505 } | 1417 } |
| 1506 | 1418 |
| 1507 static void enforcedRangeUnsignedLongLongAttrAttributeSetter(v8::Local<v8::Strin
g> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 1419 static void enforcedRangeUnsignedLongLongAttrAttributeSetter(v8::Local<v8::Strin
g> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 1508 { | 1420 { |
| 1509 TestObj* imp = V8TestObject::toNative(info.Holder()); | 1421 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1510 V8TRYCATCH_WITH_TYPECHECK_VOID(unsigned long long, v, toUInt64(value, Enforc
eRange, ok), info.GetIsolate()); | 1422 V8TRYCATCH_WITH_TYPECHECK_VOID(unsigned long long, v, toUInt64(value, Enforc
eRange, ok), info.GetIsolate()); |
| 1511 imp->setEnforcedRangeUnsignedLongLongAttr(v); | 1423 imp->setEnforcedRangeUnsignedLongLongAttr(v); |
| 1512 return; | |
| 1513 } | 1424 } |
| 1514 | 1425 |
| 1515 static void enforcedRangeUnsignedLongLongAttrAttributeSetterCallback(v8::Local<v
8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void
>& info) | 1426 static void enforcedRangeUnsignedLongLongAttrAttributeSetterCallback(v8::Local<v
8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void
>& info) |
| 1516 { | 1427 { |
| 1517 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1428 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 1518 TestObjV8Internal::enforcedRangeUnsignedLongLongAttrAttributeSetter(name, va
lue, info); | 1429 TestObjV8Internal::enforcedRangeUnsignedLongLongAttrAttributeSetter(name, va
lue, info); |
| 1519 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 1430 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 1520 } | 1431 } |
| 1521 | 1432 |
| 1522 #if ENABLE(Condition1) | 1433 #if ENABLE(Condition1) |
| 1523 | 1434 |
| 1524 static void conditionalAttr1AttributeGetter(v8::Local<v8::String> name, const v8
::PropertyCallbackInfo<v8::Value>& info) | 1435 static void conditionalAttr1AttributeGetter(v8::Local<v8::String> name, const v8
::PropertyCallbackInfo<v8::Value>& info) |
| 1525 { | 1436 { |
| 1526 TestObj* imp = V8TestObject::toNative(info.Holder()); | 1437 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1527 v8SetReturnValueInt(info, imp->conditionalAttr1()); | 1438 v8SetReturnValueInt(info, imp->conditionalAttr1()); |
| 1528 return; | |
| 1529 } | 1439 } |
| 1530 | 1440 |
| 1531 #endif // ENABLE(Condition1) | 1441 #endif // ENABLE(Condition1) |
| 1532 | 1442 |
| 1533 #if ENABLE(Condition1) | 1443 #if ENABLE(Condition1) |
| 1534 | 1444 |
| 1535 static void conditionalAttr1AttributeGetterCallback(v8::Local<v8::String> name,
const v8::PropertyCallbackInfo<v8::Value>& info) | 1445 static void conditionalAttr1AttributeGetterCallback(v8::Local<v8::String> name,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1536 { | 1446 { |
| 1537 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1447 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 1538 TestObjV8Internal::conditionalAttr1AttributeGetter(name, info); | 1448 TestObjV8Internal::conditionalAttr1AttributeGetter(name, info); |
| 1539 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 1449 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 1540 } | 1450 } |
| 1541 | 1451 |
| 1542 #endif // ENABLE(Condition1) | 1452 #endif // ENABLE(Condition1) |
| 1543 | 1453 |
| 1544 #if ENABLE(Condition1) | 1454 #if ENABLE(Condition1) |
| 1545 | 1455 |
| 1546 static void conditionalAttr1AttributeSetter(v8::Local<v8::String> name, v8::Loca
l<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 1456 static void conditionalAttr1AttributeSetter(v8::Local<v8::String> name, v8::Loca
l<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 1547 { | 1457 { |
| 1548 TestObj* imp = V8TestObject::toNative(info.Holder()); | 1458 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1549 V8TRYCATCH_VOID(int, v, toInt32(value)); | 1459 V8TRYCATCH_VOID(int, v, toInt32(value)); |
| 1550 imp->setConditionalAttr1(v); | 1460 imp->setConditionalAttr1(v); |
| 1551 return; | |
| 1552 } | 1461 } |
| 1553 | 1462 |
| 1554 #endif // ENABLE(Condition1) | 1463 #endif // ENABLE(Condition1) |
| 1555 | 1464 |
| 1556 #if ENABLE(Condition1) | 1465 #if ENABLE(Condition1) |
| 1557 | 1466 |
| 1558 static void conditionalAttr1AttributeSetterCallback(v8::Local<v8::String> name,
v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 1467 static void conditionalAttr1AttributeSetterCallback(v8::Local<v8::String> name,
v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 1559 { | 1468 { |
| 1560 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1469 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 1561 TestObjV8Internal::conditionalAttr1AttributeSetter(name, value, info); | 1470 TestObjV8Internal::conditionalAttr1AttributeSetter(name, value, info); |
| 1562 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 1471 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 1563 } | 1472 } |
| 1564 | 1473 |
| 1565 #endif // ENABLE(Condition1) | 1474 #endif // ENABLE(Condition1) |
| 1566 | 1475 |
| 1567 #if ENABLE(Condition1) && ENABLE(Condition2) | 1476 #if ENABLE(Condition1) && ENABLE(Condition2) |
| 1568 | 1477 |
| 1569 static void conditionalAttr2AttributeGetter(v8::Local<v8::String> name, const v8
::PropertyCallbackInfo<v8::Value>& info) | 1478 static void conditionalAttr2AttributeGetter(v8::Local<v8::String> name, const v8
::PropertyCallbackInfo<v8::Value>& info) |
| 1570 { | 1479 { |
| 1571 TestObj* imp = V8TestObject::toNative(info.Holder()); | 1480 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1572 v8SetReturnValueInt(info, imp->conditionalAttr2()); | 1481 v8SetReturnValueInt(info, imp->conditionalAttr2()); |
| 1573 return; | |
| 1574 } | 1482 } |
| 1575 | 1483 |
| 1576 #endif // ENABLE(Condition1) && ENABLE(Condition2) | 1484 #endif // ENABLE(Condition1) && ENABLE(Condition2) |
| 1577 | 1485 |
| 1578 #if ENABLE(Condition1) && ENABLE(Condition2) | 1486 #if ENABLE(Condition1) && ENABLE(Condition2) |
| 1579 | 1487 |
| 1580 static void conditionalAttr2AttributeGetterCallback(v8::Local<v8::String> name,
const v8::PropertyCallbackInfo<v8::Value>& info) | 1488 static void conditionalAttr2AttributeGetterCallback(v8::Local<v8::String> name,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1581 { | 1489 { |
| 1582 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1490 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 1583 TestObjV8Internal::conditionalAttr2AttributeGetter(name, info); | 1491 TestObjV8Internal::conditionalAttr2AttributeGetter(name, info); |
| 1584 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 1492 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 1585 } | 1493 } |
| 1586 | 1494 |
| 1587 #endif // ENABLE(Condition1) && ENABLE(Condition2) | 1495 #endif // ENABLE(Condition1) && ENABLE(Condition2) |
| 1588 | 1496 |
| 1589 #if ENABLE(Condition1) && ENABLE(Condition2) | 1497 #if ENABLE(Condition1) && ENABLE(Condition2) |
| 1590 | 1498 |
| 1591 static void conditionalAttr2AttributeSetter(v8::Local<v8::String> name, v8::Loca
l<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 1499 static void conditionalAttr2AttributeSetter(v8::Local<v8::String> name, v8::Loca
l<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 1592 { | 1500 { |
| 1593 TestObj* imp = V8TestObject::toNative(info.Holder()); | 1501 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1594 V8TRYCATCH_VOID(int, v, toInt32(value)); | 1502 V8TRYCATCH_VOID(int, v, toInt32(value)); |
| 1595 imp->setConditionalAttr2(v); | 1503 imp->setConditionalAttr2(v); |
| 1596 return; | |
| 1597 } | 1504 } |
| 1598 | 1505 |
| 1599 #endif // ENABLE(Condition1) && ENABLE(Condition2) | 1506 #endif // ENABLE(Condition1) && ENABLE(Condition2) |
| 1600 | 1507 |
| 1601 #if ENABLE(Condition1) && ENABLE(Condition2) | 1508 #if ENABLE(Condition1) && ENABLE(Condition2) |
| 1602 | 1509 |
| 1603 static void conditionalAttr2AttributeSetterCallback(v8::Local<v8::String> name,
v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 1510 static void conditionalAttr2AttributeSetterCallback(v8::Local<v8::String> name,
v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 1604 { | 1511 { |
| 1605 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1512 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 1606 TestObjV8Internal::conditionalAttr2AttributeSetter(name, value, info); | 1513 TestObjV8Internal::conditionalAttr2AttributeSetter(name, value, info); |
| 1607 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 1514 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 1608 } | 1515 } |
| 1609 | 1516 |
| 1610 #endif // ENABLE(Condition1) && ENABLE(Condition2) | 1517 #endif // ENABLE(Condition1) && ENABLE(Condition2) |
| 1611 | 1518 |
| 1612 #if ENABLE(Condition1) || ENABLE(Condition2) | 1519 #if ENABLE(Condition1) || ENABLE(Condition2) |
| 1613 | 1520 |
| 1614 static void conditionalAttr3AttributeGetter(v8::Local<v8::String> name, const v8
::PropertyCallbackInfo<v8::Value>& info) | 1521 static void conditionalAttr3AttributeGetter(v8::Local<v8::String> name, const v8
::PropertyCallbackInfo<v8::Value>& info) |
| 1615 { | 1522 { |
| 1616 TestObj* imp = V8TestObject::toNative(info.Holder()); | 1523 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1617 v8SetReturnValueInt(info, imp->conditionalAttr3()); | 1524 v8SetReturnValueInt(info, imp->conditionalAttr3()); |
| 1618 return; | |
| 1619 } | 1525 } |
| 1620 | 1526 |
| 1621 #endif // ENABLE(Condition1) || ENABLE(Condition2) | 1527 #endif // ENABLE(Condition1) || ENABLE(Condition2) |
| 1622 | 1528 |
| 1623 #if ENABLE(Condition1) || ENABLE(Condition2) | 1529 #if ENABLE(Condition1) || ENABLE(Condition2) |
| 1624 | 1530 |
| 1625 static void conditionalAttr3AttributeGetterCallback(v8::Local<v8::String> name,
const v8::PropertyCallbackInfo<v8::Value>& info) | 1531 static void conditionalAttr3AttributeGetterCallback(v8::Local<v8::String> name,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1626 { | 1532 { |
| 1627 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1533 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 1628 TestObjV8Internal::conditionalAttr3AttributeGetter(name, info); | 1534 TestObjV8Internal::conditionalAttr3AttributeGetter(name, info); |
| 1629 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 1535 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 1630 } | 1536 } |
| 1631 | 1537 |
| 1632 #endif // ENABLE(Condition1) || ENABLE(Condition2) | 1538 #endif // ENABLE(Condition1) || ENABLE(Condition2) |
| 1633 | 1539 |
| 1634 #if ENABLE(Condition1) || ENABLE(Condition2) | 1540 #if ENABLE(Condition1) || ENABLE(Condition2) |
| 1635 | 1541 |
| 1636 static void conditionalAttr3AttributeSetter(v8::Local<v8::String> name, v8::Loca
l<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 1542 static void conditionalAttr3AttributeSetter(v8::Local<v8::String> name, v8::Loca
l<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 1637 { | 1543 { |
| 1638 TestObj* imp = V8TestObject::toNative(info.Holder()); | 1544 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1639 V8TRYCATCH_VOID(int, v, toInt32(value)); | 1545 V8TRYCATCH_VOID(int, v, toInt32(value)); |
| 1640 imp->setConditionalAttr3(v); | 1546 imp->setConditionalAttr3(v); |
| 1641 return; | |
| 1642 } | 1547 } |
| 1643 | 1548 |
| 1644 #endif // ENABLE(Condition1) || ENABLE(Condition2) | 1549 #endif // ENABLE(Condition1) || ENABLE(Condition2) |
| 1645 | 1550 |
| 1646 #if ENABLE(Condition1) || ENABLE(Condition2) | 1551 #if ENABLE(Condition1) || ENABLE(Condition2) |
| 1647 | 1552 |
| 1648 static void conditionalAttr3AttributeSetterCallback(v8::Local<v8::String> name,
v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 1553 static void conditionalAttr3AttributeSetterCallback(v8::Local<v8::String> name,
v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 1649 { | 1554 { |
| 1650 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1555 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 1651 TestObjV8Internal::conditionalAttr3AttributeSetter(name, value, info); | 1556 TestObjV8Internal::conditionalAttr3AttributeSetter(name, value, info); |
| 1652 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 1557 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 1653 } | 1558 } |
| 1654 | 1559 |
| 1655 #endif // ENABLE(Condition1) || ENABLE(Condition2) | 1560 #endif // ENABLE(Condition1) || ENABLE(Condition2) |
| 1656 | 1561 |
| 1657 static void cachedAttribute1AttributeGetter(v8::Local<v8::String> name, const v8
::PropertyCallbackInfo<v8::Value>& info) | 1562 static void cachedAttribute1AttributeGetter(v8::Local<v8::String> name, const v8
::PropertyCallbackInfo<v8::Value>& info) |
| 1658 { | 1563 { |
| 1659 TestObj* imp = V8TestObject::toNative(info.Holder()); | 1564 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1660 v8SetReturnValue(info, imp->cachedAttribute1().v8Value()); | 1565 v8SetReturnValue(info, imp->cachedAttribute1().v8Value()); |
| 1661 return; | |
| 1662 } | 1566 } |
| 1663 | 1567 |
| 1664 static void cachedAttribute1AttributeGetterCallback(v8::Local<v8::String> name,
const v8::PropertyCallbackInfo<v8::Value>& info) | 1568 static void cachedAttribute1AttributeGetterCallback(v8::Local<v8::String> name,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1665 { | 1569 { |
| 1666 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1570 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 1667 TestObjV8Internal::cachedAttribute1AttributeGetter(name, info); | 1571 TestObjV8Internal::cachedAttribute1AttributeGetter(name, info); |
| 1668 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 1572 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 1669 } | 1573 } |
| 1670 | 1574 |
| 1671 static void cachedAttribute2AttributeGetter(v8::Local<v8::String> name, const v8
::PropertyCallbackInfo<v8::Value>& info) | 1575 static void cachedAttribute2AttributeGetter(v8::Local<v8::String> name, const v8
::PropertyCallbackInfo<v8::Value>& info) |
| 1672 { | 1576 { |
| 1673 TestObj* imp = V8TestObject::toNative(info.Holder()); | 1577 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1674 v8SetReturnValue(info, imp->cachedAttribute2().v8Value()); | 1578 v8SetReturnValue(info, imp->cachedAttribute2().v8Value()); |
| 1675 return; | |
| 1676 } | 1579 } |
| 1677 | 1580 |
| 1678 static void cachedAttribute2AttributeGetterCallback(v8::Local<v8::String> name,
const v8::PropertyCallbackInfo<v8::Value>& info) | 1581 static void cachedAttribute2AttributeGetterCallback(v8::Local<v8::String> name,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1679 { | 1582 { |
| 1680 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1583 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 1681 TestObjV8Internal::cachedAttribute2AttributeGetter(name, info); | 1584 TestObjV8Internal::cachedAttribute2AttributeGetter(name, info); |
| 1682 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 1585 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 1683 } | 1586 } |
| 1684 | 1587 |
| 1685 static void anyAttributeAttributeGetter(v8::Local<v8::String> name, const v8::Pr
opertyCallbackInfo<v8::Value>& info) | 1588 static void anyAttributeAttributeGetter(v8::Local<v8::String> name, const v8::Pr
opertyCallbackInfo<v8::Value>& info) |
| 1686 { | 1589 { |
| 1687 TestObj* imp = V8TestObject::toNative(info.Holder()); | 1590 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1688 v8SetReturnValue(info, imp->anyAttribute().v8Value()); | 1591 v8SetReturnValue(info, imp->anyAttribute().v8Value()); |
| 1689 return; | |
| 1690 } | 1592 } |
| 1691 | 1593 |
| 1692 static void anyAttributeAttributeGetterCallback(v8::Local<v8::String> name, cons
t v8::PropertyCallbackInfo<v8::Value>& info) | 1594 static void anyAttributeAttributeGetterCallback(v8::Local<v8::String> name, cons
t v8::PropertyCallbackInfo<v8::Value>& info) |
| 1693 { | 1595 { |
| 1694 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1596 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 1695 TestObjV8Internal::anyAttributeAttributeGetter(name, info); | 1597 TestObjV8Internal::anyAttributeAttributeGetter(name, info); |
| 1696 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 1598 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 1697 } | 1599 } |
| 1698 | 1600 |
| 1699 static void anyAttributeAttributeSetter(v8::Local<v8::String> name, v8::Local<v8
::Value> value, const v8::PropertyCallbackInfo<void>& info) | 1601 static void anyAttributeAttributeSetter(v8::Local<v8::String> name, v8::Local<v8
::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 1700 { | 1602 { |
| 1701 TestObj* imp = V8TestObject::toNative(info.Holder()); | 1603 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1702 V8TRYCATCH_VOID(ScriptValue, v, ScriptValue(value, info.GetIsolate())); | 1604 V8TRYCATCH_VOID(ScriptValue, v, ScriptValue(value, info.GetIsolate())); |
| 1703 imp->setAnyAttribute(v); | 1605 imp->setAnyAttribute(v); |
| 1704 return; | |
| 1705 } | 1606 } |
| 1706 | 1607 |
| 1707 static void anyAttributeAttributeSetterCallback(v8::Local<v8::String> name, v8::
Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 1608 static void anyAttributeAttributeSetterCallback(v8::Local<v8::String> name, v8::
Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 1708 { | 1609 { |
| 1709 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1610 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 1710 TestObjV8Internal::anyAttributeAttributeSetter(name, value, info); | 1611 TestObjV8Internal::anyAttributeAttributeSetter(name, value, info); |
| 1711 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 1612 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 1712 } | 1613 } |
| 1713 | 1614 |
| 1714 static void callbackFunctionAttributeAttributeGetter(v8::Local<v8::String> name,
const v8::PropertyCallbackInfo<v8::Value>& info) | 1615 static void callbackFunctionAttributeAttributeGetter(v8::Local<v8::String> name,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1715 { | 1616 { |
| 1716 TestObj* imp = V8TestObject::toNative(info.Holder()); | 1617 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1717 v8SetReturnValue(info, imp->callbackFunctionAttribute().v8Value()); | 1618 v8SetReturnValue(info, imp->callbackFunctionAttribute().v8Value()); |
| 1718 return; | |
| 1719 } | 1619 } |
| 1720 | 1620 |
| 1721 static void callbackFunctionAttributeAttributeGetterCallback(v8::Local<v8::Strin
g> name, const v8::PropertyCallbackInfo<v8::Value>& info) | 1621 static void callbackFunctionAttributeAttributeGetterCallback(v8::Local<v8::Strin
g> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1722 { | 1622 { |
| 1723 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1623 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 1724 TestObjV8Internal::callbackFunctionAttributeAttributeGetter(name, info); | 1624 TestObjV8Internal::callbackFunctionAttributeAttributeGetter(name, info); |
| 1725 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 1625 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 1726 } | 1626 } |
| 1727 | 1627 |
| 1728 static void callbackFunctionAttributeAttributeSetter(v8::Local<v8::String> name,
v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 1628 static void callbackFunctionAttributeAttributeSetter(v8::Local<v8::String> name,
v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 1729 { | 1629 { |
| 1730 TestObj* imp = V8TestObject::toNative(info.Holder()); | 1630 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1731 V8TRYCATCH_VOID(ScriptValue, v, ScriptValue(value, info.GetIsolate())); | 1631 V8TRYCATCH_VOID(ScriptValue, v, ScriptValue(value, info.GetIsolate())); |
| 1732 imp->setCallbackFunctionAttribute(v); | 1632 imp->setCallbackFunctionAttribute(v); |
| 1733 return; | |
| 1734 } | 1633 } |
| 1735 | 1634 |
| 1736 static void callbackFunctionAttributeAttributeSetterCallback(v8::Local<v8::Strin
g> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 1635 static void callbackFunctionAttributeAttributeSetterCallback(v8::Local<v8::Strin
g> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 1737 { | 1636 { |
| 1738 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1637 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 1739 TestObjV8Internal::callbackFunctionAttributeAttributeSetter(name, value, inf
o); | 1638 TestObjV8Internal::callbackFunctionAttributeAttributeSetter(name, value, inf
o); |
| 1740 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 1639 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 1741 } | 1640 } |
| 1742 | 1641 |
| 1743 static void enabledAtRuntimeAttrAttributeGetter(v8::Local<v8::String> name, cons
t v8::PropertyCallbackInfo<v8::Value>& info) | 1642 static void enabledAtRuntimeAttrAttributeGetter(v8::Local<v8::String> name, cons
t v8::PropertyCallbackInfo<v8::Value>& info) |
| 1744 { | 1643 { |
| 1745 TestObj* imp = V8TestObject::toNative(info.Holder()); | 1644 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1746 v8SetReturnValueInt(info, imp->enabledAtRuntimeAttr()); | 1645 v8SetReturnValueInt(info, imp->enabledAtRuntimeAttr()); |
| 1747 return; | |
| 1748 } | 1646 } |
| 1749 | 1647 |
| 1750 static void enabledAtRuntimeAttrAttributeGetterCallback(v8::Local<v8::String> na
me, const v8::PropertyCallbackInfo<v8::Value>& info) | 1648 static void enabledAtRuntimeAttrAttributeGetterCallback(v8::Local<v8::String> na
me, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1751 { | 1649 { |
| 1752 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1650 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 1753 TestObjV8Internal::enabledAtRuntimeAttrAttributeGetter(name, info); | 1651 TestObjV8Internal::enabledAtRuntimeAttrAttributeGetter(name, info); |
| 1754 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 1652 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 1755 } | 1653 } |
| 1756 | 1654 |
| 1757 static void enabledAtRuntimeAttrAttributeSetter(v8::Local<v8::String> name, v8::
Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 1655 static void enabledAtRuntimeAttrAttributeSetter(v8::Local<v8::String> name, v8::
Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 1758 { | 1656 { |
| 1759 TestObj* imp = V8TestObject::toNative(info.Holder()); | 1657 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1760 V8TRYCATCH_VOID(int, v, toInt32(value)); | 1658 V8TRYCATCH_VOID(int, v, toInt32(value)); |
| 1761 imp->setEnabledAtRuntimeAttr(v); | 1659 imp->setEnabledAtRuntimeAttr(v); |
| 1762 return; | |
| 1763 } | 1660 } |
| 1764 | 1661 |
| 1765 static void enabledAtRuntimeAttrAttributeSetterCallback(v8::Local<v8::String> na
me, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 1662 static void enabledAtRuntimeAttrAttributeSetterCallback(v8::Local<v8::String> na
me, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 1766 { | 1663 { |
| 1767 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1664 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 1768 TestObjV8Internal::enabledAtRuntimeAttrAttributeSetter(name, value, info); | 1665 TestObjV8Internal::enabledAtRuntimeAttrAttributeSetter(name, value, info); |
| 1769 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 1666 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 1770 } | 1667 } |
| 1771 | 1668 |
| 1772 static void enabledPerContextAttrAttributeGetter(v8::Local<v8::String> name, con
st v8::PropertyCallbackInfo<v8::Value>& info) | 1669 static void enabledPerContextAttrAttributeGetter(v8::Local<v8::String> name, con
st v8::PropertyCallbackInfo<v8::Value>& info) |
| 1773 { | 1670 { |
| 1774 TestObj* imp = V8TestObject::toNative(info.Holder()); | 1671 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1775 v8SetReturnValueInt(info, imp->enabledPerContextAttr()); | 1672 v8SetReturnValueInt(info, imp->enabledPerContextAttr()); |
| 1776 return; | |
| 1777 } | 1673 } |
| 1778 | 1674 |
| 1779 static void enabledPerContextAttrAttributeGetterCallback(v8::Local<v8::String> n
ame, const v8::PropertyCallbackInfo<v8::Value>& info) | 1675 static void enabledPerContextAttrAttributeGetterCallback(v8::Local<v8::String> n
ame, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1780 { | 1676 { |
| 1781 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1677 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 1782 TestObjV8Internal::enabledPerContextAttrAttributeGetter(name, info); | 1678 TestObjV8Internal::enabledPerContextAttrAttributeGetter(name, info); |
| 1783 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 1679 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 1784 } | 1680 } |
| 1785 | 1681 |
| 1786 static void enabledPerContextAttrAttributeSetter(v8::Local<v8::String> name, v8:
:Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 1682 static void enabledPerContextAttrAttributeSetter(v8::Local<v8::String> name, v8:
:Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 1787 { | 1683 { |
| 1788 TestObj* imp = V8TestObject::toNative(info.Holder()); | 1684 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1789 V8TRYCATCH_VOID(int, v, toInt32(value)); | 1685 V8TRYCATCH_VOID(int, v, toInt32(value)); |
| 1790 imp->setEnabledPerContextAttr(v); | 1686 imp->setEnabledPerContextAttr(v); |
| 1791 return; | |
| 1792 } | 1687 } |
| 1793 | 1688 |
| 1794 static void enabledPerContextAttrAttributeSetterCallback(v8::Local<v8::String> n
ame, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 1689 static void enabledPerContextAttrAttributeSetterCallback(v8::Local<v8::String> n
ame, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 1795 { | 1690 { |
| 1796 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1691 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 1797 TestObjV8Internal::enabledPerContextAttrAttributeSetter(name, value, info); | 1692 TestObjV8Internal::enabledPerContextAttrAttributeSetter(name, value, info); |
| 1798 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 1693 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 1799 } | 1694 } |
| 1800 | 1695 |
| 1801 static void floatArrayAttributeGetter(v8::Local<v8::String> name, const v8::Prop
ertyCallbackInfo<v8::Value>& info) | 1696 static void floatArrayAttributeGetter(v8::Local<v8::String> name, const v8::Prop
ertyCallbackInfo<v8::Value>& info) |
| 1802 { | 1697 { |
| 1803 TestObj* imp = V8TestObject::toNative(info.Holder()); | 1698 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1804 v8SetReturnValue(info, v8Array(imp->floatArray(), info.GetIsolate())); | 1699 v8SetReturnValue(info, v8Array(imp->floatArray(), info.GetIsolate())); |
| 1805 return; | |
| 1806 } | 1700 } |
| 1807 | 1701 |
| 1808 static void floatArrayAttributeGetterCallback(v8::Local<v8::String> name, const
v8::PropertyCallbackInfo<v8::Value>& info) | 1702 static void floatArrayAttributeGetterCallback(v8::Local<v8::String> name, const
v8::PropertyCallbackInfo<v8::Value>& info) |
| 1809 { | 1703 { |
| 1810 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1704 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 1811 TestObjV8Internal::floatArrayAttributeGetter(name, info); | 1705 TestObjV8Internal::floatArrayAttributeGetter(name, info); |
| 1812 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 1706 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 1813 } | 1707 } |
| 1814 | 1708 |
| 1815 static void floatArrayAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::
Value> value, const v8::PropertyCallbackInfo<void>& info) | 1709 static void floatArrayAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::
Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 1816 { | 1710 { |
| 1817 TestObj* imp = V8TestObject::toNative(info.Holder()); | 1711 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1818 V8TRYCATCH_VOID(Vector<float>, v, toNativeArray<float>(value, info.GetIsolat
e())); | 1712 V8TRYCATCH_VOID(Vector<float>, v, toNativeArray<float>(value, info.GetIsolat
e())); |
| 1819 imp->setFloatArray(v); | 1713 imp->setFloatArray(v); |
| 1820 return; | |
| 1821 } | 1714 } |
| 1822 | 1715 |
| 1823 static void floatArrayAttributeSetterCallback(v8::Local<v8::String> name, v8::Lo
cal<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 1716 static void floatArrayAttributeSetterCallback(v8::Local<v8::String> name, v8::Lo
cal<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 1824 { | 1717 { |
| 1825 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1718 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 1826 TestObjV8Internal::floatArrayAttributeSetter(name, value, info); | 1719 TestObjV8Internal::floatArrayAttributeSetter(name, value, info); |
| 1827 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 1720 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 1828 } | 1721 } |
| 1829 | 1722 |
| 1830 static void doubleArrayAttributeGetter(v8::Local<v8::String> name, const v8::Pro
pertyCallbackInfo<v8::Value>& info) | 1723 static void doubleArrayAttributeGetter(v8::Local<v8::String> name, const v8::Pro
pertyCallbackInfo<v8::Value>& info) |
| 1831 { | 1724 { |
| 1832 TestObj* imp = V8TestObject::toNative(info.Holder()); | 1725 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1833 v8SetReturnValue(info, v8Array(imp->doubleArray(), info.GetIsolate())); | 1726 v8SetReturnValue(info, v8Array(imp->doubleArray(), info.GetIsolate())); |
| 1834 return; | |
| 1835 } | 1727 } |
| 1836 | 1728 |
| 1837 static void doubleArrayAttributeGetterCallback(v8::Local<v8::String> name, const
v8::PropertyCallbackInfo<v8::Value>& info) | 1729 static void doubleArrayAttributeGetterCallback(v8::Local<v8::String> name, const
v8::PropertyCallbackInfo<v8::Value>& info) |
| 1838 { | 1730 { |
| 1839 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1731 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 1840 TestObjV8Internal::doubleArrayAttributeGetter(name, info); | 1732 TestObjV8Internal::doubleArrayAttributeGetter(name, info); |
| 1841 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 1733 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 1842 } | 1734 } |
| 1843 | 1735 |
| 1844 static void doubleArrayAttributeSetter(v8::Local<v8::String> name, v8::Local<v8:
:Value> value, const v8::PropertyCallbackInfo<void>& info) | 1736 static void doubleArrayAttributeSetter(v8::Local<v8::String> name, v8::Local<v8:
:Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 1845 { | 1737 { |
| 1846 TestObj* imp = V8TestObject::toNative(info.Holder()); | 1738 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1847 V8TRYCATCH_VOID(Vector<double>, v, toNativeArray<double>(value, info.GetIsol
ate())); | 1739 V8TRYCATCH_VOID(Vector<double>, v, toNativeArray<double>(value, info.GetIsol
ate())); |
| 1848 imp->setDoubleArray(v); | 1740 imp->setDoubleArray(v); |
| 1849 return; | |
| 1850 } | 1741 } |
| 1851 | 1742 |
| 1852 static void doubleArrayAttributeSetterCallback(v8::Local<v8::String> name, v8::L
ocal<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 1743 static void doubleArrayAttributeSetterCallback(v8::Local<v8::String> name, v8::L
ocal<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 1853 { | 1744 { |
| 1854 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1745 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 1855 TestObjV8Internal::doubleArrayAttributeSetter(name, value, info); | 1746 TestObjV8Internal::doubleArrayAttributeSetter(name, value, info); |
| 1856 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 1747 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 1857 } | 1748 } |
| 1858 | 1749 |
| 1859 static void messagePortArrayAttributeGetter(v8::Local<v8::String> name, const v8
::PropertyCallbackInfo<v8::Value>& info) | 1750 static void messagePortArrayAttributeGetter(v8::Local<v8::String> name, const v8
::PropertyCallbackInfo<v8::Value>& info) |
| 1860 { | 1751 { |
| 1861 TestObj* imp = V8TestObject::toNative(info.Holder()); | 1752 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1862 v8SetReturnValue(info, v8Array(imp->messagePortArray(), info.GetIsolate())); | 1753 v8SetReturnValue(info, v8Array(imp->messagePortArray(), info.GetIsolate())); |
| 1863 return; | |
| 1864 } | 1754 } |
| 1865 | 1755 |
| 1866 static void messagePortArrayAttributeGetterCallback(v8::Local<v8::String> name,
const v8::PropertyCallbackInfo<v8::Value>& info) | 1756 static void messagePortArrayAttributeGetterCallback(v8::Local<v8::String> name,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1867 { | 1757 { |
| 1868 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1758 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 1869 TestObjV8Internal::messagePortArrayAttributeGetter(name, info); | 1759 TestObjV8Internal::messagePortArrayAttributeGetter(name, info); |
| 1870 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 1760 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 1871 } | 1761 } |
| 1872 | 1762 |
| 1873 static void messagePortArrayAttributeSetter(v8::Local<v8::String> name, v8::Loca
l<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 1763 static void messagePortArrayAttributeSetter(v8::Local<v8::String> name, v8::Loca
l<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 1874 { | 1764 { |
| 1875 TestObj* imp = V8TestObject::toNative(info.Holder()); | 1765 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1876 V8TRYCATCH_VOID(Vector<RefPtr<MessagePort> >, v, (toRefPtrNativeArray<Messag
ePort, V8MessagePort>(value, info.GetIsolate()))); | 1766 V8TRYCATCH_VOID(Vector<RefPtr<MessagePort> >, v, (toRefPtrNativeArray<Messag
ePort, V8MessagePort>(value, info.GetIsolate()))); |
| 1877 imp->setMessagePortArray(v); | 1767 imp->setMessagePortArray(v); |
| 1878 return; | |
| 1879 } | 1768 } |
| 1880 | 1769 |
| 1881 static void messagePortArrayAttributeSetterCallback(v8::Local<v8::String> name,
v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 1770 static void messagePortArrayAttributeSetterCallback(v8::Local<v8::String> name,
v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 1882 { | 1771 { |
| 1883 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1772 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 1884 TestObjV8Internal::messagePortArrayAttributeSetter(name, value, info); | 1773 TestObjV8Internal::messagePortArrayAttributeSetter(name, value, info); |
| 1885 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 1774 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 1886 } | 1775 } |
| 1887 | 1776 |
| 1888 static void contentDocumentAttributeGetter(v8::Local<v8::String> name, const v8:
:PropertyCallbackInfo<v8::Value>& info) | 1777 static void contentDocumentAttributeGetter(v8::Local<v8::String> name, const v8:
:PropertyCallbackInfo<v8::Value>& info) |
| 1889 { | 1778 { |
| 1890 TestObj* imp = V8TestObject::toNative(info.Holder()); | 1779 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1891 if (!BindingSecurity::shouldAllowAccessToNode(imp->contentDocument())) { | 1780 if (!BindingSecurity::shouldAllowAccessToNode(imp->contentDocument())) { |
| 1892 v8SetReturnValueNull(info); | 1781 v8SetReturnValueNull(info); |
| 1893 return; | 1782 return; |
| 1894 } | 1783 } |
| 1895 v8SetReturnValueFast(info, imp->contentDocument(), imp); | 1784 v8SetReturnValueFast(info, imp->contentDocument(), imp); |
| 1896 return; | |
| 1897 } | 1785 } |
| 1898 | 1786 |
| 1899 static void contentDocumentAttributeGetterCallback(v8::Local<v8::String> name, c
onst v8::PropertyCallbackInfo<v8::Value>& info) | 1787 static void contentDocumentAttributeGetterCallback(v8::Local<v8::String> name, c
onst v8::PropertyCallbackInfo<v8::Value>& info) |
| 1900 { | 1788 { |
| 1901 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1789 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 1902 TestObjV8Internal::contentDocumentAttributeGetter(name, info); | 1790 TestObjV8Internal::contentDocumentAttributeGetter(name, info); |
| 1903 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 1791 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 1904 } | 1792 } |
| 1905 | 1793 |
| 1906 static void mutablePointAttributeGetter(v8::Local<v8::String> name, const v8::Pr
opertyCallbackInfo<v8::Value>& info) | 1794 static void mutablePointAttributeGetter(v8::Local<v8::String> name, const v8::Pr
opertyCallbackInfo<v8::Value>& info) |
| 1907 { | 1795 { |
| 1908 TestObj* imp = V8TestObject::toNative(info.Holder()); | 1796 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1909 v8SetReturnValueFast(info, WTF::getPtr(SVGStaticPropertyTearOff<TestObj, SVG
Point>::create(imp, imp->mutablePoint(), &TestObj::updateMutablePoint)), imp); | 1797 v8SetReturnValueFast(info, WTF::getPtr(SVGStaticPropertyTearOff<TestObj, SVG
Point>::create(imp, imp->mutablePoint(), &TestObj::updateMutablePoint)), imp); |
| 1910 return; | |
| 1911 } | 1798 } |
| 1912 | 1799 |
| 1913 static void mutablePointAttributeGetterCallback(v8::Local<v8::String> name, cons
t v8::PropertyCallbackInfo<v8::Value>& info) | 1800 static void mutablePointAttributeGetterCallback(v8::Local<v8::String> name, cons
t v8::PropertyCallbackInfo<v8::Value>& info) |
| 1914 { | 1801 { |
| 1915 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1802 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 1916 TestObjV8Internal::mutablePointAttributeGetter(name, info); | 1803 TestObjV8Internal::mutablePointAttributeGetter(name, info); |
| 1917 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 1804 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 1918 } | 1805 } |
| 1919 | 1806 |
| 1920 static void mutablePointAttributeSetter(v8::Local<v8::String> name, v8::Local<v8
::Value> value, const v8::PropertyCallbackInfo<void>& info) | 1807 static void mutablePointAttributeSetter(v8::Local<v8::String> name, v8::Local<v8
::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 1921 { | 1808 { |
| 1922 TestObj* imp = V8TestObject::toNative(info.Holder()); | 1809 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1923 V8TRYCATCH_VOID(RefPtr<SVGPropertyTearOff<SVGPoint> >, v, V8SVGPoint::HasIns
tance(value, info.GetIsolate(), worldType(info.GetIsolate())) ? V8SVGPoint::toNa
tive(v8::Handle<v8::Object>::Cast(value)) : 0); | 1810 V8TRYCATCH_VOID(RefPtr<SVGPropertyTearOff<SVGPoint> >, v, V8SVGPoint::HasIns
tance(value, info.GetIsolate(), worldType(info.GetIsolate())) ? V8SVGPoint::toNa
tive(v8::Handle<v8::Object>::Cast(value)) : 0); |
| 1924 imp->setMutablePoint(WTF::getPtr(v)); | 1811 imp->setMutablePoint(WTF::getPtr(v)); |
| 1925 return; | |
| 1926 } | 1812 } |
| 1927 | 1813 |
| 1928 static void mutablePointAttributeSetterCallback(v8::Local<v8::String> name, v8::
Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 1814 static void mutablePointAttributeSetterCallback(v8::Local<v8::String> name, v8::
Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 1929 { | 1815 { |
| 1930 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1816 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 1931 TestObjV8Internal::mutablePointAttributeSetter(name, value, info); | 1817 TestObjV8Internal::mutablePointAttributeSetter(name, value, info); |
| 1932 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 1818 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 1933 } | 1819 } |
| 1934 | 1820 |
| 1935 static void immutablePointAttributeGetter(v8::Local<v8::String> name, const v8::
PropertyCallbackInfo<v8::Value>& info) | 1821 static void immutablePointAttributeGetter(v8::Local<v8::String> name, const v8::
PropertyCallbackInfo<v8::Value>& info) |
| 1936 { | 1822 { |
| 1937 TestObj* imp = V8TestObject::toNative(info.Holder()); | 1823 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1938 v8SetReturnValueFast(info, WTF::getPtr(SVGPropertyTearOff<SVGPoint>::create(
imp->immutablePoint())), imp); | 1824 v8SetReturnValueFast(info, WTF::getPtr(SVGPropertyTearOff<SVGPoint>::create(
imp->immutablePoint())), imp); |
| 1939 return; | |
| 1940 } | 1825 } |
| 1941 | 1826 |
| 1942 static void immutablePointAttributeGetterCallback(v8::Local<v8::String> name, co
nst v8::PropertyCallbackInfo<v8::Value>& info) | 1827 static void immutablePointAttributeGetterCallback(v8::Local<v8::String> name, co
nst v8::PropertyCallbackInfo<v8::Value>& info) |
| 1943 { | 1828 { |
| 1944 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1829 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 1945 TestObjV8Internal::immutablePointAttributeGetter(name, info); | 1830 TestObjV8Internal::immutablePointAttributeGetter(name, info); |
| 1946 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 1831 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 1947 } | 1832 } |
| 1948 | 1833 |
| 1949 static void immutablePointAttributeSetter(v8::Local<v8::String> name, v8::Local<
v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 1834 static void immutablePointAttributeSetter(v8::Local<v8::String> name, v8::Local<
v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 1950 { | 1835 { |
| 1951 TestObj* imp = V8TestObject::toNative(info.Holder()); | 1836 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1952 V8TRYCATCH_VOID(RefPtr<SVGPropertyTearOff<SVGPoint> >, v, V8SVGPoint::HasIns
tance(value, info.GetIsolate(), worldType(info.GetIsolate())) ? V8SVGPoint::toNa
tive(v8::Handle<v8::Object>::Cast(value)) : 0); | 1837 V8TRYCATCH_VOID(RefPtr<SVGPropertyTearOff<SVGPoint> >, v, V8SVGPoint::HasIns
tance(value, info.GetIsolate(), worldType(info.GetIsolate())) ? V8SVGPoint::toNa
tive(v8::Handle<v8::Object>::Cast(value)) : 0); |
| 1953 imp->setImmutablePoint(WTF::getPtr(v)); | 1838 imp->setImmutablePoint(WTF::getPtr(v)); |
| 1954 return; | |
| 1955 } | 1839 } |
| 1956 | 1840 |
| 1957 static void immutablePointAttributeSetterCallback(v8::Local<v8::String> name, v8
::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 1841 static void immutablePointAttributeSetterCallback(v8::Local<v8::String> name, v8
::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 1958 { | 1842 { |
| 1959 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1843 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 1960 TestObjV8Internal::immutablePointAttributeSetter(name, value, info); | 1844 TestObjV8Internal::immutablePointAttributeSetter(name, value, info); |
| 1961 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 1845 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 1962 } | 1846 } |
| 1963 | 1847 |
| 1964 static void strawberryAttributeGetter(v8::Local<v8::String> name, const v8::Prop
ertyCallbackInfo<v8::Value>& info) | 1848 static void strawberryAttributeGetter(v8::Local<v8::String> name, const v8::Prop
ertyCallbackInfo<v8::Value>& info) |
| 1965 { | 1849 { |
| 1966 TestObj* imp = V8TestObject::toNative(info.Holder()); | 1850 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1967 v8SetReturnValueInt(info, imp->blueberry()); | 1851 v8SetReturnValueInt(info, imp->blueberry()); |
| 1968 return; | |
| 1969 } | 1852 } |
| 1970 | 1853 |
| 1971 static void strawberryAttributeGetterCallback(v8::Local<v8::String> name, const
v8::PropertyCallbackInfo<v8::Value>& info) | 1854 static void strawberryAttributeGetterCallback(v8::Local<v8::String> name, const
v8::PropertyCallbackInfo<v8::Value>& info) |
| 1972 { | 1855 { |
| 1973 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1856 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 1974 TestObjV8Internal::strawberryAttributeGetter(name, info); | 1857 TestObjV8Internal::strawberryAttributeGetter(name, info); |
| 1975 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 1858 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 1976 } | 1859 } |
| 1977 | 1860 |
| 1978 static void strawberryAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::
Value> value, const v8::PropertyCallbackInfo<void>& info) | 1861 static void strawberryAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::
Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 1979 { | 1862 { |
| 1980 TestObj* imp = V8TestObject::toNative(info.Holder()); | 1863 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1981 V8TRYCATCH_VOID(int, v, toInt32(value)); | 1864 V8TRYCATCH_VOID(int, v, toInt32(value)); |
| 1982 imp->setBlueberry(v); | 1865 imp->setBlueberry(v); |
| 1983 return; | |
| 1984 } | 1866 } |
| 1985 | 1867 |
| 1986 static void strawberryAttributeSetterCallback(v8::Local<v8::String> name, v8::Lo
cal<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 1868 static void strawberryAttributeSetterCallback(v8::Local<v8::String> name, v8::Lo
cal<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 1987 { | 1869 { |
| 1988 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1870 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 1989 TestObjV8Internal::strawberryAttributeSetter(name, value, info); | 1871 TestObjV8Internal::strawberryAttributeSetter(name, value, info); |
| 1990 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 1872 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 1991 } | 1873 } |
| 1992 | 1874 |
| 1993 static void strictFloatAttributeGetter(v8::Local<v8::String> name, const v8::Pro
pertyCallbackInfo<v8::Value>& info) | 1875 static void strictFloatAttributeGetter(v8::Local<v8::String> name, const v8::Pro
pertyCallbackInfo<v8::Value>& info) |
| 1994 { | 1876 { |
| 1995 TestObj* imp = V8TestObject::toNative(info.Holder()); | 1877 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 1996 v8SetReturnValue(info, imp->strictFloat()); | 1878 v8SetReturnValue(info, imp->strictFloat()); |
| 1997 return; | |
| 1998 } | 1879 } |
| 1999 | 1880 |
| 2000 static void strictFloatAttributeGetterCallback(v8::Local<v8::String> name, const
v8::PropertyCallbackInfo<v8::Value>& info) | 1881 static void strictFloatAttributeGetterCallback(v8::Local<v8::String> name, const
v8::PropertyCallbackInfo<v8::Value>& info) |
| 2001 { | 1882 { |
| 2002 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1883 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2003 TestObjV8Internal::strictFloatAttributeGetter(name, info); | 1884 TestObjV8Internal::strictFloatAttributeGetter(name, info); |
| 2004 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 1885 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 2005 } | 1886 } |
| 2006 | 1887 |
| 2007 static void strictFloatAttributeSetter(v8::Local<v8::String> name, v8::Local<v8:
:Value> value, const v8::PropertyCallbackInfo<void>& info) | 1888 static void strictFloatAttributeSetter(v8::Local<v8::String> name, v8::Local<v8:
:Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 2008 { | 1889 { |
| 2009 TestObj* imp = V8TestObject::toNative(info.Holder()); | 1890 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2010 V8TRYCATCH_VOID(float, v, static_cast<float>(value->NumberValue())); | 1891 V8TRYCATCH_VOID(float, v, static_cast<float>(value->NumberValue())); |
| 2011 imp->setStrictFloat(v); | 1892 imp->setStrictFloat(v); |
| 2012 return; | |
| 2013 } | 1893 } |
| 2014 | 1894 |
| 2015 static void strictFloatAttributeSetterCallback(v8::Local<v8::String> name, v8::L
ocal<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 1895 static void strictFloatAttributeSetterCallback(v8::Local<v8::String> name, v8::L
ocal<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 2016 { | 1896 { |
| 2017 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1897 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 2018 TestObjV8Internal::strictFloatAttributeSetter(name, value, info); | 1898 TestObjV8Internal::strictFloatAttributeSetter(name, value, info); |
| 2019 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 1899 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 2020 } | 1900 } |
| 2021 | 1901 |
| 2022 static void descriptionAttributeGetter(v8::Local<v8::String> name, const v8::Pro
pertyCallbackInfo<v8::Value>& info) | 1902 static void descriptionAttributeGetter(v8::Local<v8::String> name, const v8::Pro
pertyCallbackInfo<v8::Value>& info) |
| 2023 { | 1903 { |
| 2024 TestObj* imp = V8TestObject::toNative(info.Holder()); | 1904 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2025 v8SetReturnValueInt(info, imp->description()); | 1905 v8SetReturnValueInt(info, imp->description()); |
| 2026 return; | |
| 2027 } | 1906 } |
| 2028 | 1907 |
| 2029 static void descriptionAttributeGetterCallback(v8::Local<v8::String> name, const
v8::PropertyCallbackInfo<v8::Value>& info) | 1908 static void descriptionAttributeGetterCallback(v8::Local<v8::String> name, const
v8::PropertyCallbackInfo<v8::Value>& info) |
| 2030 { | 1909 { |
| 2031 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1910 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2032 TestObjV8Internal::descriptionAttributeGetter(name, info); | 1911 TestObjV8Internal::descriptionAttributeGetter(name, info); |
| 2033 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 1912 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 2034 } | 1913 } |
| 2035 | 1914 |
| 2036 static void idAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCall
backInfo<v8::Value>& info) | 1915 static void idAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCall
backInfo<v8::Value>& info) |
| 2037 { | 1916 { |
| 2038 TestObj* imp = V8TestObject::toNative(info.Holder()); | 1917 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2039 v8SetReturnValueInt(info, imp->id()); | 1918 v8SetReturnValueInt(info, imp->id()); |
| 2040 return; | |
| 2041 } | 1919 } |
| 2042 | 1920 |
| 2043 static void idAttributeGetterCallback(v8::Local<v8::String> name, const v8::Prop
ertyCallbackInfo<v8::Value>& info) | 1921 static void idAttributeGetterCallback(v8::Local<v8::String> name, const v8::Prop
ertyCallbackInfo<v8::Value>& info) |
| 2044 { | 1922 { |
| 2045 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1923 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2046 TestObjV8Internal::idAttributeGetter(name, info); | 1924 TestObjV8Internal::idAttributeGetter(name, info); |
| 2047 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 1925 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 2048 } | 1926 } |
| 2049 | 1927 |
| 2050 static void idAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> v
alue, const v8::PropertyCallbackInfo<void>& info) | 1928 static void idAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> v
alue, const v8::PropertyCallbackInfo<void>& info) |
| 2051 { | 1929 { |
| 2052 TestObj* imp = V8TestObject::toNative(info.Holder()); | 1930 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2053 V8TRYCATCH_VOID(int, v, toInt32(value)); | 1931 V8TRYCATCH_VOID(int, v, toInt32(value)); |
| 2054 imp->setId(v); | 1932 imp->setId(v); |
| 2055 return; | |
| 2056 } | 1933 } |
| 2057 | 1934 |
| 2058 static void idAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::
Value> value, const v8::PropertyCallbackInfo<void>& info) | 1935 static void idAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::
Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 2059 { | 1936 { |
| 2060 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1937 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 2061 TestObjV8Internal::idAttributeSetter(name, value, info); | 1938 TestObjV8Internal::idAttributeSetter(name, value, info); |
| 2062 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 1939 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 2063 } | 1940 } |
| 2064 | 1941 |
| 2065 static void hashAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCa
llbackInfo<v8::Value>& info) | 1942 static void hashAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCa
llbackInfo<v8::Value>& info) |
| 2066 { | 1943 { |
| 2067 TestObj* imp = V8TestObject::toNative(info.Holder()); | 1944 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2068 v8SetReturnValueString(info, imp->hash(), info.GetIsolate()); | 1945 v8SetReturnValueString(info, imp->hash(), info.GetIsolate()); |
| 2069 return; | |
| 2070 } | 1946 } |
| 2071 | 1947 |
| 2072 static void hashAttributeGetterCallback(v8::Local<v8::String> name, const v8::Pr
opertyCallbackInfo<v8::Value>& info) | 1948 static void hashAttributeGetterCallback(v8::Local<v8::String> name, const v8::Pr
opertyCallbackInfo<v8::Value>& info) |
| 2073 { | 1949 { |
| 2074 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1950 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2075 TestObjV8Internal::hashAttributeGetter(name, info); | 1951 TestObjV8Internal::hashAttributeGetter(name, info); |
| 2076 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 1952 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 2077 } | 1953 } |
| 2078 | 1954 |
| 2079 static void replaceableAttributeAttributeGetter(v8::Local<v8::String> name, cons
t v8::PropertyCallbackInfo<v8::Value>& info) | 1955 static void replaceableAttributeAttributeGetter(v8::Local<v8::String> name, cons
t v8::PropertyCallbackInfo<v8::Value>& info) |
| 2080 { | 1956 { |
| 2081 TestObj* imp = V8TestObject::toNative(info.Holder()); | 1957 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2082 v8SetReturnValueInt(info, imp->replaceableAttribute()); | 1958 v8SetReturnValueInt(info, imp->replaceableAttribute()); |
| 2083 return; | |
| 2084 } | 1959 } |
| 2085 | 1960 |
| 2086 static void replaceableAttributeAttributeGetterCallback(v8::Local<v8::String> na
me, const v8::PropertyCallbackInfo<v8::Value>& info) | 1961 static void replaceableAttributeAttributeGetterCallback(v8::Local<v8::String> na
me, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2087 { | 1962 { |
| 2088 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1963 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2089 TestObjV8Internal::replaceableAttributeAttributeGetter(name, info); | 1964 TestObjV8Internal::replaceableAttributeAttributeGetter(name, info); |
| 2090 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 1965 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 2091 } | 1966 } |
| 2092 | 1967 |
| 2093 static void nullableDoubleAttributeAttributeGetter(v8::Local<v8::String> name, c
onst v8::PropertyCallbackInfo<v8::Value>& info) | 1968 static void nullableDoubleAttributeAttributeGetter(v8::Local<v8::String> name, c
onst v8::PropertyCallbackInfo<v8::Value>& info) |
| 2094 { | 1969 { |
| 2095 TestObj* imp = V8TestObject::toNative(info.Holder()); | 1970 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2096 bool isNull = false; | 1971 bool isNull = false; |
| 2097 double value = imp->nullableDoubleAttribute(isNull); | 1972 double value = imp->nullableDoubleAttribute(isNull); |
| 2098 if (isNull) { | 1973 if (isNull) { |
| 2099 v8SetReturnValueNull(info); | 1974 v8SetReturnValueNull(info); |
| 2100 return; | 1975 return; |
| 2101 } | 1976 } |
| 2102 v8SetReturnValue(info, value); | 1977 v8SetReturnValue(info, value); |
| 2103 return; | |
| 2104 } | 1978 } |
| 2105 | 1979 |
| 2106 static void nullableDoubleAttributeAttributeGetterCallback(v8::Local<v8::String>
name, const v8::PropertyCallbackInfo<v8::Value>& info) | 1980 static void nullableDoubleAttributeAttributeGetterCallback(v8::Local<v8::String>
name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2107 { | 1981 { |
| 2108 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1982 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2109 TestObjV8Internal::nullableDoubleAttributeAttributeGetter(name, info); | 1983 TestObjV8Internal::nullableDoubleAttributeAttributeGetter(name, info); |
| 2110 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 1984 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 2111 } | 1985 } |
| 2112 | 1986 |
| 2113 static void nullableLongAttributeAttributeGetter(v8::Local<v8::String> name, con
st v8::PropertyCallbackInfo<v8::Value>& info) | 1987 static void nullableLongAttributeAttributeGetter(v8::Local<v8::String> name, con
st v8::PropertyCallbackInfo<v8::Value>& info) |
| 2114 { | 1988 { |
| 2115 TestObj* imp = V8TestObject::toNative(info.Holder()); | 1989 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2116 bool isNull = false; | 1990 bool isNull = false; |
| 2117 int value = imp->nullableLongAttribute(isNull); | 1991 int value = imp->nullableLongAttribute(isNull); |
| 2118 if (isNull) { | 1992 if (isNull) { |
| 2119 v8SetReturnValueNull(info); | 1993 v8SetReturnValueNull(info); |
| 2120 return; | 1994 return; |
| 2121 } | 1995 } |
| 2122 v8SetReturnValueInt(info, value); | 1996 v8SetReturnValueInt(info, value); |
| 2123 return; | |
| 2124 } | 1997 } |
| 2125 | 1998 |
| 2126 static void nullableLongAttributeAttributeGetterCallback(v8::Local<v8::String> n
ame, const v8::PropertyCallbackInfo<v8::Value>& info) | 1999 static void nullableLongAttributeAttributeGetterCallback(v8::Local<v8::String> n
ame, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2127 { | 2000 { |
| 2128 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2001 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2129 TestObjV8Internal::nullableLongAttributeAttributeGetter(name, info); | 2002 TestObjV8Internal::nullableLongAttributeAttributeGetter(name, info); |
| 2130 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 2003 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 2131 } | 2004 } |
| 2132 | 2005 |
| 2133 static void nullableBooleanAttributeAttributeGetter(v8::Local<v8::String> name,
const v8::PropertyCallbackInfo<v8::Value>& info) | 2006 static void nullableBooleanAttributeAttributeGetter(v8::Local<v8::String> name,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2134 { | 2007 { |
| 2135 TestObj* imp = V8TestObject::toNative(info.Holder()); | 2008 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2136 bool isNull = false; | 2009 bool isNull = false; |
| 2137 bool value = imp->nullableBooleanAttribute(isNull); | 2010 bool value = imp->nullableBooleanAttribute(isNull); |
| 2138 if (isNull) { | 2011 if (isNull) { |
| 2139 v8SetReturnValueNull(info); | 2012 v8SetReturnValueNull(info); |
| 2140 return; | 2013 return; |
| 2141 } | 2014 } |
| 2142 v8SetReturnValueBool(info, value); | 2015 v8SetReturnValueBool(info, value); |
| 2143 return; | |
| 2144 } | 2016 } |
| 2145 | 2017 |
| 2146 static void nullableBooleanAttributeAttributeGetterCallback(v8::Local<v8::String
> name, const v8::PropertyCallbackInfo<v8::Value>& info) | 2018 static void nullableBooleanAttributeAttributeGetterCallback(v8::Local<v8::String
> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2147 { | 2019 { |
| 2148 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2020 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2149 TestObjV8Internal::nullableBooleanAttributeAttributeGetter(name, info); | 2021 TestObjV8Internal::nullableBooleanAttributeAttributeGetter(name, info); |
| 2150 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 2022 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 2151 } | 2023 } |
| 2152 | 2024 |
| 2153 static void nullableStringAttributeAttributeGetter(v8::Local<v8::String> name, c
onst v8::PropertyCallbackInfo<v8::Value>& info) | 2025 static void nullableStringAttributeAttributeGetter(v8::Local<v8::String> name, c
onst v8::PropertyCallbackInfo<v8::Value>& info) |
| 2154 { | 2026 { |
| 2155 TestObj* imp = V8TestObject::toNative(info.Holder()); | 2027 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2156 bool isNull = false; | 2028 bool isNull = false; |
| 2157 String value = imp->nullableStringAttribute(isNull); | 2029 String value = imp->nullableStringAttribute(isNull); |
| 2158 if (isNull) { | 2030 if (isNull) { |
| 2159 v8SetReturnValueNull(info); | 2031 v8SetReturnValueNull(info); |
| 2160 return; | 2032 return; |
| 2161 } | 2033 } |
| 2162 v8SetReturnValueString(info, value, info.GetIsolate()); | 2034 v8SetReturnValueString(info, value, info.GetIsolate()); |
| 2163 return; | |
| 2164 } | 2035 } |
| 2165 | 2036 |
| 2166 static void nullableStringAttributeAttributeGetterCallback(v8::Local<v8::String>
name, const v8::PropertyCallbackInfo<v8::Value>& info) | 2037 static void nullableStringAttributeAttributeGetterCallback(v8::Local<v8::String>
name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2167 { | 2038 { |
| 2168 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2039 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2169 TestObjV8Internal::nullableStringAttributeAttributeGetter(name, info); | 2040 TestObjV8Internal::nullableStringAttributeAttributeGetter(name, info); |
| 2170 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 2041 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 2171 } | 2042 } |
| 2172 | 2043 |
| 2173 static void nullableLongSettableAttributeAttributeGetter(v8::Local<v8::String> n
ame, const v8::PropertyCallbackInfo<v8::Value>& info) | 2044 static void nullableLongSettableAttributeAttributeGetter(v8::Local<v8::String> n
ame, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2174 { | 2045 { |
| 2175 TestObj* imp = V8TestObject::toNative(info.Holder()); | 2046 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2176 bool isNull = false; | 2047 bool isNull = false; |
| 2177 int value = imp->nullableLongSettableAttribute(isNull); | 2048 int value = imp->nullableLongSettableAttribute(isNull); |
| 2178 if (isNull) { | 2049 if (isNull) { |
| 2179 v8SetReturnValueNull(info); | 2050 v8SetReturnValueNull(info); |
| 2180 return; | 2051 return; |
| 2181 } | 2052 } |
| 2182 v8SetReturnValueInt(info, value); | 2053 v8SetReturnValueInt(info, value); |
| 2183 return; | |
| 2184 } | 2054 } |
| 2185 | 2055 |
| 2186 static void nullableLongSettableAttributeAttributeGetterCallback(v8::Local<v8::S
tring> name, const v8::PropertyCallbackInfo<v8::Value>& info) | 2056 static void nullableLongSettableAttributeAttributeGetterCallback(v8::Local<v8::S
tring> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2187 { | 2057 { |
| 2188 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2058 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2189 TestObjV8Internal::nullableLongSettableAttributeAttributeGetter(name, info); | 2059 TestObjV8Internal::nullableLongSettableAttributeAttributeGetter(name, info); |
| 2190 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 2060 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 2191 } | 2061 } |
| 2192 | 2062 |
| 2193 static void nullableLongSettableAttributeAttributeSetter(v8::Local<v8::String> n
ame, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 2063 static void nullableLongSettableAttributeAttributeSetter(v8::Local<v8::String> n
ame, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 2194 { | 2064 { |
| 2195 TestObj* imp = V8TestObject::toNative(info.Holder()); | 2065 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2196 V8TRYCATCH_VOID(int, v, toInt32(value)); | 2066 V8TRYCATCH_VOID(int, v, toInt32(value)); |
| 2197 imp->setNullableLongSettableAttribute(v); | 2067 imp->setNullableLongSettableAttribute(v); |
| 2198 return; | |
| 2199 } | 2068 } |
| 2200 | 2069 |
| 2201 static void nullableLongSettableAttributeAttributeSetterCallback(v8::Local<v8::S
tring> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& i
nfo) | 2070 static void nullableLongSettableAttributeAttributeSetterCallback(v8::Local<v8::S
tring> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& i
nfo) |
| 2202 { | 2071 { |
| 2203 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2072 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 2204 TestObjV8Internal::nullableLongSettableAttributeAttributeSetter(name, value,
info); | 2073 TestObjV8Internal::nullableLongSettableAttributeAttributeSetter(name, value,
info); |
| 2205 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 2074 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 2206 } | 2075 } |
| 2207 | 2076 |
| 2208 static void nullableStringValueAttributeGetter(v8::Local<v8::String> name, const
v8::PropertyCallbackInfo<v8::Value>& info) | 2077 static void nullableStringValueAttributeGetter(v8::Local<v8::String> name, const
v8::PropertyCallbackInfo<v8::Value>& info) |
| 2209 { | 2078 { |
| 2210 TestObj* imp = V8TestObject::toNative(info.Holder()); | 2079 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2211 ExceptionState es(info.GetIsolate()); | 2080 ExceptionState es(info.GetIsolate()); |
| 2212 bool isNull = false; | 2081 bool isNull = false; |
| 2213 int value = imp->nullableStringValue(isNull, es); | 2082 int value = imp->nullableStringValue(isNull, es); |
| 2214 if (isNull) { | 2083 if (isNull) { |
| 2215 v8SetReturnValueNull(info); | 2084 v8SetReturnValueNull(info); |
| 2216 return; | 2085 return; |
| 2217 } | 2086 } |
| 2218 if (UNLIKELY(es.throwIfNeeded())) | 2087 if (UNLIKELY(es.throwIfNeeded())) |
| 2219 return; | 2088 return; |
| 2220 v8SetReturnValueInt(info, value); | 2089 v8SetReturnValueInt(info, value); |
| 2221 return; | |
| 2222 } | 2090 } |
| 2223 | 2091 |
| 2224 static void nullableStringValueAttributeGetterCallback(v8::Local<v8::String> nam
e, const v8::PropertyCallbackInfo<v8::Value>& info) | 2092 static void nullableStringValueAttributeGetterCallback(v8::Local<v8::String> nam
e, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2225 { | 2093 { |
| 2226 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2094 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2227 TestObjV8Internal::nullableStringValueAttributeGetter(name, info); | 2095 TestObjV8Internal::nullableStringValueAttributeGetter(name, info); |
| 2228 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 2096 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 2229 } | 2097 } |
| 2230 | 2098 |
| 2231 static void nullableStringValueAttributeSetter(v8::Local<v8::String> name, v8::L
ocal<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 2099 static void nullableStringValueAttributeSetter(v8::Local<v8::String> name, v8::L
ocal<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 2232 { | 2100 { |
| 2233 TestObj* imp = V8TestObject::toNative(info.Holder()); | 2101 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2234 V8TRYCATCH_VOID(int, v, toInt32(value)); | 2102 V8TRYCATCH_VOID(int, v, toInt32(value)); |
| 2235 imp->setNullableStringValue(v); | 2103 imp->setNullableStringValue(v); |
| 2236 return; | |
| 2237 } | 2104 } |
| 2238 | 2105 |
| 2239 static void nullableStringValueAttributeSetterCallback(v8::Local<v8::String> nam
e, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 2106 static void nullableStringValueAttributeSetterCallback(v8::Local<v8::String> nam
e, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 2240 { | 2107 { |
| 2241 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2108 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 2242 TestObjV8Internal::nullableStringValueAttributeSetter(name, value, info); | 2109 TestObjV8Internal::nullableStringValueAttributeSetter(name, value, info); |
| 2243 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 2110 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 2244 } | 2111 } |
| 2245 | 2112 |
| 2246 static void perWorldReadOnlyAttributeAttributeGetter(v8::Local<v8::String> name,
const v8::PropertyCallbackInfo<v8::Value>& info) | 2113 static void perWorldReadOnlyAttributeAttributeGetter(v8::Local<v8::String> name,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2247 { | 2114 { |
| 2248 TestObj* imp = V8TestObject::toNative(info.Holder()); | 2115 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2249 RefPtr<TestObj> result = imp->perWorldReadOnlyAttribute(); | 2116 RefPtr<TestObj> result = imp->perWorldReadOnlyAttribute(); |
| 2250 if (result.get() && DOMDataStore::setReturnValueFromWrapper<V8TestObject>(in
fo.GetReturnValue(), result.get())) | 2117 if (result.get() && DOMDataStore::setReturnValueFromWrapper<V8TestObject>(in
fo.GetReturnValue(), result.get())) |
| 2251 return; | 2118 return; |
| 2252 v8::Handle<v8::Value> wrapper = toV8(result.get(), info.Holder(), info.GetIs
olate()); | 2119 v8::Handle<v8::Value> wrapper = toV8(result.get(), info.Holder(), info.GetIs
olate()); |
| 2253 if (!wrapper.IsEmpty()) { | 2120 if (!wrapper.IsEmpty()) { |
| 2254 V8HiddenPropertyName::setNamedHiddenReference(info.Holder(), "perWorldRe
adOnlyAttribute", wrapper); | 2121 V8HiddenPropertyName::setNamedHiddenReference(info.Holder(), "perWorldRe
adOnlyAttribute", wrapper); |
| 2255 v8SetReturnValue(info, wrapper); | 2122 v8SetReturnValue(info, wrapper); |
| 2256 } | 2123 } |
| 2257 return; | |
| 2258 } | 2124 } |
| 2259 | 2125 |
| 2260 static void perWorldReadOnlyAttributeAttributeGetterCallback(v8::Local<v8::Strin
g> name, const v8::PropertyCallbackInfo<v8::Value>& info) | 2126 static void perWorldReadOnlyAttributeAttributeGetterCallback(v8::Local<v8::Strin
g> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2261 { | 2127 { |
| 2262 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2128 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2263 TestObjV8Internal::perWorldReadOnlyAttributeAttributeGetter(name, info); | 2129 TestObjV8Internal::perWorldReadOnlyAttributeAttributeGetter(name, info); |
| 2264 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 2130 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 2265 } | 2131 } |
| 2266 | 2132 |
| 2267 static void perWorldReadOnlyAttributeAttributeGetterForMainWorld(v8::Local<v8::S
tring> name, const v8::PropertyCallbackInfo<v8::Value>& info) | 2133 static void perWorldReadOnlyAttributeAttributeGetterForMainWorld(v8::Local<v8::S
tring> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2268 { | 2134 { |
| 2269 TestObj* imp = V8TestObject::toNative(info.Holder()); | 2135 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2270 RefPtr<TestObj> result = imp->perWorldReadOnlyAttribute(); | 2136 RefPtr<TestObj> result = imp->perWorldReadOnlyAttribute(); |
| 2271 if (result.get() && DOMDataStore::setReturnValueFromWrapperForMainWorld<V8Te
stObject>(info.GetReturnValue(), result.get())) | 2137 if (result.get() && DOMDataStore::setReturnValueFromWrapperForMainWorld<V8Te
stObject>(info.GetReturnValue(), result.get())) |
| 2272 return; | 2138 return; |
| 2273 v8::Handle<v8::Value> wrapper = toV8(result.get(), info.Holder(), info.GetIs
olate()); | 2139 v8::Handle<v8::Value> wrapper = toV8(result.get(), info.Holder(), info.GetIs
olate()); |
| 2274 if (!wrapper.IsEmpty()) { | 2140 if (!wrapper.IsEmpty()) { |
| 2275 V8HiddenPropertyName::setNamedHiddenReference(info.Holder(), "perWorldRe
adOnlyAttribute", wrapper); | 2141 V8HiddenPropertyName::setNamedHiddenReference(info.Holder(), "perWorldRe
adOnlyAttribute", wrapper); |
| 2276 v8SetReturnValue(info, wrapper); | 2142 v8SetReturnValue(info, wrapper); |
| 2277 } | 2143 } |
| 2278 return; | |
| 2279 } | 2144 } |
| 2280 | 2145 |
| 2281 static void perWorldReadOnlyAttributeAttributeGetterCallbackForMainWorld(v8::Loc
al<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) | 2146 static void perWorldReadOnlyAttributeAttributeGetterCallbackForMainWorld(v8::Loc
al<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2282 { | 2147 { |
| 2283 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2148 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2284 TestObjV8Internal::perWorldReadOnlyAttributeAttributeGetterForMainWorld(name
, info); | 2149 TestObjV8Internal::perWorldReadOnlyAttributeAttributeGetterForMainWorld(name
, info); |
| 2285 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 2150 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 2286 } | 2151 } |
| 2287 | 2152 |
| 2288 static void perWorldAttributeAttributeGetter(v8::Local<v8::String> name, const v
8::PropertyCallbackInfo<v8::Value>& info) | 2153 static void perWorldAttributeAttributeGetter(v8::Local<v8::String> name, const v
8::PropertyCallbackInfo<v8::Value>& info) |
| 2289 { | 2154 { |
| 2290 TestObj* imp = V8TestObject::toNative(info.Holder()); | 2155 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2291 v8SetReturnValueFast(info, imp->perWorldAttribute(), imp); | 2156 v8SetReturnValueFast(info, imp->perWorldAttribute(), imp); |
| 2292 return; | |
| 2293 } | 2157 } |
| 2294 | 2158 |
| 2295 static void perWorldAttributeAttributeGetterCallback(v8::Local<v8::String> name,
const v8::PropertyCallbackInfo<v8::Value>& info) | 2159 static void perWorldAttributeAttributeGetterCallback(v8::Local<v8::String> name,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2296 { | 2160 { |
| 2297 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2161 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2298 TestObjV8Internal::perWorldAttributeAttributeGetter(name, info); | 2162 TestObjV8Internal::perWorldAttributeAttributeGetter(name, info); |
| 2299 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 2163 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 2300 } | 2164 } |
| 2301 | 2165 |
| 2302 static void perWorldAttributeAttributeGetterForMainWorld(v8::Local<v8::String> n
ame, const v8::PropertyCallbackInfo<v8::Value>& info) | 2166 static void perWorldAttributeAttributeGetterForMainWorld(v8::Local<v8::String> n
ame, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2303 { | 2167 { |
| 2304 TestObj* imp = V8TestObject::toNative(info.Holder()); | 2168 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2305 v8SetReturnValueForMainWorld(info, imp->perWorldAttribute(), info.Holder()); | 2169 v8SetReturnValueForMainWorld(info, imp->perWorldAttribute(), info.Holder()); |
| 2306 return; | |
| 2307 } | 2170 } |
| 2308 | 2171 |
| 2309 static void perWorldAttributeAttributeGetterCallbackForMainWorld(v8::Local<v8::S
tring> name, const v8::PropertyCallbackInfo<v8::Value>& info) | 2172 static void perWorldAttributeAttributeGetterCallbackForMainWorld(v8::Local<v8::S
tring> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2310 { | 2173 { |
| 2311 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2174 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2312 TestObjV8Internal::perWorldAttributeAttributeGetterForMainWorld(name, info); | 2175 TestObjV8Internal::perWorldAttributeAttributeGetterForMainWorld(name, info); |
| 2313 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 2176 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 2314 } | 2177 } |
| 2315 | 2178 |
| 2316 static void perWorldAttributeAttributeSetter(v8::Local<v8::String> name, v8::Loc
al<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 2179 static void perWorldAttributeAttributeSetter(v8::Local<v8::String> name, v8::Loc
al<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 2317 { | 2180 { |
| 2318 TestObj* imp = V8TestObject::toNative(info.Holder()); | 2181 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2319 V8TRYCATCH_VOID(TestObj*, v, V8TestObject::HasInstance(value, info.GetIsolat
e(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Objec
t>::Cast(value)) : 0); | 2182 V8TRYCATCH_VOID(TestObj*, v, V8TestObject::HasInstance(value, info.GetIsolat
e(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Objec
t>::Cast(value)) : 0); |
| 2320 imp->setPerWorldAttribute(WTF::getPtr(v)); | 2183 imp->setPerWorldAttribute(WTF::getPtr(v)); |
| 2321 return; | |
| 2322 } | 2184 } |
| 2323 | 2185 |
| 2324 static void perWorldAttributeAttributeSetterCallback(v8::Local<v8::String> name,
v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 2186 static void perWorldAttributeAttributeSetterCallback(v8::Local<v8::String> name,
v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 2325 { | 2187 { |
| 2326 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2188 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 2327 TestObjV8Internal::perWorldAttributeAttributeSetter(name, value, info); | 2189 TestObjV8Internal::perWorldAttributeAttributeSetter(name, value, info); |
| 2328 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 2190 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 2329 } | 2191 } |
| 2330 | 2192 |
| 2331 static void perWorldAttributeAttributeSetterForMainWorld(v8::Local<v8::String> n
ame, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 2193 static void perWorldAttributeAttributeSetterForMainWorld(v8::Local<v8::String> n
ame, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 2332 { | 2194 { |
| 2333 TestObj* imp = V8TestObject::toNative(info.Holder()); | 2195 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2334 V8TRYCATCH_VOID(TestObj*, v, V8TestObject::HasInstance(value, info.GetIsolat
e(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Objec
t>::Cast(value)) : 0); | 2196 V8TRYCATCH_VOID(TestObj*, v, V8TestObject::HasInstance(value, info.GetIsolat
e(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Objec
t>::Cast(value)) : 0); |
| 2335 imp->setPerWorldAttribute(WTF::getPtr(v)); | 2197 imp->setPerWorldAttribute(WTF::getPtr(v)); |
| 2336 return; | |
| 2337 } | 2198 } |
| 2338 | 2199 |
| 2339 static void perWorldAttributeAttributeSetterCallbackForMainWorld(v8::Local<v8::S
tring> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& i
nfo) | 2200 static void perWorldAttributeAttributeSetterCallbackForMainWorld(v8::Local<v8::S
tring> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& i
nfo) |
| 2340 { | 2201 { |
| 2341 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2202 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 2342 TestObjV8Internal::perWorldAttributeAttributeSetterForMainWorld(name, value,
info); | 2203 TestObjV8Internal::perWorldAttributeAttributeSetterForMainWorld(name, value,
info); |
| 2343 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 2204 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 2344 } | 2205 } |
| 2345 | 2206 |
| 2346 static void activityLoggedAttr1AttributeGetter(v8::Local<v8::String> name, const
v8::PropertyCallbackInfo<v8::Value>& info) | 2207 static void activityLoggedAttr1AttributeGetter(v8::Local<v8::String> name, const
v8::PropertyCallbackInfo<v8::Value>& info) |
| 2347 { | 2208 { |
| 2348 TestObj* imp = V8TestObject::toNative(info.Holder()); | 2209 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2349 v8SetReturnValueInt(info, imp->activityLoggedAttr1()); | 2210 v8SetReturnValueInt(info, imp->activityLoggedAttr1()); |
| 2350 return; | |
| 2351 } | 2211 } |
| 2352 | 2212 |
| 2353 static void activityLoggedAttr1AttributeGetterCallback(v8::Local<v8::String> nam
e, const v8::PropertyCallbackInfo<v8::Value>& info) | 2213 static void activityLoggedAttr1AttributeGetterCallback(v8::Local<v8::String> nam
e, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2354 { | 2214 { |
| 2355 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2215 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2356 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 2216 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
| 2357 if (contextData && contextData->activityLogger()) | 2217 if (contextData && contextData->activityLogger()) |
| 2358 contextData->activityLogger()->log("TestObject.activityLoggedAttr1", 0,
0, "Getter"); | 2218 contextData->activityLogger()->log("TestObject.activityLoggedAttr1", 0,
0, "Getter"); |
| 2359 TestObjV8Internal::activityLoggedAttr1AttributeGetter(name, info); | 2219 TestObjV8Internal::activityLoggedAttr1AttributeGetter(name, info); |
| 2360 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 2220 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 2361 } | 2221 } |
| 2362 | 2222 |
| 2363 static void activityLoggedAttr1AttributeSetter(v8::Local<v8::String> name, v8::L
ocal<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 2223 static void activityLoggedAttr1AttributeSetter(v8::Local<v8::String> name, v8::L
ocal<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 2364 { | 2224 { |
| 2365 TestObj* imp = V8TestObject::toNative(info.Holder()); | 2225 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2366 V8TRYCATCH_VOID(int, v, toInt32(value)); | 2226 V8TRYCATCH_VOID(int, v, toInt32(value)); |
| 2367 imp->setActivityLoggedAttr1(v); | 2227 imp->setActivityLoggedAttr1(v); |
| 2368 return; | |
| 2369 } | 2228 } |
| 2370 | 2229 |
| 2371 static void activityLoggedAttr1AttributeSetterCallback(v8::Local<v8::String> nam
e, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 2230 static void activityLoggedAttr1AttributeSetterCallback(v8::Local<v8::String> nam
e, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 2372 { | 2231 { |
| 2373 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2232 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 2374 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 2233 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
| 2375 if (contextData && contextData->activityLogger()) { | 2234 if (contextData && contextData->activityLogger()) { |
| 2376 v8::Handle<v8::Value> loggerArg[] = { value }; | 2235 v8::Handle<v8::Value> loggerArg[] = { value }; |
| 2377 contextData->activityLogger()->log("TestObject.activityLoggedAttr1", 1,
&loggerArg[0], "Setter"); | 2236 contextData->activityLogger()->log("TestObject.activityLoggedAttr1", 1,
&loggerArg[0], "Setter"); |
| 2378 } | 2237 } |
| 2379 TestObjV8Internal::activityLoggedAttr1AttributeSetter(name, value, info); | 2238 TestObjV8Internal::activityLoggedAttr1AttributeSetter(name, value, info); |
| 2380 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 2239 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 2381 } | 2240 } |
| 2382 | 2241 |
| 2383 static void activityLoggedAttr2AttributeGetter(v8::Local<v8::String> name, const
v8::PropertyCallbackInfo<v8::Value>& info) | 2242 static void activityLoggedAttr2AttributeGetter(v8::Local<v8::String> name, const
v8::PropertyCallbackInfo<v8::Value>& info) |
| 2384 { | 2243 { |
| 2385 TestObj* imp = V8TestObject::toNative(info.Holder()); | 2244 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2386 v8SetReturnValueInt(info, imp->activityLoggedAttr2()); | 2245 v8SetReturnValueInt(info, imp->activityLoggedAttr2()); |
| 2387 return; | |
| 2388 } | 2246 } |
| 2389 | 2247 |
| 2390 static void activityLoggedAttr2AttributeGetterCallback(v8::Local<v8::String> nam
e, const v8::PropertyCallbackInfo<v8::Value>& info) | 2248 static void activityLoggedAttr2AttributeGetterCallback(v8::Local<v8::String> nam
e, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2391 { | 2249 { |
| 2392 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2250 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2393 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 2251 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
| 2394 if (contextData && contextData->activityLogger()) | 2252 if (contextData && contextData->activityLogger()) |
| 2395 contextData->activityLogger()->log("TestObject.activityLoggedAttr2", 0,
0, "Getter"); | 2253 contextData->activityLogger()->log("TestObject.activityLoggedAttr2", 0,
0, "Getter"); |
| 2396 TestObjV8Internal::activityLoggedAttr2AttributeGetter(name, info); | 2254 TestObjV8Internal::activityLoggedAttr2AttributeGetter(name, info); |
| 2397 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 2255 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 2398 } | 2256 } |
| 2399 | 2257 |
| 2400 static void activityLoggedAttr2AttributeGetterForMainWorld(v8::Local<v8::String>
name, const v8::PropertyCallbackInfo<v8::Value>& info) | 2258 static void activityLoggedAttr2AttributeGetterForMainWorld(v8::Local<v8::String>
name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2401 { | 2259 { |
| 2402 TestObj* imp = V8TestObject::toNative(info.Holder()); | 2260 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2403 v8SetReturnValueInt(info, imp->activityLoggedAttr2()); | 2261 v8SetReturnValueInt(info, imp->activityLoggedAttr2()); |
| 2404 return; | |
| 2405 } | 2262 } |
| 2406 | 2263 |
| 2407 static void activityLoggedAttr2AttributeGetterCallbackForMainWorld(v8::Local<v8:
:String> name, const v8::PropertyCallbackInfo<v8::Value>& info) | 2264 static void activityLoggedAttr2AttributeGetterCallbackForMainWorld(v8::Local<v8:
:String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2408 { | 2265 { |
| 2409 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2266 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2410 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 2267 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
| 2411 if (contextData && contextData->activityLogger()) | 2268 if (contextData && contextData->activityLogger()) |
| 2412 contextData->activityLogger()->log("TestObject.activityLoggedAttr2", 0,
0, "Getter"); | 2269 contextData->activityLogger()->log("TestObject.activityLoggedAttr2", 0,
0, "Getter"); |
| 2413 TestObjV8Internal::activityLoggedAttr2AttributeGetterForMainWorld(name, info
); | 2270 TestObjV8Internal::activityLoggedAttr2AttributeGetterForMainWorld(name, info
); |
| 2414 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 2271 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 2415 } | 2272 } |
| 2416 | 2273 |
| 2417 static void activityLoggedAttr2AttributeSetter(v8::Local<v8::String> name, v8::L
ocal<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 2274 static void activityLoggedAttr2AttributeSetter(v8::Local<v8::String> name, v8::L
ocal<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 2418 { | 2275 { |
| 2419 TestObj* imp = V8TestObject::toNative(info.Holder()); | 2276 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2420 V8TRYCATCH_VOID(int, v, toInt32(value)); | 2277 V8TRYCATCH_VOID(int, v, toInt32(value)); |
| 2421 imp->setActivityLoggedAttr2(v); | 2278 imp->setActivityLoggedAttr2(v); |
| 2422 return; | |
| 2423 } | 2279 } |
| 2424 | 2280 |
| 2425 static void activityLoggedAttr2AttributeSetterCallback(v8::Local<v8::String> nam
e, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 2281 static void activityLoggedAttr2AttributeSetterCallback(v8::Local<v8::String> nam
e, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 2426 { | 2282 { |
| 2427 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2283 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 2428 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 2284 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
| 2429 if (contextData && contextData->activityLogger()) { | 2285 if (contextData && contextData->activityLogger()) { |
| 2430 v8::Handle<v8::Value> loggerArg[] = { value }; | 2286 v8::Handle<v8::Value> loggerArg[] = { value }; |
| 2431 contextData->activityLogger()->log("TestObject.activityLoggedAttr2", 1,
&loggerArg[0], "Setter"); | 2287 contextData->activityLogger()->log("TestObject.activityLoggedAttr2", 1,
&loggerArg[0], "Setter"); |
| 2432 } | 2288 } |
| 2433 TestObjV8Internal::activityLoggedAttr2AttributeSetter(name, value, info); | 2289 TestObjV8Internal::activityLoggedAttr2AttributeSetter(name, value, info); |
| 2434 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 2290 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 2435 } | 2291 } |
| 2436 | 2292 |
| 2437 static void activityLoggedAttr2AttributeSetterForMainWorld(v8::Local<v8::String>
name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 2293 static void activityLoggedAttr2AttributeSetterForMainWorld(v8::Local<v8::String>
name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 2438 { | 2294 { |
| 2439 TestObj* imp = V8TestObject::toNative(info.Holder()); | 2295 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2440 V8TRYCATCH_VOID(int, v, toInt32(value)); | 2296 V8TRYCATCH_VOID(int, v, toInt32(value)); |
| 2441 imp->setActivityLoggedAttr2(v); | 2297 imp->setActivityLoggedAttr2(v); |
| 2442 return; | |
| 2443 } | 2298 } |
| 2444 | 2299 |
| 2445 static void activityLoggedAttr2AttributeSetterCallbackForMainWorld(v8::Local<v8:
:String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>&
info) | 2300 static void activityLoggedAttr2AttributeSetterCallbackForMainWorld(v8::Local<v8:
:String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>&
info) |
| 2446 { | 2301 { |
| 2447 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2302 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 2448 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 2303 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
| 2449 if (contextData && contextData->activityLogger()) { | 2304 if (contextData && contextData->activityLogger()) { |
| 2450 v8::Handle<v8::Value> loggerArg[] = { value }; | 2305 v8::Handle<v8::Value> loggerArg[] = { value }; |
| 2451 contextData->activityLogger()->log("TestObject.activityLoggedAttr2", 1,
&loggerArg[0], "Setter"); | 2306 contextData->activityLogger()->log("TestObject.activityLoggedAttr2", 1,
&loggerArg[0], "Setter"); |
| 2452 } | 2307 } |
| 2453 TestObjV8Internal::activityLoggedAttr2AttributeSetterForMainWorld(name, valu
e, info); | 2308 TestObjV8Internal::activityLoggedAttr2AttributeSetterForMainWorld(name, valu
e, info); |
| 2454 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 2309 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 2455 } | 2310 } |
| 2456 | 2311 |
| 2457 static void activityLoggedInIsolatedWorldsAttrAttributeGetter(v8::Local<v8::Stri
ng> name, const v8::PropertyCallbackInfo<v8::Value>& info) | 2312 static void activityLoggedInIsolatedWorldsAttrAttributeGetter(v8::Local<v8::Stri
ng> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2458 { | 2313 { |
| 2459 TestObj* imp = V8TestObject::toNative(info.Holder()); | 2314 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2460 v8SetReturnValueInt(info, imp->activityLoggedInIsolatedWorldsAttr()); | 2315 v8SetReturnValueInt(info, imp->activityLoggedInIsolatedWorldsAttr()); |
| 2461 return; | |
| 2462 } | 2316 } |
| 2463 | 2317 |
| 2464 static void activityLoggedInIsolatedWorldsAttrAttributeGetterCallback(v8::Local<
v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) | 2318 static void activityLoggedInIsolatedWorldsAttrAttributeGetterCallback(v8::Local<
v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2465 { | 2319 { |
| 2466 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2320 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2467 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 2321 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
| 2468 if (contextData && contextData->activityLogger()) | 2322 if (contextData && contextData->activityLogger()) |
| 2469 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW
orldsAttr", 0, 0, "Getter"); | 2323 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW
orldsAttr", 0, 0, "Getter"); |
| 2470 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrAttributeGetter(name, i
nfo); | 2324 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrAttributeGetter(name, i
nfo); |
| 2471 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 2325 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 2472 } | 2326 } |
| 2473 | 2327 |
| 2474 static void activityLoggedInIsolatedWorldsAttrAttributeGetterForMainWorld(v8::Lo
cal<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) | 2328 static void activityLoggedInIsolatedWorldsAttrAttributeGetterForMainWorld(v8::Lo
cal<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2475 { | 2329 { |
| 2476 TestObj* imp = V8TestObject::toNative(info.Holder()); | 2330 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2477 v8SetReturnValueInt(info, imp->activityLoggedInIsolatedWorldsAttr()); | 2331 v8SetReturnValueInt(info, imp->activityLoggedInIsolatedWorldsAttr()); |
| 2478 return; | |
| 2479 } | 2332 } |
| 2480 | 2333 |
| 2481 static void activityLoggedInIsolatedWorldsAttrAttributeGetterCallbackForMainWorl
d(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) | 2334 static void activityLoggedInIsolatedWorldsAttrAttributeGetterCallbackForMainWorl
d(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2482 { | 2335 { |
| 2483 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2336 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2484 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrAttributeGetterForMainW
orld(name, info); | 2337 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrAttributeGetterForMainW
orld(name, info); |
| 2485 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 2338 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 2486 } | 2339 } |
| 2487 | 2340 |
| 2488 static void activityLoggedInIsolatedWorldsAttrAttributeSetter(v8::Local<v8::Stri
ng> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info
) | 2341 static void activityLoggedInIsolatedWorldsAttrAttributeSetter(v8::Local<v8::Stri
ng> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info
) |
| 2489 { | 2342 { |
| 2490 TestObj* imp = V8TestObject::toNative(info.Holder()); | 2343 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2491 V8TRYCATCH_VOID(int, v, toInt32(value)); | 2344 V8TRYCATCH_VOID(int, v, toInt32(value)); |
| 2492 imp->setActivityLoggedInIsolatedWorldsAttr(v); | 2345 imp->setActivityLoggedInIsolatedWorldsAttr(v); |
| 2493 return; | |
| 2494 } | 2346 } |
| 2495 | 2347 |
| 2496 static void activityLoggedInIsolatedWorldsAttrAttributeSetterCallback(v8::Local<
v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<voi
d>& info) | 2348 static void activityLoggedInIsolatedWorldsAttrAttributeSetterCallback(v8::Local<
v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<voi
d>& info) |
| 2497 { | 2349 { |
| 2498 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2350 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 2499 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 2351 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
| 2500 if (contextData && contextData->activityLogger()) { | 2352 if (contextData && contextData->activityLogger()) { |
| 2501 v8::Handle<v8::Value> loggerArg[] = { value }; | 2353 v8::Handle<v8::Value> loggerArg[] = { value }; |
| 2502 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW
orldsAttr", 1, &loggerArg[0], "Setter"); | 2354 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW
orldsAttr", 1, &loggerArg[0], "Setter"); |
| 2503 } | 2355 } |
| 2504 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrAttributeSetter(name, v
alue, info); | 2356 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrAttributeSetter(name, v
alue, info); |
| 2505 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 2357 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 2506 } | 2358 } |
| 2507 | 2359 |
| 2508 static void activityLoggedInIsolatedWorldsAttrAttributeSetterForMainWorld(v8::Lo
cal<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo
<void>& info) | 2360 static void activityLoggedInIsolatedWorldsAttrAttributeSetterForMainWorld(v8::Lo
cal<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo
<void>& info) |
| 2509 { | 2361 { |
| 2510 TestObj* imp = V8TestObject::toNative(info.Holder()); | 2362 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2511 V8TRYCATCH_VOID(int, v, toInt32(value)); | 2363 V8TRYCATCH_VOID(int, v, toInt32(value)); |
| 2512 imp->setActivityLoggedInIsolatedWorldsAttr(v); | 2364 imp->setActivityLoggedInIsolatedWorldsAttr(v); |
| 2513 return; | |
| 2514 } | 2365 } |
| 2515 | 2366 |
| 2516 static void activityLoggedInIsolatedWorldsAttrAttributeSetterCallbackForMainWorl
d(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCall
backInfo<void>& info) | 2367 static void activityLoggedInIsolatedWorldsAttrAttributeSetterCallbackForMainWorl
d(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCall
backInfo<void>& info) |
| 2517 { | 2368 { |
| 2518 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2369 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 2519 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrAttributeSetterForMainW
orld(name, value, info); | 2370 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrAttributeSetterForMainW
orld(name, value, info); |
| 2520 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 2371 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 2521 } | 2372 } |
| 2522 | 2373 |
| 2523 static void activityLoggedAttrSetter1AttributeGetter(v8::Local<v8::String> name,
const v8::PropertyCallbackInfo<v8::Value>& info) | 2374 static void activityLoggedAttrSetter1AttributeGetter(v8::Local<v8::String> name,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2524 { | 2375 { |
| 2525 TestObj* imp = V8TestObject::toNative(info.Holder()); | 2376 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2526 v8SetReturnValueInt(info, imp->activityLoggedAttrSetter1()); | 2377 v8SetReturnValueInt(info, imp->activityLoggedAttrSetter1()); |
| 2527 return; | |
| 2528 } | 2378 } |
| 2529 | 2379 |
| 2530 static void activityLoggedAttrSetter1AttributeGetterCallback(v8::Local<v8::Strin
g> name, const v8::PropertyCallbackInfo<v8::Value>& info) | 2380 static void activityLoggedAttrSetter1AttributeGetterCallback(v8::Local<v8::Strin
g> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2531 { | 2381 { |
| 2532 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2382 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2533 TestObjV8Internal::activityLoggedAttrSetter1AttributeGetter(name, info); | 2383 TestObjV8Internal::activityLoggedAttrSetter1AttributeGetter(name, info); |
| 2534 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 2384 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 2535 } | 2385 } |
| 2536 | 2386 |
| 2537 static void activityLoggedAttrSetter1AttributeSetter(v8::Local<v8::String> name,
v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 2387 static void activityLoggedAttrSetter1AttributeSetter(v8::Local<v8::String> name,
v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 2538 { | 2388 { |
| 2539 TestObj* imp = V8TestObject::toNative(info.Holder()); | 2389 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2540 V8TRYCATCH_VOID(int, v, toInt32(value)); | 2390 V8TRYCATCH_VOID(int, v, toInt32(value)); |
| 2541 imp->setActivityLoggedAttrSetter1(v); | 2391 imp->setActivityLoggedAttrSetter1(v); |
| 2542 return; | |
| 2543 } | 2392 } |
| 2544 | 2393 |
| 2545 static void activityLoggedAttrSetter1AttributeSetterCallback(v8::Local<v8::Strin
g> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 2394 static void activityLoggedAttrSetter1AttributeSetterCallback(v8::Local<v8::Strin
g> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 2546 { | 2395 { |
| 2547 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2396 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 2548 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 2397 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
| 2549 if (contextData && contextData->activityLogger()) { | 2398 if (contextData && contextData->activityLogger()) { |
| 2550 v8::Handle<v8::Value> loggerArg[] = { value }; | 2399 v8::Handle<v8::Value> loggerArg[] = { value }; |
| 2551 contextData->activityLogger()->log("TestObject.activityLoggedAttrSetter1
", 1, &loggerArg[0], "Setter"); | 2400 contextData->activityLogger()->log("TestObject.activityLoggedAttrSetter1
", 1, &loggerArg[0], "Setter"); |
| 2552 } | 2401 } |
| 2553 TestObjV8Internal::activityLoggedAttrSetter1AttributeSetter(name, value, inf
o); | 2402 TestObjV8Internal::activityLoggedAttrSetter1AttributeSetter(name, value, inf
o); |
| 2554 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 2403 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 2555 } | 2404 } |
| 2556 | 2405 |
| 2557 static void activityLoggedAttrSetter2AttributeGetter(v8::Local<v8::String> name,
const v8::PropertyCallbackInfo<v8::Value>& info) | 2406 static void activityLoggedAttrSetter2AttributeGetter(v8::Local<v8::String> name,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2558 { | 2407 { |
| 2559 TestObj* imp = V8TestObject::toNative(info.Holder()); | 2408 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2560 v8SetReturnValueInt(info, imp->activityLoggedAttrSetter2()); | 2409 v8SetReturnValueInt(info, imp->activityLoggedAttrSetter2()); |
| 2561 return; | |
| 2562 } | 2410 } |
| 2563 | 2411 |
| 2564 static void activityLoggedAttrSetter2AttributeGetterCallback(v8::Local<v8::Strin
g> name, const v8::PropertyCallbackInfo<v8::Value>& info) | 2412 static void activityLoggedAttrSetter2AttributeGetterCallback(v8::Local<v8::Strin
g> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2565 { | 2413 { |
| 2566 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2414 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2567 TestObjV8Internal::activityLoggedAttrSetter2AttributeGetter(name, info); | 2415 TestObjV8Internal::activityLoggedAttrSetter2AttributeGetter(name, info); |
| 2568 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 2416 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 2569 } | 2417 } |
| 2570 | 2418 |
| 2571 static void activityLoggedAttrSetter2AttributeGetterForMainWorld(v8::Local<v8::S
tring> name, const v8::PropertyCallbackInfo<v8::Value>& info) | 2419 static void activityLoggedAttrSetter2AttributeGetterForMainWorld(v8::Local<v8::S
tring> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2572 { | 2420 { |
| 2573 TestObj* imp = V8TestObject::toNative(info.Holder()); | 2421 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2574 v8SetReturnValueInt(info, imp->activityLoggedAttrSetter2()); | 2422 v8SetReturnValueInt(info, imp->activityLoggedAttrSetter2()); |
| 2575 return; | |
| 2576 } | 2423 } |
| 2577 | 2424 |
| 2578 static void activityLoggedAttrSetter2AttributeGetterCallbackForMainWorld(v8::Loc
al<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) | 2425 static void activityLoggedAttrSetter2AttributeGetterCallbackForMainWorld(v8::Loc
al<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2579 { | 2426 { |
| 2580 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2427 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2581 TestObjV8Internal::activityLoggedAttrSetter2AttributeGetterForMainWorld(name
, info); | 2428 TestObjV8Internal::activityLoggedAttrSetter2AttributeGetterForMainWorld(name
, info); |
| 2582 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 2429 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 2583 } | 2430 } |
| 2584 | 2431 |
| 2585 static void activityLoggedAttrSetter2AttributeSetter(v8::Local<v8::String> name,
v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 2432 static void activityLoggedAttrSetter2AttributeSetter(v8::Local<v8::String> name,
v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 2586 { | 2433 { |
| 2587 TestObj* imp = V8TestObject::toNative(info.Holder()); | 2434 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2588 V8TRYCATCH_VOID(int, v, toInt32(value)); | 2435 V8TRYCATCH_VOID(int, v, toInt32(value)); |
| 2589 imp->setActivityLoggedAttrSetter2(v); | 2436 imp->setActivityLoggedAttrSetter2(v); |
| 2590 return; | |
| 2591 } | 2437 } |
| 2592 | 2438 |
| 2593 static void activityLoggedAttrSetter2AttributeSetterCallback(v8::Local<v8::Strin
g> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 2439 static void activityLoggedAttrSetter2AttributeSetterCallback(v8::Local<v8::Strin
g> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 2594 { | 2440 { |
| 2595 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2441 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 2596 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 2442 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
| 2597 if (contextData && contextData->activityLogger()) { | 2443 if (contextData && contextData->activityLogger()) { |
| 2598 v8::Handle<v8::Value> loggerArg[] = { value }; | 2444 v8::Handle<v8::Value> loggerArg[] = { value }; |
| 2599 contextData->activityLogger()->log("TestObject.activityLoggedAttrSetter2
", 1, &loggerArg[0], "Setter"); | 2445 contextData->activityLogger()->log("TestObject.activityLoggedAttrSetter2
", 1, &loggerArg[0], "Setter"); |
| 2600 } | 2446 } |
| 2601 TestObjV8Internal::activityLoggedAttrSetter2AttributeSetter(name, value, inf
o); | 2447 TestObjV8Internal::activityLoggedAttrSetter2AttributeSetter(name, value, inf
o); |
| 2602 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 2448 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 2603 } | 2449 } |
| 2604 | 2450 |
| 2605 static void activityLoggedAttrSetter2AttributeSetterForMainWorld(v8::Local<v8::S
tring> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& i
nfo) | 2451 static void activityLoggedAttrSetter2AttributeSetterForMainWorld(v8::Local<v8::S
tring> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& i
nfo) |
| 2606 { | 2452 { |
| 2607 TestObj* imp = V8TestObject::toNative(info.Holder()); | 2453 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2608 V8TRYCATCH_VOID(int, v, toInt32(value)); | 2454 V8TRYCATCH_VOID(int, v, toInt32(value)); |
| 2609 imp->setActivityLoggedAttrSetter2(v); | 2455 imp->setActivityLoggedAttrSetter2(v); |
| 2610 return; | |
| 2611 } | 2456 } |
| 2612 | 2457 |
| 2613 static void activityLoggedAttrSetter2AttributeSetterCallbackForMainWorld(v8::Loc
al<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<
void>& info) | 2458 static void activityLoggedAttrSetter2AttributeSetterCallbackForMainWorld(v8::Loc
al<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<
void>& info) |
| 2614 { | 2459 { |
| 2615 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2460 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 2616 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 2461 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
| 2617 if (contextData && contextData->activityLogger()) { | 2462 if (contextData && contextData->activityLogger()) { |
| 2618 v8::Handle<v8::Value> loggerArg[] = { value }; | 2463 v8::Handle<v8::Value> loggerArg[] = { value }; |
| 2619 contextData->activityLogger()->log("TestObject.activityLoggedAttrSetter2
", 1, &loggerArg[0], "Setter"); | 2464 contextData->activityLogger()->log("TestObject.activityLoggedAttrSetter2
", 1, &loggerArg[0], "Setter"); |
| 2620 } | 2465 } |
| 2621 TestObjV8Internal::activityLoggedAttrSetter2AttributeSetterForMainWorld(name
, value, info); | 2466 TestObjV8Internal::activityLoggedAttrSetter2AttributeSetterForMainWorld(name
, value, info); |
| 2622 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 2467 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 2623 } | 2468 } |
| 2624 | 2469 |
| 2625 static void activityLoggedInIsolatedWorldsAttrSetterAttributeGetter(v8::Local<v8
::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) | 2470 static void activityLoggedInIsolatedWorldsAttrSetterAttributeGetter(v8::Local<v8
::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2626 { | 2471 { |
| 2627 TestObj* imp = V8TestObject::toNative(info.Holder()); | 2472 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2628 v8SetReturnValueInt(info, imp->activityLoggedInIsolatedWorldsAttrSetter()); | 2473 v8SetReturnValueInt(info, imp->activityLoggedInIsolatedWorldsAttrSetter()); |
| 2629 return; | |
| 2630 } | 2474 } |
| 2631 | 2475 |
| 2632 static void activityLoggedInIsolatedWorldsAttrSetterAttributeGetterCallback(v8::
Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) | 2476 static void activityLoggedInIsolatedWorldsAttrSetterAttributeGetterCallback(v8::
Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2633 { | 2477 { |
| 2634 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2478 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2635 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrSetterAttributeGetter(n
ame, info); | 2479 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrSetterAttributeGetter(n
ame, info); |
| 2636 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 2480 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 2637 } | 2481 } |
| 2638 | 2482 |
| 2639 static void activityLoggedInIsolatedWorldsAttrSetterAttributeGetterForMainWorld(
v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) | 2483 static void activityLoggedInIsolatedWorldsAttrSetterAttributeGetterForMainWorld(
v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2640 { | 2484 { |
| 2641 TestObj* imp = V8TestObject::toNative(info.Holder()); | 2485 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2642 v8SetReturnValueInt(info, imp->activityLoggedInIsolatedWorldsAttrSetter()); | 2486 v8SetReturnValueInt(info, imp->activityLoggedInIsolatedWorldsAttrSetter()); |
| 2643 return; | |
| 2644 } | 2487 } |
| 2645 | 2488 |
| 2646 static void activityLoggedInIsolatedWorldsAttrSetterAttributeGetterCallbackForMa
inWorld(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& i
nfo) | 2489 static void activityLoggedInIsolatedWorldsAttrSetterAttributeGetterCallbackForMa
inWorld(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& i
nfo) |
| 2647 { | 2490 { |
| 2648 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2491 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2649 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrSetterAttributeGetterFo
rMainWorld(name, info); | 2492 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrSetterAttributeGetterFo
rMainWorld(name, info); |
| 2650 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 2493 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 2651 } | 2494 } |
| 2652 | 2495 |
| 2653 static void activityLoggedInIsolatedWorldsAttrSetterAttributeSetter(v8::Local<v8
::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>
& info) | 2496 static void activityLoggedInIsolatedWorldsAttrSetterAttributeSetter(v8::Local<v8
::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>
& info) |
| 2654 { | 2497 { |
| 2655 TestObj* imp = V8TestObject::toNative(info.Holder()); | 2498 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2656 V8TRYCATCH_VOID(int, v, toInt32(value)); | 2499 V8TRYCATCH_VOID(int, v, toInt32(value)); |
| 2657 imp->setActivityLoggedInIsolatedWorldsAttrSetter(v); | 2500 imp->setActivityLoggedInIsolatedWorldsAttrSetter(v); |
| 2658 return; | |
| 2659 } | 2501 } |
| 2660 | 2502 |
| 2661 static void activityLoggedInIsolatedWorldsAttrSetterAttributeSetterCallback(v8::
Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackIn
fo<void>& info) | 2503 static void activityLoggedInIsolatedWorldsAttrSetterAttributeSetterCallback(v8::
Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackIn
fo<void>& info) |
| 2662 { | 2504 { |
| 2663 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2505 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 2664 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 2506 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
| 2665 if (contextData && contextData->activityLogger()) { | 2507 if (contextData && contextData->activityLogger()) { |
| 2666 v8::Handle<v8::Value> loggerArg[] = { value }; | 2508 v8::Handle<v8::Value> loggerArg[] = { value }; |
| 2667 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW
orldsAttrSetter", 1, &loggerArg[0], "Setter"); | 2509 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW
orldsAttrSetter", 1, &loggerArg[0], "Setter"); |
| 2668 } | 2510 } |
| 2669 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrSetterAttributeSetter(n
ame, value, info); | 2511 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrSetterAttributeSetter(n
ame, value, info); |
| 2670 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 2512 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 2671 } | 2513 } |
| 2672 | 2514 |
| 2673 static void activityLoggedInIsolatedWorldsAttrSetterAttributeSetterForMainWorld(
v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallba
ckInfo<void>& info) | 2515 static void activityLoggedInIsolatedWorldsAttrSetterAttributeSetterForMainWorld(
v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallba
ckInfo<void>& info) |
| 2674 { | 2516 { |
| 2675 TestObj* imp = V8TestObject::toNative(info.Holder()); | 2517 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2676 V8TRYCATCH_VOID(int, v, toInt32(value)); | 2518 V8TRYCATCH_VOID(int, v, toInt32(value)); |
| 2677 imp->setActivityLoggedInIsolatedWorldsAttrSetter(v); | 2519 imp->setActivityLoggedInIsolatedWorldsAttrSetter(v); |
| 2678 return; | |
| 2679 } | 2520 } |
| 2680 | 2521 |
| 2681 static void activityLoggedInIsolatedWorldsAttrSetterAttributeSetterCallbackForMa
inWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::Proper
tyCallbackInfo<void>& info) | 2522 static void activityLoggedInIsolatedWorldsAttrSetterAttributeSetterCallbackForMa
inWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::Proper
tyCallbackInfo<void>& info) |
| 2682 { | 2523 { |
| 2683 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2524 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 2684 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrSetterAttributeSetterFo
rMainWorld(name, value, info); | 2525 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrSetterAttributeSetterFo
rMainWorld(name, value, info); |
| 2685 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 2526 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 2686 } | 2527 } |
| 2687 | 2528 |
| 2688 static void activityLoggedAttrGetter1AttributeGetter(v8::Local<v8::String> name,
const v8::PropertyCallbackInfo<v8::Value>& info) | 2529 static void activityLoggedAttrGetter1AttributeGetter(v8::Local<v8::String> name,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2689 { | 2530 { |
| 2690 TestObj* imp = V8TestObject::toNative(info.Holder()); | 2531 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2691 v8SetReturnValueInt(info, imp->activityLoggedAttrGetter1()); | 2532 v8SetReturnValueInt(info, imp->activityLoggedAttrGetter1()); |
| 2692 return; | |
| 2693 } | 2533 } |
| 2694 | 2534 |
| 2695 static void activityLoggedAttrGetter1AttributeGetterCallback(v8::Local<v8::Strin
g> name, const v8::PropertyCallbackInfo<v8::Value>& info) | 2535 static void activityLoggedAttrGetter1AttributeGetterCallback(v8::Local<v8::Strin
g> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2696 { | 2536 { |
| 2697 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2537 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2698 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 2538 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
| 2699 if (contextData && contextData->activityLogger()) | 2539 if (contextData && contextData->activityLogger()) |
| 2700 contextData->activityLogger()->log("TestObject.activityLoggedAttrGetter1
", 0, 0, "Getter"); | 2540 contextData->activityLogger()->log("TestObject.activityLoggedAttrGetter1
", 0, 0, "Getter"); |
| 2701 TestObjV8Internal::activityLoggedAttrGetter1AttributeGetter(name, info); | 2541 TestObjV8Internal::activityLoggedAttrGetter1AttributeGetter(name, info); |
| 2702 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 2542 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 2703 } | 2543 } |
| 2704 | 2544 |
| 2705 static void activityLoggedAttrGetter1AttributeSetter(v8::Local<v8::String> name,
v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 2545 static void activityLoggedAttrGetter1AttributeSetter(v8::Local<v8::String> name,
v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 2706 { | 2546 { |
| 2707 TestObj* imp = V8TestObject::toNative(info.Holder()); | 2547 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2708 V8TRYCATCH_VOID(int, v, toInt32(value)); | 2548 V8TRYCATCH_VOID(int, v, toInt32(value)); |
| 2709 imp->setActivityLoggedAttrGetter1(v); | 2549 imp->setActivityLoggedAttrGetter1(v); |
| 2710 return; | |
| 2711 } | 2550 } |
| 2712 | 2551 |
| 2713 static void activityLoggedAttrGetter1AttributeSetterCallback(v8::Local<v8::Strin
g> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 2552 static void activityLoggedAttrGetter1AttributeSetterCallback(v8::Local<v8::Strin
g> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 2714 { | 2553 { |
| 2715 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2554 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 2716 TestObjV8Internal::activityLoggedAttrGetter1AttributeSetter(name, value, inf
o); | 2555 TestObjV8Internal::activityLoggedAttrGetter1AttributeSetter(name, value, inf
o); |
| 2717 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 2556 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 2718 } | 2557 } |
| 2719 | 2558 |
| 2720 static void activityLoggedAttrGetter2AttributeGetter(v8::Local<v8::String> name,
const v8::PropertyCallbackInfo<v8::Value>& info) | 2559 static void activityLoggedAttrGetter2AttributeGetter(v8::Local<v8::String> name,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2721 { | 2560 { |
| 2722 TestObj* imp = V8TestObject::toNative(info.Holder()); | 2561 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2723 v8SetReturnValueInt(info, imp->activityLoggedAttrGetter2()); | 2562 v8SetReturnValueInt(info, imp->activityLoggedAttrGetter2()); |
| 2724 return; | |
| 2725 } | 2563 } |
| 2726 | 2564 |
| 2727 static void activityLoggedAttrGetter2AttributeGetterCallback(v8::Local<v8::Strin
g> name, const v8::PropertyCallbackInfo<v8::Value>& info) | 2565 static void activityLoggedAttrGetter2AttributeGetterCallback(v8::Local<v8::Strin
g> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2728 { | 2566 { |
| 2729 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2567 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2730 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 2568 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
| 2731 if (contextData && contextData->activityLogger()) | 2569 if (contextData && contextData->activityLogger()) |
| 2732 contextData->activityLogger()->log("TestObject.activityLoggedAttrGetter2
", 0, 0, "Getter"); | 2570 contextData->activityLogger()->log("TestObject.activityLoggedAttrGetter2
", 0, 0, "Getter"); |
| 2733 TestObjV8Internal::activityLoggedAttrGetter2AttributeGetter(name, info); | 2571 TestObjV8Internal::activityLoggedAttrGetter2AttributeGetter(name, info); |
| 2734 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 2572 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 2735 } | 2573 } |
| 2736 | 2574 |
| 2737 static void activityLoggedAttrGetter2AttributeGetterForMainWorld(v8::Local<v8::S
tring> name, const v8::PropertyCallbackInfo<v8::Value>& info) | 2575 static void activityLoggedAttrGetter2AttributeGetterForMainWorld(v8::Local<v8::S
tring> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2738 { | 2576 { |
| 2739 TestObj* imp = V8TestObject::toNative(info.Holder()); | 2577 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2740 v8SetReturnValueInt(info, imp->activityLoggedAttrGetter2()); | 2578 v8SetReturnValueInt(info, imp->activityLoggedAttrGetter2()); |
| 2741 return; | |
| 2742 } | 2579 } |
| 2743 | 2580 |
| 2744 static void activityLoggedAttrGetter2AttributeGetterCallbackForMainWorld(v8::Loc
al<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) | 2581 static void activityLoggedAttrGetter2AttributeGetterCallbackForMainWorld(v8::Loc
al<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2745 { | 2582 { |
| 2746 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2583 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2747 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 2584 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
| 2748 if (contextData && contextData->activityLogger()) | 2585 if (contextData && contextData->activityLogger()) |
| 2749 contextData->activityLogger()->log("TestObject.activityLoggedAttrGetter2
", 0, 0, "Getter"); | 2586 contextData->activityLogger()->log("TestObject.activityLoggedAttrGetter2
", 0, 0, "Getter"); |
| 2750 TestObjV8Internal::activityLoggedAttrGetter2AttributeGetterForMainWorld(name
, info); | 2587 TestObjV8Internal::activityLoggedAttrGetter2AttributeGetterForMainWorld(name
, info); |
| 2751 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 2588 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 2752 } | 2589 } |
| 2753 | 2590 |
| 2754 static void activityLoggedAttrGetter2AttributeSetter(v8::Local<v8::String> name,
v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 2591 static void activityLoggedAttrGetter2AttributeSetter(v8::Local<v8::String> name,
v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 2755 { | 2592 { |
| 2756 TestObj* imp = V8TestObject::toNative(info.Holder()); | 2593 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2757 V8TRYCATCH_VOID(int, v, toInt32(value)); | 2594 V8TRYCATCH_VOID(int, v, toInt32(value)); |
| 2758 imp->setActivityLoggedAttrGetter2(v); | 2595 imp->setActivityLoggedAttrGetter2(v); |
| 2759 return; | |
| 2760 } | 2596 } |
| 2761 | 2597 |
| 2762 static void activityLoggedAttrGetter2AttributeSetterCallback(v8::Local<v8::Strin
g> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 2598 static void activityLoggedAttrGetter2AttributeSetterCallback(v8::Local<v8::Strin
g> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 2763 { | 2599 { |
| 2764 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2600 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 2765 TestObjV8Internal::activityLoggedAttrGetter2AttributeSetter(name, value, inf
o); | 2601 TestObjV8Internal::activityLoggedAttrGetter2AttributeSetter(name, value, inf
o); |
| 2766 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 2602 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 2767 } | 2603 } |
| 2768 | 2604 |
| 2769 static void activityLoggedAttrGetter2AttributeSetterForMainWorld(v8::Local<v8::S
tring> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& i
nfo) | 2605 static void activityLoggedAttrGetter2AttributeSetterForMainWorld(v8::Local<v8::S
tring> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& i
nfo) |
| 2770 { | 2606 { |
| 2771 TestObj* imp = V8TestObject::toNative(info.Holder()); | 2607 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2772 V8TRYCATCH_VOID(int, v, toInt32(value)); | 2608 V8TRYCATCH_VOID(int, v, toInt32(value)); |
| 2773 imp->setActivityLoggedAttrGetter2(v); | 2609 imp->setActivityLoggedAttrGetter2(v); |
| 2774 return; | |
| 2775 } | 2610 } |
| 2776 | 2611 |
| 2777 static void activityLoggedAttrGetter2AttributeSetterCallbackForMainWorld(v8::Loc
al<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<
void>& info) | 2612 static void activityLoggedAttrGetter2AttributeSetterCallbackForMainWorld(v8::Loc
al<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<
void>& info) |
| 2778 { | 2613 { |
| 2779 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2614 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 2780 TestObjV8Internal::activityLoggedAttrGetter2AttributeSetterForMainWorld(name
, value, info); | 2615 TestObjV8Internal::activityLoggedAttrGetter2AttributeSetterForMainWorld(name
, value, info); |
| 2781 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 2616 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 2782 } | 2617 } |
| 2783 | 2618 |
| 2784 static void activityLoggedInIsolatedWorldsAttrGetterAttributeGetter(v8::Local<v8
::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) | 2619 static void activityLoggedInIsolatedWorldsAttrGetterAttributeGetter(v8::Local<v8
::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2785 { | 2620 { |
| 2786 TestObj* imp = V8TestObject::toNative(info.Holder()); | 2621 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2787 v8SetReturnValueInt(info, imp->activityLoggedInIsolatedWorldsAttrGetter()); | 2622 v8SetReturnValueInt(info, imp->activityLoggedInIsolatedWorldsAttrGetter()); |
| 2788 return; | |
| 2789 } | 2623 } |
| 2790 | 2624 |
| 2791 static void activityLoggedInIsolatedWorldsAttrGetterAttributeGetterCallback(v8::
Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) | 2625 static void activityLoggedInIsolatedWorldsAttrGetterAttributeGetterCallback(v8::
Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2792 { | 2626 { |
| 2793 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2627 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2794 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 2628 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
| 2795 if (contextData && contextData->activityLogger()) | 2629 if (contextData && contextData->activityLogger()) |
| 2796 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW
orldsAttrGetter", 0, 0, "Getter"); | 2630 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW
orldsAttrGetter", 0, 0, "Getter"); |
| 2797 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttributeGetter(n
ame, info); | 2631 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttributeGetter(n
ame, info); |
| 2798 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 2632 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 2799 } | 2633 } |
| 2800 | 2634 |
| 2801 static void activityLoggedInIsolatedWorldsAttrGetterAttributeGetterForMainWorld(
v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) | 2635 static void activityLoggedInIsolatedWorldsAttrGetterAttributeGetterForMainWorld(
v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2802 { | 2636 { |
| 2803 TestObj* imp = V8TestObject::toNative(info.Holder()); | 2637 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2804 v8SetReturnValueInt(info, imp->activityLoggedInIsolatedWorldsAttrGetter()); | 2638 v8SetReturnValueInt(info, imp->activityLoggedInIsolatedWorldsAttrGetter()); |
| 2805 return; | |
| 2806 } | 2639 } |
| 2807 | 2640 |
| 2808 static void activityLoggedInIsolatedWorldsAttrGetterAttributeGetterCallbackForMa
inWorld(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& i
nfo) | 2641 static void activityLoggedInIsolatedWorldsAttrGetterAttributeGetterCallbackForMa
inWorld(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& i
nfo) |
| 2809 { | 2642 { |
| 2810 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2643 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2811 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttributeGetterFo
rMainWorld(name, info); | 2644 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttributeGetterFo
rMainWorld(name, info); |
| 2812 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 2645 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 2813 } | 2646 } |
| 2814 | 2647 |
| 2815 static void activityLoggedInIsolatedWorldsAttrGetterAttributeSetter(v8::Local<v8
::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>
& info) | 2648 static void activityLoggedInIsolatedWorldsAttrGetterAttributeSetter(v8::Local<v8
::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>
& info) |
| 2816 { | 2649 { |
| 2817 TestObj* imp = V8TestObject::toNative(info.Holder()); | 2650 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2818 V8TRYCATCH_VOID(int, v, toInt32(value)); | 2651 V8TRYCATCH_VOID(int, v, toInt32(value)); |
| 2819 imp->setActivityLoggedInIsolatedWorldsAttrGetter(v); | 2652 imp->setActivityLoggedInIsolatedWorldsAttrGetter(v); |
| 2820 return; | |
| 2821 } | 2653 } |
| 2822 | 2654 |
| 2823 static void activityLoggedInIsolatedWorldsAttrGetterAttributeSetterCallback(v8::
Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackIn
fo<void>& info) | 2655 static void activityLoggedInIsolatedWorldsAttrGetterAttributeSetterCallback(v8::
Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackIn
fo<void>& info) |
| 2824 { | 2656 { |
| 2825 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2657 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 2826 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttributeSetter(n
ame, value, info); | 2658 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttributeSetter(n
ame, value, info); |
| 2827 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 2659 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 2828 } | 2660 } |
| 2829 | 2661 |
| 2830 static void activityLoggedInIsolatedWorldsAttrGetterAttributeSetterForMainWorld(
v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallba
ckInfo<void>& info) | 2662 static void activityLoggedInIsolatedWorldsAttrGetterAttributeSetterForMainWorld(
v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallba
ckInfo<void>& info) |
| 2831 { | 2663 { |
| 2832 TestObj* imp = V8TestObject::toNative(info.Holder()); | 2664 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2833 V8TRYCATCH_VOID(int, v, toInt32(value)); | 2665 V8TRYCATCH_VOID(int, v, toInt32(value)); |
| 2834 imp->setActivityLoggedInIsolatedWorldsAttrGetter(v); | 2666 imp->setActivityLoggedInIsolatedWorldsAttrGetter(v); |
| 2835 return; | |
| 2836 } | 2667 } |
| 2837 | 2668 |
| 2838 static void activityLoggedInIsolatedWorldsAttrGetterAttributeSetterCallbackForMa
inWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::Proper
tyCallbackInfo<void>& info) | 2669 static void activityLoggedInIsolatedWorldsAttrGetterAttributeSetterCallbackForMa
inWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::Proper
tyCallbackInfo<void>& info) |
| 2839 { | 2670 { |
| 2840 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2671 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 2841 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttributeSetterFo
rMainWorld(name, value, info); | 2672 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttributeSetterFo
rMainWorld(name, value, info); |
| 2842 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 2673 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 2843 } | 2674 } |
| 2844 | 2675 |
| 2845 static void deprecatedStaticReadOnlyAttrAttributeGetter(v8::Local<v8::String> na
me, const v8::PropertyCallbackInfo<v8::Value>& info) | 2676 static void deprecatedStaticReadOnlyAttrAttributeGetter(v8::Local<v8::String> na
me, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2846 { | 2677 { |
| 2847 v8SetReturnValueInt(info, TestObj::deprecatedStaticReadOnlyAttr()); | 2678 v8SetReturnValueInt(info, TestObj::deprecatedStaticReadOnlyAttr()); |
| 2848 return; | |
| 2849 } | 2679 } |
| 2850 | 2680 |
| 2851 static void deprecatedStaticReadOnlyAttrAttributeGetterCallback(v8::Local<v8::St
ring> name, const v8::PropertyCallbackInfo<v8::Value>& info) | 2681 static void deprecatedStaticReadOnlyAttrAttributeGetterCallback(v8::Local<v8::St
ring> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2852 { | 2682 { |
| 2853 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2683 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2854 UseCounter::countDeprecation(activeScriptExecutionContext(), UseCounter::Sta
ticReadonlyAttribute); | 2684 UseCounter::countDeprecation(activeScriptExecutionContext(), UseCounter::Sta
ticReadonlyAttribute); |
| 2855 TestObjV8Internal::deprecatedStaticReadOnlyAttrAttributeGetter(name, info); | 2685 TestObjV8Internal::deprecatedStaticReadOnlyAttrAttributeGetter(name, info); |
| 2856 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 2686 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 2857 } | 2687 } |
| 2858 | 2688 |
| 2859 static void deprecatedStaticAttrAttributeGetter(v8::Local<v8::String> name, cons
t v8::PropertyCallbackInfo<v8::Value>& info) | 2689 static void deprecatedStaticAttrAttributeGetter(v8::Local<v8::String> name, cons
t v8::PropertyCallbackInfo<v8::Value>& info) |
| 2860 { | 2690 { |
| 2861 v8SetReturnValueInt(info, TestObj::deprecatedStaticAttr()); | 2691 v8SetReturnValueInt(info, TestObj::deprecatedStaticAttr()); |
| 2862 return; | |
| 2863 } | 2692 } |
| 2864 | 2693 |
| 2865 static void deprecatedStaticAttrAttributeGetterCallback(v8::Local<v8::String> na
me, const v8::PropertyCallbackInfo<v8::Value>& info) | 2694 static void deprecatedStaticAttrAttributeGetterCallback(v8::Local<v8::String> na
me, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2866 { | 2695 { |
| 2867 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2696 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2868 UseCounter::countDeprecation(activeScriptExecutionContext(), UseCounter::Sta
ticAttribute); | 2697 UseCounter::countDeprecation(activeScriptExecutionContext(), UseCounter::Sta
ticAttribute); |
| 2869 TestObjV8Internal::deprecatedStaticAttrAttributeGetter(name, info); | 2698 TestObjV8Internal::deprecatedStaticAttrAttributeGetter(name, info); |
| 2870 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 2699 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 2871 } | 2700 } |
| 2872 | 2701 |
| 2873 static void deprecatedStaticAttrAttributeSetter(v8::Local<v8::String> name, v8::
Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 2702 static void deprecatedStaticAttrAttributeSetter(v8::Local<v8::String> name, v8::
Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 2874 { | 2703 { |
| 2875 V8TRYCATCH_VOID(int, v, toInt32(value)); | 2704 V8TRYCATCH_VOID(int, v, toInt32(value)); |
| 2876 TestObj::setDeprecatedStaticAttr(v); | 2705 TestObj::setDeprecatedStaticAttr(v); |
| 2877 return; | |
| 2878 } | 2706 } |
| 2879 | 2707 |
| 2880 static void deprecatedStaticAttrAttributeSetterCallback(v8::Local<v8::String> na
me, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 2708 static void deprecatedStaticAttrAttributeSetterCallback(v8::Local<v8::String> na
me, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 2881 { | 2709 { |
| 2882 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2710 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 2883 UseCounter::countDeprecation(activeScriptExecutionContext(), UseCounter::Sta
ticAttribute); | 2711 UseCounter::countDeprecation(activeScriptExecutionContext(), UseCounter::Sta
ticAttribute); |
| 2884 TestObjV8Internal::deprecatedStaticAttrAttributeSetter(name, value, info); | 2712 TestObjV8Internal::deprecatedStaticAttrAttributeSetter(name, value, info); |
| 2885 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 2713 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 2886 } | 2714 } |
| 2887 | 2715 |
| 2888 static void deprecatedReadonlyAttrAttributeGetter(v8::Local<v8::String> name, co
nst v8::PropertyCallbackInfo<v8::Value>& info) | 2716 static void deprecatedReadonlyAttrAttributeGetter(v8::Local<v8::String> name, co
nst v8::PropertyCallbackInfo<v8::Value>& info) |
| 2889 { | 2717 { |
| 2890 TestObj* imp = V8TestObject::toNative(info.Holder()); | 2718 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2891 v8SetReturnValueInt(info, imp->deprecatedReadonlyAttr()); | 2719 v8SetReturnValueInt(info, imp->deprecatedReadonlyAttr()); |
| 2892 return; | |
| 2893 } | 2720 } |
| 2894 | 2721 |
| 2895 static void deprecatedReadonlyAttrAttributeGetterCallback(v8::Local<v8::String>
name, const v8::PropertyCallbackInfo<v8::Value>& info) | 2722 static void deprecatedReadonlyAttrAttributeGetterCallback(v8::Local<v8::String>
name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2896 { | 2723 { |
| 2897 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2724 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2898 UseCounter::countDeprecation(activeScriptExecutionContext(), UseCounter::Rea
donlyAttribute); | 2725 UseCounter::countDeprecation(activeScriptExecutionContext(), UseCounter::Rea
donlyAttribute); |
| 2899 TestObjV8Internal::deprecatedReadonlyAttrAttributeGetter(name, info); | 2726 TestObjV8Internal::deprecatedReadonlyAttrAttributeGetter(name, info); |
| 2900 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 2727 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 2901 } | 2728 } |
| 2902 | 2729 |
| 2903 static void deprecatedAttrAttributeGetter(v8::Local<v8::String> name, const v8::
PropertyCallbackInfo<v8::Value>& info) | 2730 static void deprecatedAttrAttributeGetter(v8::Local<v8::String> name, const v8::
PropertyCallbackInfo<v8::Value>& info) |
| 2904 { | 2731 { |
| 2905 TestObj* imp = V8TestObject::toNative(info.Holder()); | 2732 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2906 v8SetReturnValueInt(info, imp->deprecatedAttr()); | 2733 v8SetReturnValueInt(info, imp->deprecatedAttr()); |
| 2907 return; | |
| 2908 } | 2734 } |
| 2909 | 2735 |
| 2910 static void deprecatedAttrAttributeGetterCallback(v8::Local<v8::String> name, co
nst v8::PropertyCallbackInfo<v8::Value>& info) | 2736 static void deprecatedAttrAttributeGetterCallback(v8::Local<v8::String> name, co
nst v8::PropertyCallbackInfo<v8::Value>& info) |
| 2911 { | 2737 { |
| 2912 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2738 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2913 UseCounter::countDeprecation(activeScriptExecutionContext(), UseCounter::Att
ribute); | 2739 UseCounter::countDeprecation(activeScriptExecutionContext(), UseCounter::Att
ribute); |
| 2914 TestObjV8Internal::deprecatedAttrAttributeGetter(name, info); | 2740 TestObjV8Internal::deprecatedAttrAttributeGetter(name, info); |
| 2915 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 2741 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 2916 } | 2742 } |
| 2917 | 2743 |
| 2918 static void deprecatedAttrAttributeSetter(v8::Local<v8::String> name, v8::Local<
v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 2744 static void deprecatedAttrAttributeSetter(v8::Local<v8::String> name, v8::Local<
v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 2919 { | 2745 { |
| 2920 TestObj* imp = V8TestObject::toNative(info.Holder()); | 2746 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 2921 V8TRYCATCH_VOID(int, v, toInt32(value)); | 2747 V8TRYCATCH_VOID(int, v, toInt32(value)); |
| 2922 imp->setDeprecatedAttr(v); | 2748 imp->setDeprecatedAttr(v); |
| 2923 return; | |
| 2924 } | 2749 } |
| 2925 | 2750 |
| 2926 static void deprecatedAttrAttributeSetterCallback(v8::Local<v8::String> name, v8
::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) | 2751 static void deprecatedAttrAttributeSetterCallback(v8::Local<v8::String> name, v8
::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| 2927 { | 2752 { |
| 2928 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2753 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 2929 UseCounter::countDeprecation(activeScriptExecutionContext(), UseCounter::Att
ribute); | 2754 UseCounter::countDeprecation(activeScriptExecutionContext(), UseCounter::Att
ribute); |
| 2930 TestObjV8Internal::deprecatedAttrAttributeSetter(name, value, info); | 2755 TestObjV8Internal::deprecatedAttrAttributeSetter(name, value, info); |
| 2931 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 2756 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 2932 } | 2757 } |
| 2933 | 2758 |
| (...skipping 2628 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5562 V8DOMWrapper::associateObjectWithWrapper<V8TestObject>(impl, &info, wrapper,
isolate, WrapperConfiguration::Independent); | 5387 V8DOMWrapper::associateObjectWithWrapper<V8TestObject>(impl, &info, wrapper,
isolate, WrapperConfiguration::Independent); |
| 5563 return wrapper; | 5388 return wrapper; |
| 5564 } | 5389 } |
| 5565 | 5390 |
| 5566 void V8TestObject::derefObject(void* object) | 5391 void V8TestObject::derefObject(void* object) |
| 5567 { | 5392 { |
| 5568 fromInternalPointer(object)->deref(); | 5393 fromInternalPointer(object)->deref(); |
| 5569 } | 5394 } |
| 5570 | 5395 |
| 5571 } // namespace WebCore | 5396 } // namespace WebCore |
| OLD | NEW |