OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! | 5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! |
6 | 6 |
7 #include "config.h" | 7 #include "config.h" |
8 #include "V8TestObject.h" | 8 #include "V8TestObject.h" |
9 | 9 |
10 #include "HTMLNames.h" | 10 #include "HTMLNames.h" |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 | 61 |
62 namespace WebCore { | 62 namespace WebCore { |
63 const WrapperTypeInfo V8TestObject::wrapperTypeInfo = { gin::kEmbedderBlink, V8T
estObject::domTemplate, V8TestObject::derefObject, 0, V8TestObject::toEventTarge
t, 0, V8TestObject::installPerContextEnabledMethods, &V8EventTarget::wrapperType
Info, WrapperTypeObjectPrototype, false }; | 63 const WrapperTypeInfo V8TestObject::wrapperTypeInfo = { gin::kEmbedderBlink, V8T
estObject::domTemplate, V8TestObject::derefObject, 0, V8TestObject::toEventTarge
t, 0, V8TestObject::installPerContextEnabledMethods, &V8EventTarget::wrapperType
Info, WrapperTypeObjectPrototype, false }; |
64 | 64 |
65 namespace TestObjectV8Internal { | 65 namespace TestObjectV8Internal { |
66 | 66 |
67 template <typename T> void V8_USE(T) { } | 67 template <typename T> void V8_USE(T) { } |
68 | 68 |
69 static void readOnlyLongAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) | 69 static void readOnlyLongAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) |
70 { | 70 { |
71 TestObject* impl = V8TestObject::toNative(info.Holder()); | 71 v8::Handle<v8::Object> holder = info.Holder(); |
| 72 TestObject* impl = V8TestObject::toNative(holder); |
72 v8SetReturnValueInt(info, impl->readOnlyLongAttr()); | 73 v8SetReturnValueInt(info, impl->readOnlyLongAttr()); |
73 } | 74 } |
74 | 75 |
75 static void readOnlyLongAttrAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) | 76 static void readOnlyLongAttrAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) |
76 { | 77 { |
77 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 78 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
78 TestObjectV8Internal::readOnlyLongAttrAttributeGetter(info); | 79 TestObjectV8Internal::readOnlyLongAttrAttributeGetter(info); |
79 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 80 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
80 } | 81 } |
81 | 82 |
82 static void readOnlyStringAttrAttributeGetter(const v8::PropertyCallbackInfo<v8:
:Value>& info) | 83 static void readOnlyStringAttrAttributeGetter(const v8::PropertyCallbackInfo<v8:
:Value>& info) |
83 { | 84 { |
84 TestObject* impl = V8TestObject::toNative(info.Holder()); | 85 v8::Handle<v8::Object> holder = info.Holder(); |
| 86 TestObject* impl = V8TestObject::toNative(holder); |
85 v8SetReturnValueString(info, impl->readOnlyStringAttr(), info.GetIsolate()); | 87 v8SetReturnValueString(info, impl->readOnlyStringAttr(), info.GetIsolate()); |
86 } | 88 } |
87 | 89 |
88 static void readOnlyStringAttrAttributeGetterCallback(v8::Local<v8::String>, con
st v8::PropertyCallbackInfo<v8::Value>& info) | 90 static void readOnlyStringAttrAttributeGetterCallback(v8::Local<v8::String>, con
st v8::PropertyCallbackInfo<v8::Value>& info) |
89 { | 91 { |
90 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 92 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
91 TestObjectV8Internal::readOnlyStringAttrAttributeGetter(info); | 93 TestObjectV8Internal::readOnlyStringAttrAttributeGetter(info); |
92 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 94 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
93 } | 95 } |
94 | 96 |
95 static void readOnlyTestObjectAttrAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) | 97 static void readOnlyTestObjectAttrAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) |
96 { | 98 { |
97 TestObject* impl = V8TestObject::toNative(info.Holder()); | 99 v8::Isolate* isolate = info.GetIsolate(); |
| 100 v8::Handle<v8::Object> holder = info.Holder(); |
| 101 TestObject* impl = V8TestObject::toNative(holder); |
98 RefPtr<TestObject> result(impl->readOnlyTestObjectAttr()); | 102 RefPtr<TestObject> result(impl->readOnlyTestObjectAttr()); |
99 if (result && DOMDataStore::setReturnValueFromWrapper<V8TestObject>(info.Get
ReturnValue(), result.get())) | 103 if (result && DOMDataStore::setReturnValueFromWrapper<V8TestObject>(info.Get
ReturnValue(), result.get())) |
100 return; | 104 return; |
101 v8::Handle<v8::Value> wrapper = toV8(result.get(), info.Holder(), info.GetIs
olate()); | 105 v8::Handle<v8::Value> wrapper = toV8(result.get(), holder, isolate); |
102 if (!wrapper.IsEmpty()) { | 106 if (!wrapper.IsEmpty()) { |
103 V8HiddenValue::setHiddenValue(info.GetIsolate(), info.Holder(), v8Atomic
String(info.GetIsolate(), "readOnlyTestObjectAttr"), wrapper); | 107 V8HiddenValue::setHiddenValue(isolate, holder, v8AtomicString(info.GetIs
olate(), "readOnlyTestObjectAttr"), wrapper); |
104 v8SetReturnValue(info, wrapper); | 108 v8SetReturnValue(info, wrapper); |
105 } | 109 } |
106 } | 110 } |
107 | 111 |
108 static void readOnlyTestObjectAttrAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 112 static void readOnlyTestObjectAttrAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
109 { | 113 { |
110 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 114 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
111 TestObjectV8Internal::readOnlyTestObjectAttrAttributeGetter(info); | 115 TestObjectV8Internal::readOnlyTestObjectAttrAttributeGetter(info); |
112 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 116 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
113 } | 117 } |
(...skipping 30 matching lines...) Expand all Loading... |
144 | 148 |
145 static void staticStringAttrAttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 149 static void staticStringAttrAttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
146 { | 150 { |
147 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 151 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
148 TestObjectV8Internal::staticStringAttrAttributeSetter(jsValue, info); | 152 TestObjectV8Internal::staticStringAttrAttributeSetter(jsValue, info); |
149 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 153 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
150 } | 154 } |
151 | 155 |
152 static void enumAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& i
nfo) | 156 static void enumAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& i
nfo) |
153 { | 157 { |
154 TestObject* impl = V8TestObject::toNative(info.Holder()); | 158 v8::Handle<v8::Object> holder = info.Holder(); |
| 159 TestObject* impl = V8TestObject::toNative(holder); |
155 v8SetReturnValueString(info, impl->enumAttr(), info.GetIsolate()); | 160 v8SetReturnValueString(info, impl->enumAttr(), info.GetIsolate()); |
156 } | 161 } |
157 | 162 |
158 static void enumAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::Pro
pertyCallbackInfo<v8::Value>& info) | 163 static void enumAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::Pro
pertyCallbackInfo<v8::Value>& info) |
159 { | 164 { |
160 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 165 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
161 TestObjectV8Internal::enumAttrAttributeGetter(info); | 166 TestObjectV8Internal::enumAttrAttributeGetter(info); |
162 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 167 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
163 } | 168 } |
164 | 169 |
165 static void enumAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Prop
ertyCallbackInfo<void>& info) | 170 static void enumAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Prop
ertyCallbackInfo<void>& info) |
166 { | 171 { |
167 TestObject* impl = V8TestObject::toNative(info.Holder()); | 172 v8::Handle<v8::Object> holder = info.Holder(); |
| 173 TestObject* impl = V8TestObject::toNative(holder); |
168 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 174 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); |
169 String string = cppValue; | 175 String string = cppValue; |
170 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" || st
ring == "EnumValue3")) | 176 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" || st
ring == "EnumValue3")) |
171 return; | 177 return; |
172 impl->setEnumAttr(cppValue); | 178 impl->setEnumAttr(cppValue); |
173 } | 179 } |
174 | 180 |
175 static void enumAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8:
:Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 181 static void enumAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8:
:Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
176 { | 182 { |
177 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 183 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
178 TestObjectV8Internal::enumAttrAttributeSetter(jsValue, info); | 184 TestObjectV8Internal::enumAttrAttributeSetter(jsValue, info); |
179 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 185 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
180 } | 186 } |
181 | 187 |
182 static void readOnlyEnumAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) | 188 static void readOnlyEnumAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) |
183 { | 189 { |
184 TestObject* impl = V8TestObject::toNative(info.Holder()); | 190 v8::Handle<v8::Object> holder = info.Holder(); |
| 191 TestObject* impl = V8TestObject::toNative(holder); |
185 v8SetReturnValueString(info, impl->readOnlyEnumAttr(), info.GetIsolate()); | 192 v8SetReturnValueString(info, impl->readOnlyEnumAttr(), info.GetIsolate()); |
186 } | 193 } |
187 | 194 |
188 static void readOnlyEnumAttrAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) | 195 static void readOnlyEnumAttrAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) |
189 { | 196 { |
190 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 197 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
191 TestObjectV8Internal::readOnlyEnumAttrAttributeGetter(info); | 198 TestObjectV8Internal::readOnlyEnumAttrAttributeGetter(info); |
192 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 199 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
193 } | 200 } |
194 | 201 |
195 static void byteAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& i
nfo) | 202 static void byteAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& i
nfo) |
196 { | 203 { |
197 TestObject* impl = V8TestObject::toNative(info.Holder()); | 204 v8::Handle<v8::Object> holder = info.Holder(); |
| 205 TestObject* impl = V8TestObject::toNative(holder); |
198 v8SetReturnValueInt(info, impl->byteAttr()); | 206 v8SetReturnValueInt(info, impl->byteAttr()); |
199 } | 207 } |
200 | 208 |
201 static void byteAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::Pro
pertyCallbackInfo<v8::Value>& info) | 209 static void byteAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::Pro
pertyCallbackInfo<v8::Value>& info) |
202 { | 210 { |
203 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 211 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
204 TestObjectV8Internal::byteAttrAttributeGetter(info); | 212 TestObjectV8Internal::byteAttrAttributeGetter(info); |
205 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 213 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
206 } | 214 } |
207 | 215 |
208 static void byteAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Prop
ertyCallbackInfo<void>& info) | 216 static void byteAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Prop
ertyCallbackInfo<void>& info) |
209 { | 217 { |
210 ExceptionState exceptionState(ExceptionState::SetterContext, "byteAttr", "Te
stObject", info.Holder(), info.GetIsolate()); | 218 v8::Isolate* isolate = info.GetIsolate(); |
211 TestObject* impl = V8TestObject::toNative(info.Holder()); | 219 v8::Handle<v8::Object> holder = info.Holder(); |
| 220 ExceptionState exceptionState(ExceptionState::SetterContext, "byteAttr", "Te
stObject", holder, isolate); |
| 221 TestObject* impl = V8TestObject::toNative(holder); |
212 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt8(jsValue, exceptionState), ex
ceptionState); | 222 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt8(jsValue, exceptionState), ex
ceptionState); |
213 impl->setByteAttr(cppValue); | 223 impl->setByteAttr(cppValue); |
214 } | 224 } |
215 | 225 |
216 static void byteAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8:
:Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 226 static void byteAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8:
:Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
217 { | 227 { |
218 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 228 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
219 TestObjectV8Internal::byteAttrAttributeSetter(jsValue, info); | 229 TestObjectV8Internal::byteAttrAttributeSetter(jsValue, info); |
220 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 230 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
221 } | 231 } |
222 | 232 |
223 static void octetAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>&
info) | 233 static void octetAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>&
info) |
224 { | 234 { |
225 TestObject* impl = V8TestObject::toNative(info.Holder()); | 235 v8::Handle<v8::Object> holder = info.Holder(); |
| 236 TestObject* impl = V8TestObject::toNative(holder); |
226 v8SetReturnValueUnsigned(info, impl->octetAttr()); | 237 v8SetReturnValueUnsigned(info, impl->octetAttr()); |
227 } | 238 } |
228 | 239 |
229 static void octetAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::Pr
opertyCallbackInfo<v8::Value>& info) | 240 static void octetAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::Pr
opertyCallbackInfo<v8::Value>& info) |
230 { | 241 { |
231 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 242 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
232 TestObjectV8Internal::octetAttrAttributeGetter(info); | 243 TestObjectV8Internal::octetAttrAttributeGetter(info); |
233 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 244 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
234 } | 245 } |
235 | 246 |
236 static void octetAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Pro
pertyCallbackInfo<void>& info) | 247 static void octetAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Pro
pertyCallbackInfo<void>& info) |
237 { | 248 { |
238 ExceptionState exceptionState(ExceptionState::SetterContext, "octetAttr", "T
estObject", info.Holder(), info.GetIsolate()); | 249 v8::Isolate* isolate = info.GetIsolate(); |
239 TestObject* impl = V8TestObject::toNative(info.Holder()); | 250 v8::Handle<v8::Object> holder = info.Holder(); |
| 251 ExceptionState exceptionState(ExceptionState::SetterContext, "octetAttr", "T
estObject", holder, isolate); |
| 252 TestObject* impl = V8TestObject::toNative(holder); |
240 V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt8(jsValue, exceptionStat
e), exceptionState); | 253 V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt8(jsValue, exceptionStat
e), exceptionState); |
241 impl->setOctetAttr(cppValue); | 254 impl->setOctetAttr(cppValue); |
242 } | 255 } |
243 | 256 |
244 static void octetAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8
::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 257 static void octetAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8
::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
245 { | 258 { |
246 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 259 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
247 TestObjectV8Internal::octetAttrAttributeSetter(jsValue, info); | 260 TestObjectV8Internal::octetAttrAttributeSetter(jsValue, info); |
248 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 261 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
249 } | 262 } |
250 | 263 |
251 static void shortAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>&
info) | 264 static void shortAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>&
info) |
252 { | 265 { |
253 TestObject* impl = V8TestObject::toNative(info.Holder()); | 266 v8::Handle<v8::Object> holder = info.Holder(); |
| 267 TestObject* impl = V8TestObject::toNative(holder); |
254 v8SetReturnValueInt(info, impl->shortAttr()); | 268 v8SetReturnValueInt(info, impl->shortAttr()); |
255 } | 269 } |
256 | 270 |
257 static void shortAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::Pr
opertyCallbackInfo<v8::Value>& info) | 271 static void shortAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::Pr
opertyCallbackInfo<v8::Value>& info) |
258 { | 272 { |
259 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 273 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
260 TestObjectV8Internal::shortAttrAttributeGetter(info); | 274 TestObjectV8Internal::shortAttrAttributeGetter(info); |
261 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 275 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
262 } | 276 } |
263 | 277 |
264 static void shortAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Pro
pertyCallbackInfo<void>& info) | 278 static void shortAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Pro
pertyCallbackInfo<void>& info) |
265 { | 279 { |
266 ExceptionState exceptionState(ExceptionState::SetterContext, "shortAttr", "T
estObject", info.Holder(), info.GetIsolate()); | 280 v8::Isolate* isolate = info.GetIsolate(); |
267 TestObject* impl = V8TestObject::toNative(info.Holder()); | 281 v8::Handle<v8::Object> holder = info.Holder(); |
| 282 ExceptionState exceptionState(ExceptionState::SetterContext, "shortAttr", "T
estObject", holder, isolate); |
| 283 TestObject* impl = V8TestObject::toNative(holder); |
268 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt16(jsValue, exceptionState), e
xceptionState); | 284 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt16(jsValue, exceptionState), e
xceptionState); |
269 impl->setShortAttr(cppValue); | 285 impl->setShortAttr(cppValue); |
270 } | 286 } |
271 | 287 |
272 static void shortAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8
::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 288 static void shortAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8
::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
273 { | 289 { |
274 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 290 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
275 TestObjectV8Internal::shortAttrAttributeSetter(jsValue, info); | 291 TestObjectV8Internal::shortAttrAttributeSetter(jsValue, info); |
276 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 292 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
277 } | 293 } |
278 | 294 |
279 static void unsignedShortAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::
Value>& info) | 295 static void unsignedShortAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::
Value>& info) |
280 { | 296 { |
281 TestObject* impl = V8TestObject::toNative(info.Holder()); | 297 v8::Handle<v8::Object> holder = info.Holder(); |
| 298 TestObject* impl = V8TestObject::toNative(holder); |
282 v8SetReturnValueUnsigned(info, impl->unsignedShortAttr()); | 299 v8SetReturnValueUnsigned(info, impl->unsignedShortAttr()); |
283 } | 300 } |
284 | 301 |
285 static void unsignedShortAttrAttributeGetterCallback(v8::Local<v8::String>, cons
t v8::PropertyCallbackInfo<v8::Value>& info) | 302 static void unsignedShortAttrAttributeGetterCallback(v8::Local<v8::String>, cons
t v8::PropertyCallbackInfo<v8::Value>& info) |
286 { | 303 { |
287 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 304 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
288 TestObjectV8Internal::unsignedShortAttrAttributeGetter(info); | 305 TestObjectV8Internal::unsignedShortAttrAttributeGetter(info); |
289 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 306 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
290 } | 307 } |
291 | 308 |
292 static void unsignedShortAttrAttributeSetter(v8::Local<v8::Value> jsValue, const
v8::PropertyCallbackInfo<void>& info) | 309 static void unsignedShortAttrAttributeSetter(v8::Local<v8::Value> jsValue, const
v8::PropertyCallbackInfo<void>& info) |
293 { | 310 { |
294 ExceptionState exceptionState(ExceptionState::SetterContext, "unsignedShortA
ttr", "TestObject", info.Holder(), info.GetIsolate()); | 311 v8::Isolate* isolate = info.GetIsolate(); |
295 TestObject* impl = V8TestObject::toNative(info.Holder()); | 312 v8::Handle<v8::Object> holder = info.Holder(); |
| 313 ExceptionState exceptionState(ExceptionState::SetterContext, "unsignedShortA
ttr", "TestObject", holder, isolate); |
| 314 TestObject* impl = V8TestObject::toNative(holder); |
296 V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt16(jsValue, exceptionSta
te), exceptionState); | 315 V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt16(jsValue, exceptionSta
te), exceptionState); |
297 impl->setUnsignedShortAttr(cppValue); | 316 impl->setUnsignedShortAttr(cppValue); |
298 } | 317 } |
299 | 318 |
300 static void unsignedShortAttrAttributeSetterCallback(v8::Local<v8::String>, v8::
Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 319 static void unsignedShortAttrAttributeSetterCallback(v8::Local<v8::String>, v8::
Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
301 { | 320 { |
302 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 321 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
303 TestObjectV8Internal::unsignedShortAttrAttributeSetter(jsValue, info); | 322 TestObjectV8Internal::unsignedShortAttrAttributeSetter(jsValue, info); |
304 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 323 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
305 } | 324 } |
306 | 325 |
307 static void longAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& i
nfo) | 326 static void longAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& i
nfo) |
308 { | 327 { |
309 TestObject* impl = V8TestObject::toNative(info.Holder()); | 328 v8::Handle<v8::Object> holder = info.Holder(); |
| 329 TestObject* impl = V8TestObject::toNative(holder); |
310 v8SetReturnValueInt(info, impl->longAttr()); | 330 v8SetReturnValueInt(info, impl->longAttr()); |
311 } | 331 } |
312 | 332 |
313 static void longAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::Pro
pertyCallbackInfo<v8::Value>& info) | 333 static void longAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::Pro
pertyCallbackInfo<v8::Value>& info) |
314 { | 334 { |
315 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 335 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
316 TestObjectV8Internal::longAttrAttributeGetter(info); | 336 TestObjectV8Internal::longAttrAttributeGetter(info); |
317 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 337 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
318 } | 338 } |
319 | 339 |
320 static void longAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Prop
ertyCallbackInfo<void>& info) | 340 static void longAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Prop
ertyCallbackInfo<void>& info) |
321 { | 341 { |
322 ExceptionState exceptionState(ExceptionState::SetterContext, "longAttr", "Te
stObject", info.Holder(), info.GetIsolate()); | 342 v8::Isolate* isolate = info.GetIsolate(); |
323 TestObject* impl = V8TestObject::toNative(info.Holder()); | 343 v8::Handle<v8::Object> holder = info.Holder(); |
| 344 ExceptionState exceptionState(ExceptionState::SetterContext, "longAttr", "Te
stObject", holder, isolate); |
| 345 TestObject* impl = V8TestObject::toNative(holder); |
324 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 346 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); |
325 impl->setLongAttr(cppValue); | 347 impl->setLongAttr(cppValue); |
326 } | 348 } |
327 | 349 |
328 static void longAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8:
:Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 350 static void longAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8:
:Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
329 { | 351 { |
330 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 352 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
331 TestObjectV8Internal::longAttrAttributeSetter(jsValue, info); | 353 TestObjectV8Internal::longAttrAttributeSetter(jsValue, info); |
332 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 354 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
333 } | 355 } |
334 | 356 |
335 static void longLongAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value
>& info) | 357 static void longLongAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value
>& info) |
336 { | 358 { |
337 TestObject* impl = V8TestObject::toNative(info.Holder()); | 359 v8::Handle<v8::Object> holder = info.Holder(); |
| 360 TestObject* impl = V8TestObject::toNative(holder); |
338 v8SetReturnValue(info, static_cast<double>(impl->longLongAttr())); | 361 v8SetReturnValue(info, static_cast<double>(impl->longLongAttr())); |
339 } | 362 } |
340 | 363 |
341 static void longLongAttrAttributeGetterCallback(v8::Local<v8::String>, const v8:
:PropertyCallbackInfo<v8::Value>& info) | 364 static void longLongAttrAttributeGetterCallback(v8::Local<v8::String>, const v8:
:PropertyCallbackInfo<v8::Value>& info) |
342 { | 365 { |
343 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 366 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
344 TestObjectV8Internal::longLongAttrAttributeGetter(info); | 367 TestObjectV8Internal::longLongAttrAttributeGetter(info); |
345 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 368 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
346 } | 369 } |
347 | 370 |
348 static void longLongAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::
PropertyCallbackInfo<void>& info) | 371 static void longLongAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::
PropertyCallbackInfo<void>& info) |
349 { | 372 { |
350 ExceptionState exceptionState(ExceptionState::SetterContext, "longLongAttr",
"TestObject", info.Holder(), info.GetIsolate()); | 373 v8::Isolate* isolate = info.GetIsolate(); |
351 TestObject* impl = V8TestObject::toNative(info.Holder()); | 374 v8::Handle<v8::Object> holder = info.Holder(); |
| 375 ExceptionState exceptionState(ExceptionState::SetterContext, "longLongAttr",
"TestObject", holder, isolate); |
| 376 TestObject* impl = V8TestObject::toNative(holder); |
352 V8TRYCATCH_EXCEPTION_VOID(long long, cppValue, toInt64(jsValue, exceptionSta
te), exceptionState); | 377 V8TRYCATCH_EXCEPTION_VOID(long long, cppValue, toInt64(jsValue, exceptionSta
te), exceptionState); |
353 impl->setLongLongAttr(cppValue); | 378 impl->setLongLongAttr(cppValue); |
354 } | 379 } |
355 | 380 |
356 static void longLongAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local
<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 381 static void longLongAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local
<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
357 { | 382 { |
358 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 383 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
359 TestObjectV8Internal::longLongAttrAttributeSetter(jsValue, info); | 384 TestObjectV8Internal::longLongAttrAttributeSetter(jsValue, info); |
360 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 385 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
361 } | 386 } |
362 | 387 |
363 static void unsignedLongLongAttrAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) | 388 static void unsignedLongLongAttrAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) |
364 { | 389 { |
365 TestObject* impl = V8TestObject::toNative(info.Holder()); | 390 v8::Handle<v8::Object> holder = info.Holder(); |
| 391 TestObject* impl = V8TestObject::toNative(holder); |
366 v8SetReturnValue(info, static_cast<double>(impl->unsignedLongLongAttr())); | 392 v8SetReturnValue(info, static_cast<double>(impl->unsignedLongLongAttr())); |
367 } | 393 } |
368 | 394 |
369 static void unsignedLongLongAttrAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) | 395 static void unsignedLongLongAttrAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) |
370 { | 396 { |
371 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 397 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
372 TestObjectV8Internal::unsignedLongLongAttrAttributeGetter(info); | 398 TestObjectV8Internal::unsignedLongLongAttrAttributeGetter(info); |
373 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 399 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
374 } | 400 } |
375 | 401 |
376 static void unsignedLongLongAttrAttributeSetter(v8::Local<v8::Value> jsValue, co
nst v8::PropertyCallbackInfo<void>& info) | 402 static void unsignedLongLongAttrAttributeSetter(v8::Local<v8::Value> jsValue, co
nst v8::PropertyCallbackInfo<void>& info) |
377 { | 403 { |
378 ExceptionState exceptionState(ExceptionState::SetterContext, "unsignedLongLo
ngAttr", "TestObject", info.Holder(), info.GetIsolate()); | 404 v8::Isolate* isolate = info.GetIsolate(); |
379 TestObject* impl = V8TestObject::toNative(info.Holder()); | 405 v8::Handle<v8::Object> holder = info.Holder(); |
| 406 ExceptionState exceptionState(ExceptionState::SetterContext, "unsignedLongLo
ngAttr", "TestObject", holder, isolate); |
| 407 TestObject* impl = V8TestObject::toNative(holder); |
380 V8TRYCATCH_EXCEPTION_VOID(unsigned long long, cppValue, toUInt64(jsValue, ex
ceptionState), exceptionState); | 408 V8TRYCATCH_EXCEPTION_VOID(unsigned long long, cppValue, toUInt64(jsValue, ex
ceptionState), exceptionState); |
381 impl->setUnsignedLongLongAttr(cppValue); | 409 impl->setUnsignedLongLongAttr(cppValue); |
382 } | 410 } |
383 | 411 |
384 static void unsignedLongLongAttrAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 412 static void unsignedLongLongAttrAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
385 { | 413 { |
386 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 414 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
387 TestObjectV8Internal::unsignedLongLongAttrAttributeSetter(jsValue, info); | 415 TestObjectV8Internal::unsignedLongLongAttrAttributeSetter(jsValue, info); |
388 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 416 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
389 } | 417 } |
390 | 418 |
391 static void stringAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>&
info) | 419 static void stringAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>&
info) |
392 { | 420 { |
393 TestObject* impl = V8TestObject::toNative(info.Holder()); | 421 v8::Handle<v8::Object> holder = info.Holder(); |
| 422 TestObject* impl = V8TestObject::toNative(holder); |
394 v8SetReturnValueString(info, impl->stringAttr(), info.GetIsolate()); | 423 v8SetReturnValueString(info, impl->stringAttr(), info.GetIsolate()); |
395 } | 424 } |
396 | 425 |
397 static void stringAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::P
ropertyCallbackInfo<v8::Value>& info) | 426 static void stringAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::P
ropertyCallbackInfo<v8::Value>& info) |
398 { | 427 { |
399 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 428 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
400 TestObjectV8Internal::stringAttrAttributeGetter(info); | 429 TestObjectV8Internal::stringAttrAttributeGetter(info); |
401 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 430 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
402 } | 431 } |
403 | 432 |
404 static void stringAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Pr
opertyCallbackInfo<void>& info) | 433 static void stringAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Pr
opertyCallbackInfo<void>& info) |
405 { | 434 { |
406 TestObject* impl = V8TestObject::toNative(info.Holder()); | 435 v8::Handle<v8::Object> holder = info.Holder(); |
| 436 TestObject* impl = V8TestObject::toNative(holder); |
407 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 437 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); |
408 impl->setStringAttr(cppValue); | 438 impl->setStringAttr(cppValue); |
409 } | 439 } |
410 | 440 |
411 static void stringAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v
8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 441 static void stringAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v
8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
412 { | 442 { |
413 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 443 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
414 TestObjectV8Internal::stringAttrAttributeSetter(jsValue, info); | 444 TestObjectV8Internal::stringAttrAttributeSetter(jsValue, info); |
415 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 445 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
416 } | 446 } |
417 | 447 |
418 static void treatNullAsNullStringStringAttrAttributeGetter(const v8::PropertyCal
lbackInfo<v8::Value>& info) | 448 static void treatNullAsNullStringStringAttrAttributeGetter(const v8::PropertyCal
lbackInfo<v8::Value>& info) |
419 { | 449 { |
420 TestObject* impl = V8TestObject::toNative(info.Holder()); | 450 v8::Handle<v8::Object> holder = info.Holder(); |
| 451 TestObject* impl = V8TestObject::toNative(holder); |
421 v8SetReturnValueString(info, impl->treatNullAsNullStringStringAttr(), info.G
etIsolate()); | 452 v8SetReturnValueString(info, impl->treatNullAsNullStringStringAttr(), info.G
etIsolate()); |
422 } | 453 } |
423 | 454 |
424 static void treatNullAsNullStringStringAttrAttributeGetterCallback(v8::Local<v8:
:String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 455 static void treatNullAsNullStringStringAttrAttributeGetterCallback(v8::Local<v8:
:String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
425 { | 456 { |
426 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 457 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
427 TestObjectV8Internal::treatNullAsNullStringStringAttrAttributeGetter(info); | 458 TestObjectV8Internal::treatNullAsNullStringStringAttrAttributeGetter(info); |
428 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 459 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
429 } | 460 } |
430 | 461 |
431 static void treatNullAsNullStringStringAttrAttributeSetter(v8::Local<v8::Value>
jsValue, const v8::PropertyCallbackInfo<void>& info) | 462 static void treatNullAsNullStringStringAttrAttributeSetter(v8::Local<v8::Value>
jsValue, const v8::PropertyCallbackInfo<void>& info) |
432 { | 463 { |
433 TestObject* impl = V8TestObject::toNative(info.Holder()); | 464 v8::Handle<v8::Object> holder = info.Holder(); |
| 465 TestObject* impl = V8TestObject::toNative(holder); |
434 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, cppVal
ue, jsValue); | 466 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, cppVal
ue, jsValue); |
435 impl->setTreatNullAsNullStringStringAttr(cppValue); | 467 impl->setTreatNullAsNullStringStringAttr(cppValue); |
436 } | 468 } |
437 | 469 |
438 static void treatNullAsNullStringStringAttrAttributeSetterCallback(v8::Local<v8:
:String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& in
fo) | 470 static void treatNullAsNullStringStringAttrAttributeSetterCallback(v8::Local<v8:
:String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& in
fo) |
439 { | 471 { |
440 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 472 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
441 TestObjectV8Internal::treatNullAsNullStringStringAttrAttributeSetter(jsValue
, info); | 473 TestObjectV8Internal::treatNullAsNullStringStringAttrAttributeSetter(jsValue
, info); |
442 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 474 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
443 } | 475 } |
444 | 476 |
445 static void treatNullAsNullStringTreatUndefinedAsNullStringStringAttrAttributeGe
tter(const v8::PropertyCallbackInfo<v8::Value>& info) | 477 static void treatNullAsNullStringTreatUndefinedAsNullStringStringAttrAttributeGe
tter(const v8::PropertyCallbackInfo<v8::Value>& info) |
446 { | 478 { |
447 TestObject* impl = V8TestObject::toNative(info.Holder()); | 479 v8::Handle<v8::Object> holder = info.Holder(); |
| 480 TestObject* impl = V8TestObject::toNative(holder); |
448 v8SetReturnValueString(info, impl->treatNullAsNullStringTreatUndefinedAsNull
StringStringAttr(), info.GetIsolate()); | 481 v8SetReturnValueString(info, impl->treatNullAsNullStringTreatUndefinedAsNull
StringStringAttr(), info.GetIsolate()); |
449 } | 482 } |
450 | 483 |
451 static void treatNullAsNullStringTreatUndefinedAsNullStringStringAttrAttributeGe
tterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& i
nfo) | 484 static void treatNullAsNullStringTreatUndefinedAsNullStringStringAttrAttributeGe
tterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& i
nfo) |
452 { | 485 { |
453 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 486 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
454 TestObjectV8Internal::treatNullAsNullStringTreatUndefinedAsNullStringStringA
ttrAttributeGetter(info); | 487 TestObjectV8Internal::treatNullAsNullStringTreatUndefinedAsNullStringStringA
ttrAttributeGetter(info); |
455 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 488 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
456 } | 489 } |
457 | 490 |
458 static void treatNullAsNullStringTreatUndefinedAsNullStringStringAttrAttributeSe
tter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 491 static void treatNullAsNullStringTreatUndefinedAsNullStringStringAttrAttributeSe
tter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
459 { | 492 { |
460 TestObject* impl = V8TestObject::toNative(info.Holder()); | 493 v8::Handle<v8::Object> holder = info.Holder(); |
| 494 TestObject* impl = V8TestObject::toNative(holder); |
461 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithUndefinedOrNullChe
ck>, cppValue, jsValue); | 495 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithUndefinedOrNullChe
ck>, cppValue, jsValue); |
462 impl->setTreatNullAsNullStringTreatUndefinedAsNullStringStringAttr(cppValue)
; | 496 impl->setTreatNullAsNullStringTreatUndefinedAsNullStringStringAttr(cppValue)
; |
463 } | 497 } |
464 | 498 |
465 static void treatNullAsNullStringTreatUndefinedAsNullStringStringAttrAttributeSe
tterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::Prop
ertyCallbackInfo<void>& info) | 499 static void treatNullAsNullStringTreatUndefinedAsNullStringStringAttrAttributeSe
tterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::Prop
ertyCallbackInfo<void>& info) |
466 { | 500 { |
467 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 501 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
468 TestObjectV8Internal::treatNullAsNullStringTreatUndefinedAsNullStringStringA
ttrAttributeSetter(jsValue, info); | 502 TestObjectV8Internal::treatNullAsNullStringTreatUndefinedAsNullStringStringA
ttrAttributeSetter(jsValue, info); |
469 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 503 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
470 } | 504 } |
471 | 505 |
472 static void eventHandlerAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) | 506 static void eventHandlerAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) |
473 { | 507 { |
474 TestObject* impl = V8TestObject::toNative(info.Holder()); | 508 v8::Handle<v8::Object> holder = info.Holder(); |
| 509 TestObject* impl = V8TestObject::toNative(holder); |
475 EventListener* jsValue = impl->eventHandlerAttr(); | 510 EventListener* jsValue = impl->eventHandlerAttr(); |
476 v8SetReturnValue(info, jsValue ? v8::Handle<v8::Value>(V8AbstractEventListen
er::cast(jsValue)->getListenerObject(impl->executionContext())) : v8::Handle<v8:
:Value>(v8::Null(info.GetIsolate()))); | 511 v8SetReturnValue(info, jsValue ? v8::Handle<v8::Value>(V8AbstractEventListen
er::cast(jsValue)->getListenerObject(impl->executionContext())) : v8::Handle<v8:
:Value>(v8::Null(info.GetIsolate()))); |
477 } | 512 } |
478 | 513 |
479 static void eventHandlerAttrAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) | 514 static void eventHandlerAttrAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) |
480 { | 515 { |
481 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 516 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
482 TestObjectV8Internal::eventHandlerAttrAttributeGetter(info); | 517 TestObjectV8Internal::eventHandlerAttrAttributeGetter(info); |
483 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 518 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
484 } | 519 } |
485 | 520 |
486 static void eventHandlerAttrAttributeSetter(v8::Local<v8::Value> jsValue, const
v8::PropertyCallbackInfo<void>& info) | 521 static void eventHandlerAttrAttributeSetter(v8::Local<v8::Value> jsValue, const
v8::PropertyCallbackInfo<void>& info) |
487 { | 522 { |
488 TestObject* impl = V8TestObject::toNative(info.Holder()); | 523 v8::Isolate* isolate = info.GetIsolate(); |
489 moveEventListenerToNewWrapper(info.Holder(), impl->eventHandlerAttr(), jsVal
ue, V8TestObject::eventListenerCacheIndex, info.GetIsolate()); | 524 v8::Handle<v8::Object> holder = info.Holder(); |
| 525 TestObject* impl = V8TestObject::toNative(holder); |
| 526 moveEventListenerToNewWrapper(holder, impl->eventHandlerAttr(), jsValue, V8T
estObject::eventListenerCacheIndex, isolate); |
490 impl->setEventHandlerAttr(V8EventListenerList::getEventListener(jsValue, tru
e, ListenerFindOrCreate)); | 527 impl->setEventHandlerAttr(V8EventListenerList::getEventListener(jsValue, tru
e, ListenerFindOrCreate)); |
491 } | 528 } |
492 | 529 |
493 static void eventHandlerAttrAttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 530 static void eventHandlerAttrAttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
494 { | 531 { |
495 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 532 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
496 TestObjectV8Internal::eventHandlerAttrAttributeSetter(jsValue, info); | 533 TestObjectV8Internal::eventHandlerAttrAttributeSetter(jsValue, info); |
497 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 534 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
498 } | 535 } |
499 | 536 |
500 static void testObjAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>
& info) | 537 static void testObjAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>
& info) |
501 { | 538 { |
502 TestObject* impl = V8TestObject::toNative(info.Holder()); | 539 v8::Handle<v8::Object> holder = info.Holder(); |
| 540 TestObject* impl = V8TestObject::toNative(holder); |
503 v8SetReturnValueFast(info, WTF::getPtr(impl->testObjAttr()), impl); | 541 v8SetReturnValueFast(info, WTF::getPtr(impl->testObjAttr()), impl); |
504 } | 542 } |
505 | 543 |
506 static void testObjAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::
PropertyCallbackInfo<v8::Value>& info) | 544 static void testObjAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::
PropertyCallbackInfo<v8::Value>& info) |
507 { | 545 { |
508 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 546 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
509 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::Te
stFeature); | 547 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::Te
stFeature); |
510 TestObjectV8Internal::testObjAttrAttributeGetter(info); | 548 TestObjectV8Internal::testObjAttrAttributeGetter(info); |
511 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 549 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
512 } | 550 } |
513 | 551 |
514 static void testObjAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::P
ropertyCallbackInfo<void>& info) | 552 static void testObjAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::P
ropertyCallbackInfo<void>& info) |
515 { | 553 { |
516 TestObject* impl = V8TestObject::toNative(info.Holder()); | 554 v8::Handle<v8::Object> holder = info.Holder(); |
| 555 TestObject* impl = V8TestObject::toNative(holder); |
517 V8TRYCATCH_VOID(TestObject*, cppValue, V8TestObject::toNativeWithTypeCheck(i
nfo.GetIsolate(), jsValue)); | 556 V8TRYCATCH_VOID(TestObject*, cppValue, V8TestObject::toNativeWithTypeCheck(i
nfo.GetIsolate(), jsValue)); |
518 impl->setTestObjAttr(WTF::getPtr(cppValue)); | 557 impl->setTestObjAttr(WTF::getPtr(cppValue)); |
519 } | 558 } |
520 | 559 |
521 static void testObjAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<
v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 560 static void testObjAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<
v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
522 { | 561 { |
523 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 562 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
524 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::Te
stFeature); | 563 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::Te
stFeature); |
525 TestObjectV8Internal::testObjAttrAttributeSetter(jsValue, info); | 564 TestObjectV8Internal::testObjAttrAttributeSetter(jsValue, info); |
526 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 565 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
527 } | 566 } |
528 | 567 |
529 static void attrWithJSGetterAndSetterAttributeGetter(const v8::FunctionCallbackI
nfo<v8::Value>& info) | 568 static void attrWithJSGetterAndSetterAttributeGetter(const v8::FunctionCallbackI
nfo<v8::Value>& info) |
530 { | 569 { |
531 TestObject* impl = V8TestObject::toNative(info.Holder()); | 570 v8::Handle<v8::Object> holder = info.Holder(); |
| 571 TestObject* impl = V8TestObject::toNative(holder); |
532 v8SetReturnValueString(info, impl->attrWithJSGetterAndSetter(), info.GetIsol
ate()); | 572 v8SetReturnValueString(info, impl->attrWithJSGetterAndSetter(), info.GetIsol
ate()); |
533 } | 573 } |
534 | 574 |
535 static void attrWithJSGetterAndSetterAttributeGetterCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) | 575 static void attrWithJSGetterAndSetterAttributeGetterCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) |
536 { | 576 { |
537 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 577 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
538 TestObjectV8Internal::attrWithJSGetterAndSetterAttributeGetter(info); | 578 TestObjectV8Internal::attrWithJSGetterAndSetterAttributeGetter(info); |
539 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 579 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
540 } | 580 } |
541 | 581 |
542 static void attrWithJSGetterAndSetterAttributeSetter(v8::Local<v8::Value> jsValu
e, const v8::FunctionCallbackInfo<v8::Value>& info) | 582 static void attrWithJSGetterAndSetterAttributeSetter(v8::Local<v8::Value> jsValu
e, const v8::FunctionCallbackInfo<v8::Value>& info) |
543 { | 583 { |
544 TestObject* impl = V8TestObject::toNative(info.Holder()); | 584 v8::Handle<v8::Object> holder = info.Holder(); |
| 585 TestObject* impl = V8TestObject::toNative(holder); |
545 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 586 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); |
546 impl->setAttrWithJSGetterAndSetter(cppValue); | 587 impl->setAttrWithJSGetterAndSetter(cppValue); |
547 } | 588 } |
548 | 589 |
549 static void attrWithJSGetterAndSetterAttributeSetterCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) | 590 static void attrWithJSGetterAndSetterAttributeSetterCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) |
550 { | 591 { |
551 v8::Local<v8::Value> jsValue = info[0]; | 592 v8::Local<v8::Value> jsValue = info[0]; |
552 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 593 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
553 TestObjectV8Internal::attrWithJSGetterAndSetterAttributeSetter(jsValue, info
); | 594 TestObjectV8Internal::attrWithJSGetterAndSetterAttributeSetter(jsValue, info
); |
554 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 595 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
555 } | 596 } |
556 | 597 |
557 static void XMLObjAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>&
info) | 598 static void XMLObjAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>&
info) |
558 { | 599 { |
559 TestObject* impl = V8TestObject::toNative(info.Holder()); | 600 v8::Handle<v8::Object> holder = info.Holder(); |
| 601 TestObject* impl = V8TestObject::toNative(holder); |
560 v8SetReturnValueFast(info, WTF::getPtr(impl->xmlObjAttr()), impl); | 602 v8SetReturnValueFast(info, WTF::getPtr(impl->xmlObjAttr()), impl); |
561 } | 603 } |
562 | 604 |
563 static void XMLObjAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::P
ropertyCallbackInfo<v8::Value>& info) | 605 static void XMLObjAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::P
ropertyCallbackInfo<v8::Value>& info) |
564 { | 606 { |
565 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 607 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
566 TestObjectV8Internal::XMLObjAttrAttributeGetter(info); | 608 TestObjectV8Internal::XMLObjAttrAttributeGetter(info); |
567 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 609 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
568 } | 610 } |
569 | 611 |
570 static void XMLObjAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Pr
opertyCallbackInfo<void>& info) | 612 static void XMLObjAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Pr
opertyCallbackInfo<void>& info) |
571 { | 613 { |
572 TestObject* impl = V8TestObject::toNative(info.Holder()); | 614 v8::Handle<v8::Object> holder = info.Holder(); |
| 615 TestObject* impl = V8TestObject::toNative(holder); |
573 V8TRYCATCH_VOID(TestObject*, cppValue, V8TestObject::toNativeWithTypeCheck(i
nfo.GetIsolate(), jsValue)); | 616 V8TRYCATCH_VOID(TestObject*, cppValue, V8TestObject::toNativeWithTypeCheck(i
nfo.GetIsolate(), jsValue)); |
574 impl->setXMLObjAttr(WTF::getPtr(cppValue)); | 617 impl->setXMLObjAttr(WTF::getPtr(cppValue)); |
575 } | 618 } |
576 | 619 |
577 static void XMLObjAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v
8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 620 static void XMLObjAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v
8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
578 { | 621 { |
579 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 622 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
580 TestObjectV8Internal::XMLObjAttrAttributeSetter(jsValue, info); | 623 TestObjectV8Internal::XMLObjAttrAttributeSetter(jsValue, info); |
581 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 624 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
582 } | 625 } |
583 | 626 |
584 static void reflectedStringAttrAttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) | 627 static void reflectedStringAttrAttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) |
585 { | 628 { |
586 TestObject* impl = V8TestObject::toNative(info.Holder()); | 629 v8::Handle<v8::Object> holder = info.Holder(); |
| 630 TestObject* impl = V8TestObject::toNative(holder); |
587 v8SetReturnValueString(info, impl->fastGetAttribute(HTMLNames::reflectedstri
ngattrAttr), info.GetIsolate()); | 631 v8SetReturnValueString(info, impl->fastGetAttribute(HTMLNames::reflectedstri
ngattrAttr), info.GetIsolate()); |
588 } | 632 } |
589 | 633 |
590 static void reflectedStringAttrAttributeGetterCallback(v8::Local<v8::String>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) | 634 static void reflectedStringAttrAttributeGetterCallback(v8::Local<v8::String>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) |
591 { | 635 { |
592 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 636 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
593 TestObjectV8Internal::reflectedStringAttrAttributeGetter(info); | 637 TestObjectV8Internal::reflectedStringAttrAttributeGetter(info); |
594 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 638 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
595 } | 639 } |
596 | 640 |
597 static void reflectedStringAttrAttributeSetter(v8::Local<v8::Value> jsValue, con
st v8::PropertyCallbackInfo<void>& info) | 641 static void reflectedStringAttrAttributeSetter(v8::Local<v8::Value> jsValue, con
st v8::PropertyCallbackInfo<void>& info) |
598 { | 642 { |
599 TestObject* impl = V8TestObject::toNative(info.Holder()); | 643 v8::Handle<v8::Object> holder = info.Holder(); |
| 644 TestObject* impl = V8TestObject::toNative(holder); |
600 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 645 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); |
601 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 646 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
602 impl->setAttribute(HTMLNames::reflectedstringattrAttr, cppValue); | 647 impl->setAttribute(HTMLNames::reflectedstringattrAttr, cppValue); |
603 } | 648 } |
604 | 649 |
605 static void reflectedStringAttrAttributeSetterCallback(v8::Local<v8::String>, v8
::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 650 static void reflectedStringAttrAttributeSetterCallback(v8::Local<v8::String>, v8
::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
606 { | 651 { |
607 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 652 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
608 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 653 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
609 TestObjectV8Internal::reflectedStringAttrAttributeSetter(jsValue, info); | 654 TestObjectV8Internal::reflectedStringAttrAttributeSetter(jsValue, info); |
610 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 655 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
611 } | 656 } |
612 | 657 |
613 static void reflectedTreatNullAsNullStringStringAttrAttributeGetter(const v8::Pr
opertyCallbackInfo<v8::Value>& info) | 658 static void reflectedTreatNullAsNullStringStringAttrAttributeGetter(const v8::Pr
opertyCallbackInfo<v8::Value>& info) |
614 { | 659 { |
615 TestObject* impl = V8TestObject::toNative(info.Holder()); | 660 v8::Handle<v8::Object> holder = info.Holder(); |
| 661 TestObject* impl = V8TestObject::toNative(holder); |
616 v8SetReturnValueString(info, impl->fastGetAttribute(HTMLNames::reflectedtrea
tnullasnullstringstringattrAttr), info.GetIsolate()); | 662 v8SetReturnValueString(info, impl->fastGetAttribute(HTMLNames::reflectedtrea
tnullasnullstringstringattrAttr), info.GetIsolate()); |
617 } | 663 } |
618 | 664 |
619 static void reflectedTreatNullAsNullStringStringAttrAttributeGetterCallback(v8::
Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 665 static void reflectedTreatNullAsNullStringStringAttrAttributeGetterCallback(v8::
Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
620 { | 666 { |
621 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 667 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
622 TestObjectV8Internal::reflectedTreatNullAsNullStringStringAttrAttributeGette
r(info); | 668 TestObjectV8Internal::reflectedTreatNullAsNullStringStringAttrAttributeGette
r(info); |
623 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 669 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
624 } | 670 } |
625 | 671 |
626 static void reflectedTreatNullAsNullStringStringAttrAttributeSetter(v8::Local<v8
::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 672 static void reflectedTreatNullAsNullStringStringAttrAttributeSetter(v8::Local<v8
::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
627 { | 673 { |
628 TestObject* impl = V8TestObject::toNative(info.Holder()); | 674 v8::Handle<v8::Object> holder = info.Holder(); |
| 675 TestObject* impl = V8TestObject::toNative(holder); |
629 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, cppVal
ue, jsValue); | 676 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, cppVal
ue, jsValue); |
630 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 677 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
631 impl->setAttribute(HTMLNames::reflectedtreatnullasnullstringstringattrAttr,
cppValue); | 678 impl->setAttribute(HTMLNames::reflectedtreatnullasnullstringstringattrAttr,
cppValue); |
632 } | 679 } |
633 | 680 |
634 static void reflectedTreatNullAsNullStringStringAttrAttributeSetterCallback(v8::
Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<
void>& info) | 681 static void reflectedTreatNullAsNullStringStringAttrAttributeSetterCallback(v8::
Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<
void>& info) |
635 { | 682 { |
636 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 683 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
637 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 684 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
638 TestObjectV8Internal::reflectedTreatNullAsNullStringStringAttrAttributeSette
r(jsValue, info); | 685 TestObjectV8Internal::reflectedTreatNullAsNullStringStringAttrAttributeSette
r(jsValue, info); |
639 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 686 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
640 } | 687 } |
641 | 688 |
642 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringStringAttrAt
tributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) | 689 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringStringAttrAt
tributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) |
643 { | 690 { |
644 TestObject* impl = V8TestObject::toNative(info.Holder()); | 691 v8::Handle<v8::Object> holder = info.Holder(); |
| 692 TestObject* impl = V8TestObject::toNative(holder); |
645 v8SetReturnValueString(info, impl->fastGetAttribute(HTMLNames::reflectedtrea
tnullasnullstringtreatundefinedasnullstringstringattrAttr), info.GetIsolate()); | 693 v8SetReturnValueString(info, impl->fastGetAttribute(HTMLNames::reflectedtrea
tnullasnullstringtreatundefinedasnullstringstringattrAttr), info.GetIsolate()); |
646 } | 694 } |
647 | 695 |
648 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringStringAttrAt
tributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::
Value>& info) | 696 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringStringAttrAt
tributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::
Value>& info) |
649 { | 697 { |
650 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 698 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
651 TestObjectV8Internal::reflectedTreatNullAsNullStringTreatUndefinedAsNullStri
ngStringAttrAttributeGetter(info); | 699 TestObjectV8Internal::reflectedTreatNullAsNullStringTreatUndefinedAsNullStri
ngStringAttrAttributeGetter(info); |
652 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 700 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
653 } | 701 } |
654 | 702 |
655 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringStringAttrAt
tributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>
& info) | 703 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringStringAttrAt
tributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>
& info) |
656 { | 704 { |
657 TestObject* impl = V8TestObject::toNative(info.Holder()); | 705 v8::Handle<v8::Object> holder = info.Holder(); |
| 706 TestObject* impl = V8TestObject::toNative(holder); |
658 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithUndefinedOrNullChe
ck>, cppValue, jsValue); | 707 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithUndefinedOrNullChe
ck>, cppValue, jsValue); |
659 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 708 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
660 impl->setAttribute(HTMLNames::reflectedtreatnullasnullstringtreatundefinedas
nullstringstringattrAttr, cppValue); | 709 impl->setAttribute(HTMLNames::reflectedtreatnullasnullstringtreatundefinedas
nullstringstringattrAttr, cppValue); |
661 } | 710 } |
662 | 711 |
663 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringStringAttrAt
tributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const
v8::PropertyCallbackInfo<void>& info) | 712 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringStringAttrAt
tributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const
v8::PropertyCallbackInfo<void>& info) |
664 { | 713 { |
665 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 714 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
666 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 715 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
667 TestObjectV8Internal::reflectedTreatNullAsNullStringTreatUndefinedAsNullStri
ngStringAttrAttributeSetter(jsValue, info); | 716 TestObjectV8Internal::reflectedTreatNullAsNullStringTreatUndefinedAsNullStri
ngStringAttrAttributeSetter(jsValue, info); |
668 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 717 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
669 } | 718 } |
670 | 719 |
671 static void reflectedIntegralAttrAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) | 720 static void reflectedIntegralAttrAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) |
672 { | 721 { |
673 TestObject* impl = V8TestObject::toNative(info.Holder()); | 722 v8::Handle<v8::Object> holder = info.Holder(); |
| 723 TestObject* impl = V8TestObject::toNative(holder); |
674 v8SetReturnValueInt(info, impl->getIntegralAttribute(HTMLNames::reflectedint
egralattrAttr)); | 724 v8SetReturnValueInt(info, impl->getIntegralAttribute(HTMLNames::reflectedint
egralattrAttr)); |
675 } | 725 } |
676 | 726 |
677 static void reflectedIntegralAttrAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 727 static void reflectedIntegralAttrAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
678 { | 728 { |
679 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 729 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
680 TestObjectV8Internal::reflectedIntegralAttrAttributeGetter(info); | 730 TestObjectV8Internal::reflectedIntegralAttrAttributeGetter(info); |
681 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 731 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
682 } | 732 } |
683 | 733 |
684 static void reflectedIntegralAttrAttributeSetter(v8::Local<v8::Value> jsValue, c
onst v8::PropertyCallbackInfo<void>& info) | 734 static void reflectedIntegralAttrAttributeSetter(v8::Local<v8::Value> jsValue, c
onst v8::PropertyCallbackInfo<void>& info) |
685 { | 735 { |
686 ExceptionState exceptionState(ExceptionState::SetterContext, "reflectedInteg
ralAttr", "TestObject", info.Holder(), info.GetIsolate()); | 736 v8::Isolate* isolate = info.GetIsolate(); |
687 TestObject* impl = V8TestObject::toNative(info.Holder()); | 737 v8::Handle<v8::Object> holder = info.Holder(); |
| 738 ExceptionState exceptionState(ExceptionState::SetterContext, "reflectedInteg
ralAttr", "TestObject", holder, isolate); |
| 739 TestObject* impl = V8TestObject::toNative(holder); |
688 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 740 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); |
689 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 741 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
690 impl->setIntegralAttribute(HTMLNames::reflectedintegralattrAttr, cppValue); | 742 impl->setIntegralAttribute(HTMLNames::reflectedintegralattrAttr, cppValue); |
691 } | 743 } |
692 | 744 |
693 static void reflectedIntegralAttrAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 745 static void reflectedIntegralAttrAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
694 { | 746 { |
695 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 747 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
696 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 748 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
697 TestObjectV8Internal::reflectedIntegralAttrAttributeSetter(jsValue, info); | 749 TestObjectV8Internal::reflectedIntegralAttrAttributeSetter(jsValue, info); |
698 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 750 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
699 } | 751 } |
700 | 752 |
701 static void reflectedUnsignedIntegralAttrAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) | 753 static void reflectedUnsignedIntegralAttrAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) |
702 { | 754 { |
703 TestObject* impl = V8TestObject::toNative(info.Holder()); | 755 v8::Handle<v8::Object> holder = info.Holder(); |
| 756 TestObject* impl = V8TestObject::toNative(holder); |
704 v8SetReturnValueUnsigned(info, std::max(0, impl->getIntegralAttribute(HTMLNa
mes::reflectedunsignedintegralattrAttr))); | 757 v8SetReturnValueUnsigned(info, std::max(0, impl->getIntegralAttribute(HTMLNa
mes::reflectedunsignedintegralattrAttr))); |
705 } | 758 } |
706 | 759 |
707 static void reflectedUnsignedIntegralAttrAttributeGetterCallback(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) | 760 static void reflectedUnsignedIntegralAttrAttributeGetterCallback(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) |
708 { | 761 { |
709 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 762 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
710 TestObjectV8Internal::reflectedUnsignedIntegralAttrAttributeGetter(info); | 763 TestObjectV8Internal::reflectedUnsignedIntegralAttrAttributeGetter(info); |
711 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 764 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
712 } | 765 } |
713 | 766 |
714 static void reflectedUnsignedIntegralAttrAttributeSetter(v8::Local<v8::Value> js
Value, const v8::PropertyCallbackInfo<void>& info) | 767 static void reflectedUnsignedIntegralAttrAttributeSetter(v8::Local<v8::Value> js
Value, const v8::PropertyCallbackInfo<void>& info) |
715 { | 768 { |
716 ExceptionState exceptionState(ExceptionState::SetterContext, "reflectedUnsig
nedIntegralAttr", "TestObject", info.Holder(), info.GetIsolate()); | 769 v8::Isolate* isolate = info.GetIsolate(); |
717 TestObject* impl = V8TestObject::toNative(info.Holder()); | 770 v8::Handle<v8::Object> holder = info.Holder(); |
| 771 ExceptionState exceptionState(ExceptionState::SetterContext, "reflectedUnsig
nedIntegralAttr", "TestObject", holder, isolate); |
| 772 TestObject* impl = V8TestObject::toNative(holder); |
718 V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt32(jsValue, exceptionSta
te), exceptionState); | 773 V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt32(jsValue, exceptionSta
te), exceptionState); |
719 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 774 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
720 impl->setUnsignedIntegralAttribute(HTMLNames::reflectedunsignedintegralattrA
ttr, cppValue); | 775 impl->setUnsignedIntegralAttribute(HTMLNames::reflectedunsignedintegralattrA
ttr, cppValue); |
721 } | 776 } |
722 | 777 |
723 static void reflectedUnsignedIntegralAttrAttributeSetterCallback(v8::Local<v8::S
tring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info
) | 778 static void reflectedUnsignedIntegralAttrAttributeSetterCallback(v8::Local<v8::S
tring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info
) |
724 { | 779 { |
725 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 780 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
726 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 781 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
727 TestObjectV8Internal::reflectedUnsignedIntegralAttrAttributeSetter(jsValue,
info); | 782 TestObjectV8Internal::reflectedUnsignedIntegralAttrAttributeSetter(jsValue,
info); |
728 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 783 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
729 } | 784 } |
730 | 785 |
731 static void reflectedBooleanAttrAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) | 786 static void reflectedBooleanAttrAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) |
732 { | 787 { |
733 TestObject* impl = V8TestObject::toNative(info.Holder()); | 788 v8::Handle<v8::Object> holder = info.Holder(); |
| 789 TestObject* impl = V8TestObject::toNative(holder); |
734 v8SetReturnValueBool(info, impl->fastHasAttribute(HTMLNames::reflectedboolea
nattrAttr)); | 790 v8SetReturnValueBool(info, impl->fastHasAttribute(HTMLNames::reflectedboolea
nattrAttr)); |
735 } | 791 } |
736 | 792 |
737 static void reflectedBooleanAttrAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) | 793 static void reflectedBooleanAttrAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) |
738 { | 794 { |
739 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 795 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
740 TestObjectV8Internal::reflectedBooleanAttrAttributeGetter(info); | 796 TestObjectV8Internal::reflectedBooleanAttrAttributeGetter(info); |
741 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 797 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
742 } | 798 } |
743 | 799 |
744 static void reflectedBooleanAttrAttributeSetter(v8::Local<v8::Value> jsValue, co
nst v8::PropertyCallbackInfo<void>& info) | 800 static void reflectedBooleanAttrAttributeSetter(v8::Local<v8::Value> jsValue, co
nst v8::PropertyCallbackInfo<void>& info) |
745 { | 801 { |
746 TestObject* impl = V8TestObject::toNative(info.Holder()); | 802 v8::Handle<v8::Object> holder = info.Holder(); |
| 803 TestObject* impl = V8TestObject::toNative(holder); |
747 V8TRYCATCH_VOID(bool, cppValue, jsValue->BooleanValue()); | 804 V8TRYCATCH_VOID(bool, cppValue, jsValue->BooleanValue()); |
748 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 805 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
749 impl->setBooleanAttribute(HTMLNames::reflectedbooleanattrAttr, cppValue); | 806 impl->setBooleanAttribute(HTMLNames::reflectedbooleanattrAttr, cppValue); |
750 } | 807 } |
751 | 808 |
752 static void reflectedBooleanAttrAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 809 static void reflectedBooleanAttrAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
753 { | 810 { |
754 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 811 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
755 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 812 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
756 TestObjectV8Internal::reflectedBooleanAttrAttributeSetter(jsValue, info); | 813 TestObjectV8Internal::reflectedBooleanAttrAttributeSetter(jsValue, info); |
757 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 814 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
758 } | 815 } |
759 | 816 |
760 static void reflectedURLAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) | 817 static void reflectedURLAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) |
761 { | 818 { |
762 TestObject* impl = V8TestObject::toNative(info.Holder()); | 819 v8::Handle<v8::Object> holder = info.Holder(); |
| 820 TestObject* impl = V8TestObject::toNative(holder); |
763 v8SetReturnValueString(info, impl->getURLAttribute(HTMLNames::reflectedurlat
trAttr), info.GetIsolate()); | 821 v8SetReturnValueString(info, impl->getURLAttribute(HTMLNames::reflectedurlat
trAttr), info.GetIsolate()); |
764 } | 822 } |
765 | 823 |
766 static void reflectedURLAttrAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) | 824 static void reflectedURLAttrAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) |
767 { | 825 { |
768 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 826 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
769 TestObjectV8Internal::reflectedURLAttrAttributeGetter(info); | 827 TestObjectV8Internal::reflectedURLAttrAttributeGetter(info); |
770 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 828 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
771 } | 829 } |
772 | 830 |
773 static void reflectedURLAttrAttributeSetter(v8::Local<v8::Value> jsValue, const
v8::PropertyCallbackInfo<void>& info) | 831 static void reflectedURLAttrAttributeSetter(v8::Local<v8::Value> jsValue, const
v8::PropertyCallbackInfo<void>& info) |
774 { | 832 { |
775 TestObject* impl = V8TestObject::toNative(info.Holder()); | 833 v8::Handle<v8::Object> holder = info.Holder(); |
| 834 TestObject* impl = V8TestObject::toNative(holder); |
776 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 835 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); |
777 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 836 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
778 impl->setAttribute(HTMLNames::reflectedurlattrAttr, cppValue); | 837 impl->setAttribute(HTMLNames::reflectedurlattrAttr, cppValue); |
779 } | 838 } |
780 | 839 |
781 static void reflectedURLAttrAttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 840 static void reflectedURLAttrAttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
782 { | 841 { |
783 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 842 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
784 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 843 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
785 TestObjectV8Internal::reflectedURLAttrAttributeSetter(jsValue, info); | 844 TestObjectV8Internal::reflectedURLAttrAttributeSetter(jsValue, info); |
786 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 845 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
787 } | 846 } |
788 | 847 |
789 static void reflectedTreatNullAsNullStringURLAttrAttributeGetter(const v8::Prope
rtyCallbackInfo<v8::Value>& info) | 848 static void reflectedTreatNullAsNullStringURLAttrAttributeGetter(const v8::Prope
rtyCallbackInfo<v8::Value>& info) |
790 { | 849 { |
791 TestObject* impl = V8TestObject::toNative(info.Holder()); | 850 v8::Handle<v8::Object> holder = info.Holder(); |
| 851 TestObject* impl = V8TestObject::toNative(holder); |
792 v8SetReturnValueString(info, impl->getURLAttribute(HTMLNames::reflectedtreat
nullasnullstringurlattrAttr), info.GetIsolate()); | 852 v8SetReturnValueString(info, impl->getURLAttribute(HTMLNames::reflectedtreat
nullasnullstringurlattrAttr), info.GetIsolate()); |
793 } | 853 } |
794 | 854 |
795 static void reflectedTreatNullAsNullStringURLAttrAttributeGetterCallback(v8::Loc
al<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 855 static void reflectedTreatNullAsNullStringURLAttrAttributeGetterCallback(v8::Loc
al<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
796 { | 856 { |
797 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 857 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
798 TestObjectV8Internal::reflectedTreatNullAsNullStringURLAttrAttributeGetter(i
nfo); | 858 TestObjectV8Internal::reflectedTreatNullAsNullStringURLAttrAttributeGetter(i
nfo); |
799 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 859 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
800 } | 860 } |
801 | 861 |
802 static void reflectedTreatNullAsNullStringURLAttrAttributeSetter(v8::Local<v8::V
alue> jsValue, const v8::PropertyCallbackInfo<void>& info) | 862 static void reflectedTreatNullAsNullStringURLAttrAttributeSetter(v8::Local<v8::V
alue> jsValue, const v8::PropertyCallbackInfo<void>& info) |
803 { | 863 { |
804 TestObject* impl = V8TestObject::toNative(info.Holder()); | 864 v8::Handle<v8::Object> holder = info.Holder(); |
| 865 TestObject* impl = V8TestObject::toNative(holder); |
805 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, cppVal
ue, jsValue); | 866 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, cppVal
ue, jsValue); |
806 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 867 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
807 impl->setAttribute(HTMLNames::reflectedtreatnullasnullstringurlattrAttr, cpp
Value); | 868 impl->setAttribute(HTMLNames::reflectedtreatnullasnullstringurlattrAttr, cpp
Value); |
808 } | 869 } |
809 | 870 |
810 static void reflectedTreatNullAsNullStringURLAttrAttributeSetterCallback(v8::Loc
al<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<voi
d>& info) | 871 static void reflectedTreatNullAsNullStringURLAttrAttributeSetterCallback(v8::Loc
al<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<voi
d>& info) |
811 { | 872 { |
812 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 873 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
813 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 874 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
814 TestObjectV8Internal::reflectedTreatNullAsNullStringURLAttrAttributeSetter(j
sValue, info); | 875 TestObjectV8Internal::reflectedTreatNullAsNullStringURLAttrAttributeSetter(j
sValue, info); |
815 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 876 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
816 } | 877 } |
817 | 878 |
818 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringURLAttrAttri
buteGetter(const v8::PropertyCallbackInfo<v8::Value>& info) | 879 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringURLAttrAttri
buteGetter(const v8::PropertyCallbackInfo<v8::Value>& info) |
819 { | 880 { |
820 TestObject* impl = V8TestObject::toNative(info.Holder()); | 881 v8::Handle<v8::Object> holder = info.Holder(); |
| 882 TestObject* impl = V8TestObject::toNative(holder); |
821 v8SetReturnValueString(info, impl->getURLAttribute(HTMLNames::reflectedtreat
nullasnullstringtreatundefinedasnullstringurlattrAttr), info.GetIsolate()); | 883 v8SetReturnValueString(info, impl->getURLAttribute(HTMLNames::reflectedtreat
nullasnullstringtreatundefinedasnullstringurlattrAttr), info.GetIsolate()); |
822 } | 884 } |
823 | 885 |
824 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringURLAttrAttri
buteGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Val
ue>& info) | 886 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringURLAttrAttri
buteGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Val
ue>& info) |
825 { | 887 { |
826 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 888 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
827 TestObjectV8Internal::reflectedTreatNullAsNullStringTreatUndefinedAsNullStri
ngURLAttrAttributeGetter(info); | 889 TestObjectV8Internal::reflectedTreatNullAsNullStringTreatUndefinedAsNullStri
ngURLAttrAttributeGetter(info); |
828 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 890 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
829 } | 891 } |
830 | 892 |
831 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringURLAttrAttri
buteSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& i
nfo) | 893 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringURLAttrAttri
buteSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& i
nfo) |
832 { | 894 { |
833 TestObject* impl = V8TestObject::toNative(info.Holder()); | 895 v8::Handle<v8::Object> holder = info.Holder(); |
| 896 TestObject* impl = V8TestObject::toNative(holder); |
834 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithUndefinedOrNullChe
ck>, cppValue, jsValue); | 897 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithUndefinedOrNullChe
ck>, cppValue, jsValue); |
835 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 898 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
836 impl->setAttribute(HTMLNames::reflectedtreatnullasnullstringtreatundefinedas
nullstringurlattrAttr, cppValue); | 899 impl->setAttribute(HTMLNames::reflectedtreatnullasnullstringtreatundefinedas
nullstringurlattrAttr, cppValue); |
837 } | 900 } |
838 | 901 |
839 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringURLAttrAttri
buteSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8
::PropertyCallbackInfo<void>& info) | 902 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringURLAttrAttri
buteSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8
::PropertyCallbackInfo<void>& info) |
840 { | 903 { |
841 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 904 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
842 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 905 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
843 TestObjectV8Internal::reflectedTreatNullAsNullStringTreatUndefinedAsNullStri
ngURLAttrAttributeSetter(jsValue, info); | 906 TestObjectV8Internal::reflectedTreatNullAsNullStringTreatUndefinedAsNullStri
ngURLAttrAttributeSetter(jsValue, info); |
844 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 907 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
845 } | 908 } |
846 | 909 |
847 static void reflectedCustomStringAttrAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) | 910 static void reflectedCustomStringAttrAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) |
848 { | 911 { |
849 TestObject* impl = V8TestObject::toNative(info.Holder()); | 912 v8::Handle<v8::Object> holder = info.Holder(); |
| 913 TestObject* impl = V8TestObject::toNative(holder); |
850 v8SetReturnValueString(info, impl->fastGetAttribute(HTMLNames::customContent
StringAttrAttr), info.GetIsolate()); | 914 v8SetReturnValueString(info, impl->fastGetAttribute(HTMLNames::customContent
StringAttrAttr), info.GetIsolate()); |
851 } | 915 } |
852 | 916 |
853 static void reflectedCustomStringAttrAttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) | 917 static void reflectedCustomStringAttrAttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) |
854 { | 918 { |
855 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 919 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
856 TestObjectV8Internal::reflectedCustomStringAttrAttributeGetter(info); | 920 TestObjectV8Internal::reflectedCustomStringAttrAttributeGetter(info); |
857 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 921 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
858 } | 922 } |
859 | 923 |
860 static void reflectedCustomStringAttrAttributeSetter(v8::Local<v8::Value> jsValu
e, const v8::PropertyCallbackInfo<void>& info) | 924 static void reflectedCustomStringAttrAttributeSetter(v8::Local<v8::Value> jsValu
e, const v8::PropertyCallbackInfo<void>& info) |
861 { | 925 { |
862 TestObject* impl = V8TestObject::toNative(info.Holder()); | 926 v8::Handle<v8::Object> holder = info.Holder(); |
| 927 TestObject* impl = V8TestObject::toNative(holder); |
863 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 928 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); |
864 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 929 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
865 impl->setAttribute(HTMLNames::customContentStringAttrAttr, cppValue); | 930 impl->setAttribute(HTMLNames::customContentStringAttrAttr, cppValue); |
866 } | 931 } |
867 | 932 |
868 static void reflectedCustomStringAttrAttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 933 static void reflectedCustomStringAttrAttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
869 { | 934 { |
870 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 935 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
871 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 936 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
872 TestObjectV8Internal::reflectedCustomStringAttrAttributeSetter(jsValue, info
); | 937 TestObjectV8Internal::reflectedCustomStringAttrAttributeSetter(jsValue, info
); |
873 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 938 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
874 } | 939 } |
875 | 940 |
876 static void reflectedTreatNullAsNullStringCustomStringAttrAttributeGetter(const
v8::PropertyCallbackInfo<v8::Value>& info) | 941 static void reflectedTreatNullAsNullStringCustomStringAttrAttributeGetter(const
v8::PropertyCallbackInfo<v8::Value>& info) |
877 { | 942 { |
878 TestObject* impl = V8TestObject::toNative(info.Holder()); | 943 v8::Handle<v8::Object> holder = info.Holder(); |
| 944 TestObject* impl = V8TestObject::toNative(holder); |
879 v8SetReturnValueString(info, impl->fastGetAttribute(HTMLNames::customContent
StringAttrAttr), info.GetIsolate()); | 945 v8SetReturnValueString(info, impl->fastGetAttribute(HTMLNames::customContent
StringAttrAttr), info.GetIsolate()); |
880 } | 946 } |
881 | 947 |
882 static void reflectedTreatNullAsNullStringCustomStringAttrAttributeGetterCallbac
k(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 948 static void reflectedTreatNullAsNullStringCustomStringAttrAttributeGetterCallbac
k(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
883 { | 949 { |
884 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 950 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
885 TestObjectV8Internal::reflectedTreatNullAsNullStringCustomStringAttrAttribut
eGetter(info); | 951 TestObjectV8Internal::reflectedTreatNullAsNullStringCustomStringAttrAttribut
eGetter(info); |
886 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 952 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
887 } | 953 } |
888 | 954 |
889 static void reflectedTreatNullAsNullStringCustomStringAttrAttributeSetter(v8::Lo
cal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 955 static void reflectedTreatNullAsNullStringCustomStringAttrAttributeSetter(v8::Lo
cal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
890 { | 956 { |
891 TestObject* impl = V8TestObject::toNative(info.Holder()); | 957 v8::Handle<v8::Object> holder = info.Holder(); |
| 958 TestObject* impl = V8TestObject::toNative(holder); |
892 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, cppVal
ue, jsValue); | 959 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, cppVal
ue, jsValue); |
893 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 960 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
894 impl->setAttribute(HTMLNames::customContentStringAttrAttr, cppValue); | 961 impl->setAttribute(HTMLNames::customContentStringAttrAttr, cppValue); |
895 } | 962 } |
896 | 963 |
897 static void reflectedTreatNullAsNullStringCustomStringAttrAttributeSetterCallbac
k(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbac
kInfo<void>& info) | 964 static void reflectedTreatNullAsNullStringCustomStringAttrAttributeSetterCallbac
k(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbac
kInfo<void>& info) |
898 { | 965 { |
899 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 966 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
900 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 967 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
901 TestObjectV8Internal::reflectedTreatNullAsNullStringCustomStringAttrAttribut
eSetter(jsValue, info); | 968 TestObjectV8Internal::reflectedTreatNullAsNullStringCustomStringAttrAttribut
eSetter(jsValue, info); |
902 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 969 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
903 } | 970 } |
904 | 971 |
905 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringCustomString
AttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) | 972 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringCustomString
AttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) |
906 { | 973 { |
907 TestObject* impl = V8TestObject::toNative(info.Holder()); | 974 v8::Handle<v8::Object> holder = info.Holder(); |
| 975 TestObject* impl = V8TestObject::toNative(holder); |
908 v8SetReturnValueString(info, impl->fastGetAttribute(HTMLNames::customContent
StringAttrAttr), info.GetIsolate()); | 976 v8SetReturnValueString(info, impl->fastGetAttribute(HTMLNames::customContent
StringAttrAttr), info.GetIsolate()); |
909 } | 977 } |
910 | 978 |
911 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringCustomString
AttrAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInf
o<v8::Value>& info) | 979 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringCustomString
AttrAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInf
o<v8::Value>& info) |
912 { | 980 { |
913 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 981 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
914 TestObjectV8Internal::reflectedTreatNullAsNullStringTreatUndefinedAsNullStri
ngCustomStringAttrAttributeGetter(info); | 982 TestObjectV8Internal::reflectedTreatNullAsNullStringTreatUndefinedAsNullStri
ngCustomStringAttrAttributeGetter(info); |
915 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 983 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
916 } | 984 } |
917 | 985 |
918 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringCustomString
AttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo
<void>& info) | 986 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringCustomString
AttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo
<void>& info) |
919 { | 987 { |
920 TestObject* impl = V8TestObject::toNative(info.Holder()); | 988 v8::Handle<v8::Object> holder = info.Holder(); |
| 989 TestObject* impl = V8TestObject::toNative(holder); |
921 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithUndefinedOrNullChe
ck>, cppValue, jsValue); | 990 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithUndefinedOrNullChe
ck>, cppValue, jsValue); |
922 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 991 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
923 impl->setAttribute(HTMLNames::customContentStringAttrAttr, cppValue); | 992 impl->setAttribute(HTMLNames::customContentStringAttrAttr, cppValue); |
924 } | 993 } |
925 | 994 |
926 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringCustomString
AttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue,
const v8::PropertyCallbackInfo<void>& info) | 995 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringCustomString
AttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue,
const v8::PropertyCallbackInfo<void>& info) |
927 { | 996 { |
928 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 997 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
929 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 998 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
930 TestObjectV8Internal::reflectedTreatNullAsNullStringTreatUndefinedAsNullStri
ngCustomStringAttrAttributeSetter(jsValue, info); | 999 TestObjectV8Internal::reflectedTreatNullAsNullStringTreatUndefinedAsNullStri
ngCustomStringAttrAttributeSetter(jsValue, info); |
931 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1000 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
932 } | 1001 } |
933 | 1002 |
934 static void reflectedCustomIntegralAttrAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) | 1003 static void reflectedCustomIntegralAttrAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) |
935 { | 1004 { |
936 TestObject* impl = V8TestObject::toNative(info.Holder()); | 1005 v8::Handle<v8::Object> holder = info.Holder(); |
| 1006 TestObject* impl = V8TestObject::toNative(holder); |
937 v8SetReturnValueInt(info, impl->getIntegralAttribute(HTMLNames::customConten
tIntegralAttrAttr)); | 1007 v8SetReturnValueInt(info, impl->getIntegralAttribute(HTMLNames::customConten
tIntegralAttrAttr)); |
938 } | 1008 } |
939 | 1009 |
940 static void reflectedCustomIntegralAttrAttributeGetterCallback(v8::Local<v8::Str
ing>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1010 static void reflectedCustomIntegralAttrAttributeGetterCallback(v8::Local<v8::Str
ing>, const v8::PropertyCallbackInfo<v8::Value>& info) |
941 { | 1011 { |
942 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1012 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
943 TestObjectV8Internal::reflectedCustomIntegralAttrAttributeGetter(info); | 1013 TestObjectV8Internal::reflectedCustomIntegralAttrAttributeGetter(info); |
944 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1014 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
945 } | 1015 } |
946 | 1016 |
947 static void reflectedCustomIntegralAttrAttributeSetter(v8::Local<v8::Value> jsVa
lue, const v8::PropertyCallbackInfo<void>& info) | 1017 static void reflectedCustomIntegralAttrAttributeSetter(v8::Local<v8::Value> jsVa
lue, const v8::PropertyCallbackInfo<void>& info) |
948 { | 1018 { |
949 ExceptionState exceptionState(ExceptionState::SetterContext, "reflectedCusto
mIntegralAttr", "TestObject", info.Holder(), info.GetIsolate()); | 1019 v8::Isolate* isolate = info.GetIsolate(); |
950 TestObject* impl = V8TestObject::toNative(info.Holder()); | 1020 v8::Handle<v8::Object> holder = info.Holder(); |
| 1021 ExceptionState exceptionState(ExceptionState::SetterContext, "reflectedCusto
mIntegralAttr", "TestObject", holder, isolate); |
| 1022 TestObject* impl = V8TestObject::toNative(holder); |
951 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 1023 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); |
952 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 1024 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
953 impl->setIntegralAttribute(HTMLNames::customContentIntegralAttrAttr, cppValu
e); | 1025 impl->setIntegralAttribute(HTMLNames::customContentIntegralAttrAttr, cppValu
e); |
954 } | 1026 } |
955 | 1027 |
956 static void reflectedCustomIntegralAttrAttributeSetterCallback(v8::Local<v8::Str
ing>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 1028 static void reflectedCustomIntegralAttrAttributeSetterCallback(v8::Local<v8::Str
ing>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
957 { | 1029 { |
958 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1030 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
959 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 1031 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
960 TestObjectV8Internal::reflectedCustomIntegralAttrAttributeSetter(jsValue, in
fo); | 1032 TestObjectV8Internal::reflectedCustomIntegralAttrAttributeSetter(jsValue, in
fo); |
961 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1033 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
962 } | 1034 } |
963 | 1035 |
964 static void reflectedCustomBooleanAttrAttributeGetter(const v8::PropertyCallback
Info<v8::Value>& info) | 1036 static void reflectedCustomBooleanAttrAttributeGetter(const v8::PropertyCallback
Info<v8::Value>& info) |
965 { | 1037 { |
966 TestObject* impl = V8TestObject::toNative(info.Holder()); | 1038 v8::Handle<v8::Object> holder = info.Holder(); |
| 1039 TestObject* impl = V8TestObject::toNative(holder); |
967 v8SetReturnValueBool(info, impl->fastHasAttribute(HTMLNames::customContentBo
oleanAttrAttr)); | 1040 v8SetReturnValueBool(info, impl->fastHasAttribute(HTMLNames::customContentBo
oleanAttrAttr)); |
968 } | 1041 } |
969 | 1042 |
970 static void reflectedCustomBooleanAttrAttributeGetterCallback(v8::Local<v8::Stri
ng>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1043 static void reflectedCustomBooleanAttrAttributeGetterCallback(v8::Local<v8::Stri
ng>, const v8::PropertyCallbackInfo<v8::Value>& info) |
971 { | 1044 { |
972 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1045 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
973 TestObjectV8Internal::reflectedCustomBooleanAttrAttributeGetter(info); | 1046 TestObjectV8Internal::reflectedCustomBooleanAttrAttributeGetter(info); |
974 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1047 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
975 } | 1048 } |
976 | 1049 |
977 static void reflectedCustomBooleanAttrAttributeSetter(v8::Local<v8::Value> jsVal
ue, const v8::PropertyCallbackInfo<void>& info) | 1050 static void reflectedCustomBooleanAttrAttributeSetter(v8::Local<v8::Value> jsVal
ue, const v8::PropertyCallbackInfo<void>& info) |
978 { | 1051 { |
979 TestObject* impl = V8TestObject::toNative(info.Holder()); | 1052 v8::Handle<v8::Object> holder = info.Holder(); |
| 1053 TestObject* impl = V8TestObject::toNative(holder); |
980 V8TRYCATCH_VOID(bool, cppValue, jsValue->BooleanValue()); | 1054 V8TRYCATCH_VOID(bool, cppValue, jsValue->BooleanValue()); |
981 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 1055 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
982 impl->setBooleanAttribute(HTMLNames::customContentBooleanAttrAttr, cppValue)
; | 1056 impl->setBooleanAttribute(HTMLNames::customContentBooleanAttrAttr, cppValue)
; |
983 } | 1057 } |
984 | 1058 |
985 static void reflectedCustomBooleanAttrAttributeSetterCallback(v8::Local<v8::Stri
ng>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 1059 static void reflectedCustomBooleanAttrAttributeSetterCallback(v8::Local<v8::Stri
ng>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
986 { | 1060 { |
987 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1061 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
988 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 1062 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
989 TestObjectV8Internal::reflectedCustomBooleanAttrAttributeSetter(jsValue, inf
o); | 1063 TestObjectV8Internal::reflectedCustomBooleanAttrAttributeSetter(jsValue, inf
o); |
990 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1064 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
991 } | 1065 } |
992 | 1066 |
993 static void reflectedCustomURLAttrAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) | 1067 static void reflectedCustomURLAttrAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) |
994 { | 1068 { |
995 TestObject* impl = V8TestObject::toNative(info.Holder()); | 1069 v8::Handle<v8::Object> holder = info.Holder(); |
| 1070 TestObject* impl = V8TestObject::toNative(holder); |
996 v8SetReturnValueString(info, impl->getURLAttribute(HTMLNames::customContentU
RLAttrAttr), info.GetIsolate()); | 1071 v8SetReturnValueString(info, impl->getURLAttribute(HTMLNames::customContentU
RLAttrAttr), info.GetIsolate()); |
997 } | 1072 } |
998 | 1073 |
999 static void reflectedCustomURLAttrAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 1074 static void reflectedCustomURLAttrAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
1000 { | 1075 { |
1001 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1076 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1002 TestObjectV8Internal::reflectedCustomURLAttrAttributeGetter(info); | 1077 TestObjectV8Internal::reflectedCustomURLAttrAttributeGetter(info); |
1003 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1078 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1004 } | 1079 } |
1005 | 1080 |
1006 static void reflectedCustomURLAttrAttributeSetter(v8::Local<v8::Value> jsValue,
const v8::PropertyCallbackInfo<void>& info) | 1081 static void reflectedCustomURLAttrAttributeSetter(v8::Local<v8::Value> jsValue,
const v8::PropertyCallbackInfo<void>& info) |
1007 { | 1082 { |
1008 TestObject* impl = V8TestObject::toNative(info.Holder()); | 1083 v8::Handle<v8::Object> holder = info.Holder(); |
| 1084 TestObject* impl = V8TestObject::toNative(holder); |
1009 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 1085 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); |
1010 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 1086 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
1011 impl->setAttribute(HTMLNames::customContentURLAttrAttr, cppValue); | 1087 impl->setAttribute(HTMLNames::customContentURLAttrAttr, cppValue); |
1012 } | 1088 } |
1013 | 1089 |
1014 static void reflectedCustomURLAttrAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 1090 static void reflectedCustomURLAttrAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
1015 { | 1091 { |
1016 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1092 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1017 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 1093 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
1018 TestObjectV8Internal::reflectedCustomURLAttrAttributeSetter(jsValue, info); | 1094 TestObjectV8Internal::reflectedCustomURLAttrAttributeSetter(jsValue, info); |
1019 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1095 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1020 } | 1096 } |
1021 | 1097 |
1022 static void reflectedTreatNullAsNullStringCustomURLAttrAttributeGetter(const v8:
:PropertyCallbackInfo<v8::Value>& info) | 1098 static void reflectedTreatNullAsNullStringCustomURLAttrAttributeGetter(const v8:
:PropertyCallbackInfo<v8::Value>& info) |
1023 { | 1099 { |
1024 TestObject* impl = V8TestObject::toNative(info.Holder()); | 1100 v8::Handle<v8::Object> holder = info.Holder(); |
| 1101 TestObject* impl = V8TestObject::toNative(holder); |
1025 v8SetReturnValueString(info, impl->getURLAttribute(HTMLNames::customContentU
RLAttrAttr), info.GetIsolate()); | 1102 v8SetReturnValueString(info, impl->getURLAttribute(HTMLNames::customContentU
RLAttrAttr), info.GetIsolate()); |
1026 } | 1103 } |
1027 | 1104 |
1028 static void reflectedTreatNullAsNullStringCustomURLAttrAttributeGetterCallback(v
8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1105 static void reflectedTreatNullAsNullStringCustomURLAttrAttributeGetterCallback(v
8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
1029 { | 1106 { |
1030 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1107 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1031 TestObjectV8Internal::reflectedTreatNullAsNullStringCustomURLAttrAttributeGe
tter(info); | 1108 TestObjectV8Internal::reflectedTreatNullAsNullStringCustomURLAttrAttributeGe
tter(info); |
1032 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1109 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1033 } | 1110 } |
1034 | 1111 |
1035 static void reflectedTreatNullAsNullStringCustomURLAttrAttributeSetter(v8::Local
<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 1112 static void reflectedTreatNullAsNullStringCustomURLAttrAttributeSetter(v8::Local
<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
1036 { | 1113 { |
1037 TestObject* impl = V8TestObject::toNative(info.Holder()); | 1114 v8::Handle<v8::Object> holder = info.Holder(); |
| 1115 TestObject* impl = V8TestObject::toNative(holder); |
1038 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, cppVal
ue, jsValue); | 1116 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, cppVal
ue, jsValue); |
1039 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 1117 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
1040 impl->setAttribute(HTMLNames::customContentURLAttrAttr, cppValue); | 1118 impl->setAttribute(HTMLNames::customContentURLAttrAttr, cppValue); |
1041 } | 1119 } |
1042 | 1120 |
1043 static void reflectedTreatNullAsNullStringCustomURLAttrAttributeSetterCallback(v
8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackIn
fo<void>& info) | 1121 static void reflectedTreatNullAsNullStringCustomURLAttrAttributeSetterCallback(v
8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackIn
fo<void>& info) |
1044 { | 1122 { |
1045 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1123 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1046 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 1124 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
1047 TestObjectV8Internal::reflectedTreatNullAsNullStringCustomURLAttrAttributeSe
tter(jsValue, info); | 1125 TestObjectV8Internal::reflectedTreatNullAsNullStringCustomURLAttrAttributeSe
tter(jsValue, info); |
1048 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1126 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1049 } | 1127 } |
1050 | 1128 |
1051 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringCustomURLAtt
rAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) | 1129 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringCustomURLAtt
rAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) |
1052 { | 1130 { |
1053 TestObject* impl = V8TestObject::toNative(info.Holder()); | 1131 v8::Handle<v8::Object> holder = info.Holder(); |
| 1132 TestObject* impl = V8TestObject::toNative(holder); |
1054 v8SetReturnValueString(info, impl->getURLAttribute(HTMLNames::customContentU
RLAttrAttr), info.GetIsolate()); | 1133 v8SetReturnValueString(info, impl->getURLAttribute(HTMLNames::customContentU
RLAttrAttr), info.GetIsolate()); |
1055 } | 1134 } |
1056 | 1135 |
1057 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringCustomURLAtt
rAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v
8::Value>& info) | 1136 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringCustomURLAtt
rAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v
8::Value>& info) |
1058 { | 1137 { |
1059 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1138 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1060 TestObjectV8Internal::reflectedTreatNullAsNullStringTreatUndefinedAsNullStri
ngCustomURLAttrAttributeGetter(info); | 1139 TestObjectV8Internal::reflectedTreatNullAsNullStringTreatUndefinedAsNullStri
ngCustomURLAttrAttributeGetter(info); |
1061 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1140 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1062 } | 1141 } |
1063 | 1142 |
1064 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringCustomURLAtt
rAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<vo
id>& info) | 1143 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringCustomURLAtt
rAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<vo
id>& info) |
1065 { | 1144 { |
1066 TestObject* impl = V8TestObject::toNative(info.Holder()); | 1145 v8::Handle<v8::Object> holder = info.Holder(); |
| 1146 TestObject* impl = V8TestObject::toNative(holder); |
1067 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithUndefinedOrNullChe
ck>, cppValue, jsValue); | 1147 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithUndefinedOrNullChe
ck>, cppValue, jsValue); |
1068 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 1148 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
1069 impl->setAttribute(HTMLNames::customContentURLAttrAttr, cppValue); | 1149 impl->setAttribute(HTMLNames::customContentURLAttrAttr, cppValue); |
1070 } | 1150 } |
1071 | 1151 |
1072 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringCustomURLAtt
rAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, co
nst v8::PropertyCallbackInfo<void>& info) | 1152 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringCustomURLAtt
rAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, co
nst v8::PropertyCallbackInfo<void>& info) |
1073 { | 1153 { |
1074 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1154 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1075 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 1155 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
1076 TestObjectV8Internal::reflectedTreatNullAsNullStringTreatUndefinedAsNullStri
ngCustomURLAttrAttributeSetter(jsValue, info); | 1156 TestObjectV8Internal::reflectedTreatNullAsNullStringTreatUndefinedAsNullStri
ngCustomURLAttrAttributeSetter(jsValue, info); |
1077 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1157 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1078 } | 1158 } |
1079 | 1159 |
1080 static void limitedToOnlyOneAttributeAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) | 1160 static void limitedToOnlyOneAttributeAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) |
1081 { | 1161 { |
1082 TestObject* impl = V8TestObject::toNative(info.Holder()); | 1162 v8::Handle<v8::Object> holder = info.Holder(); |
| 1163 TestObject* impl = V8TestObject::toNative(holder); |
1083 String resultValue = impl->fastGetAttribute(HTMLNames::limitedtoonlyoneattri
buteAttr); | 1164 String resultValue = impl->fastGetAttribute(HTMLNames::limitedtoonlyoneattri
buteAttr); |
1084 if (resultValue.isEmpty()) { | 1165 if (resultValue.isEmpty()) { |
1085 ; | 1166 ; |
1086 } else if (equalIgnoringCase(resultValue, "unique")) { | 1167 } else if (equalIgnoringCase(resultValue, "unique")) { |
1087 resultValue = "unique"; | 1168 resultValue = "unique"; |
1088 } else { | 1169 } else { |
1089 resultValue = ""; | 1170 resultValue = ""; |
1090 } | 1171 } |
1091 v8SetReturnValueString(info, resultValue, info.GetIsolate()); | 1172 v8SetReturnValueString(info, resultValue, info.GetIsolate()); |
1092 } | 1173 } |
1093 | 1174 |
1094 static void limitedToOnlyOneAttributeAttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1175 static void limitedToOnlyOneAttributeAttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) |
1095 { | 1176 { |
1096 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1177 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1097 TestObjectV8Internal::limitedToOnlyOneAttributeAttributeGetter(info); | 1178 TestObjectV8Internal::limitedToOnlyOneAttributeAttributeGetter(info); |
1098 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1179 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1099 } | 1180 } |
1100 | 1181 |
1101 static void limitedToOnlyOneAttributeAttributeSetter(v8::Local<v8::Value> jsValu
e, const v8::PropertyCallbackInfo<void>& info) | 1182 static void limitedToOnlyOneAttributeAttributeSetter(v8::Local<v8::Value> jsValu
e, const v8::PropertyCallbackInfo<void>& info) |
1102 { | 1183 { |
1103 TestObject* impl = V8TestObject::toNative(info.Holder()); | 1184 v8::Handle<v8::Object> holder = info.Holder(); |
| 1185 TestObject* impl = V8TestObject::toNative(holder); |
1104 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 1186 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); |
1105 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 1187 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
1106 impl->setAttribute(HTMLNames::limitedtoonlyoneattributeAttr, cppValue); | 1188 impl->setAttribute(HTMLNames::limitedtoonlyoneattributeAttr, cppValue); |
1107 } | 1189 } |
1108 | 1190 |
1109 static void limitedToOnlyOneAttributeAttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 1191 static void limitedToOnlyOneAttributeAttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
1110 { | 1192 { |
1111 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1193 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1112 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 1194 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
1113 TestObjectV8Internal::limitedToOnlyOneAttributeAttributeSetter(jsValue, info
); | 1195 TestObjectV8Internal::limitedToOnlyOneAttributeAttributeSetter(jsValue, info
); |
1114 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1196 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1115 } | 1197 } |
1116 | 1198 |
1117 static void limitedToOnlyAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) | 1199 static void limitedToOnlyAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) |
1118 { | 1200 { |
1119 TestObject* impl = V8TestObject::toNative(info.Holder()); | 1201 v8::Handle<v8::Object> holder = info.Holder(); |
| 1202 TestObject* impl = V8TestObject::toNative(holder); |
1120 String resultValue = impl->fastGetAttribute(HTMLNames::limitedtoonlyattribut
eAttr); | 1203 String resultValue = impl->fastGetAttribute(HTMLNames::limitedtoonlyattribut
eAttr); |
1121 if (resultValue.isEmpty()) { | 1204 if (resultValue.isEmpty()) { |
1122 ; | 1205 ; |
1123 } else if (equalIgnoringCase(resultValue, "Per")) { | 1206 } else if (equalIgnoringCase(resultValue, "Per")) { |
1124 resultValue = "Per"; | 1207 resultValue = "Per"; |
1125 } else if (equalIgnoringCase(resultValue, "Paal")) { | 1208 } else if (equalIgnoringCase(resultValue, "Paal")) { |
1126 resultValue = "Paal"; | 1209 resultValue = "Paal"; |
1127 } else if (equalIgnoringCase(resultValue, "Espen")) { | 1210 } else if (equalIgnoringCase(resultValue, "Espen")) { |
1128 resultValue = "Espen"; | 1211 resultValue = "Espen"; |
1129 } else { | 1212 } else { |
1130 resultValue = ""; | 1213 resultValue = ""; |
1131 } | 1214 } |
1132 v8SetReturnValueString(info, resultValue, info.GetIsolate()); | 1215 v8SetReturnValueString(info, resultValue, info.GetIsolate()); |
1133 } | 1216 } |
1134 | 1217 |
1135 static void limitedToOnlyAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 1218 static void limitedToOnlyAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
1136 { | 1219 { |
1137 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1220 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1138 TestObjectV8Internal::limitedToOnlyAttributeAttributeGetter(info); | 1221 TestObjectV8Internal::limitedToOnlyAttributeAttributeGetter(info); |
1139 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1222 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1140 } | 1223 } |
1141 | 1224 |
1142 static void limitedToOnlyAttributeAttributeSetter(v8::Local<v8::Value> jsValue,
const v8::PropertyCallbackInfo<void>& info) | 1225 static void limitedToOnlyAttributeAttributeSetter(v8::Local<v8::Value> jsValue,
const v8::PropertyCallbackInfo<void>& info) |
1143 { | 1226 { |
1144 TestObject* impl = V8TestObject::toNative(info.Holder()); | 1227 v8::Handle<v8::Object> holder = info.Holder(); |
| 1228 TestObject* impl = V8TestObject::toNative(holder); |
1145 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 1229 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); |
1146 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 1230 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
1147 impl->setAttribute(HTMLNames::limitedtoonlyattributeAttr, cppValue); | 1231 impl->setAttribute(HTMLNames::limitedtoonlyattributeAttr, cppValue); |
1148 } | 1232 } |
1149 | 1233 |
1150 static void limitedToOnlyAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 1234 static void limitedToOnlyAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
1151 { | 1235 { |
1152 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1236 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1153 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 1237 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
1154 TestObjectV8Internal::limitedToOnlyAttributeAttributeSetter(jsValue, info); | 1238 TestObjectV8Internal::limitedToOnlyAttributeAttributeSetter(jsValue, info); |
1155 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1239 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1156 } | 1240 } |
1157 | 1241 |
1158 static void limitedToOnlyOtherAttributeAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) | 1242 static void limitedToOnlyOtherAttributeAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) |
1159 { | 1243 { |
1160 TestObject* impl = V8TestObject::toNative(info.Holder()); | 1244 v8::Handle<v8::Object> holder = info.Holder(); |
| 1245 TestObject* impl = V8TestObject::toNative(holder); |
1161 String resultValue = impl->fastGetAttribute(HTMLNames::OtherAttr); | 1246 String resultValue = impl->fastGetAttribute(HTMLNames::OtherAttr); |
1162 if (resultValue.isEmpty()) { | 1247 if (resultValue.isEmpty()) { |
1163 ; | 1248 ; |
1164 } else if (equalIgnoringCase(resultValue, "Value1")) { | 1249 } else if (equalIgnoringCase(resultValue, "Value1")) { |
1165 resultValue = "Value1"; | 1250 resultValue = "Value1"; |
1166 } else if (equalIgnoringCase(resultValue, "Value2")) { | 1251 } else if (equalIgnoringCase(resultValue, "Value2")) { |
1167 resultValue = "Value2"; | 1252 resultValue = "Value2"; |
1168 } else { | 1253 } else { |
1169 resultValue = ""; | 1254 resultValue = ""; |
1170 } | 1255 } |
1171 v8SetReturnValueString(info, resultValue, info.GetIsolate()); | 1256 v8SetReturnValueString(info, resultValue, info.GetIsolate()); |
1172 } | 1257 } |
1173 | 1258 |
1174 static void limitedToOnlyOtherAttributeAttributeGetterCallback(v8::Local<v8::Str
ing>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1259 static void limitedToOnlyOtherAttributeAttributeGetterCallback(v8::Local<v8::Str
ing>, const v8::PropertyCallbackInfo<v8::Value>& info) |
1175 { | 1260 { |
1176 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1261 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1177 TestObjectV8Internal::limitedToOnlyOtherAttributeAttributeGetter(info); | 1262 TestObjectV8Internal::limitedToOnlyOtherAttributeAttributeGetter(info); |
1178 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1263 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1179 } | 1264 } |
1180 | 1265 |
1181 static void limitedToOnlyOtherAttributeAttributeSetter(v8::Local<v8::Value> jsVa
lue, const v8::PropertyCallbackInfo<void>& info) | 1266 static void limitedToOnlyOtherAttributeAttributeSetter(v8::Local<v8::Value> jsVa
lue, const v8::PropertyCallbackInfo<void>& info) |
1182 { | 1267 { |
1183 TestObject* impl = V8TestObject::toNative(info.Holder()); | 1268 v8::Handle<v8::Object> holder = info.Holder(); |
| 1269 TestObject* impl = V8TestObject::toNative(holder); |
1184 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 1270 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); |
1185 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 1271 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
1186 impl->setAttribute(HTMLNames::OtherAttr, cppValue); | 1272 impl->setAttribute(HTMLNames::OtherAttr, cppValue); |
1187 } | 1273 } |
1188 | 1274 |
1189 static void limitedToOnlyOtherAttributeAttributeSetterCallback(v8::Local<v8::Str
ing>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 1275 static void limitedToOnlyOtherAttributeAttributeSetterCallback(v8::Local<v8::Str
ing>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
1190 { | 1276 { |
1191 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1277 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1192 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 1278 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
1193 TestObjectV8Internal::limitedToOnlyOtherAttributeAttributeSetter(jsValue, in
fo); | 1279 TestObjectV8Internal::limitedToOnlyOtherAttributeAttributeSetter(jsValue, in
fo); |
1194 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1280 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1195 } | 1281 } |
1196 | 1282 |
1197 static void limitedWithMissingDefaultAttributeAttributeGetter(const v8::Property
CallbackInfo<v8::Value>& info) | 1283 static void limitedWithMissingDefaultAttributeAttributeGetter(const v8::Property
CallbackInfo<v8::Value>& info) |
1198 { | 1284 { |
1199 TestObject* impl = V8TestObject::toNative(info.Holder()); | 1285 v8::Handle<v8::Object> holder = info.Holder(); |
| 1286 TestObject* impl = V8TestObject::toNative(holder); |
1200 String resultValue = impl->fastGetAttribute(HTMLNames::limitedwithmissingdef
aultattributeAttr); | 1287 String resultValue = impl->fastGetAttribute(HTMLNames::limitedwithmissingdef
aultattributeAttr); |
1201 if (resultValue.isEmpty()) { | 1288 if (resultValue.isEmpty()) { |
1202 resultValue = "rsa"; | 1289 resultValue = "rsa"; |
1203 } else if (equalIgnoringCase(resultValue, "rsa")) { | 1290 } else if (equalIgnoringCase(resultValue, "rsa")) { |
1204 resultValue = "rsa"; | 1291 resultValue = "rsa"; |
1205 } else if (equalIgnoringCase(resultValue, "dsa")) { | 1292 } else if (equalIgnoringCase(resultValue, "dsa")) { |
1206 resultValue = "dsa"; | 1293 resultValue = "dsa"; |
1207 } else { | 1294 } else { |
1208 resultValue = ""; | 1295 resultValue = ""; |
1209 } | 1296 } |
1210 v8SetReturnValueString(info, resultValue, info.GetIsolate()); | 1297 v8SetReturnValueString(info, resultValue, info.GetIsolate()); |
1211 } | 1298 } |
1212 | 1299 |
1213 static void limitedWithMissingDefaultAttributeAttributeGetterCallback(v8::Local<
v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1300 static void limitedWithMissingDefaultAttributeAttributeGetterCallback(v8::Local<
v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
1214 { | 1301 { |
1215 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1302 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1216 TestObjectV8Internal::limitedWithMissingDefaultAttributeAttributeGetter(info
); | 1303 TestObjectV8Internal::limitedWithMissingDefaultAttributeAttributeGetter(info
); |
1217 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1304 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1218 } | 1305 } |
1219 | 1306 |
1220 static void limitedWithMissingDefaultAttributeAttributeSetter(v8::Local<v8::Valu
e> jsValue, const v8::PropertyCallbackInfo<void>& info) | 1307 static void limitedWithMissingDefaultAttributeAttributeSetter(v8::Local<v8::Valu
e> jsValue, const v8::PropertyCallbackInfo<void>& info) |
1221 { | 1308 { |
1222 TestObject* impl = V8TestObject::toNative(info.Holder()); | 1309 v8::Handle<v8::Object> holder = info.Holder(); |
| 1310 TestObject* impl = V8TestObject::toNative(holder); |
1223 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 1311 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); |
1224 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 1312 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
1225 impl->setAttribute(HTMLNames::limitedwithmissingdefaultattributeAttr, cppVal
ue); | 1313 impl->setAttribute(HTMLNames::limitedwithmissingdefaultattributeAttr, cppVal
ue); |
1226 } | 1314 } |
1227 | 1315 |
1228 static void limitedWithMissingDefaultAttributeAttributeSetterCallback(v8::Local<
v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>&
info) | 1316 static void limitedWithMissingDefaultAttributeAttributeSetterCallback(v8::Local<
v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>&
info) |
1229 { | 1317 { |
1230 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1318 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1231 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 1319 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
1232 TestObjectV8Internal::limitedWithMissingDefaultAttributeAttributeSetter(jsVa
lue, info); | 1320 TestObjectV8Internal::limitedWithMissingDefaultAttributeAttributeSetter(jsVa
lue, info); |
1233 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1321 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1234 } | 1322 } |
1235 | 1323 |
1236 static void limitedWithInvalidMissingDefaultAttributeAttributeGetter(const v8::P
ropertyCallbackInfo<v8::Value>& info) | 1324 static void limitedWithInvalidMissingDefaultAttributeAttributeGetter(const v8::P
ropertyCallbackInfo<v8::Value>& info) |
1237 { | 1325 { |
1238 TestObject* impl = V8TestObject::toNative(info.Holder()); | 1326 v8::Handle<v8::Object> holder = info.Holder(); |
| 1327 TestObject* impl = V8TestObject::toNative(holder); |
1239 String resultValue = impl->fastGetAttribute(HTMLNames::limitedwithinvalidmis
singdefaultattributeAttr); | 1328 String resultValue = impl->fastGetAttribute(HTMLNames::limitedwithinvalidmis
singdefaultattributeAttr); |
1240 if (resultValue.isEmpty()) { | 1329 if (resultValue.isEmpty()) { |
1241 resultValue = "auto"; | 1330 resultValue = "auto"; |
1242 } else if (equalIgnoringCase(resultValue, "ltr")) { | 1331 } else if (equalIgnoringCase(resultValue, "ltr")) { |
1243 resultValue = "ltr"; | 1332 resultValue = "ltr"; |
1244 } else if (equalIgnoringCase(resultValue, "rtl")) { | 1333 } else if (equalIgnoringCase(resultValue, "rtl")) { |
1245 resultValue = "rtl"; | 1334 resultValue = "rtl"; |
1246 } else if (equalIgnoringCase(resultValue, "auto")) { | 1335 } else if (equalIgnoringCase(resultValue, "auto")) { |
1247 resultValue = "auto"; | 1336 resultValue = "auto"; |
1248 } else { | 1337 } else { |
1249 resultValue = "ltr"; | 1338 resultValue = "ltr"; |
1250 } | 1339 } |
1251 v8SetReturnValueString(info, resultValue, info.GetIsolate()); | 1340 v8SetReturnValueString(info, resultValue, info.GetIsolate()); |
1252 } | 1341 } |
1253 | 1342 |
1254 static void limitedWithInvalidMissingDefaultAttributeAttributeGetterCallback(v8:
:Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1343 static void limitedWithInvalidMissingDefaultAttributeAttributeGetterCallback(v8:
:Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
1255 { | 1344 { |
1256 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1345 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1257 TestObjectV8Internal::limitedWithInvalidMissingDefaultAttributeAttributeGett
er(info); | 1346 TestObjectV8Internal::limitedWithInvalidMissingDefaultAttributeAttributeGett
er(info); |
1258 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1347 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1259 } | 1348 } |
1260 | 1349 |
1261 static void limitedWithInvalidMissingDefaultAttributeAttributeSetter(v8::Local<v
8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 1350 static void limitedWithInvalidMissingDefaultAttributeAttributeSetter(v8::Local<v
8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
1262 { | 1351 { |
1263 TestObject* impl = V8TestObject::toNative(info.Holder()); | 1352 v8::Handle<v8::Object> holder = info.Holder(); |
| 1353 TestObject* impl = V8TestObject::toNative(holder); |
1264 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 1354 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); |
1265 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 1355 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
1266 impl->setAttribute(HTMLNames::limitedwithinvalidmissingdefaultattributeAttr,
cppValue); | 1356 impl->setAttribute(HTMLNames::limitedwithinvalidmissingdefaultattributeAttr,
cppValue); |
1267 } | 1357 } |
1268 | 1358 |
1269 static void limitedWithInvalidMissingDefaultAttributeAttributeSetterCallback(v8:
:Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo
<void>& info) | 1359 static void limitedWithInvalidMissingDefaultAttributeAttributeSetterCallback(v8:
:Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo
<void>& info) |
1270 { | 1360 { |
1271 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1361 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1272 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 1362 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
1273 TestObjectV8Internal::limitedWithInvalidMissingDefaultAttributeAttributeSett
er(jsValue, info); | 1363 TestObjectV8Internal::limitedWithInvalidMissingDefaultAttributeAttributeSett
er(jsValue, info); |
1274 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1364 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1275 } | 1365 } |
1276 | 1366 |
1277 static void limitedWithInvalidAndMissingDefaultAttributeAttributeGetter(const v8
::PropertyCallbackInfo<v8::Value>& info) | 1367 static void limitedWithInvalidAndMissingDefaultAttributeAttributeGetter(const v8
::PropertyCallbackInfo<v8::Value>& info) |
1278 { | 1368 { |
1279 TestObject* impl = V8TestObject::toNative(info.Holder()); | 1369 v8::Handle<v8::Object> holder = info.Holder(); |
| 1370 TestObject* impl = V8TestObject::toNative(holder); |
1280 String resultValue = impl->fastGetAttribute(HTMLNames::limitedwithinvalidand
missingdefaultattributeAttr); | 1371 String resultValue = impl->fastGetAttribute(HTMLNames::limitedwithinvalidand
missingdefaultattributeAttr); |
1281 if (resultValue.isEmpty()) { | 1372 if (resultValue.isEmpty()) { |
1282 resultValue = "left"; | 1373 resultValue = "left"; |
1283 } else if (equalIgnoringCase(resultValue, "left")) { | 1374 } else if (equalIgnoringCase(resultValue, "left")) { |
1284 resultValue = "left"; | 1375 resultValue = "left"; |
1285 } else if (equalIgnoringCase(resultValue, "right")) { | 1376 } else if (equalIgnoringCase(resultValue, "right")) { |
1286 resultValue = "right"; | 1377 resultValue = "right"; |
1287 } else { | 1378 } else { |
1288 resultValue = "left"; | 1379 resultValue = "left"; |
1289 } | 1380 } |
1290 v8SetReturnValueString(info, resultValue, info.GetIsolate()); | 1381 v8SetReturnValueString(info, resultValue, info.GetIsolate()); |
1291 } | 1382 } |
1292 | 1383 |
1293 static void limitedWithInvalidAndMissingDefaultAttributeAttributeGetterCallback(
v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1384 static void limitedWithInvalidAndMissingDefaultAttributeAttributeGetterCallback(
v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
1294 { | 1385 { |
1295 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1386 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1296 TestObjectV8Internal::limitedWithInvalidAndMissingDefaultAttributeAttributeG
etter(info); | 1387 TestObjectV8Internal::limitedWithInvalidAndMissingDefaultAttributeAttributeG
etter(info); |
1297 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1388 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1298 } | 1389 } |
1299 | 1390 |
1300 static void limitedWithInvalidAndMissingDefaultAttributeAttributeSetter(v8::Loca
l<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 1391 static void limitedWithInvalidAndMissingDefaultAttributeAttributeSetter(v8::Loca
l<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
1301 { | 1392 { |
1302 TestObject* impl = V8TestObject::toNative(info.Holder()); | 1393 v8::Handle<v8::Object> holder = info.Holder(); |
| 1394 TestObject* impl = V8TestObject::toNative(holder); |
1303 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 1395 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); |
1304 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 1396 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
1305 impl->setAttribute(HTMLNames::limitedwithinvalidandmissingdefaultattributeAt
tr, cppValue); | 1397 impl->setAttribute(HTMLNames::limitedwithinvalidandmissingdefaultattributeAt
tr, cppValue); |
1306 } | 1398 } |
1307 | 1399 |
1308 static void limitedWithInvalidAndMissingDefaultAttributeAttributeSetterCallback(
v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackI
nfo<void>& info) | 1400 static void limitedWithInvalidAndMissingDefaultAttributeAttributeSetterCallback(
v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackI
nfo<void>& info) |
1309 { | 1401 { |
1310 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1402 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1311 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 1403 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
1312 TestObjectV8Internal::limitedWithInvalidAndMissingDefaultAttributeAttributeS
etter(jsValue, info); | 1404 TestObjectV8Internal::limitedWithInvalidAndMissingDefaultAttributeAttributeS
etter(jsValue, info); |
1313 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1405 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1314 } | 1406 } |
1315 | 1407 |
1316 static void corsSettingAttributeAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) | 1408 static void corsSettingAttributeAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) |
1317 { | 1409 { |
1318 TestObject* impl = V8TestObject::toNative(info.Holder()); | 1410 v8::Handle<v8::Object> holder = info.Holder(); |
| 1411 TestObject* impl = V8TestObject::toNative(holder); |
1319 String resultValue = impl->fastGetAttribute(HTMLNames::corssettingattributeA
ttr); | 1412 String resultValue = impl->fastGetAttribute(HTMLNames::corssettingattributeA
ttr); |
1320 if (resultValue.isNull()) { | 1413 if (resultValue.isNull()) { |
1321 ; | 1414 ; |
1322 } else if (resultValue.isEmpty()) { | 1415 } else if (resultValue.isEmpty()) { |
1323 resultValue = "anonymous"; | 1416 resultValue = "anonymous"; |
1324 } else if (equalIgnoringCase(resultValue, "anonymous")) { | 1417 } else if (equalIgnoringCase(resultValue, "anonymous")) { |
1325 resultValue = "anonymous"; | 1418 resultValue = "anonymous"; |
1326 } else if (equalIgnoringCase(resultValue, "use-credentials")) { | 1419 } else if (equalIgnoringCase(resultValue, "use-credentials")) { |
1327 resultValue = "use-credentials"; | 1420 resultValue = "use-credentials"; |
1328 } else { | 1421 } else { |
1329 resultValue = "anonymous"; | 1422 resultValue = "anonymous"; |
1330 } | 1423 } |
1331 v8SetReturnValueString(info, resultValue, info.GetIsolate()); | 1424 v8SetReturnValueString(info, resultValue, info.GetIsolate()); |
1332 } | 1425 } |
1333 | 1426 |
1334 static void corsSettingAttributeAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) | 1427 static void corsSettingAttributeAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) |
1335 { | 1428 { |
1336 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1429 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1337 TestObjectV8Internal::corsSettingAttributeAttributeGetter(info); | 1430 TestObjectV8Internal::corsSettingAttributeAttributeGetter(info); |
1338 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1431 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1339 } | 1432 } |
1340 | 1433 |
1341 static void limitedWithEmptyMissingInvalidAttributeAttributeGetter(const v8::Pro
pertyCallbackInfo<v8::Value>& info) | 1434 static void limitedWithEmptyMissingInvalidAttributeAttributeGetter(const v8::Pro
pertyCallbackInfo<v8::Value>& info) |
1342 { | 1435 { |
1343 TestObject* impl = V8TestObject::toNative(info.Holder()); | 1436 v8::Handle<v8::Object> holder = info.Holder(); |
| 1437 TestObject* impl = V8TestObject::toNative(holder); |
1344 String resultValue = impl->fastGetAttribute(HTMLNames::limitedwithemptymissi
nginvalidattributeAttr); | 1438 String resultValue = impl->fastGetAttribute(HTMLNames::limitedwithemptymissi
nginvalidattributeAttr); |
1345 if (resultValue.isNull()) { | 1439 if (resultValue.isNull()) { |
1346 resultValue = "missing"; | 1440 resultValue = "missing"; |
1347 } else if (resultValue.isEmpty()) { | 1441 } else if (resultValue.isEmpty()) { |
1348 resultValue = "empty"; | 1442 resultValue = "empty"; |
1349 } else if (equalIgnoringCase(resultValue, "empty")) { | 1443 } else if (equalIgnoringCase(resultValue, "empty")) { |
1350 resultValue = "empty"; | 1444 resultValue = "empty"; |
1351 } else if (equalIgnoringCase(resultValue, "missing")) { | 1445 } else if (equalIgnoringCase(resultValue, "missing")) { |
1352 resultValue = "missing"; | 1446 resultValue = "missing"; |
1353 } else if (equalIgnoringCase(resultValue, "invalid")) { | 1447 } else if (equalIgnoringCase(resultValue, "invalid")) { |
1354 resultValue = "invalid"; | 1448 resultValue = "invalid"; |
1355 } else if (equalIgnoringCase(resultValue, "a-normal")) { | 1449 } else if (equalIgnoringCase(resultValue, "a-normal")) { |
1356 resultValue = "a-normal"; | 1450 resultValue = "a-normal"; |
1357 } else { | 1451 } else { |
1358 resultValue = "invalid"; | 1452 resultValue = "invalid"; |
1359 } | 1453 } |
1360 v8SetReturnValueString(info, resultValue, info.GetIsolate()); | 1454 v8SetReturnValueString(info, resultValue, info.GetIsolate()); |
1361 } | 1455 } |
1362 | 1456 |
1363 static void limitedWithEmptyMissingInvalidAttributeAttributeGetterCallback(v8::L
ocal<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1457 static void limitedWithEmptyMissingInvalidAttributeAttributeGetterCallback(v8::L
ocal<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
1364 { | 1458 { |
1365 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1459 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1366 TestObjectV8Internal::limitedWithEmptyMissingInvalidAttributeAttributeGetter
(info); | 1460 TestObjectV8Internal::limitedWithEmptyMissingInvalidAttributeAttributeGetter
(info); |
1367 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1461 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1368 } | 1462 } |
1369 | 1463 |
1370 static void typedArrayAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Val
ue>& info) | 1464 static void typedArrayAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Val
ue>& info) |
1371 { | 1465 { |
1372 TestObject* impl = V8TestObject::toNative(info.Holder()); | 1466 v8::Handle<v8::Object> holder = info.Holder(); |
| 1467 TestObject* impl = V8TestObject::toNative(holder); |
1373 v8SetReturnValueFast(info, WTF::getPtr(impl->typedArrayAttr()), impl); | 1468 v8SetReturnValueFast(info, WTF::getPtr(impl->typedArrayAttr()), impl); |
1374 } | 1469 } |
1375 | 1470 |
1376 static void typedArrayAttrAttributeGetterCallback(v8::Local<v8::String>, const v
8::PropertyCallbackInfo<v8::Value>& info) | 1471 static void typedArrayAttrAttributeGetterCallback(v8::Local<v8::String>, const v
8::PropertyCallbackInfo<v8::Value>& info) |
1377 { | 1472 { |
1378 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1473 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1379 TestObjectV8Internal::typedArrayAttrAttributeGetter(info); | 1474 TestObjectV8Internal::typedArrayAttrAttributeGetter(info); |
1380 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1475 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1381 } | 1476 } |
1382 | 1477 |
1383 static void typedArrayAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8
::PropertyCallbackInfo<void>& info) | 1478 static void typedArrayAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8
::PropertyCallbackInfo<void>& info) |
1384 { | 1479 { |
1385 TestObject* impl = V8TestObject::toNative(info.Holder()); | 1480 v8::Handle<v8::Object> holder = info.Holder(); |
| 1481 TestObject* impl = V8TestObject::toNative(holder); |
1386 V8TRYCATCH_VOID(Float32Array*, cppValue, jsValue->IsFloat32Array() ? V8Float
32Array::toNative(v8::Handle<v8::Float32Array>::Cast(jsValue)) : 0); | 1482 V8TRYCATCH_VOID(Float32Array*, cppValue, jsValue->IsFloat32Array() ? V8Float
32Array::toNative(v8::Handle<v8::Float32Array>::Cast(jsValue)) : 0); |
1387 impl->setTypedArrayAttr(WTF::getPtr(cppValue)); | 1483 impl->setTypedArrayAttr(WTF::getPtr(cppValue)); |
1388 } | 1484 } |
1389 | 1485 |
1390 static void typedArrayAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Loc
al<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 1486 static void typedArrayAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Loc
al<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
1391 { | 1487 { |
1392 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1488 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1393 TestObjectV8Internal::typedArrayAttrAttributeSetter(jsValue, info); | 1489 TestObjectV8Internal::typedArrayAttrAttributeSetter(jsValue, info); |
1394 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1490 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1395 } | 1491 } |
1396 | 1492 |
1397 static void attrWithGetterExceptionAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) | 1493 static void attrWithGetterExceptionAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) |
1398 { | 1494 { |
1399 TestObject* impl = V8TestObject::toNative(info.Holder()); | 1495 v8::Isolate* isolate = info.GetIsolate(); |
1400 ExceptionState exceptionState(ExceptionState::GetterContext, "attrWithGetter
Exception", "TestObject", info.Holder(), info.GetIsolate()); | 1496 v8::Handle<v8::Object> holder = info.Holder(); |
| 1497 TestObject* impl = V8TestObject::toNative(holder); |
| 1498 ExceptionState exceptionState(ExceptionState::GetterContext, "attrWithGetter
Exception", "TestObject", holder, isolate); |
1401 int jsValue = impl->attrWithGetterException(exceptionState); | 1499 int jsValue = impl->attrWithGetterException(exceptionState); |
1402 if (UNLIKELY(exceptionState.throwIfNeeded())) | 1500 if (UNLIKELY(exceptionState.throwIfNeeded())) |
1403 return; | 1501 return; |
1404 v8SetReturnValueInt(info, jsValue); | 1502 v8SetReturnValueInt(info, jsValue); |
1405 } | 1503 } |
1406 | 1504 |
1407 static void attrWithGetterExceptionAttributeGetterCallback(v8::Local<v8::String>
, const v8::PropertyCallbackInfo<v8::Value>& info) | 1505 static void attrWithGetterExceptionAttributeGetterCallback(v8::Local<v8::String>
, const v8::PropertyCallbackInfo<v8::Value>& info) |
1408 { | 1506 { |
1409 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1507 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1410 TestObjectV8Internal::attrWithGetterExceptionAttributeGetter(info); | 1508 TestObjectV8Internal::attrWithGetterExceptionAttributeGetter(info); |
1411 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1509 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1412 } | 1510 } |
1413 | 1511 |
1414 static void attrWithGetterExceptionAttributeSetter(v8::Local<v8::Value> jsValue,
const v8::PropertyCallbackInfo<void>& info) | 1512 static void attrWithGetterExceptionAttributeSetter(v8::Local<v8::Value> jsValue,
const v8::PropertyCallbackInfo<void>& info) |
1415 { | 1513 { |
1416 ExceptionState exceptionState(ExceptionState::SetterContext, "attrWithGetter
Exception", "TestObject", info.Holder(), info.GetIsolate()); | 1514 v8::Isolate* isolate = info.GetIsolate(); |
1417 TestObject* impl = V8TestObject::toNative(info.Holder()); | 1515 v8::Handle<v8::Object> holder = info.Holder(); |
| 1516 ExceptionState exceptionState(ExceptionState::SetterContext, "attrWithGetter
Exception", "TestObject", holder, isolate); |
| 1517 TestObject* impl = V8TestObject::toNative(holder); |
1418 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 1518 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); |
1419 impl->setAttrWithGetterException(cppValue); | 1519 impl->setAttrWithGetterException(cppValue); |
1420 } | 1520 } |
1421 | 1521 |
1422 static void attrWithGetterExceptionAttributeSetterCallback(v8::Local<v8::String>
, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 1522 static void attrWithGetterExceptionAttributeSetterCallback(v8::Local<v8::String>
, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
1423 { | 1523 { |
1424 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1524 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1425 TestObjectV8Internal::attrWithGetterExceptionAttributeSetter(jsValue, info); | 1525 TestObjectV8Internal::attrWithGetterExceptionAttributeSetter(jsValue, info); |
1426 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1526 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1427 } | 1527 } |
1428 | 1528 |
1429 static void attrWithSetterExceptionAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) | 1529 static void attrWithSetterExceptionAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) |
1430 { | 1530 { |
1431 TestObject* impl = V8TestObject::toNative(info.Holder()); | 1531 v8::Handle<v8::Object> holder = info.Holder(); |
| 1532 TestObject* impl = V8TestObject::toNative(holder); |
1432 v8SetReturnValueInt(info, impl->attrWithSetterException()); | 1533 v8SetReturnValueInt(info, impl->attrWithSetterException()); |
1433 } | 1534 } |
1434 | 1535 |
1435 static void attrWithSetterExceptionAttributeGetterCallback(v8::Local<v8::String>
, const v8::PropertyCallbackInfo<v8::Value>& info) | 1536 static void attrWithSetterExceptionAttributeGetterCallback(v8::Local<v8::String>
, const v8::PropertyCallbackInfo<v8::Value>& info) |
1436 { | 1537 { |
1437 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1538 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1438 TestObjectV8Internal::attrWithSetterExceptionAttributeGetter(info); | 1539 TestObjectV8Internal::attrWithSetterExceptionAttributeGetter(info); |
1439 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1540 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1440 } | 1541 } |
1441 | 1542 |
1442 static void attrWithSetterExceptionAttributeSetter(v8::Local<v8::Value> jsValue,
const v8::PropertyCallbackInfo<void>& info) | 1543 static void attrWithSetterExceptionAttributeSetter(v8::Local<v8::Value> jsValue,
const v8::PropertyCallbackInfo<void>& info) |
1443 { | 1544 { |
1444 ExceptionState exceptionState(ExceptionState::SetterContext, "attrWithSetter
Exception", "TestObject", info.Holder(), info.GetIsolate()); | 1545 v8::Isolate* isolate = info.GetIsolate(); |
1445 TestObject* impl = V8TestObject::toNative(info.Holder()); | 1546 v8::Handle<v8::Object> holder = info.Holder(); |
| 1547 ExceptionState exceptionState(ExceptionState::SetterContext, "attrWithSetter
Exception", "TestObject", holder, isolate); |
| 1548 TestObject* impl = V8TestObject::toNative(holder); |
1446 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 1549 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); |
1447 impl->setAttrWithSetterException(cppValue, exceptionState); | 1550 impl->setAttrWithSetterException(cppValue, exceptionState); |
1448 exceptionState.throwIfNeeded(); | 1551 exceptionState.throwIfNeeded(); |
1449 } | 1552 } |
1450 | 1553 |
1451 static void attrWithSetterExceptionAttributeSetterCallback(v8::Local<v8::String>
, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 1554 static void attrWithSetterExceptionAttributeSetterCallback(v8::Local<v8::String>
, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
1452 { | 1555 { |
1453 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1556 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1454 TestObjectV8Internal::attrWithSetterExceptionAttributeSetter(jsValue, info); | 1557 TestObjectV8Internal::attrWithSetterExceptionAttributeSetter(jsValue, info); |
1455 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1558 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1456 } | 1559 } |
1457 | 1560 |
1458 static void stringAttrWithGetterExceptionAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) | 1561 static void stringAttrWithGetterExceptionAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) |
1459 { | 1562 { |
1460 TestObject* impl = V8TestObject::toNative(info.Holder()); | 1563 v8::Isolate* isolate = info.GetIsolate(); |
1461 ExceptionState exceptionState(ExceptionState::GetterContext, "stringAttrWith
GetterException", "TestObject", info.Holder(), info.GetIsolate()); | 1564 v8::Handle<v8::Object> holder = info.Holder(); |
| 1565 TestObject* impl = V8TestObject::toNative(holder); |
| 1566 ExceptionState exceptionState(ExceptionState::GetterContext, "stringAttrWith
GetterException", "TestObject", holder, isolate); |
1462 String jsValue = impl->stringAttrWithGetterException(exceptionState); | 1567 String jsValue = impl->stringAttrWithGetterException(exceptionState); |
1463 if (UNLIKELY(exceptionState.throwIfNeeded())) | 1568 if (UNLIKELY(exceptionState.throwIfNeeded())) |
1464 return; | 1569 return; |
1465 v8SetReturnValueString(info, jsValue, info.GetIsolate()); | 1570 v8SetReturnValueString(info, jsValue, info.GetIsolate()); |
1466 } | 1571 } |
1467 | 1572 |
1468 static void stringAttrWithGetterExceptionAttributeGetterCallback(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1573 static void stringAttrWithGetterExceptionAttributeGetterCallback(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) |
1469 { | 1574 { |
1470 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1575 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1471 TestObjectV8Internal::stringAttrWithGetterExceptionAttributeGetter(info); | 1576 TestObjectV8Internal::stringAttrWithGetterExceptionAttributeGetter(info); |
1472 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1577 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1473 } | 1578 } |
1474 | 1579 |
1475 static void stringAttrWithGetterExceptionAttributeSetter(v8::Local<v8::Value> js
Value, const v8::PropertyCallbackInfo<void>& info) | 1580 static void stringAttrWithGetterExceptionAttributeSetter(v8::Local<v8::Value> js
Value, const v8::PropertyCallbackInfo<void>& info) |
1476 { | 1581 { |
1477 TestObject* impl = V8TestObject::toNative(info.Holder()); | 1582 v8::Handle<v8::Object> holder = info.Holder(); |
| 1583 TestObject* impl = V8TestObject::toNative(holder); |
1478 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 1584 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); |
1479 impl->setStringAttrWithGetterException(cppValue); | 1585 impl->setStringAttrWithGetterException(cppValue); |
1480 } | 1586 } |
1481 | 1587 |
1482 static void stringAttrWithGetterExceptionAttributeSetterCallback(v8::Local<v8::S
tring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info
) | 1588 static void stringAttrWithGetterExceptionAttributeSetterCallback(v8::Local<v8::S
tring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info
) |
1483 { | 1589 { |
1484 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1590 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1485 TestObjectV8Internal::stringAttrWithGetterExceptionAttributeSetter(jsValue,
info); | 1591 TestObjectV8Internal::stringAttrWithGetterExceptionAttributeSetter(jsValue,
info); |
1486 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1592 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1487 } | 1593 } |
1488 | 1594 |
1489 static void stringAttrWithSetterExceptionAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) | 1595 static void stringAttrWithSetterExceptionAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) |
1490 { | 1596 { |
1491 TestObject* impl = V8TestObject::toNative(info.Holder()); | 1597 v8::Handle<v8::Object> holder = info.Holder(); |
| 1598 TestObject* impl = V8TestObject::toNative(holder); |
1492 v8SetReturnValueString(info, impl->stringAttrWithSetterException(), info.Get
Isolate()); | 1599 v8SetReturnValueString(info, impl->stringAttrWithSetterException(), info.Get
Isolate()); |
1493 } | 1600 } |
1494 | 1601 |
1495 static void stringAttrWithSetterExceptionAttributeGetterCallback(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1602 static void stringAttrWithSetterExceptionAttributeGetterCallback(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) |
1496 { | 1603 { |
1497 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1604 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1498 TestObjectV8Internal::stringAttrWithSetterExceptionAttributeGetter(info); | 1605 TestObjectV8Internal::stringAttrWithSetterExceptionAttributeGetter(info); |
1499 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1606 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1500 } | 1607 } |
1501 | 1608 |
1502 static void stringAttrWithSetterExceptionAttributeSetter(v8::Local<v8::Value> js
Value, const v8::PropertyCallbackInfo<void>& info) | 1609 static void stringAttrWithSetterExceptionAttributeSetter(v8::Local<v8::Value> js
Value, const v8::PropertyCallbackInfo<void>& info) |
1503 { | 1610 { |
1504 ExceptionState exceptionState(ExceptionState::SetterContext, "stringAttrWith
SetterException", "TestObject", info.Holder(), info.GetIsolate()); | 1611 v8::Isolate* isolate = info.GetIsolate(); |
1505 TestObject* impl = V8TestObject::toNative(info.Holder()); | 1612 v8::Handle<v8::Object> holder = info.Holder(); |
| 1613 ExceptionState exceptionState(ExceptionState::SetterContext, "stringAttrWith
SetterException", "TestObject", holder, isolate); |
| 1614 TestObject* impl = V8TestObject::toNative(holder); |
1506 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 1615 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); |
1507 impl->setStringAttrWithSetterException(cppValue, exceptionState); | 1616 impl->setStringAttrWithSetterException(cppValue, exceptionState); |
1508 exceptionState.throwIfNeeded(); | 1617 exceptionState.throwIfNeeded(); |
1509 } | 1618 } |
1510 | 1619 |
1511 static void stringAttrWithSetterExceptionAttributeSetterCallback(v8::Local<v8::S
tring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info
) | 1620 static void stringAttrWithSetterExceptionAttributeSetterCallback(v8::Local<v8::S
tring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info
) |
1512 { | 1621 { |
1513 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1622 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1514 TestObjectV8Internal::stringAttrWithSetterExceptionAttributeSetter(jsValue,
info); | 1623 TestObjectV8Internal::stringAttrWithSetterExceptionAttributeSetter(jsValue,
info); |
1515 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1624 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1516 } | 1625 } |
1517 | 1626 |
1518 static void customAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::P
ropertyCallbackInfo<v8::Value>& info) | 1627 static void customAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::P
ropertyCallbackInfo<v8::Value>& info) |
1519 { | 1628 { |
1520 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1629 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1521 V8TestObject::customAttrAttributeGetterCustom(info); | 1630 V8TestObject::customAttrAttributeGetterCustom(info); |
1522 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1631 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1523 } | 1632 } |
1524 | 1633 |
1525 static void customAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v
8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 1634 static void customAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v
8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
1526 { | 1635 { |
1527 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1636 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1528 V8TestObject::customAttrAttributeSetterCustom(jsValue, info); | 1637 V8TestObject::customAttrAttributeSetterCustom(jsValue, info); |
1529 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1638 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1530 } | 1639 } |
1531 | 1640 |
1532 static void withExecutionContextAttributeAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) | 1641 static void withExecutionContextAttributeAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) |
1533 { | 1642 { |
1534 TestObject* impl = V8TestObject::toNative(info.Holder()); | 1643 v8::Isolate* isolate = info.GetIsolate(); |
1535 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate())
; | 1644 v8::Handle<v8::Object> holder = info.Holder(); |
| 1645 TestObject* impl = V8TestObject::toNative(holder); |
| 1646 ExecutionContext* scriptContext = currentExecutionContext(isolate); |
1536 v8SetReturnValueFast(info, WTF::getPtr(impl->withExecutionContextAttribute(s
criptContext)), impl); | 1647 v8SetReturnValueFast(info, WTF::getPtr(impl->withExecutionContextAttribute(s
criptContext)), impl); |
1537 } | 1648 } |
1538 | 1649 |
1539 static void withExecutionContextAttributeAttributeGetterCallback(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1650 static void withExecutionContextAttributeAttributeGetterCallback(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) |
1540 { | 1651 { |
1541 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1652 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1542 TestObjectV8Internal::withExecutionContextAttributeAttributeGetter(info); | 1653 TestObjectV8Internal::withExecutionContextAttributeAttributeGetter(info); |
1543 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1654 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1544 } | 1655 } |
1545 | 1656 |
1546 static void withExecutionContextAttributeAttributeSetter(v8::Local<v8::Value> js
Value, const v8::PropertyCallbackInfo<void>& info) | 1657 static void withExecutionContextAttributeAttributeSetter(v8::Local<v8::Value> js
Value, const v8::PropertyCallbackInfo<void>& info) |
1547 { | 1658 { |
1548 TestObject* impl = V8TestObject::toNative(info.Holder()); | 1659 v8::Isolate* isolate = info.GetIsolate(); |
| 1660 v8::Handle<v8::Object> holder = info.Holder(); |
| 1661 TestObject* impl = V8TestObject::toNative(holder); |
1549 V8TRYCATCH_VOID(TestObject*, cppValue, V8TestObject::toNativeWithTypeCheck(i
nfo.GetIsolate(), jsValue)); | 1662 V8TRYCATCH_VOID(TestObject*, cppValue, V8TestObject::toNativeWithTypeCheck(i
nfo.GetIsolate(), jsValue)); |
1550 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate())
; | 1663 ExecutionContext* scriptContext = currentExecutionContext(isolate); |
1551 impl->setWithExecutionContextAttribute(scriptContext, WTF::getPtr(cppValue))
; | 1664 impl->setWithExecutionContextAttribute(scriptContext, WTF::getPtr(cppValue))
; |
1552 } | 1665 } |
1553 | 1666 |
1554 static void withExecutionContextAttributeAttributeSetterCallback(v8::Local<v8::S
tring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info
) | 1667 static void withExecutionContextAttributeAttributeSetterCallback(v8::Local<v8::S
tring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info
) |
1555 { | 1668 { |
1556 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1669 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1557 TestObjectV8Internal::withExecutionContextAttributeAttributeSetter(jsValue,
info); | 1670 TestObjectV8Internal::withExecutionContextAttributeAttributeSetter(jsValue,
info); |
1558 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1671 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1559 } | 1672 } |
1560 | 1673 |
1561 static void withActiveWindowAndFirstWindowAttributeAttributeGetter(const v8::Pro
pertyCallbackInfo<v8::Value>& info) | 1674 static void withActiveWindowAndFirstWindowAttributeAttributeGetter(const v8::Pro
pertyCallbackInfo<v8::Value>& info) |
1562 { | 1675 { |
1563 TestObject* impl = V8TestObject::toNative(info.Holder()); | 1676 v8::Handle<v8::Object> holder = info.Holder(); |
| 1677 TestObject* impl = V8TestObject::toNative(holder); |
1564 v8SetReturnValueFast(info, WTF::getPtr(impl->withActiveWindowAndFirstWindowA
ttribute()), impl); | 1678 v8SetReturnValueFast(info, WTF::getPtr(impl->withActiveWindowAndFirstWindowA
ttribute()), impl); |
1565 } | 1679 } |
1566 | 1680 |
1567 static void withActiveWindowAndFirstWindowAttributeAttributeGetterCallback(v8::L
ocal<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1681 static void withActiveWindowAndFirstWindowAttributeAttributeGetterCallback(v8::L
ocal<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
1568 { | 1682 { |
1569 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1683 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1570 TestObjectV8Internal::withActiveWindowAndFirstWindowAttributeAttributeGetter
(info); | 1684 TestObjectV8Internal::withActiveWindowAndFirstWindowAttributeAttributeGetter
(info); |
1571 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1685 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1572 } | 1686 } |
1573 | 1687 |
1574 static void withActiveWindowAndFirstWindowAttributeAttributeSetter(v8::Local<v8:
:Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 1688 static void withActiveWindowAndFirstWindowAttributeAttributeSetter(v8::Local<v8:
:Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
1575 { | 1689 { |
1576 TestObject* impl = V8TestObject::toNative(info.Holder()); | 1690 v8::Handle<v8::Object> holder = info.Holder(); |
| 1691 TestObject* impl = V8TestObject::toNative(holder); |
1577 V8TRYCATCH_VOID(TestObject*, cppValue, V8TestObject::toNativeWithTypeCheck(i
nfo.GetIsolate(), jsValue)); | 1692 V8TRYCATCH_VOID(TestObject*, cppValue, V8TestObject::toNativeWithTypeCheck(i
nfo.GetIsolate(), jsValue)); |
1578 impl->setWithActiveWindowAndFirstWindowAttribute(callingDOMWindow(info.GetIs
olate()), enteredDOMWindow(info.GetIsolate()), WTF::getPtr(cppValue)); | 1693 impl->setWithActiveWindowAndFirstWindowAttribute(callingDOMWindow(info.GetIs
olate()), enteredDOMWindow(info.GetIsolate()), WTF::getPtr(cppValue)); |
1579 } | 1694 } |
1580 | 1695 |
1581 static void withActiveWindowAndFirstWindowAttributeAttributeSetterCallback(v8::L
ocal<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<v
oid>& info) | 1696 static void withActiveWindowAndFirstWindowAttributeAttributeSetterCallback(v8::L
ocal<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<v
oid>& info) |
1582 { | 1697 { |
1583 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1698 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1584 TestObjectV8Internal::withActiveWindowAndFirstWindowAttributeAttributeSetter
(jsValue, info); | 1699 TestObjectV8Internal::withActiveWindowAndFirstWindowAttributeAttributeSetter
(jsValue, info); |
1585 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1700 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1586 } | 1701 } |
1587 | 1702 |
1588 static void withScriptStateAttributeRaisesAttributeGetter(const v8::PropertyCall
backInfo<v8::Value>& info) | 1703 static void withScriptStateAttributeRaisesAttributeGetter(const v8::PropertyCall
backInfo<v8::Value>& info) |
1589 { | 1704 { |
1590 TestObject* impl = V8TestObject::toNative(info.Holder()); | 1705 v8::Isolate* isolate = info.GetIsolate(); |
1591 ExceptionState exceptionState(ExceptionState::GetterContext, "withScriptStat
eAttributeRaises", "TestObject", info.Holder(), info.GetIsolate()); | 1706 v8::Handle<v8::Object> holder = info.Holder(); |
| 1707 TestObject* impl = V8TestObject::toNative(holder); |
| 1708 ExceptionState exceptionState(ExceptionState::GetterContext, "withScriptStat
eAttributeRaises", "TestObject", holder, isolate); |
1592 RefPtr<TestObject> jsValue = impl->withScriptStateAttributeRaises(exceptionS
tate); | 1709 RefPtr<TestObject> jsValue = impl->withScriptStateAttributeRaises(exceptionS
tate); |
1593 if (UNLIKELY(exceptionState.throwIfNeeded())) | 1710 if (UNLIKELY(exceptionState.throwIfNeeded())) |
1594 return; | 1711 return; |
1595 v8SetReturnValueFast(info, WTF::getPtr(jsValue.release()), impl); | 1712 v8SetReturnValueFast(info, WTF::getPtr(jsValue.release()), impl); |
1596 } | 1713 } |
1597 | 1714 |
1598 static void withScriptStateAttributeRaisesAttributeGetterCallback(v8::Local<v8::
String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1715 static void withScriptStateAttributeRaisesAttributeGetterCallback(v8::Local<v8::
String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
1599 { | 1716 { |
1600 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1717 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1601 TestObjectV8Internal::withScriptStateAttributeRaisesAttributeGetter(info); | 1718 TestObjectV8Internal::withScriptStateAttributeRaisesAttributeGetter(info); |
1602 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1719 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1603 } | 1720 } |
1604 | 1721 |
1605 static void withScriptStateAttributeRaisesAttributeSetter(v8::Local<v8::Value> j
sValue, const v8::PropertyCallbackInfo<void>& info) | 1722 static void withScriptStateAttributeRaisesAttributeSetter(v8::Local<v8::Value> j
sValue, const v8::PropertyCallbackInfo<void>& info) |
1606 { | 1723 { |
1607 TestObject* impl = V8TestObject::toNative(info.Holder()); | 1724 v8::Handle<v8::Object> holder = info.Holder(); |
| 1725 TestObject* impl = V8TestObject::toNative(holder); |
1608 V8TRYCATCH_VOID(TestObject*, cppValue, V8TestObject::toNativeWithTypeCheck(i
nfo.GetIsolate(), jsValue)); | 1726 V8TRYCATCH_VOID(TestObject*, cppValue, V8TestObject::toNativeWithTypeCheck(i
nfo.GetIsolate(), jsValue)); |
1609 impl->setWithScriptStateAttributeRaises(WTF::getPtr(cppValue)); | 1727 impl->setWithScriptStateAttributeRaises(WTF::getPtr(cppValue)); |
1610 } | 1728 } |
1611 | 1729 |
1612 static void withScriptStateAttributeRaisesAttributeSetterCallback(v8::Local<v8::
String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& inf
o) | 1730 static void withScriptStateAttributeRaisesAttributeSetterCallback(v8::Local<v8::
String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& inf
o) |
1613 { | 1731 { |
1614 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1732 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1615 TestObjectV8Internal::withScriptStateAttributeRaisesAttributeSetter(jsValue,
info); | 1733 TestObjectV8Internal::withScriptStateAttributeRaisesAttributeSetter(jsValue,
info); |
1616 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1734 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1617 } | 1735 } |
1618 | 1736 |
1619 static void enforcedRangeByteAttrAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) | 1737 static void enforcedRangeByteAttrAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) |
1620 { | 1738 { |
1621 TestObject* impl = V8TestObject::toNative(info.Holder()); | 1739 v8::Handle<v8::Object> holder = info.Holder(); |
| 1740 TestObject* impl = V8TestObject::toNative(holder); |
1622 v8SetReturnValueInt(info, impl->enforcedRangeByteAttr()); | 1741 v8SetReturnValueInt(info, impl->enforcedRangeByteAttr()); |
1623 } | 1742 } |
1624 | 1743 |
1625 static void enforcedRangeByteAttrAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 1744 static void enforcedRangeByteAttrAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
1626 { | 1745 { |
1627 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1746 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1628 TestObjectV8Internal::enforcedRangeByteAttrAttributeGetter(info); | 1747 TestObjectV8Internal::enforcedRangeByteAttrAttributeGetter(info); |
1629 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1748 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1630 } | 1749 } |
1631 | 1750 |
1632 static void enforcedRangeByteAttrAttributeSetter(v8::Local<v8::Value> jsValue, c
onst v8::PropertyCallbackInfo<void>& info) | 1751 static void enforcedRangeByteAttrAttributeSetter(v8::Local<v8::Value> jsValue, c
onst v8::PropertyCallbackInfo<void>& info) |
1633 { | 1752 { |
1634 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeB
yteAttr", "TestObject", info.Holder(), info.GetIsolate()); | 1753 v8::Isolate* isolate = info.GetIsolate(); |
1635 TestObject* impl = V8TestObject::toNative(info.Holder()); | 1754 v8::Handle<v8::Object> holder = info.Holder(); |
| 1755 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeB
yteAttr", "TestObject", holder, isolate); |
| 1756 TestObject* impl = V8TestObject::toNative(holder); |
1636 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt8(jsValue, EnforceRange, excep
tionState), exceptionState); | 1757 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt8(jsValue, EnforceRange, excep
tionState), exceptionState); |
1637 impl->setEnforcedRangeByteAttr(cppValue); | 1758 impl->setEnforcedRangeByteAttr(cppValue); |
1638 } | 1759 } |
1639 | 1760 |
1640 static void enforcedRangeByteAttrAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 1761 static void enforcedRangeByteAttrAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
1641 { | 1762 { |
1642 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1763 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1643 TestObjectV8Internal::enforcedRangeByteAttrAttributeSetter(jsValue, info); | 1764 TestObjectV8Internal::enforcedRangeByteAttrAttributeSetter(jsValue, info); |
1644 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1765 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1645 } | 1766 } |
1646 | 1767 |
1647 static void enforcedRangeOctetAttrAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) | 1768 static void enforcedRangeOctetAttrAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) |
1648 { | 1769 { |
1649 TestObject* impl = V8TestObject::toNative(info.Holder()); | 1770 v8::Handle<v8::Object> holder = info.Holder(); |
| 1771 TestObject* impl = V8TestObject::toNative(holder); |
1650 v8SetReturnValueUnsigned(info, impl->enforcedRangeOctetAttr()); | 1772 v8SetReturnValueUnsigned(info, impl->enforcedRangeOctetAttr()); |
1651 } | 1773 } |
1652 | 1774 |
1653 static void enforcedRangeOctetAttrAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 1775 static void enforcedRangeOctetAttrAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
1654 { | 1776 { |
1655 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1777 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1656 TestObjectV8Internal::enforcedRangeOctetAttrAttributeGetter(info); | 1778 TestObjectV8Internal::enforcedRangeOctetAttrAttributeGetter(info); |
1657 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1779 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1658 } | 1780 } |
1659 | 1781 |
1660 static void enforcedRangeOctetAttrAttributeSetter(v8::Local<v8::Value> jsValue,
const v8::PropertyCallbackInfo<void>& info) | 1782 static void enforcedRangeOctetAttrAttributeSetter(v8::Local<v8::Value> jsValue,
const v8::PropertyCallbackInfo<void>& info) |
1661 { | 1783 { |
1662 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeO
ctetAttr", "TestObject", info.Holder(), info.GetIsolate()); | 1784 v8::Isolate* isolate = info.GetIsolate(); |
1663 TestObject* impl = V8TestObject::toNative(info.Holder()); | 1785 v8::Handle<v8::Object> holder = info.Holder(); |
| 1786 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeO
ctetAttr", "TestObject", holder, isolate); |
| 1787 TestObject* impl = V8TestObject::toNative(holder); |
1664 V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt8(jsValue, EnforceRange,
exceptionState), exceptionState); | 1788 V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt8(jsValue, EnforceRange,
exceptionState), exceptionState); |
1665 impl->setEnforcedRangeOctetAttr(cppValue); | 1789 impl->setEnforcedRangeOctetAttr(cppValue); |
1666 } | 1790 } |
1667 | 1791 |
1668 static void enforcedRangeOctetAttrAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 1792 static void enforcedRangeOctetAttrAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
1669 { | 1793 { |
1670 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1794 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1671 TestObjectV8Internal::enforcedRangeOctetAttrAttributeSetter(jsValue, info); | 1795 TestObjectV8Internal::enforcedRangeOctetAttrAttributeSetter(jsValue, info); |
1672 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1796 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1673 } | 1797 } |
1674 | 1798 |
1675 static void enforcedRangeShortAttrAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) | 1799 static void enforcedRangeShortAttrAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) |
1676 { | 1800 { |
1677 TestObject* impl = V8TestObject::toNative(info.Holder()); | 1801 v8::Handle<v8::Object> holder = info.Holder(); |
| 1802 TestObject* impl = V8TestObject::toNative(holder); |
1678 v8SetReturnValueInt(info, impl->enforcedRangeShortAttr()); | 1803 v8SetReturnValueInt(info, impl->enforcedRangeShortAttr()); |
1679 } | 1804 } |
1680 | 1805 |
1681 static void enforcedRangeShortAttrAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 1806 static void enforcedRangeShortAttrAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
1682 { | 1807 { |
1683 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1808 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1684 TestObjectV8Internal::enforcedRangeShortAttrAttributeGetter(info); | 1809 TestObjectV8Internal::enforcedRangeShortAttrAttributeGetter(info); |
1685 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1810 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1686 } | 1811 } |
1687 | 1812 |
1688 static void enforcedRangeShortAttrAttributeSetter(v8::Local<v8::Value> jsValue,
const v8::PropertyCallbackInfo<void>& info) | 1813 static void enforcedRangeShortAttrAttributeSetter(v8::Local<v8::Value> jsValue,
const v8::PropertyCallbackInfo<void>& info) |
1689 { | 1814 { |
1690 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeS
hortAttr", "TestObject", info.Holder(), info.GetIsolate()); | 1815 v8::Isolate* isolate = info.GetIsolate(); |
1691 TestObject* impl = V8TestObject::toNative(info.Holder()); | 1816 v8::Handle<v8::Object> holder = info.Holder(); |
| 1817 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeS
hortAttr", "TestObject", holder, isolate); |
| 1818 TestObject* impl = V8TestObject::toNative(holder); |
1692 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt16(jsValue, EnforceRange, exce
ptionState), exceptionState); | 1819 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt16(jsValue, EnforceRange, exce
ptionState), exceptionState); |
1693 impl->setEnforcedRangeShortAttr(cppValue); | 1820 impl->setEnforcedRangeShortAttr(cppValue); |
1694 } | 1821 } |
1695 | 1822 |
1696 static void enforcedRangeShortAttrAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 1823 static void enforcedRangeShortAttrAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
1697 { | 1824 { |
1698 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1825 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1699 TestObjectV8Internal::enforcedRangeShortAttrAttributeSetter(jsValue, info); | 1826 TestObjectV8Internal::enforcedRangeShortAttrAttributeSetter(jsValue, info); |
1700 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1827 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1701 } | 1828 } |
1702 | 1829 |
1703 static void enforcedRangeUnsignedShortAttrAttributeGetter(const v8::PropertyCall
backInfo<v8::Value>& info) | 1830 static void enforcedRangeUnsignedShortAttrAttributeGetter(const v8::PropertyCall
backInfo<v8::Value>& info) |
1704 { | 1831 { |
1705 TestObject* impl = V8TestObject::toNative(info.Holder()); | 1832 v8::Handle<v8::Object> holder = info.Holder(); |
| 1833 TestObject* impl = V8TestObject::toNative(holder); |
1706 v8SetReturnValueUnsigned(info, impl->enforcedRangeUnsignedShortAttr()); | 1834 v8SetReturnValueUnsigned(info, impl->enforcedRangeUnsignedShortAttr()); |
1707 } | 1835 } |
1708 | 1836 |
1709 static void enforcedRangeUnsignedShortAttrAttributeGetterCallback(v8::Local<v8::
String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1837 static void enforcedRangeUnsignedShortAttrAttributeGetterCallback(v8::Local<v8::
String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
1710 { | 1838 { |
1711 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1839 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1712 TestObjectV8Internal::enforcedRangeUnsignedShortAttrAttributeGetter(info); | 1840 TestObjectV8Internal::enforcedRangeUnsignedShortAttrAttributeGetter(info); |
1713 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1841 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1714 } | 1842 } |
1715 | 1843 |
1716 static void enforcedRangeUnsignedShortAttrAttributeSetter(v8::Local<v8::Value> j
sValue, const v8::PropertyCallbackInfo<void>& info) | 1844 static void enforcedRangeUnsignedShortAttrAttributeSetter(v8::Local<v8::Value> j
sValue, const v8::PropertyCallbackInfo<void>& info) |
1717 { | 1845 { |
1718 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeU
nsignedShortAttr", "TestObject", info.Holder(), info.GetIsolate()); | 1846 v8::Isolate* isolate = info.GetIsolate(); |
1719 TestObject* impl = V8TestObject::toNative(info.Holder()); | 1847 v8::Handle<v8::Object> holder = info.Holder(); |
| 1848 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeU
nsignedShortAttr", "TestObject", holder, isolate); |
| 1849 TestObject* impl = V8TestObject::toNative(holder); |
1720 V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt16(jsValue, EnforceRange
, exceptionState), exceptionState); | 1850 V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt16(jsValue, EnforceRange
, exceptionState), exceptionState); |
1721 impl->setEnforcedRangeUnsignedShortAttr(cppValue); | 1851 impl->setEnforcedRangeUnsignedShortAttr(cppValue); |
1722 } | 1852 } |
1723 | 1853 |
1724 static void enforcedRangeUnsignedShortAttrAttributeSetterCallback(v8::Local<v8::
String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& inf
o) | 1854 static void enforcedRangeUnsignedShortAttrAttributeSetterCallback(v8::Local<v8::
String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& inf
o) |
1725 { | 1855 { |
1726 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1856 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1727 TestObjectV8Internal::enforcedRangeUnsignedShortAttrAttributeSetter(jsValue,
info); | 1857 TestObjectV8Internal::enforcedRangeUnsignedShortAttrAttributeSetter(jsValue,
info); |
1728 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1858 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1729 } | 1859 } |
1730 | 1860 |
1731 static void enforcedRangeLongAttrAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) | 1861 static void enforcedRangeLongAttrAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) |
1732 { | 1862 { |
1733 TestObject* impl = V8TestObject::toNative(info.Holder()); | 1863 v8::Handle<v8::Object> holder = info.Holder(); |
| 1864 TestObject* impl = V8TestObject::toNative(holder); |
1734 v8SetReturnValueInt(info, impl->enforcedRangeLongAttr()); | 1865 v8SetReturnValueInt(info, impl->enforcedRangeLongAttr()); |
1735 } | 1866 } |
1736 | 1867 |
1737 static void enforcedRangeLongAttrAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 1868 static void enforcedRangeLongAttrAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
1738 { | 1869 { |
1739 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1870 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1740 TestObjectV8Internal::enforcedRangeLongAttrAttributeGetter(info); | 1871 TestObjectV8Internal::enforcedRangeLongAttrAttributeGetter(info); |
1741 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1872 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1742 } | 1873 } |
1743 | 1874 |
1744 static void enforcedRangeLongAttrAttributeSetter(v8::Local<v8::Value> jsValue, c
onst v8::PropertyCallbackInfo<void>& info) | 1875 static void enforcedRangeLongAttrAttributeSetter(v8::Local<v8::Value> jsValue, c
onst v8::PropertyCallbackInfo<void>& info) |
1745 { | 1876 { |
1746 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeL
ongAttr", "TestObject", info.Holder(), info.GetIsolate()); | 1877 v8::Isolate* isolate = info.GetIsolate(); |
1747 TestObject* impl = V8TestObject::toNative(info.Holder()); | 1878 v8::Handle<v8::Object> holder = info.Holder(); |
| 1879 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeL
ongAttr", "TestObject", holder, isolate); |
| 1880 TestObject* impl = V8TestObject::toNative(holder); |
1748 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, EnforceRange, exce
ptionState), exceptionState); | 1881 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, EnforceRange, exce
ptionState), exceptionState); |
1749 impl->setEnforcedRangeLongAttr(cppValue); | 1882 impl->setEnforcedRangeLongAttr(cppValue); |
1750 } | 1883 } |
1751 | 1884 |
1752 static void enforcedRangeLongAttrAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 1885 static void enforcedRangeLongAttrAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
1753 { | 1886 { |
1754 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1887 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1755 TestObjectV8Internal::enforcedRangeLongAttrAttributeSetter(jsValue, info); | 1888 TestObjectV8Internal::enforcedRangeLongAttrAttributeSetter(jsValue, info); |
1756 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1889 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1757 } | 1890 } |
1758 | 1891 |
1759 static void enforcedRangeUnsignedLongAttrAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) | 1892 static void enforcedRangeUnsignedLongAttrAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) |
1760 { | 1893 { |
1761 TestObject* impl = V8TestObject::toNative(info.Holder()); | 1894 v8::Handle<v8::Object> holder = info.Holder(); |
| 1895 TestObject* impl = V8TestObject::toNative(holder); |
1762 v8SetReturnValueUnsigned(info, impl->enforcedRangeUnsignedLongAttr()); | 1896 v8SetReturnValueUnsigned(info, impl->enforcedRangeUnsignedLongAttr()); |
1763 } | 1897 } |
1764 | 1898 |
1765 static void enforcedRangeUnsignedLongAttrAttributeGetterCallback(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1899 static void enforcedRangeUnsignedLongAttrAttributeGetterCallback(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) |
1766 { | 1900 { |
1767 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1901 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1768 TestObjectV8Internal::enforcedRangeUnsignedLongAttrAttributeGetter(info); | 1902 TestObjectV8Internal::enforcedRangeUnsignedLongAttrAttributeGetter(info); |
1769 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1903 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1770 } | 1904 } |
1771 | 1905 |
1772 static void enforcedRangeUnsignedLongAttrAttributeSetter(v8::Local<v8::Value> js
Value, const v8::PropertyCallbackInfo<void>& info) | 1906 static void enforcedRangeUnsignedLongAttrAttributeSetter(v8::Local<v8::Value> js
Value, const v8::PropertyCallbackInfo<void>& info) |
1773 { | 1907 { |
1774 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeU
nsignedLongAttr", "TestObject", info.Holder(), info.GetIsolate()); | 1908 v8::Isolate* isolate = info.GetIsolate(); |
1775 TestObject* impl = V8TestObject::toNative(info.Holder()); | 1909 v8::Handle<v8::Object> holder = info.Holder(); |
| 1910 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeU
nsignedLongAttr", "TestObject", holder, isolate); |
| 1911 TestObject* impl = V8TestObject::toNative(holder); |
1776 V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt32(jsValue, EnforceRange
, exceptionState), exceptionState); | 1912 V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt32(jsValue, EnforceRange
, exceptionState), exceptionState); |
1777 impl->setEnforcedRangeUnsignedLongAttr(cppValue); | 1913 impl->setEnforcedRangeUnsignedLongAttr(cppValue); |
1778 } | 1914 } |
1779 | 1915 |
1780 static void enforcedRangeUnsignedLongAttrAttributeSetterCallback(v8::Local<v8::S
tring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info
) | 1916 static void enforcedRangeUnsignedLongAttrAttributeSetterCallback(v8::Local<v8::S
tring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info
) |
1781 { | 1917 { |
1782 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1918 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1783 TestObjectV8Internal::enforcedRangeUnsignedLongAttrAttributeSetter(jsValue,
info); | 1919 TestObjectV8Internal::enforcedRangeUnsignedLongAttrAttributeSetter(jsValue,
info); |
1784 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1920 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1785 } | 1921 } |
1786 | 1922 |
1787 static void enforcedRangeLongLongAttrAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) | 1923 static void enforcedRangeLongLongAttrAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) |
1788 { | 1924 { |
1789 TestObject* impl = V8TestObject::toNative(info.Holder()); | 1925 v8::Handle<v8::Object> holder = info.Holder(); |
| 1926 TestObject* impl = V8TestObject::toNative(holder); |
1790 v8SetReturnValue(info, static_cast<double>(impl->enforcedRangeLongLongAttr()
)); | 1927 v8SetReturnValue(info, static_cast<double>(impl->enforcedRangeLongLongAttr()
)); |
1791 } | 1928 } |
1792 | 1929 |
1793 static void enforcedRangeLongLongAttrAttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1930 static void enforcedRangeLongLongAttrAttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) |
1794 { | 1931 { |
1795 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1932 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1796 TestObjectV8Internal::enforcedRangeLongLongAttrAttributeGetter(info); | 1933 TestObjectV8Internal::enforcedRangeLongLongAttrAttributeGetter(info); |
1797 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1934 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1798 } | 1935 } |
1799 | 1936 |
1800 static void enforcedRangeLongLongAttrAttributeSetter(v8::Local<v8::Value> jsValu
e, const v8::PropertyCallbackInfo<void>& info) | 1937 static void enforcedRangeLongLongAttrAttributeSetter(v8::Local<v8::Value> jsValu
e, const v8::PropertyCallbackInfo<void>& info) |
1801 { | 1938 { |
1802 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeL
ongLongAttr", "TestObject", info.Holder(), info.GetIsolate()); | 1939 v8::Isolate* isolate = info.GetIsolate(); |
1803 TestObject* impl = V8TestObject::toNative(info.Holder()); | 1940 v8::Handle<v8::Object> holder = info.Holder(); |
| 1941 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeL
ongLongAttr", "TestObject", holder, isolate); |
| 1942 TestObject* impl = V8TestObject::toNative(holder); |
1804 V8TRYCATCH_EXCEPTION_VOID(long long, cppValue, toInt64(jsValue, EnforceRange
, exceptionState), exceptionState); | 1943 V8TRYCATCH_EXCEPTION_VOID(long long, cppValue, toInt64(jsValue, EnforceRange
, exceptionState), exceptionState); |
1805 impl->setEnforcedRangeLongLongAttr(cppValue); | 1944 impl->setEnforcedRangeLongLongAttr(cppValue); |
1806 } | 1945 } |
1807 | 1946 |
1808 static void enforcedRangeLongLongAttrAttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 1947 static void enforcedRangeLongLongAttrAttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
1809 { | 1948 { |
1810 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1949 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1811 TestObjectV8Internal::enforcedRangeLongLongAttrAttributeSetter(jsValue, info
); | 1950 TestObjectV8Internal::enforcedRangeLongLongAttrAttributeSetter(jsValue, info
); |
1812 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1951 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1813 } | 1952 } |
1814 | 1953 |
1815 static void enforcedRangeUnsignedLongLongAttrAttributeGetter(const v8::PropertyC
allbackInfo<v8::Value>& info) | 1954 static void enforcedRangeUnsignedLongLongAttrAttributeGetter(const v8::PropertyC
allbackInfo<v8::Value>& info) |
1816 { | 1955 { |
1817 TestObject* impl = V8TestObject::toNative(info.Holder()); | 1956 v8::Handle<v8::Object> holder = info.Holder(); |
| 1957 TestObject* impl = V8TestObject::toNative(holder); |
1818 v8SetReturnValue(info, static_cast<double>(impl->enforcedRangeUnsignedLongLo
ngAttr())); | 1958 v8SetReturnValue(info, static_cast<double>(impl->enforcedRangeUnsignedLongLo
ngAttr())); |
1819 } | 1959 } |
1820 | 1960 |
1821 static void enforcedRangeUnsignedLongLongAttrAttributeGetterCallback(v8::Local<v
8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1961 static void enforcedRangeUnsignedLongLongAttrAttributeGetterCallback(v8::Local<v
8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
1822 { | 1962 { |
1823 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1963 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1824 TestObjectV8Internal::enforcedRangeUnsignedLongLongAttrAttributeGetter(info)
; | 1964 TestObjectV8Internal::enforcedRangeUnsignedLongLongAttrAttributeGetter(info)
; |
1825 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1965 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1826 } | 1966 } |
1827 | 1967 |
1828 static void enforcedRangeUnsignedLongLongAttrAttributeSetter(v8::Local<v8::Value
> jsValue, const v8::PropertyCallbackInfo<void>& info) | 1968 static void enforcedRangeUnsignedLongLongAttrAttributeSetter(v8::Local<v8::Value
> jsValue, const v8::PropertyCallbackInfo<void>& info) |
1829 { | 1969 { |
1830 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeU
nsignedLongLongAttr", "TestObject", info.Holder(), info.GetIsolate()); | 1970 v8::Isolate* isolate = info.GetIsolate(); |
1831 TestObject* impl = V8TestObject::toNative(info.Holder()); | 1971 v8::Handle<v8::Object> holder = info.Holder(); |
| 1972 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeU
nsignedLongLongAttr", "TestObject", holder, isolate); |
| 1973 TestObject* impl = V8TestObject::toNative(holder); |
1832 V8TRYCATCH_EXCEPTION_VOID(unsigned long long, cppValue, toUInt64(jsValue, En
forceRange, exceptionState), exceptionState); | 1974 V8TRYCATCH_EXCEPTION_VOID(unsigned long long, cppValue, toUInt64(jsValue, En
forceRange, exceptionState), exceptionState); |
1833 impl->setEnforcedRangeUnsignedLongLongAttr(cppValue); | 1975 impl->setEnforcedRangeUnsignedLongLongAttr(cppValue); |
1834 } | 1976 } |
1835 | 1977 |
1836 static void enforcedRangeUnsignedLongLongAttrAttributeSetterCallback(v8::Local<v
8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>&
info) | 1978 static void enforcedRangeUnsignedLongLongAttrAttributeSetterCallback(v8::Local<v
8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>&
info) |
1837 { | 1979 { |
1838 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1980 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1839 TestObjectV8Internal::enforcedRangeUnsignedLongLongAttrAttributeSetter(jsVal
ue, info); | 1981 TestObjectV8Internal::enforcedRangeUnsignedLongLongAttrAttributeSetter(jsVal
ue, info); |
1840 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1982 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1841 } | 1983 } |
1842 | 1984 |
1843 #if ENABLE(Condition1) | 1985 #if ENABLE(Condition1) |
1844 static void conditionalAttr1AttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) | 1986 static void conditionalAttr1AttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) |
1845 { | 1987 { |
1846 TestObject* impl = V8TestObject::toNative(info.Holder()); | 1988 v8::Handle<v8::Object> holder = info.Holder(); |
| 1989 TestObject* impl = V8TestObject::toNative(holder); |
1847 v8SetReturnValueInt(info, impl->conditionalAttr1()); | 1990 v8SetReturnValueInt(info, impl->conditionalAttr1()); |
1848 } | 1991 } |
1849 #endif // ENABLE(Condition1) | 1992 #endif // ENABLE(Condition1) |
1850 | 1993 |
1851 #if ENABLE(Condition1) | 1994 #if ENABLE(Condition1) |
1852 static void conditionalAttr1AttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) | 1995 static void conditionalAttr1AttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) |
1853 { | 1996 { |
1854 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1997 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1855 TestObjectV8Internal::conditionalAttr1AttributeGetter(info); | 1998 TestObjectV8Internal::conditionalAttr1AttributeGetter(info); |
1856 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1999 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1857 } | 2000 } |
1858 #endif // ENABLE(Condition1) | 2001 #endif // ENABLE(Condition1) |
1859 | 2002 |
1860 #if ENABLE(Condition1) | 2003 #if ENABLE(Condition1) |
1861 static void conditionalAttr1AttributeSetter(v8::Local<v8::Value> jsValue, const
v8::PropertyCallbackInfo<void>& info) | 2004 static void conditionalAttr1AttributeSetter(v8::Local<v8::Value> jsValue, const
v8::PropertyCallbackInfo<void>& info) |
1862 { | 2005 { |
1863 ExceptionState exceptionState(ExceptionState::SetterContext, "conditionalAtt
r1", "TestObject", info.Holder(), info.GetIsolate()); | 2006 v8::Isolate* isolate = info.GetIsolate(); |
1864 TestObject* impl = V8TestObject::toNative(info.Holder()); | 2007 v8::Handle<v8::Object> holder = info.Holder(); |
| 2008 ExceptionState exceptionState(ExceptionState::SetterContext, "conditionalAtt
r1", "TestObject", holder, isolate); |
| 2009 TestObject* impl = V8TestObject::toNative(holder); |
1865 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 2010 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); |
1866 impl->setConditionalAttr1(cppValue); | 2011 impl->setConditionalAttr1(cppValue); |
1867 } | 2012 } |
1868 #endif // ENABLE(Condition1) | 2013 #endif // ENABLE(Condition1) |
1869 | 2014 |
1870 #if ENABLE(Condition1) | 2015 #if ENABLE(Condition1) |
1871 static void conditionalAttr1AttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 2016 static void conditionalAttr1AttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
1872 { | 2017 { |
1873 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2018 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1874 TestObjectV8Internal::conditionalAttr1AttributeSetter(jsValue, info); | 2019 TestObjectV8Internal::conditionalAttr1AttributeSetter(jsValue, info); |
1875 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2020 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1876 } | 2021 } |
1877 #endif // ENABLE(Condition1) | 2022 #endif // ENABLE(Condition1) |
1878 | 2023 |
1879 #if ENABLE(Condition1) && ENABLE(Condition2) | 2024 #if ENABLE(Condition1) && ENABLE(Condition2) |
1880 static void conditionalAttr2AttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) | 2025 static void conditionalAttr2AttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) |
1881 { | 2026 { |
1882 TestObject* impl = V8TestObject::toNative(info.Holder()); | 2027 v8::Handle<v8::Object> holder = info.Holder(); |
| 2028 TestObject* impl = V8TestObject::toNative(holder); |
1883 v8SetReturnValueInt(info, impl->conditionalAttr2()); | 2029 v8SetReturnValueInt(info, impl->conditionalAttr2()); |
1884 } | 2030 } |
1885 #endif // ENABLE(Condition1) && ENABLE(Condition2) | 2031 #endif // ENABLE(Condition1) && ENABLE(Condition2) |
1886 | 2032 |
1887 #if ENABLE(Condition1) && ENABLE(Condition2) | 2033 #if ENABLE(Condition1) && ENABLE(Condition2) |
1888 static void conditionalAttr2AttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) | 2034 static void conditionalAttr2AttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) |
1889 { | 2035 { |
1890 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2036 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1891 TestObjectV8Internal::conditionalAttr2AttributeGetter(info); | 2037 TestObjectV8Internal::conditionalAttr2AttributeGetter(info); |
1892 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2038 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1893 } | 2039 } |
1894 #endif // ENABLE(Condition1) && ENABLE(Condition2) | 2040 #endif // ENABLE(Condition1) && ENABLE(Condition2) |
1895 | 2041 |
1896 #if ENABLE(Condition1) && ENABLE(Condition2) | 2042 #if ENABLE(Condition1) && ENABLE(Condition2) |
1897 static void conditionalAttr2AttributeSetter(v8::Local<v8::Value> jsValue, const
v8::PropertyCallbackInfo<void>& info) | 2043 static void conditionalAttr2AttributeSetter(v8::Local<v8::Value> jsValue, const
v8::PropertyCallbackInfo<void>& info) |
1898 { | 2044 { |
1899 ExceptionState exceptionState(ExceptionState::SetterContext, "conditionalAtt
r2", "TestObject", info.Holder(), info.GetIsolate()); | 2045 v8::Isolate* isolate = info.GetIsolate(); |
1900 TestObject* impl = V8TestObject::toNative(info.Holder()); | 2046 v8::Handle<v8::Object> holder = info.Holder(); |
| 2047 ExceptionState exceptionState(ExceptionState::SetterContext, "conditionalAtt
r2", "TestObject", holder, isolate); |
| 2048 TestObject* impl = V8TestObject::toNative(holder); |
1901 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 2049 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); |
1902 impl->setConditionalAttr2(cppValue); | 2050 impl->setConditionalAttr2(cppValue); |
1903 } | 2051 } |
1904 #endif // ENABLE(Condition1) && ENABLE(Condition2) | 2052 #endif // ENABLE(Condition1) && ENABLE(Condition2) |
1905 | 2053 |
1906 #if ENABLE(Condition1) && ENABLE(Condition2) | 2054 #if ENABLE(Condition1) && ENABLE(Condition2) |
1907 static void conditionalAttr2AttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 2055 static void conditionalAttr2AttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
1908 { | 2056 { |
1909 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2057 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1910 TestObjectV8Internal::conditionalAttr2AttributeSetter(jsValue, info); | 2058 TestObjectV8Internal::conditionalAttr2AttributeSetter(jsValue, info); |
1911 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2059 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1912 } | 2060 } |
1913 #endif // ENABLE(Condition1) && ENABLE(Condition2) | 2061 #endif // ENABLE(Condition1) && ENABLE(Condition2) |
1914 | 2062 |
1915 #if ENABLE(Condition1) || ENABLE(Condition2) || ENABLE(Condition3) | 2063 #if ENABLE(Condition1) || ENABLE(Condition2) || ENABLE(Condition3) |
1916 static void conditionalAttr3AttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) | 2064 static void conditionalAttr3AttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) |
1917 { | 2065 { |
1918 TestObject* impl = V8TestObject::toNative(info.Holder()); | 2066 v8::Handle<v8::Object> holder = info.Holder(); |
| 2067 TestObject* impl = V8TestObject::toNative(holder); |
1919 v8SetReturnValueInt(info, impl->conditionalAttr3()); | 2068 v8SetReturnValueInt(info, impl->conditionalAttr3()); |
1920 } | 2069 } |
1921 #endif // ENABLE(Condition1) || ENABLE(Condition2) || ENABLE(Condition3) | 2070 #endif // ENABLE(Condition1) || ENABLE(Condition2) || ENABLE(Condition3) |
1922 | 2071 |
1923 #if ENABLE(Condition1) || ENABLE(Condition2) || ENABLE(Condition3) | 2072 #if ENABLE(Condition1) || ENABLE(Condition2) || ENABLE(Condition3) |
1924 static void conditionalAttr3AttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) | 2073 static void conditionalAttr3AttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) |
1925 { | 2074 { |
1926 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2075 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1927 TestObjectV8Internal::conditionalAttr3AttributeGetter(info); | 2076 TestObjectV8Internal::conditionalAttr3AttributeGetter(info); |
1928 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2077 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1929 } | 2078 } |
1930 #endif // ENABLE(Condition1) || ENABLE(Condition2) || ENABLE(Condition3) | 2079 #endif // ENABLE(Condition1) || ENABLE(Condition2) || ENABLE(Condition3) |
1931 | 2080 |
1932 #if ENABLE(Condition1) || ENABLE(Condition2) || ENABLE(Condition3) | 2081 #if ENABLE(Condition1) || ENABLE(Condition2) || ENABLE(Condition3) |
1933 static void conditionalAttr3AttributeSetter(v8::Local<v8::Value> jsValue, const
v8::PropertyCallbackInfo<void>& info) | 2082 static void conditionalAttr3AttributeSetter(v8::Local<v8::Value> jsValue, const
v8::PropertyCallbackInfo<void>& info) |
1934 { | 2083 { |
1935 ExceptionState exceptionState(ExceptionState::SetterContext, "conditionalAtt
r3", "TestObject", info.Holder(), info.GetIsolate()); | 2084 v8::Isolate* isolate = info.GetIsolate(); |
1936 TestObject* impl = V8TestObject::toNative(info.Holder()); | 2085 v8::Handle<v8::Object> holder = info.Holder(); |
| 2086 ExceptionState exceptionState(ExceptionState::SetterContext, "conditionalAtt
r3", "TestObject", holder, isolate); |
| 2087 TestObject* impl = V8TestObject::toNative(holder); |
1937 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 2088 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); |
1938 impl->setConditionalAttr3(cppValue); | 2089 impl->setConditionalAttr3(cppValue); |
1939 } | 2090 } |
1940 #endif // ENABLE(Condition1) || ENABLE(Condition2) || ENABLE(Condition3) | 2091 #endif // ENABLE(Condition1) || ENABLE(Condition2) || ENABLE(Condition3) |
1941 | 2092 |
1942 #if ENABLE(Condition1) || ENABLE(Condition2) || ENABLE(Condition3) | 2093 #if ENABLE(Condition1) || ENABLE(Condition2) || ENABLE(Condition3) |
1943 static void conditionalAttr3AttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 2094 static void conditionalAttr3AttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
1944 { | 2095 { |
1945 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2096 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1946 TestObjectV8Internal::conditionalAttr3AttributeSetter(jsValue, info); | 2097 TestObjectV8Internal::conditionalAttr3AttributeSetter(jsValue, info); |
1947 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2098 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1948 } | 2099 } |
1949 #endif // ENABLE(Condition1) || ENABLE(Condition2) || ENABLE(Condition3) | 2100 #endif // ENABLE(Condition1) || ENABLE(Condition2) || ENABLE(Condition3) |
1950 | 2101 |
1951 static void cachedAttribute1AttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) | 2102 static void cachedAttribute1AttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) |
1952 { | 2103 { |
1953 TestObject* impl = V8TestObject::toNative(info.Holder()); | 2104 v8::Handle<v8::Object> holder = info.Holder(); |
| 2105 TestObject* impl = V8TestObject::toNative(holder); |
1954 v8SetReturnValue(info, impl->cachedAttribute1().v8Value()); | 2106 v8SetReturnValue(info, impl->cachedAttribute1().v8Value()); |
1955 } | 2107 } |
1956 | 2108 |
1957 static void cachedAttribute1AttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) | 2109 static void cachedAttribute1AttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) |
1958 { | 2110 { |
1959 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2111 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1960 TestObjectV8Internal::cachedAttribute1AttributeGetter(info); | 2112 TestObjectV8Internal::cachedAttribute1AttributeGetter(info); |
1961 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2113 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1962 } | 2114 } |
1963 | 2115 |
1964 static void cachedAttribute2AttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) | 2116 static void cachedAttribute2AttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) |
1965 { | 2117 { |
1966 TestObject* impl = V8TestObject::toNative(info.Holder()); | 2118 v8::Handle<v8::Object> holder = info.Holder(); |
| 2119 TestObject* impl = V8TestObject::toNative(holder); |
1967 v8SetReturnValue(info, impl->cachedAttribute2().v8Value()); | 2120 v8SetReturnValue(info, impl->cachedAttribute2().v8Value()); |
1968 } | 2121 } |
1969 | 2122 |
1970 static void cachedAttribute2AttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) | 2123 static void cachedAttribute2AttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) |
1971 { | 2124 { |
1972 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2125 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1973 TestObjectV8Internal::cachedAttribute2AttributeGetter(info); | 2126 TestObjectV8Internal::cachedAttribute2AttributeGetter(info); |
1974 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2127 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1975 } | 2128 } |
1976 | 2129 |
1977 static void cachedDirtyableAttributeAttributeGetter(const v8::PropertyCallbackIn
fo<v8::Value>& info) | 2130 static void cachedDirtyableAttributeAttributeGetter(const v8::PropertyCallbackIn
fo<v8::Value>& info) |
1978 { | 2131 { |
1979 v8::Handle<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "cac
hedDirtyableAttribute"); | 2132 v8::Isolate* isolate = info.GetIsolate(); |
1980 TestObject* impl = V8TestObject::toNative(info.Holder()); | 2133 v8::Handle<v8::Object> holder = info.Holder(); |
| 2134 v8::Handle<v8::String> propertyName = v8AtomicString(isolate, "cachedDirtyab
leAttribute"); |
| 2135 TestObject* impl = V8TestObject::toNative(holder); |
1981 if (!impl->isValueDirty()) { | 2136 if (!impl->isValueDirty()) { |
1982 v8::Handle<v8::Value> jsValue = V8HiddenValue::getHiddenValue(info.GetIs
olate(), info.Holder(), propertyName); | 2137 v8::Handle<v8::Value> jsValue = V8HiddenValue::getHiddenValue(isolate, h
older, propertyName); |
1983 if (!jsValue.IsEmpty()) { | 2138 if (!jsValue.IsEmpty()) { |
1984 v8SetReturnValue(info, jsValue); | 2139 v8SetReturnValue(info, jsValue); |
1985 return; | 2140 return; |
1986 } | 2141 } |
1987 } | 2142 } |
1988 ScriptValue jsValue = impl->cachedDirtyableAttribute(); | 2143 ScriptValue jsValue = impl->cachedDirtyableAttribute(); |
1989 V8HiddenValue::setHiddenValue(info.GetIsolate(), info.Holder(), propertyName
, jsValue.v8Value()); | 2144 V8HiddenValue::setHiddenValue(isolate, holder, propertyName, jsValue.v8Value
()); |
1990 v8SetReturnValue(info, jsValue.v8Value()); | 2145 v8SetReturnValue(info, jsValue.v8Value()); |
1991 } | 2146 } |
1992 | 2147 |
1993 static void cachedDirtyableAttributeAttributeGetterCallback(v8::Local<v8::String
>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2148 static void cachedDirtyableAttributeAttributeGetterCallback(v8::Local<v8::String
>, const v8::PropertyCallbackInfo<v8::Value>& info) |
1994 { | 2149 { |
1995 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2150 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1996 TestObjectV8Internal::cachedDirtyableAttributeAttributeGetter(info); | 2151 TestObjectV8Internal::cachedDirtyableAttributeAttributeGetter(info); |
1997 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2152 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1998 } | 2153 } |
1999 | 2154 |
2000 static void cachedDirtyableAttributeRaisesAttributeGetter(const v8::PropertyCall
backInfo<v8::Value>& info) | 2155 static void cachedDirtyableAttributeRaisesAttributeGetter(const v8::PropertyCall
backInfo<v8::Value>& info) |
2001 { | 2156 { |
2002 v8::Handle<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "cac
hedDirtyableAttributeRaises"); | 2157 v8::Isolate* isolate = info.GetIsolate(); |
2003 TestObject* impl = V8TestObject::toNative(info.Holder()); | 2158 v8::Handle<v8::Object> holder = info.Holder(); |
| 2159 v8::Handle<v8::String> propertyName = v8AtomicString(isolate, "cachedDirtyab
leAttributeRaises"); |
| 2160 TestObject* impl = V8TestObject::toNative(holder); |
2004 if (!impl->isValueDirty()) { | 2161 if (!impl->isValueDirty()) { |
2005 v8::Handle<v8::Value> jsValue = V8HiddenValue::getHiddenValue(info.GetIs
olate(), info.Holder(), propertyName); | 2162 v8::Handle<v8::Value> jsValue = V8HiddenValue::getHiddenValue(isolate, h
older, propertyName); |
2006 if (!jsValue.IsEmpty()) { | 2163 if (!jsValue.IsEmpty()) { |
2007 v8SetReturnValue(info, jsValue); | 2164 v8SetReturnValue(info, jsValue); |
2008 return; | 2165 return; |
2009 } | 2166 } |
2010 } | 2167 } |
2011 ExceptionState exceptionState(ExceptionState::GetterContext, "cachedDirtyabl
eAttributeRaises", "TestObject", info.Holder(), info.GetIsolate()); | 2168 ExceptionState exceptionState(ExceptionState::GetterContext, "cachedDirtyabl
eAttributeRaises", "TestObject", holder, isolate); |
2012 ScriptValue jsValue = impl->cachedDirtyableAttributeRaises(exceptionState); | 2169 ScriptValue jsValue = impl->cachedDirtyableAttributeRaises(exceptionState); |
2013 if (UNLIKELY(exceptionState.throwIfNeeded())) | 2170 if (UNLIKELY(exceptionState.throwIfNeeded())) |
2014 return; | 2171 return; |
2015 V8HiddenValue::setHiddenValue(info.GetIsolate(), info.Holder(), propertyName
, jsValue.v8Value()); | 2172 V8HiddenValue::setHiddenValue(isolate, holder, propertyName, jsValue.v8Value
()); |
2016 v8SetReturnValue(info, jsValue.v8Value()); | 2173 v8SetReturnValue(info, jsValue.v8Value()); |
2017 } | 2174 } |
2018 | 2175 |
2019 static void cachedDirtyableAttributeRaisesAttributeGetterCallback(v8::Local<v8::
String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2176 static void cachedDirtyableAttributeRaisesAttributeGetterCallback(v8::Local<v8::
String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
2020 { | 2177 { |
2021 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2178 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2022 TestObjectV8Internal::cachedDirtyableAttributeRaisesAttributeGetter(info); | 2179 TestObjectV8Internal::cachedDirtyableAttributeRaisesAttributeGetter(info); |
2023 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2180 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2024 } | 2181 } |
2025 | 2182 |
2026 static void anyAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value
>& info) | 2183 static void anyAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value
>& info) |
2027 { | 2184 { |
2028 TestObject* impl = V8TestObject::toNative(info.Holder()); | 2185 v8::Handle<v8::Object> holder = info.Holder(); |
| 2186 TestObject* impl = V8TestObject::toNative(holder); |
2029 v8SetReturnValue(info, impl->anyAttribute().v8Value()); | 2187 v8SetReturnValue(info, impl->anyAttribute().v8Value()); |
2030 } | 2188 } |
2031 | 2189 |
2032 static void anyAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8:
:PropertyCallbackInfo<v8::Value>& info) | 2190 static void anyAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8:
:PropertyCallbackInfo<v8::Value>& info) |
2033 { | 2191 { |
2034 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2192 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2035 TestObjectV8Internal::anyAttributeAttributeGetter(info); | 2193 TestObjectV8Internal::anyAttributeAttributeGetter(info); |
2036 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2194 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2037 } | 2195 } |
2038 | 2196 |
2039 static void anyAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::
PropertyCallbackInfo<void>& info) | 2197 static void anyAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::
PropertyCallbackInfo<void>& info) |
2040 { | 2198 { |
2041 TestObject* impl = V8TestObject::toNative(info.Holder()); | 2199 v8::Handle<v8::Object> holder = info.Holder(); |
| 2200 TestObject* impl = V8TestObject::toNative(holder); |
2042 V8TRYCATCH_VOID(ScriptValue, cppValue, ScriptValue(jsValue, info.GetIsolate(
))); | 2201 V8TRYCATCH_VOID(ScriptValue, cppValue, ScriptValue(jsValue, info.GetIsolate(
))); |
2043 impl->setAnyAttribute(cppValue); | 2202 impl->setAnyAttribute(cppValue); |
2044 } | 2203 } |
2045 | 2204 |
2046 static void anyAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local
<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 2205 static void anyAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local
<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
2047 { | 2206 { |
2048 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2207 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2049 TestObjectV8Internal::anyAttributeAttributeSetter(jsValue, info); | 2208 TestObjectV8Internal::anyAttributeAttributeSetter(jsValue, info); |
2050 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2209 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2051 } | 2210 } |
2052 | 2211 |
2053 static void callbackFunctionAttributeAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) | 2212 static void callbackFunctionAttributeAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) |
2054 { | 2213 { |
2055 TestObject* impl = V8TestObject::toNative(info.Holder()); | 2214 v8::Handle<v8::Object> holder = info.Holder(); |
| 2215 TestObject* impl = V8TestObject::toNative(holder); |
2056 v8SetReturnValue(info, impl->callbackFunctionAttribute().v8Value()); | 2216 v8SetReturnValue(info, impl->callbackFunctionAttribute().v8Value()); |
2057 } | 2217 } |
2058 | 2218 |
2059 static void callbackFunctionAttributeAttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2219 static void callbackFunctionAttributeAttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) |
2060 { | 2220 { |
2061 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2221 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2062 TestObjectV8Internal::callbackFunctionAttributeAttributeGetter(info); | 2222 TestObjectV8Internal::callbackFunctionAttributeAttributeGetter(info); |
2063 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2223 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2064 } | 2224 } |
2065 | 2225 |
2066 static void callbackFunctionAttributeAttributeSetter(v8::Local<v8::Value> jsValu
e, const v8::PropertyCallbackInfo<void>& info) | 2226 static void callbackFunctionAttributeAttributeSetter(v8::Local<v8::Value> jsValu
e, const v8::PropertyCallbackInfo<void>& info) |
2067 { | 2227 { |
2068 TestObject* impl = V8TestObject::toNative(info.Holder()); | 2228 v8::Handle<v8::Object> holder = info.Holder(); |
| 2229 TestObject* impl = V8TestObject::toNative(holder); |
2069 V8TRYCATCH_VOID(ScriptValue, cppValue, ScriptValue(jsValue, info.GetIsolate(
))); | 2230 V8TRYCATCH_VOID(ScriptValue, cppValue, ScriptValue(jsValue, info.GetIsolate(
))); |
2070 impl->setCallbackFunctionAttribute(cppValue); | 2231 impl->setCallbackFunctionAttribute(cppValue); |
2071 } | 2232 } |
2072 | 2233 |
2073 static void callbackFunctionAttributeAttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 2234 static void callbackFunctionAttributeAttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
2074 { | 2235 { |
2075 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2236 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2076 TestObjectV8Internal::callbackFunctionAttributeAttributeSetter(jsValue, info
); | 2237 TestObjectV8Internal::callbackFunctionAttributeAttributeSetter(jsValue, info
); |
2077 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2238 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2078 } | 2239 } |
2079 | 2240 |
2080 static void enabledAtRuntimeAttrAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) | 2241 static void enabledAtRuntimeAttrAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) |
2081 { | 2242 { |
2082 TestObject* impl = V8TestObject::toNative(info.Holder()); | 2243 v8::Handle<v8::Object> holder = info.Holder(); |
| 2244 TestObject* impl = V8TestObject::toNative(holder); |
2083 v8SetReturnValueInt(info, impl->enabledAtRuntimeAttr()); | 2245 v8SetReturnValueInt(info, impl->enabledAtRuntimeAttr()); |
2084 } | 2246 } |
2085 | 2247 |
2086 static void enabledAtRuntimeAttrAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) | 2248 static void enabledAtRuntimeAttrAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) |
2087 { | 2249 { |
2088 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2250 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2089 TestObjectV8Internal::enabledAtRuntimeAttrAttributeGetter(info); | 2251 TestObjectV8Internal::enabledAtRuntimeAttrAttributeGetter(info); |
2090 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2252 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2091 } | 2253 } |
2092 | 2254 |
2093 static void enabledAtRuntimeAttrAttributeSetter(v8::Local<v8::Value> jsValue, co
nst v8::PropertyCallbackInfo<void>& info) | 2255 static void enabledAtRuntimeAttrAttributeSetter(v8::Local<v8::Value> jsValue, co
nst v8::PropertyCallbackInfo<void>& info) |
2094 { | 2256 { |
2095 ExceptionState exceptionState(ExceptionState::SetterContext, "enabledAtRunti
meAttr", "TestObject", info.Holder(), info.GetIsolate()); | 2257 v8::Isolate* isolate = info.GetIsolate(); |
2096 TestObject* impl = V8TestObject::toNative(info.Holder()); | 2258 v8::Handle<v8::Object> holder = info.Holder(); |
| 2259 ExceptionState exceptionState(ExceptionState::SetterContext, "enabledAtRunti
meAttr", "TestObject", holder, isolate); |
| 2260 TestObject* impl = V8TestObject::toNative(holder); |
2097 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 2261 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); |
2098 impl->setEnabledAtRuntimeAttr(cppValue); | 2262 impl->setEnabledAtRuntimeAttr(cppValue); |
2099 } | 2263 } |
2100 | 2264 |
2101 static void enabledAtRuntimeAttrAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 2265 static void enabledAtRuntimeAttrAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
2102 { | 2266 { |
2103 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2267 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2104 TestObjectV8Internal::enabledAtRuntimeAttrAttributeSetter(jsValue, info); | 2268 TestObjectV8Internal::enabledAtRuntimeAttrAttributeSetter(jsValue, info); |
2105 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2269 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2106 } | 2270 } |
2107 | 2271 |
2108 static void enabledPerContextAttrAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) | 2272 static void enabledPerContextAttrAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) |
2109 { | 2273 { |
2110 TestObject* impl = V8TestObject::toNative(info.Holder()); | 2274 v8::Handle<v8::Object> holder = info.Holder(); |
| 2275 TestObject* impl = V8TestObject::toNative(holder); |
2111 v8SetReturnValueInt(info, impl->enabledPerContextAttr()); | 2276 v8SetReturnValueInt(info, impl->enabledPerContextAttr()); |
2112 } | 2277 } |
2113 | 2278 |
2114 static void enabledPerContextAttrAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 2279 static void enabledPerContextAttrAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
2115 { | 2280 { |
2116 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2281 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2117 TestObjectV8Internal::enabledPerContextAttrAttributeGetter(info); | 2282 TestObjectV8Internal::enabledPerContextAttrAttributeGetter(info); |
2118 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2283 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2119 } | 2284 } |
2120 | 2285 |
2121 static void enabledPerContextAttrAttributeSetter(v8::Local<v8::Value> jsValue, c
onst v8::PropertyCallbackInfo<void>& info) | 2286 static void enabledPerContextAttrAttributeSetter(v8::Local<v8::Value> jsValue, c
onst v8::PropertyCallbackInfo<void>& info) |
2122 { | 2287 { |
2123 ExceptionState exceptionState(ExceptionState::SetterContext, "enabledPerCont
extAttr", "TestObject", info.Holder(), info.GetIsolate()); | 2288 v8::Isolate* isolate = info.GetIsolate(); |
2124 TestObject* impl = V8TestObject::toNative(info.Holder()); | 2289 v8::Handle<v8::Object> holder = info.Holder(); |
| 2290 ExceptionState exceptionState(ExceptionState::SetterContext, "enabledPerCont
extAttr", "TestObject", holder, isolate); |
| 2291 TestObject* impl = V8TestObject::toNative(holder); |
2125 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 2292 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); |
2126 impl->setEnabledPerContextAttr(cppValue); | 2293 impl->setEnabledPerContextAttr(cppValue); |
2127 } | 2294 } |
2128 | 2295 |
2129 static void enabledPerContextAttrAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 2296 static void enabledPerContextAttrAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
2130 { | 2297 { |
2131 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2298 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2132 TestObjectV8Internal::enabledPerContextAttrAttributeSetter(jsValue, info); | 2299 TestObjectV8Internal::enabledPerContextAttrAttributeSetter(jsValue, info); |
2133 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2300 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2134 } | 2301 } |
2135 | 2302 |
2136 static void floatArrayAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>&
info) | 2303 static void floatArrayAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>&
info) |
2137 { | 2304 { |
2138 TestObject* impl = V8TestObject::toNative(info.Holder()); | 2305 v8::Handle<v8::Object> holder = info.Holder(); |
| 2306 TestObject* impl = V8TestObject::toNative(holder); |
2139 v8SetReturnValue(info, v8Array(impl->floatArray(), info.GetIsolate())); | 2307 v8SetReturnValue(info, v8Array(impl->floatArray(), info.GetIsolate())); |
2140 } | 2308 } |
2141 | 2309 |
2142 static void floatArrayAttributeGetterCallback(v8::Local<v8::String>, const v8::P
ropertyCallbackInfo<v8::Value>& info) | 2310 static void floatArrayAttributeGetterCallback(v8::Local<v8::String>, const v8::P
ropertyCallbackInfo<v8::Value>& info) |
2143 { | 2311 { |
2144 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2312 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2145 TestObjectV8Internal::floatArrayAttributeGetter(info); | 2313 TestObjectV8Internal::floatArrayAttributeGetter(info); |
2146 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2314 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2147 } | 2315 } |
2148 | 2316 |
2149 static void floatArrayAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Pr
opertyCallbackInfo<void>& info) | 2317 static void floatArrayAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Pr
opertyCallbackInfo<void>& info) |
2150 { | 2318 { |
2151 TestObject* impl = V8TestObject::toNative(info.Holder()); | 2319 v8::Handle<v8::Object> holder = info.Holder(); |
| 2320 TestObject* impl = V8TestObject::toNative(holder); |
2152 V8TRYCATCH_VOID(Vector<float>, cppValue, toNativeArray<float>(jsValue, 0, in
fo.GetIsolate())); | 2321 V8TRYCATCH_VOID(Vector<float>, cppValue, toNativeArray<float>(jsValue, 0, in
fo.GetIsolate())); |
2153 impl->setFloatArray(cppValue); | 2322 impl->setFloatArray(cppValue); |
2154 } | 2323 } |
2155 | 2324 |
2156 static void floatArrayAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v
8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 2325 static void floatArrayAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v
8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
2157 { | 2326 { |
2158 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2327 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2159 TestObjectV8Internal::floatArrayAttributeSetter(jsValue, info); | 2328 TestObjectV8Internal::floatArrayAttributeSetter(jsValue, info); |
2160 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2329 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2161 } | 2330 } |
2162 | 2331 |
2163 static void doubleArrayAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>
& info) | 2332 static void doubleArrayAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>
& info) |
2164 { | 2333 { |
2165 TestObject* impl = V8TestObject::toNative(info.Holder()); | 2334 v8::Handle<v8::Object> holder = info.Holder(); |
| 2335 TestObject* impl = V8TestObject::toNative(holder); |
2166 v8SetReturnValue(info, v8Array(impl->doubleArray(), info.GetIsolate())); | 2336 v8SetReturnValue(info, v8Array(impl->doubleArray(), info.GetIsolate())); |
2167 } | 2337 } |
2168 | 2338 |
2169 static void doubleArrayAttributeGetterCallback(v8::Local<v8::String>, const v8::
PropertyCallbackInfo<v8::Value>& info) | 2339 static void doubleArrayAttributeGetterCallback(v8::Local<v8::String>, const v8::
PropertyCallbackInfo<v8::Value>& info) |
2170 { | 2340 { |
2171 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2341 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2172 TestObjectV8Internal::doubleArrayAttributeGetter(info); | 2342 TestObjectV8Internal::doubleArrayAttributeGetter(info); |
2173 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2343 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2174 } | 2344 } |
2175 | 2345 |
2176 static void doubleArrayAttributeSetter(v8::Local<v8::Value> jsValue, const v8::P
ropertyCallbackInfo<void>& info) | 2346 static void doubleArrayAttributeSetter(v8::Local<v8::Value> jsValue, const v8::P
ropertyCallbackInfo<void>& info) |
2177 { | 2347 { |
2178 TestObject* impl = V8TestObject::toNative(info.Holder()); | 2348 v8::Handle<v8::Object> holder = info.Holder(); |
| 2349 TestObject* impl = V8TestObject::toNative(holder); |
2179 V8TRYCATCH_VOID(Vector<double>, cppValue, toNativeArray<double>(jsValue, 0,
info.GetIsolate())); | 2350 V8TRYCATCH_VOID(Vector<double>, cppValue, toNativeArray<double>(jsValue, 0,
info.GetIsolate())); |
2180 impl->setDoubleArray(cppValue); | 2351 impl->setDoubleArray(cppValue); |
2181 } | 2352 } |
2182 | 2353 |
2183 static void doubleArrayAttributeSetterCallback(v8::Local<v8::String>, v8::Local<
v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 2354 static void doubleArrayAttributeSetterCallback(v8::Local<v8::String>, v8::Local<
v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
2184 { | 2355 { |
2185 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2356 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2186 TestObjectV8Internal::doubleArrayAttributeSetter(jsValue, info); | 2357 TestObjectV8Internal::doubleArrayAttributeSetter(jsValue, info); |
2187 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2358 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2188 } | 2359 } |
2189 | 2360 |
2190 static void messagePortArrayAttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) | 2361 static void messagePortArrayAttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) |
2191 { | 2362 { |
2192 TestObject* impl = V8TestObject::toNative(info.Holder()); | 2363 v8::Handle<v8::Object> holder = info.Holder(); |
| 2364 TestObject* impl = V8TestObject::toNative(holder); |
2193 v8SetReturnValue(info, v8Array(impl->messagePortArray(), info.GetIsolate()))
; | 2365 v8SetReturnValue(info, v8Array(impl->messagePortArray(), info.GetIsolate()))
; |
2194 } | 2366 } |
2195 | 2367 |
2196 static void messagePortArrayAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) | 2368 static void messagePortArrayAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) |
2197 { | 2369 { |
2198 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2370 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2199 TestObjectV8Internal::messagePortArrayAttributeGetter(info); | 2371 TestObjectV8Internal::messagePortArrayAttributeGetter(info); |
2200 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2372 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2201 } | 2373 } |
2202 | 2374 |
2203 static void messagePortArrayAttributeSetter(v8::Local<v8::Value> jsValue, const
v8::PropertyCallbackInfo<void>& info) | 2375 static void messagePortArrayAttributeSetter(v8::Local<v8::Value> jsValue, const
v8::PropertyCallbackInfo<void>& info) |
2204 { | 2376 { |
2205 TestObject* impl = V8TestObject::toNative(info.Holder()); | 2377 v8::Handle<v8::Object> holder = info.Holder(); |
| 2378 TestObject* impl = V8TestObject::toNative(holder); |
2206 V8TRYCATCH_VOID(Vector<RefPtr<MessagePort> >, cppValue, (toRefPtrNativeArray
<MessagePort, V8MessagePort>(jsValue, 0, info.GetIsolate()))); | 2379 V8TRYCATCH_VOID(Vector<RefPtr<MessagePort> >, cppValue, (toRefPtrNativeArray
<MessagePort, V8MessagePort>(jsValue, 0, info.GetIsolate()))); |
2207 impl->setMessagePortArray(cppValue); | 2380 impl->setMessagePortArray(cppValue); |
2208 } | 2381 } |
2209 | 2382 |
2210 static void messagePortArrayAttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 2383 static void messagePortArrayAttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
2211 { | 2384 { |
2212 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2385 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2213 TestObjectV8Internal::messagePortArrayAttributeSetter(jsValue, info); | 2386 TestObjectV8Internal::messagePortArrayAttributeSetter(jsValue, info); |
2214 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2387 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2215 } | 2388 } |
2216 | 2389 |
2217 static void contentDocumentAttributeGetter(const v8::PropertyCallbackInfo<v8::Va
lue>& info) | 2390 static void contentDocumentAttributeGetter(const v8::PropertyCallbackInfo<v8::Va
lue>& info) |
2218 { | 2391 { |
2219 TestObject* impl = V8TestObject::toNative(info.Holder()); | 2392 v8::Isolate* isolate = info.GetIsolate(); |
2220 ExceptionState exceptionState(ExceptionState::GetterContext, "contentDocumen
t", "TestObject", info.Holder(), info.GetIsolate()); | 2393 v8::Handle<v8::Object> holder = info.Holder(); |
2221 if (!BindingSecurity::shouldAllowAccessToNode(info.GetIsolate(), impl->conte
ntDocument(), exceptionState)) { | 2394 TestObject* impl = V8TestObject::toNative(holder); |
| 2395 ExceptionState exceptionState(ExceptionState::GetterContext, "contentDocumen
t", "TestObject", holder, isolate); |
| 2396 if (!BindingSecurity::shouldAllowAccessToNode(isolate, impl->contentDocument
(), exceptionState)) { |
2222 v8SetReturnValueNull(info); | 2397 v8SetReturnValueNull(info); |
2223 exceptionState.throwIfNeeded(); | 2398 exceptionState.throwIfNeeded(); |
2224 return; | 2399 return; |
2225 } | 2400 } |
2226 v8SetReturnValueFast(info, WTF::getPtr(impl->contentDocument()), impl); | 2401 v8SetReturnValueFast(info, WTF::getPtr(impl->contentDocument()), impl); |
2227 } | 2402 } |
2228 | 2403 |
2229 static void contentDocumentAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) | 2404 static void contentDocumentAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) |
2230 { | 2405 { |
2231 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2406 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2232 TestObjectV8Internal::contentDocumentAttributeGetter(info); | 2407 TestObjectV8Internal::contentDocumentAttributeGetter(info); |
2233 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2408 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2234 } | 2409 } |
2235 | 2410 |
2236 static void strawberryAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>&
info) | 2411 static void strawberryAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>&
info) |
2237 { | 2412 { |
2238 TestObject* impl = V8TestObject::toNative(info.Holder()); | 2413 v8::Handle<v8::Object> holder = info.Holder(); |
| 2414 TestObject* impl = V8TestObject::toNative(holder); |
2239 v8SetReturnValueInt(info, impl->blueberry()); | 2415 v8SetReturnValueInt(info, impl->blueberry()); |
2240 } | 2416 } |
2241 | 2417 |
2242 static void strawberryAttributeGetterCallback(v8::Local<v8::String>, const v8::P
ropertyCallbackInfo<v8::Value>& info) | 2418 static void strawberryAttributeGetterCallback(v8::Local<v8::String>, const v8::P
ropertyCallbackInfo<v8::Value>& info) |
2243 { | 2419 { |
2244 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2420 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2245 TestObjectV8Internal::strawberryAttributeGetter(info); | 2421 TestObjectV8Internal::strawberryAttributeGetter(info); |
2246 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2422 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2247 } | 2423 } |
2248 | 2424 |
2249 static void strawberryAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Pr
opertyCallbackInfo<void>& info) | 2425 static void strawberryAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Pr
opertyCallbackInfo<void>& info) |
2250 { | 2426 { |
2251 ExceptionState exceptionState(ExceptionState::SetterContext, "strawberry", "
TestObject", info.Holder(), info.GetIsolate()); | 2427 v8::Isolate* isolate = info.GetIsolate(); |
2252 TestObject* impl = V8TestObject::toNative(info.Holder()); | 2428 v8::Handle<v8::Object> holder = info.Holder(); |
| 2429 ExceptionState exceptionState(ExceptionState::SetterContext, "strawberry", "
TestObject", holder, isolate); |
| 2430 TestObject* impl = V8TestObject::toNative(holder); |
2253 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 2431 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); |
2254 impl->setBlueberry(cppValue); | 2432 impl->setBlueberry(cppValue); |
2255 } | 2433 } |
2256 | 2434 |
2257 static void strawberryAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v
8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 2435 static void strawberryAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v
8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
2258 { | 2436 { |
2259 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2437 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2260 TestObjectV8Internal::strawberryAttributeSetter(jsValue, info); | 2438 TestObjectV8Internal::strawberryAttributeSetter(jsValue, info); |
2261 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2439 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2262 } | 2440 } |
2263 | 2441 |
2264 static void strictFloatAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>
& info) | 2442 static void strictFloatAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>
& info) |
2265 { | 2443 { |
2266 TestObject* impl = V8TestObject::toNative(info.Holder()); | 2444 v8::Handle<v8::Object> holder = info.Holder(); |
| 2445 TestObject* impl = V8TestObject::toNative(holder); |
2267 v8SetReturnValue(info, impl->strictFloat()); | 2446 v8SetReturnValue(info, impl->strictFloat()); |
2268 } | 2447 } |
2269 | 2448 |
2270 static void strictFloatAttributeGetterCallback(v8::Local<v8::String>, const v8::
PropertyCallbackInfo<v8::Value>& info) | 2449 static void strictFloatAttributeGetterCallback(v8::Local<v8::String>, const v8::
PropertyCallbackInfo<v8::Value>& info) |
2271 { | 2450 { |
2272 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2451 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2273 TestObjectV8Internal::strictFloatAttributeGetter(info); | 2452 TestObjectV8Internal::strictFloatAttributeGetter(info); |
2274 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2453 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2275 } | 2454 } |
2276 | 2455 |
2277 static void strictFloatAttributeSetter(v8::Local<v8::Value> jsValue, const v8::P
ropertyCallbackInfo<void>& info) | 2456 static void strictFloatAttributeSetter(v8::Local<v8::Value> jsValue, const v8::P
ropertyCallbackInfo<void>& info) |
2278 { | 2457 { |
2279 TestObject* impl = V8TestObject::toNative(info.Holder()); | 2458 v8::Handle<v8::Object> holder = info.Holder(); |
| 2459 TestObject* impl = V8TestObject::toNative(holder); |
2280 V8TRYCATCH_VOID(float, cppValue, static_cast<float>(jsValue->NumberValue()))
; | 2460 V8TRYCATCH_VOID(float, cppValue, static_cast<float>(jsValue->NumberValue()))
; |
2281 impl->setStrictFloat(cppValue); | 2461 impl->setStrictFloat(cppValue); |
2282 } | 2462 } |
2283 | 2463 |
2284 static void strictFloatAttributeSetterCallback(v8::Local<v8::String>, v8::Local<
v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 2464 static void strictFloatAttributeSetterCallback(v8::Local<v8::String>, v8::Local<
v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
2285 { | 2465 { |
2286 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2466 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2287 TestObjectV8Internal::strictFloatAttributeSetter(jsValue, info); | 2467 TestObjectV8Internal::strictFloatAttributeSetter(jsValue, info); |
2288 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2468 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2289 } | 2469 } |
2290 | 2470 |
2291 static void replaceableAttributeAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) | 2471 static void replaceableAttributeAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) |
2292 { | 2472 { |
2293 TestObject* impl = V8TestObject::toNative(info.Holder()); | 2473 v8::Handle<v8::Object> holder = info.Holder(); |
| 2474 TestObject* impl = V8TestObject::toNative(holder); |
2294 v8SetReturnValueInt(info, impl->replaceableAttribute()); | 2475 v8SetReturnValueInt(info, impl->replaceableAttribute()); |
2295 } | 2476 } |
2296 | 2477 |
2297 static void replaceableAttributeAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) | 2478 static void replaceableAttributeAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) |
2298 { | 2479 { |
2299 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2480 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2300 TestObjectV8Internal::replaceableAttributeAttributeGetter(info); | 2481 TestObjectV8Internal::replaceableAttributeAttributeGetter(info); |
2301 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2482 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2302 } | 2483 } |
2303 | 2484 |
2304 static void nullableDoubleAttributeAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) | 2485 static void nullableDoubleAttributeAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) |
2305 { | 2486 { |
2306 TestObject* impl = V8TestObject::toNative(info.Holder()); | 2487 v8::Handle<v8::Object> holder = info.Holder(); |
| 2488 TestObject* impl = V8TestObject::toNative(holder); |
2307 bool isNull = false; | 2489 bool isNull = false; |
2308 double jsValue = impl->nullableDoubleAttribute(isNull); | 2490 double jsValue = impl->nullableDoubleAttribute(isNull); |
2309 if (isNull) { | 2491 if (isNull) { |
2310 v8SetReturnValueNull(info); | 2492 v8SetReturnValueNull(info); |
2311 return; | 2493 return; |
2312 } | 2494 } |
2313 v8SetReturnValue(info, jsValue); | 2495 v8SetReturnValue(info, jsValue); |
2314 } | 2496 } |
2315 | 2497 |
2316 static void nullableDoubleAttributeAttributeGetterCallback(v8::Local<v8::String>
, const v8::PropertyCallbackInfo<v8::Value>& info) | 2498 static void nullableDoubleAttributeAttributeGetterCallback(v8::Local<v8::String>
, const v8::PropertyCallbackInfo<v8::Value>& info) |
2317 { | 2499 { |
2318 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2500 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2319 TestObjectV8Internal::nullableDoubleAttributeAttributeGetter(info); | 2501 TestObjectV8Internal::nullableDoubleAttributeAttributeGetter(info); |
2320 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2502 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2321 } | 2503 } |
2322 | 2504 |
2323 static void nullableLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) | 2505 static void nullableLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) |
2324 { | 2506 { |
2325 TestObject* impl = V8TestObject::toNative(info.Holder()); | 2507 v8::Handle<v8::Object> holder = info.Holder(); |
| 2508 TestObject* impl = V8TestObject::toNative(holder); |
2326 bool isNull = false; | 2509 bool isNull = false; |
2327 int jsValue = impl->nullableLongAttribute(isNull); | 2510 int jsValue = impl->nullableLongAttribute(isNull); |
2328 if (isNull) { | 2511 if (isNull) { |
2329 v8SetReturnValueNull(info); | 2512 v8SetReturnValueNull(info); |
2330 return; | 2513 return; |
2331 } | 2514 } |
2332 v8SetReturnValueInt(info, jsValue); | 2515 v8SetReturnValueInt(info, jsValue); |
2333 } | 2516 } |
2334 | 2517 |
2335 static void nullableLongAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 2518 static void nullableLongAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
2336 { | 2519 { |
2337 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2520 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2338 TestObjectV8Internal::nullableLongAttributeAttributeGetter(info); | 2521 TestObjectV8Internal::nullableLongAttributeAttributeGetter(info); |
2339 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2522 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2340 } | 2523 } |
2341 | 2524 |
2342 static void nullableBooleanAttributeAttributeGetter(const v8::PropertyCallbackIn
fo<v8::Value>& info) | 2525 static void nullableBooleanAttributeAttributeGetter(const v8::PropertyCallbackIn
fo<v8::Value>& info) |
2343 { | 2526 { |
2344 TestObject* impl = V8TestObject::toNative(info.Holder()); | 2527 v8::Handle<v8::Object> holder = info.Holder(); |
| 2528 TestObject* impl = V8TestObject::toNative(holder); |
2345 bool isNull = false; | 2529 bool isNull = false; |
2346 bool jsValue = impl->nullableBooleanAttribute(isNull); | 2530 bool jsValue = impl->nullableBooleanAttribute(isNull); |
2347 if (isNull) { | 2531 if (isNull) { |
2348 v8SetReturnValueNull(info); | 2532 v8SetReturnValueNull(info); |
2349 return; | 2533 return; |
2350 } | 2534 } |
2351 v8SetReturnValueBool(info, jsValue); | 2535 v8SetReturnValueBool(info, jsValue); |
2352 } | 2536 } |
2353 | 2537 |
2354 static void nullableBooleanAttributeAttributeGetterCallback(v8::Local<v8::String
>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2538 static void nullableBooleanAttributeAttributeGetterCallback(v8::Local<v8::String
>, const v8::PropertyCallbackInfo<v8::Value>& info) |
2355 { | 2539 { |
2356 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2540 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2357 TestObjectV8Internal::nullableBooleanAttributeAttributeGetter(info); | 2541 TestObjectV8Internal::nullableBooleanAttributeAttributeGetter(info); |
2358 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2542 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2359 } | 2543 } |
2360 | 2544 |
2361 static void nullableStringAttributeAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) | 2545 static void nullableStringAttributeAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) |
2362 { | 2546 { |
2363 TestObject* impl = V8TestObject::toNative(info.Holder()); | 2547 v8::Handle<v8::Object> holder = info.Holder(); |
| 2548 TestObject* impl = V8TestObject::toNative(holder); |
2364 bool isNull = false; | 2549 bool isNull = false; |
2365 String jsValue = impl->nullableStringAttribute(isNull); | 2550 String jsValue = impl->nullableStringAttribute(isNull); |
2366 if (isNull) { | 2551 if (isNull) { |
2367 v8SetReturnValueNull(info); | 2552 v8SetReturnValueNull(info); |
2368 return; | 2553 return; |
2369 } | 2554 } |
2370 v8SetReturnValueString(info, jsValue, info.GetIsolate()); | 2555 v8SetReturnValueString(info, jsValue, info.GetIsolate()); |
2371 } | 2556 } |
2372 | 2557 |
2373 static void nullableStringAttributeAttributeGetterCallback(v8::Local<v8::String>
, const v8::PropertyCallbackInfo<v8::Value>& info) | 2558 static void nullableStringAttributeAttributeGetterCallback(v8::Local<v8::String>
, const v8::PropertyCallbackInfo<v8::Value>& info) |
2374 { | 2559 { |
2375 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2560 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2376 TestObjectV8Internal::nullableStringAttributeAttributeGetter(info); | 2561 TestObjectV8Internal::nullableStringAttributeAttributeGetter(info); |
2377 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2562 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2378 } | 2563 } |
2379 | 2564 |
2380 static void nullableLongSettableAttributeAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) | 2565 static void nullableLongSettableAttributeAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) |
2381 { | 2566 { |
2382 TestObject* impl = V8TestObject::toNative(info.Holder()); | 2567 v8::Handle<v8::Object> holder = info.Holder(); |
| 2568 TestObject* impl = V8TestObject::toNative(holder); |
2383 bool isNull = false; | 2569 bool isNull = false; |
2384 int jsValue = impl->nullableLongSettableAttribute(isNull); | 2570 int jsValue = impl->nullableLongSettableAttribute(isNull); |
2385 if (isNull) { | 2571 if (isNull) { |
2386 v8SetReturnValueNull(info); | 2572 v8SetReturnValueNull(info); |
2387 return; | 2573 return; |
2388 } | 2574 } |
2389 v8SetReturnValueInt(info, jsValue); | 2575 v8SetReturnValueInt(info, jsValue); |
2390 } | 2576 } |
2391 | 2577 |
2392 static void nullableLongSettableAttributeAttributeGetterCallback(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2578 static void nullableLongSettableAttributeAttributeGetterCallback(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) |
2393 { | 2579 { |
2394 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2580 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2395 TestObjectV8Internal::nullableLongSettableAttributeAttributeGetter(info); | 2581 TestObjectV8Internal::nullableLongSettableAttributeAttributeGetter(info); |
2396 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2582 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2397 } | 2583 } |
2398 | 2584 |
2399 static void nullableLongSettableAttributeAttributeSetter(v8::Local<v8::Value> js
Value, const v8::PropertyCallbackInfo<void>& info) | 2585 static void nullableLongSettableAttributeAttributeSetter(v8::Local<v8::Value> js
Value, const v8::PropertyCallbackInfo<void>& info) |
2400 { | 2586 { |
2401 ExceptionState exceptionState(ExceptionState::SetterContext, "nullableLongSe
ttableAttribute", "TestObject", info.Holder(), info.GetIsolate()); | 2587 v8::Isolate* isolate = info.GetIsolate(); |
2402 TestObject* impl = V8TestObject::toNative(info.Holder()); | 2588 v8::Handle<v8::Object> holder = info.Holder(); |
| 2589 ExceptionState exceptionState(ExceptionState::SetterContext, "nullableLongSe
ttableAttribute", "TestObject", holder, isolate); |
| 2590 TestObject* impl = V8TestObject::toNative(holder); |
2403 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 2591 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); |
2404 impl->setNullableLongSettableAttribute(cppValue); | 2592 impl->setNullableLongSettableAttribute(cppValue); |
2405 } | 2593 } |
2406 | 2594 |
2407 static void nullableLongSettableAttributeAttributeSetterCallback(v8::Local<v8::S
tring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info
) | 2595 static void nullableLongSettableAttributeAttributeSetterCallback(v8::Local<v8::S
tring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info
) |
2408 { | 2596 { |
2409 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2597 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2410 TestObjectV8Internal::nullableLongSettableAttributeAttributeSetter(jsValue,
info); | 2598 TestObjectV8Internal::nullableLongSettableAttributeAttributeSetter(jsValue,
info); |
2411 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2599 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2412 } | 2600 } |
2413 | 2601 |
2414 static void perWorldReadOnlyAttributeAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) | 2602 static void perWorldReadOnlyAttributeAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) |
2415 { | 2603 { |
2416 TestObject* impl = V8TestObject::toNative(info.Holder()); | 2604 v8::Isolate* isolate = info.GetIsolate(); |
| 2605 v8::Handle<v8::Object> holder = info.Holder(); |
| 2606 TestObject* impl = V8TestObject::toNative(holder); |
2417 RefPtr<TestObject> result(impl->perWorldReadOnlyAttribute()); | 2607 RefPtr<TestObject> result(impl->perWorldReadOnlyAttribute()); |
2418 if (result && DOMDataStore::setReturnValueFromWrapper<V8TestObject>(info.Get
ReturnValue(), result.get())) | 2608 if (result && DOMDataStore::setReturnValueFromWrapper<V8TestObject>(info.Get
ReturnValue(), result.get())) |
2419 return; | 2609 return; |
2420 v8::Handle<v8::Value> wrapper = toV8(result.get(), info.Holder(), info.GetIs
olate()); | 2610 v8::Handle<v8::Value> wrapper = toV8(result.get(), holder, isolate); |
2421 if (!wrapper.IsEmpty()) { | 2611 if (!wrapper.IsEmpty()) { |
2422 V8HiddenValue::setHiddenValue(info.GetIsolate(), info.Holder(), v8Atomic
String(info.GetIsolate(), "perWorldReadOnlyAttribute"), wrapper); | 2612 V8HiddenValue::setHiddenValue(isolate, holder, v8AtomicString(info.GetIs
olate(), "perWorldReadOnlyAttribute"), wrapper); |
2423 v8SetReturnValue(info, wrapper); | 2613 v8SetReturnValue(info, wrapper); |
2424 } | 2614 } |
2425 } | 2615 } |
2426 | 2616 |
2427 static void perWorldReadOnlyAttributeAttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2617 static void perWorldReadOnlyAttributeAttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) |
2428 { | 2618 { |
2429 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2619 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2430 TestObjectV8Internal::perWorldReadOnlyAttributeAttributeGetter(info); | 2620 TestObjectV8Internal::perWorldReadOnlyAttributeAttributeGetter(info); |
2431 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2621 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2432 } | 2622 } |
2433 | 2623 |
2434 static void perWorldReadOnlyAttributeAttributeGetterForMainWorld(const v8::Prope
rtyCallbackInfo<v8::Value>& info) | 2624 static void perWorldReadOnlyAttributeAttributeGetterForMainWorld(const v8::Prope
rtyCallbackInfo<v8::Value>& info) |
2435 { | 2625 { |
2436 TestObject* impl = V8TestObject::toNative(info.Holder()); | 2626 v8::Isolate* isolate = info.GetIsolate(); |
| 2627 v8::Handle<v8::Object> holder = info.Holder(); |
| 2628 TestObject* impl = V8TestObject::toNative(holder); |
2437 RefPtr<TestObject> result(impl->perWorldReadOnlyAttribute()); | 2629 RefPtr<TestObject> result(impl->perWorldReadOnlyAttribute()); |
2438 if (result && DOMDataStore::setReturnValueFromWrapperForMainWorld<V8TestObje
ct>(info.GetReturnValue(), result.get())) | 2630 if (result && DOMDataStore::setReturnValueFromWrapperForMainWorld<V8TestObje
ct>(info.GetReturnValue(), result.get())) |
2439 return; | 2631 return; |
2440 v8::Handle<v8::Value> wrapper = toV8(result.get(), info.Holder(), info.GetIs
olate()); | 2632 v8::Handle<v8::Value> wrapper = toV8(result.get(), holder, isolate); |
2441 if (!wrapper.IsEmpty()) { | 2633 if (!wrapper.IsEmpty()) { |
2442 V8HiddenValue::setHiddenValue(info.GetIsolate(), info.Holder(), v8Atomic
String(info.GetIsolate(), "perWorldReadOnlyAttribute"), wrapper); | 2634 V8HiddenValue::setHiddenValue(isolate, holder, v8AtomicString(info.GetIs
olate(), "perWorldReadOnlyAttribute"), wrapper); |
2443 v8SetReturnValue(info, wrapper); | 2635 v8SetReturnValue(info, wrapper); |
2444 } | 2636 } |
2445 } | 2637 } |
2446 | 2638 |
2447 static void perWorldReadOnlyAttributeAttributeGetterCallbackForMainWorld(v8::Loc
al<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2639 static void perWorldReadOnlyAttributeAttributeGetterCallbackForMainWorld(v8::Loc
al<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
2448 { | 2640 { |
2449 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2641 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2450 TestObjectV8Internal::perWorldReadOnlyAttributeAttributeGetterForMainWorld(i
nfo); | 2642 TestObjectV8Internal::perWorldReadOnlyAttributeAttributeGetterForMainWorld(i
nfo); |
2451 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2643 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2452 } | 2644 } |
2453 | 2645 |
2454 static void perWorldAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::
Value>& info) | 2646 static void perWorldAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::
Value>& info) |
2455 { | 2647 { |
2456 TestObject* impl = V8TestObject::toNative(info.Holder()); | 2648 v8::Handle<v8::Object> holder = info.Holder(); |
| 2649 TestObject* impl = V8TestObject::toNative(holder); |
2457 v8SetReturnValueFast(info, WTF::getPtr(impl->perWorldAttribute()), impl); | 2650 v8SetReturnValueFast(info, WTF::getPtr(impl->perWorldAttribute()), impl); |
2458 } | 2651 } |
2459 | 2652 |
2460 static void perWorldAttributeAttributeGetterCallback(v8::Local<v8::String>, cons
t v8::PropertyCallbackInfo<v8::Value>& info) | 2653 static void perWorldAttributeAttributeGetterCallback(v8::Local<v8::String>, cons
t v8::PropertyCallbackInfo<v8::Value>& info) |
2461 { | 2654 { |
2462 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2655 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2463 TestObjectV8Internal::perWorldAttributeAttributeGetter(info); | 2656 TestObjectV8Internal::perWorldAttributeAttributeGetter(info); |
2464 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2657 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2465 } | 2658 } |
2466 | 2659 |
2467 static void perWorldAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const
v8::PropertyCallbackInfo<void>& info) | 2660 static void perWorldAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const
v8::PropertyCallbackInfo<void>& info) |
2468 { | 2661 { |
2469 TestObject* impl = V8TestObject::toNative(info.Holder()); | 2662 v8::Handle<v8::Object> holder = info.Holder(); |
| 2663 TestObject* impl = V8TestObject::toNative(holder); |
2470 V8TRYCATCH_VOID(TestObject*, cppValue, V8TestObject::toNativeWithTypeCheck(i
nfo.GetIsolate(), jsValue)); | 2664 V8TRYCATCH_VOID(TestObject*, cppValue, V8TestObject::toNativeWithTypeCheck(i
nfo.GetIsolate(), jsValue)); |
2471 impl->setPerWorldAttribute(WTF::getPtr(cppValue)); | 2665 impl->setPerWorldAttribute(WTF::getPtr(cppValue)); |
2472 } | 2666 } |
2473 | 2667 |
2474 static void perWorldAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::
Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 2668 static void perWorldAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::
Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
2475 { | 2669 { |
2476 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2670 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2477 TestObjectV8Internal::perWorldAttributeAttributeSetter(jsValue, info); | 2671 TestObjectV8Internal::perWorldAttributeAttributeSetter(jsValue, info); |
2478 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2672 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2479 } | 2673 } |
2480 | 2674 |
2481 static void perWorldAttributeAttributeGetterForMainWorld(const v8::PropertyCallb
ackInfo<v8::Value>& info) | 2675 static void perWorldAttributeAttributeGetterForMainWorld(const v8::PropertyCallb
ackInfo<v8::Value>& info) |
2482 { | 2676 { |
2483 TestObject* impl = V8TestObject::toNative(info.Holder()); | 2677 v8::Handle<v8::Object> holder = info.Holder(); |
| 2678 TestObject* impl = V8TestObject::toNative(holder); |
2484 v8SetReturnValueForMainWorld(info, WTF::getPtr(impl->perWorldAttribute())); | 2679 v8SetReturnValueForMainWorld(info, WTF::getPtr(impl->perWorldAttribute())); |
2485 } | 2680 } |
2486 | 2681 |
2487 static void perWorldAttributeAttributeGetterCallbackForMainWorld(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2682 static void perWorldAttributeAttributeGetterCallbackForMainWorld(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) |
2488 { | 2683 { |
2489 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2684 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2490 TestObjectV8Internal::perWorldAttributeAttributeGetterForMainWorld(info); | 2685 TestObjectV8Internal::perWorldAttributeAttributeGetterForMainWorld(info); |
2491 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2686 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2492 } | 2687 } |
2493 | 2688 |
2494 static void perWorldAttributeAttributeSetterForMainWorld(v8::Local<v8::Value> js
Value, const v8::PropertyCallbackInfo<void>& info) | 2689 static void perWorldAttributeAttributeSetterForMainWorld(v8::Local<v8::Value> js
Value, const v8::PropertyCallbackInfo<void>& info) |
2495 { | 2690 { |
2496 TestObject* impl = V8TestObject::toNative(info.Holder()); | 2691 v8::Handle<v8::Object> holder = info.Holder(); |
| 2692 TestObject* impl = V8TestObject::toNative(holder); |
2497 V8TRYCATCH_VOID(TestObject*, cppValue, V8TestObject::toNativeWithTypeCheck(i
nfo.GetIsolate(), jsValue)); | 2693 V8TRYCATCH_VOID(TestObject*, cppValue, V8TestObject::toNativeWithTypeCheck(i
nfo.GetIsolate(), jsValue)); |
2498 impl->setPerWorldAttribute(WTF::getPtr(cppValue)); | 2694 impl->setPerWorldAttribute(WTF::getPtr(cppValue)); |
2499 } | 2695 } |
2500 | 2696 |
2501 static void perWorldAttributeAttributeSetterCallbackForMainWorld(v8::Local<v8::S
tring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info
) | 2697 static void perWorldAttributeAttributeSetterCallbackForMainWorld(v8::Local<v8::S
tring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info
) |
2502 { | 2698 { |
2503 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2699 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2504 TestObjectV8Internal::perWorldAttributeAttributeSetterForMainWorld(jsValue,
info); | 2700 TestObjectV8Internal::perWorldAttributeAttributeSetterForMainWorld(jsValue,
info); |
2505 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2701 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2506 } | 2702 } |
2507 | 2703 |
2508 static void activityLoggedAttr1AttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) | 2704 static void activityLoggedAttr1AttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) |
2509 { | 2705 { |
2510 TestObject* impl = V8TestObject::toNative(info.Holder()); | 2706 v8::Handle<v8::Object> holder = info.Holder(); |
| 2707 TestObject* impl = V8TestObject::toNative(holder); |
2511 v8SetReturnValueInt(info, impl->activityLoggedAttr1()); | 2708 v8SetReturnValueInt(info, impl->activityLoggedAttr1()); |
2512 } | 2709 } |
2513 | 2710 |
2514 static void activityLoggedAttr1AttributeGetterCallback(v8::Local<v8::String>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) | 2711 static void activityLoggedAttr1AttributeGetterCallback(v8::Local<v8::String>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) |
2515 { | 2712 { |
2516 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2713 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2517 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 2714 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
2518 if (contextData && contextData->activityLogger()) | 2715 if (contextData && contextData->activityLogger()) |
2519 contextData->activityLogger()->log("TestObject.activityLoggedAttr1", 0,
0, "Getter"); | 2716 contextData->activityLogger()->log("TestObject.activityLoggedAttr1", 0,
0, "Getter"); |
2520 TestObjectV8Internal::activityLoggedAttr1AttributeGetter(info); | 2717 TestObjectV8Internal::activityLoggedAttr1AttributeGetter(info); |
2521 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2718 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2522 } | 2719 } |
2523 | 2720 |
2524 static void activityLoggedAttr1AttributeSetter(v8::Local<v8::Value> jsValue, con
st v8::PropertyCallbackInfo<void>& info) | 2721 static void activityLoggedAttr1AttributeSetter(v8::Local<v8::Value> jsValue, con
st v8::PropertyCallbackInfo<void>& info) |
2525 { | 2722 { |
2526 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
Attr1", "TestObject", info.Holder(), info.GetIsolate()); | 2723 v8::Isolate* isolate = info.GetIsolate(); |
2527 TestObject* impl = V8TestObject::toNative(info.Holder()); | 2724 v8::Handle<v8::Object> holder = info.Holder(); |
| 2725 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
Attr1", "TestObject", holder, isolate); |
| 2726 TestObject* impl = V8TestObject::toNative(holder); |
2528 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 2727 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); |
2529 impl->setActivityLoggedAttr1(cppValue); | 2728 impl->setActivityLoggedAttr1(cppValue); |
2530 } | 2729 } |
2531 | 2730 |
2532 static void activityLoggedAttr1AttributeSetterCallback(v8::Local<v8::String>, v8
::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 2731 static void activityLoggedAttr1AttributeSetterCallback(v8::Local<v8::String>, v8
::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
2533 { | 2732 { |
2534 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2733 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2535 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 2734 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
2536 if (contextData && contextData->activityLogger()) { | 2735 if (contextData && contextData->activityLogger()) { |
2537 v8::Handle<v8::Value> loggerArg[] = { jsValue }; | 2736 v8::Handle<v8::Value> loggerArg[] = { jsValue }; |
2538 contextData->activityLogger()->log("TestObject.activityLoggedAttr1", 1,
&loggerArg[0], "Setter"); | 2737 contextData->activityLogger()->log("TestObject.activityLoggedAttr1", 1,
&loggerArg[0], "Setter"); |
2539 } | 2738 } |
2540 TestObjectV8Internal::activityLoggedAttr1AttributeSetter(jsValue, info); | 2739 TestObjectV8Internal::activityLoggedAttr1AttributeSetter(jsValue, info); |
2541 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2740 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2542 } | 2741 } |
2543 | 2742 |
2544 static void activityLoggedAttr2AttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) | 2743 static void activityLoggedAttr2AttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) |
2545 { | 2744 { |
2546 TestObject* impl = V8TestObject::toNative(info.Holder()); | 2745 v8::Handle<v8::Object> holder = info.Holder(); |
| 2746 TestObject* impl = V8TestObject::toNative(holder); |
2547 v8SetReturnValueInt(info, impl->activityLoggedAttr2()); | 2747 v8SetReturnValueInt(info, impl->activityLoggedAttr2()); |
2548 } | 2748 } |
2549 | 2749 |
2550 static void activityLoggedAttr2AttributeGetterCallback(v8::Local<v8::String>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) | 2750 static void activityLoggedAttr2AttributeGetterCallback(v8::Local<v8::String>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) |
2551 { | 2751 { |
2552 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2752 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2553 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 2753 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
2554 if (contextData && contextData->activityLogger()) | 2754 if (contextData && contextData->activityLogger()) |
2555 contextData->activityLogger()->log("TestObject.activityLoggedAttr2", 0,
0, "Getter"); | 2755 contextData->activityLogger()->log("TestObject.activityLoggedAttr2", 0,
0, "Getter"); |
2556 TestObjectV8Internal::activityLoggedAttr2AttributeGetter(info); | 2756 TestObjectV8Internal::activityLoggedAttr2AttributeGetter(info); |
2557 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2757 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2558 } | 2758 } |
2559 | 2759 |
2560 static void activityLoggedAttr2AttributeSetter(v8::Local<v8::Value> jsValue, con
st v8::PropertyCallbackInfo<void>& info) | 2760 static void activityLoggedAttr2AttributeSetter(v8::Local<v8::Value> jsValue, con
st v8::PropertyCallbackInfo<void>& info) |
2561 { | 2761 { |
2562 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
Attr2", "TestObject", info.Holder(), info.GetIsolate()); | 2762 v8::Isolate* isolate = info.GetIsolate(); |
2563 TestObject* impl = V8TestObject::toNative(info.Holder()); | 2763 v8::Handle<v8::Object> holder = info.Holder(); |
| 2764 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
Attr2", "TestObject", holder, isolate); |
| 2765 TestObject* impl = V8TestObject::toNative(holder); |
2564 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 2766 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); |
2565 impl->setActivityLoggedAttr2(cppValue); | 2767 impl->setActivityLoggedAttr2(cppValue); |
2566 } | 2768 } |
2567 | 2769 |
2568 static void activityLoggedAttr2AttributeSetterCallback(v8::Local<v8::String>, v8
::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 2770 static void activityLoggedAttr2AttributeSetterCallback(v8::Local<v8::String>, v8
::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
2569 { | 2771 { |
2570 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2772 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2571 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 2773 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
2572 if (contextData && contextData->activityLogger()) { | 2774 if (contextData && contextData->activityLogger()) { |
2573 v8::Handle<v8::Value> loggerArg[] = { jsValue }; | 2775 v8::Handle<v8::Value> loggerArg[] = { jsValue }; |
2574 contextData->activityLogger()->log("TestObject.activityLoggedAttr2", 1,
&loggerArg[0], "Setter"); | 2776 contextData->activityLogger()->log("TestObject.activityLoggedAttr2", 1,
&loggerArg[0], "Setter"); |
2575 } | 2777 } |
2576 TestObjectV8Internal::activityLoggedAttr2AttributeSetter(jsValue, info); | 2778 TestObjectV8Internal::activityLoggedAttr2AttributeSetter(jsValue, info); |
2577 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2779 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2578 } | 2780 } |
2579 | 2781 |
2580 static void activityLoggedAttr2AttributeGetterForMainWorld(const v8::PropertyCal
lbackInfo<v8::Value>& info) | 2782 static void activityLoggedAttr2AttributeGetterForMainWorld(const v8::PropertyCal
lbackInfo<v8::Value>& info) |
2581 { | 2783 { |
2582 TestObject* impl = V8TestObject::toNative(info.Holder()); | 2784 v8::Handle<v8::Object> holder = info.Holder(); |
| 2785 TestObject* impl = V8TestObject::toNative(holder); |
2583 v8SetReturnValueInt(info, impl->activityLoggedAttr2()); | 2786 v8SetReturnValueInt(info, impl->activityLoggedAttr2()); |
2584 } | 2787 } |
2585 | 2788 |
2586 static void activityLoggedAttr2AttributeGetterCallbackForMainWorld(v8::Local<v8:
:String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2789 static void activityLoggedAttr2AttributeGetterCallbackForMainWorld(v8::Local<v8:
:String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
2587 { | 2790 { |
2588 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2791 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2589 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 2792 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
2590 if (contextData && contextData->activityLogger()) | 2793 if (contextData && contextData->activityLogger()) |
2591 contextData->activityLogger()->log("TestObject.activityLoggedAttr2", 0,
0, "Getter"); | 2794 contextData->activityLogger()->log("TestObject.activityLoggedAttr2", 0,
0, "Getter"); |
2592 TestObjectV8Internal::activityLoggedAttr2AttributeGetterForMainWorld(info); | 2795 TestObjectV8Internal::activityLoggedAttr2AttributeGetterForMainWorld(info); |
2593 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2796 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2594 } | 2797 } |
2595 | 2798 |
2596 static void activityLoggedAttr2AttributeSetterForMainWorld(v8::Local<v8::Value>
jsValue, const v8::PropertyCallbackInfo<void>& info) | 2799 static void activityLoggedAttr2AttributeSetterForMainWorld(v8::Local<v8::Value>
jsValue, const v8::PropertyCallbackInfo<void>& info) |
2597 { | 2800 { |
2598 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
Attr2", "TestObject", info.Holder(), info.GetIsolate()); | 2801 v8::Isolate* isolate = info.GetIsolate(); |
2599 TestObject* impl = V8TestObject::toNative(info.Holder()); | 2802 v8::Handle<v8::Object> holder = info.Holder(); |
| 2803 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
Attr2", "TestObject", holder, isolate); |
| 2804 TestObject* impl = V8TestObject::toNative(holder); |
2600 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 2805 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); |
2601 impl->setActivityLoggedAttr2(cppValue); | 2806 impl->setActivityLoggedAttr2(cppValue); |
2602 } | 2807 } |
2603 | 2808 |
2604 static void activityLoggedAttr2AttributeSetterCallbackForMainWorld(v8::Local<v8:
:String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& in
fo) | 2809 static void activityLoggedAttr2AttributeSetterCallbackForMainWorld(v8::Local<v8:
:String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& in
fo) |
2605 { | 2810 { |
2606 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2811 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2607 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 2812 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
2608 if (contextData && contextData->activityLogger()) { | 2813 if (contextData && contextData->activityLogger()) { |
2609 v8::Handle<v8::Value> loggerArg[] = { jsValue }; | 2814 v8::Handle<v8::Value> loggerArg[] = { jsValue }; |
2610 contextData->activityLogger()->log("TestObject.activityLoggedAttr2", 1,
&loggerArg[0], "Setter"); | 2815 contextData->activityLogger()->log("TestObject.activityLoggedAttr2", 1,
&loggerArg[0], "Setter"); |
2611 } | 2816 } |
2612 TestObjectV8Internal::activityLoggedAttr2AttributeSetterForMainWorld(jsValue
, info); | 2817 TestObjectV8Internal::activityLoggedAttr2AttributeSetterForMainWorld(jsValue
, info); |
2613 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2818 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2614 } | 2819 } |
2615 | 2820 |
2616 static void activityLoggedInIsolatedWorldsAttrAttributeGetter(const v8::Property
CallbackInfo<v8::Value>& info) | 2821 static void activityLoggedInIsolatedWorldsAttrAttributeGetter(const v8::Property
CallbackInfo<v8::Value>& info) |
2617 { | 2822 { |
2618 TestObject* impl = V8TestObject::toNative(info.Holder()); | 2823 v8::Handle<v8::Object> holder = info.Holder(); |
| 2824 TestObject* impl = V8TestObject::toNative(holder); |
2619 v8SetReturnValueInt(info, impl->activityLoggedInIsolatedWorldsAttr()); | 2825 v8SetReturnValueInt(info, impl->activityLoggedInIsolatedWorldsAttr()); |
2620 } | 2826 } |
2621 | 2827 |
2622 static void activityLoggedInIsolatedWorldsAttrAttributeGetterCallback(v8::Local<
v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2828 static void activityLoggedInIsolatedWorldsAttrAttributeGetterCallback(v8::Local<
v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
2623 { | 2829 { |
2624 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2830 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2625 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 2831 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
2626 if (contextData && contextData->activityLogger()) | 2832 if (contextData && contextData->activityLogger()) |
2627 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW
orldsAttr", 0, 0, "Getter"); | 2833 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW
orldsAttr", 0, 0, "Getter"); |
2628 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrAttributeGetter(info
); | 2834 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrAttributeGetter(info
); |
2629 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2835 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2630 } | 2836 } |
2631 | 2837 |
2632 static void activityLoggedInIsolatedWorldsAttrAttributeSetter(v8::Local<v8::Valu
e> jsValue, const v8::PropertyCallbackInfo<void>& info) | 2838 static void activityLoggedInIsolatedWorldsAttrAttributeSetter(v8::Local<v8::Valu
e> jsValue, const v8::PropertyCallbackInfo<void>& info) |
2633 { | 2839 { |
2634 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
InIsolatedWorldsAttr", "TestObject", info.Holder(), info.GetIsolate()); | 2840 v8::Isolate* isolate = info.GetIsolate(); |
2635 TestObject* impl = V8TestObject::toNative(info.Holder()); | 2841 v8::Handle<v8::Object> holder = info.Holder(); |
| 2842 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
InIsolatedWorldsAttr", "TestObject", holder, isolate); |
| 2843 TestObject* impl = V8TestObject::toNative(holder); |
2636 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 2844 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); |
2637 impl->setActivityLoggedInIsolatedWorldsAttr(cppValue); | 2845 impl->setActivityLoggedInIsolatedWorldsAttr(cppValue); |
2638 } | 2846 } |
2639 | 2847 |
2640 static void activityLoggedInIsolatedWorldsAttrAttributeSetterCallback(v8::Local<
v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>&
info) | 2848 static void activityLoggedInIsolatedWorldsAttrAttributeSetterCallback(v8::Local<
v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>&
info) |
2641 { | 2849 { |
2642 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2850 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2643 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 2851 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
2644 if (contextData && contextData->activityLogger()) { | 2852 if (contextData && contextData->activityLogger()) { |
2645 v8::Handle<v8::Value> loggerArg[] = { jsValue }; | 2853 v8::Handle<v8::Value> loggerArg[] = { jsValue }; |
2646 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW
orldsAttr", 1, &loggerArg[0], "Setter"); | 2854 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW
orldsAttr", 1, &loggerArg[0], "Setter"); |
2647 } | 2855 } |
2648 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrAttributeSetter(jsVa
lue, info); | 2856 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrAttributeSetter(jsVa
lue, info); |
2649 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2857 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2650 } | 2858 } |
2651 | 2859 |
2652 static void activityLoggedInIsolatedWorldsAttrAttributeGetterForMainWorld(const
v8::PropertyCallbackInfo<v8::Value>& info) | 2860 static void activityLoggedInIsolatedWorldsAttrAttributeGetterForMainWorld(const
v8::PropertyCallbackInfo<v8::Value>& info) |
2653 { | 2861 { |
2654 TestObject* impl = V8TestObject::toNative(info.Holder()); | 2862 v8::Handle<v8::Object> holder = info.Holder(); |
| 2863 TestObject* impl = V8TestObject::toNative(holder); |
2655 v8SetReturnValueInt(info, impl->activityLoggedInIsolatedWorldsAttr()); | 2864 v8SetReturnValueInt(info, impl->activityLoggedInIsolatedWorldsAttr()); |
2656 } | 2865 } |
2657 | 2866 |
2658 static void activityLoggedInIsolatedWorldsAttrAttributeGetterCallbackForMainWorl
d(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2867 static void activityLoggedInIsolatedWorldsAttrAttributeGetterCallbackForMainWorl
d(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
2659 { | 2868 { |
2660 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2869 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2661 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrAttributeGetterForMa
inWorld(info); | 2870 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrAttributeGetterForMa
inWorld(info); |
2662 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2871 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2663 } | 2872 } |
2664 | 2873 |
2665 static void activityLoggedInIsolatedWorldsAttrAttributeSetterForMainWorld(v8::Lo
cal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 2874 static void activityLoggedInIsolatedWorldsAttrAttributeSetterForMainWorld(v8::Lo
cal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
2666 { | 2875 { |
2667 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
InIsolatedWorldsAttr", "TestObject", info.Holder(), info.GetIsolate()); | 2876 v8::Isolate* isolate = info.GetIsolate(); |
2668 TestObject* impl = V8TestObject::toNative(info.Holder()); | 2877 v8::Handle<v8::Object> holder = info.Holder(); |
| 2878 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
InIsolatedWorldsAttr", "TestObject", holder, isolate); |
| 2879 TestObject* impl = V8TestObject::toNative(holder); |
2669 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 2880 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); |
2670 impl->setActivityLoggedInIsolatedWorldsAttr(cppValue); | 2881 impl->setActivityLoggedInIsolatedWorldsAttr(cppValue); |
2671 } | 2882 } |
2672 | 2883 |
2673 static void activityLoggedInIsolatedWorldsAttrAttributeSetterCallbackForMainWorl
d(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbac
kInfo<void>& info) | 2884 static void activityLoggedInIsolatedWorldsAttrAttributeSetterCallbackForMainWorl
d(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbac
kInfo<void>& info) |
2674 { | 2885 { |
2675 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2886 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2676 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrAttributeSetterForMa
inWorld(jsValue, info); | 2887 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrAttributeSetterForMa
inWorld(jsValue, info); |
2677 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2888 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2678 } | 2889 } |
2679 | 2890 |
2680 static void activityLoggedAttrSetter1AttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) | 2891 static void activityLoggedAttrSetter1AttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) |
2681 { | 2892 { |
2682 TestObject* impl = V8TestObject::toNative(info.Holder()); | 2893 v8::Handle<v8::Object> holder = info.Holder(); |
| 2894 TestObject* impl = V8TestObject::toNative(holder); |
2683 v8SetReturnValueInt(info, impl->activityLoggedAttrSetter1()); | 2895 v8SetReturnValueInt(info, impl->activityLoggedAttrSetter1()); |
2684 } | 2896 } |
2685 | 2897 |
2686 static void activityLoggedAttrSetter1AttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2898 static void activityLoggedAttrSetter1AttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) |
2687 { | 2899 { |
2688 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2900 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2689 TestObjectV8Internal::activityLoggedAttrSetter1AttributeGetter(info); | 2901 TestObjectV8Internal::activityLoggedAttrSetter1AttributeGetter(info); |
2690 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2902 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2691 } | 2903 } |
2692 | 2904 |
2693 static void activityLoggedAttrSetter1AttributeSetter(v8::Local<v8::Value> jsValu
e, const v8::PropertyCallbackInfo<void>& info) | 2905 static void activityLoggedAttrSetter1AttributeSetter(v8::Local<v8::Value> jsValu
e, const v8::PropertyCallbackInfo<void>& info) |
2694 { | 2906 { |
2695 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
AttrSetter1", "TestObject", info.Holder(), info.GetIsolate()); | 2907 v8::Isolate* isolate = info.GetIsolate(); |
2696 TestObject* impl = V8TestObject::toNative(info.Holder()); | 2908 v8::Handle<v8::Object> holder = info.Holder(); |
| 2909 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
AttrSetter1", "TestObject", holder, isolate); |
| 2910 TestObject* impl = V8TestObject::toNative(holder); |
2697 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 2911 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); |
2698 impl->setActivityLoggedAttrSetter1(cppValue); | 2912 impl->setActivityLoggedAttrSetter1(cppValue); |
2699 } | 2913 } |
2700 | 2914 |
2701 static void activityLoggedAttrSetter1AttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 2915 static void activityLoggedAttrSetter1AttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
2702 { | 2916 { |
2703 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2917 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2704 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 2918 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
2705 if (contextData && contextData->activityLogger()) { | 2919 if (contextData && contextData->activityLogger()) { |
2706 v8::Handle<v8::Value> loggerArg[] = { jsValue }; | 2920 v8::Handle<v8::Value> loggerArg[] = { jsValue }; |
2707 contextData->activityLogger()->log("TestObject.activityLoggedAttrSetter1
", 1, &loggerArg[0], "Setter"); | 2921 contextData->activityLogger()->log("TestObject.activityLoggedAttrSetter1
", 1, &loggerArg[0], "Setter"); |
2708 } | 2922 } |
2709 TestObjectV8Internal::activityLoggedAttrSetter1AttributeSetter(jsValue, info
); | 2923 TestObjectV8Internal::activityLoggedAttrSetter1AttributeSetter(jsValue, info
); |
2710 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2924 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2711 } | 2925 } |
2712 | 2926 |
2713 static void activityLoggedAttrSetter2AttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) | 2927 static void activityLoggedAttrSetter2AttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) |
2714 { | 2928 { |
2715 TestObject* impl = V8TestObject::toNative(info.Holder()); | 2929 v8::Handle<v8::Object> holder = info.Holder(); |
| 2930 TestObject* impl = V8TestObject::toNative(holder); |
2716 v8SetReturnValueInt(info, impl->activityLoggedAttrSetter2()); | 2931 v8SetReturnValueInt(info, impl->activityLoggedAttrSetter2()); |
2717 } | 2932 } |
2718 | 2933 |
2719 static void activityLoggedAttrSetter2AttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2934 static void activityLoggedAttrSetter2AttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) |
2720 { | 2935 { |
2721 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2936 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2722 TestObjectV8Internal::activityLoggedAttrSetter2AttributeGetter(info); | 2937 TestObjectV8Internal::activityLoggedAttrSetter2AttributeGetter(info); |
2723 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2938 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2724 } | 2939 } |
2725 | 2940 |
2726 static void activityLoggedAttrSetter2AttributeSetter(v8::Local<v8::Value> jsValu
e, const v8::PropertyCallbackInfo<void>& info) | 2941 static void activityLoggedAttrSetter2AttributeSetter(v8::Local<v8::Value> jsValu
e, const v8::PropertyCallbackInfo<void>& info) |
2727 { | 2942 { |
2728 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
AttrSetter2", "TestObject", info.Holder(), info.GetIsolate()); | 2943 v8::Isolate* isolate = info.GetIsolate(); |
2729 TestObject* impl = V8TestObject::toNative(info.Holder()); | 2944 v8::Handle<v8::Object> holder = info.Holder(); |
| 2945 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
AttrSetter2", "TestObject", holder, isolate); |
| 2946 TestObject* impl = V8TestObject::toNative(holder); |
2730 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 2947 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); |
2731 impl->setActivityLoggedAttrSetter2(cppValue); | 2948 impl->setActivityLoggedAttrSetter2(cppValue); |
2732 } | 2949 } |
2733 | 2950 |
2734 static void activityLoggedAttrSetter2AttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 2951 static void activityLoggedAttrSetter2AttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
2735 { | 2952 { |
2736 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2953 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2737 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 2954 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
2738 if (contextData && contextData->activityLogger()) { | 2955 if (contextData && contextData->activityLogger()) { |
2739 v8::Handle<v8::Value> loggerArg[] = { jsValue }; | 2956 v8::Handle<v8::Value> loggerArg[] = { jsValue }; |
2740 contextData->activityLogger()->log("TestObject.activityLoggedAttrSetter2
", 1, &loggerArg[0], "Setter"); | 2957 contextData->activityLogger()->log("TestObject.activityLoggedAttrSetter2
", 1, &loggerArg[0], "Setter"); |
2741 } | 2958 } |
2742 TestObjectV8Internal::activityLoggedAttrSetter2AttributeSetter(jsValue, info
); | 2959 TestObjectV8Internal::activityLoggedAttrSetter2AttributeSetter(jsValue, info
); |
2743 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2960 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2744 } | 2961 } |
2745 | 2962 |
2746 static void activityLoggedAttrSetter2AttributeGetterForMainWorld(const v8::Prope
rtyCallbackInfo<v8::Value>& info) | 2963 static void activityLoggedAttrSetter2AttributeGetterForMainWorld(const v8::Prope
rtyCallbackInfo<v8::Value>& info) |
2747 { | 2964 { |
2748 TestObject* impl = V8TestObject::toNative(info.Holder()); | 2965 v8::Handle<v8::Object> holder = info.Holder(); |
| 2966 TestObject* impl = V8TestObject::toNative(holder); |
2749 v8SetReturnValueInt(info, impl->activityLoggedAttrSetter2()); | 2967 v8SetReturnValueInt(info, impl->activityLoggedAttrSetter2()); |
2750 } | 2968 } |
2751 | 2969 |
2752 static void activityLoggedAttrSetter2AttributeGetterCallbackForMainWorld(v8::Loc
al<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2970 static void activityLoggedAttrSetter2AttributeGetterCallbackForMainWorld(v8::Loc
al<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
2753 { | 2971 { |
2754 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2972 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2755 TestObjectV8Internal::activityLoggedAttrSetter2AttributeGetterForMainWorld(i
nfo); | 2973 TestObjectV8Internal::activityLoggedAttrSetter2AttributeGetterForMainWorld(i
nfo); |
2756 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2974 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2757 } | 2975 } |
2758 | 2976 |
2759 static void activityLoggedAttrSetter2AttributeSetterForMainWorld(v8::Local<v8::V
alue> jsValue, const v8::PropertyCallbackInfo<void>& info) | 2977 static void activityLoggedAttrSetter2AttributeSetterForMainWorld(v8::Local<v8::V
alue> jsValue, const v8::PropertyCallbackInfo<void>& info) |
2760 { | 2978 { |
2761 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
AttrSetter2", "TestObject", info.Holder(), info.GetIsolate()); | 2979 v8::Isolate* isolate = info.GetIsolate(); |
2762 TestObject* impl = V8TestObject::toNative(info.Holder()); | 2980 v8::Handle<v8::Object> holder = info.Holder(); |
| 2981 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
AttrSetter2", "TestObject", holder, isolate); |
| 2982 TestObject* impl = V8TestObject::toNative(holder); |
2763 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 2983 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); |
2764 impl->setActivityLoggedAttrSetter2(cppValue); | 2984 impl->setActivityLoggedAttrSetter2(cppValue); |
2765 } | 2985 } |
2766 | 2986 |
2767 static void activityLoggedAttrSetter2AttributeSetterCallbackForMainWorld(v8::Loc
al<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<voi
d>& info) | 2987 static void activityLoggedAttrSetter2AttributeSetterCallbackForMainWorld(v8::Loc
al<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<voi
d>& info) |
2768 { | 2988 { |
2769 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2989 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2770 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 2990 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
2771 if (contextData && contextData->activityLogger()) { | 2991 if (contextData && contextData->activityLogger()) { |
2772 v8::Handle<v8::Value> loggerArg[] = { jsValue }; | 2992 v8::Handle<v8::Value> loggerArg[] = { jsValue }; |
2773 contextData->activityLogger()->log("TestObject.activityLoggedAttrSetter2
", 1, &loggerArg[0], "Setter"); | 2993 contextData->activityLogger()->log("TestObject.activityLoggedAttrSetter2
", 1, &loggerArg[0], "Setter"); |
2774 } | 2994 } |
2775 TestObjectV8Internal::activityLoggedAttrSetter2AttributeSetterForMainWorld(j
sValue, info); | 2995 TestObjectV8Internal::activityLoggedAttrSetter2AttributeSetterForMainWorld(j
sValue, info); |
2776 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2996 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2777 } | 2997 } |
2778 | 2998 |
2779 static void activityLoggedInIsolatedWorldsAttrSetterAttributeGetter(const v8::Pr
opertyCallbackInfo<v8::Value>& info) | 2999 static void activityLoggedInIsolatedWorldsAttrSetterAttributeGetter(const v8::Pr
opertyCallbackInfo<v8::Value>& info) |
2780 { | 3000 { |
2781 TestObject* impl = V8TestObject::toNative(info.Holder()); | 3001 v8::Handle<v8::Object> holder = info.Holder(); |
| 3002 TestObject* impl = V8TestObject::toNative(holder); |
2782 v8SetReturnValueInt(info, impl->activityLoggedInIsolatedWorldsAttrSetter()); | 3003 v8SetReturnValueInt(info, impl->activityLoggedInIsolatedWorldsAttrSetter()); |
2783 } | 3004 } |
2784 | 3005 |
2785 static void activityLoggedInIsolatedWorldsAttrSetterAttributeGetterCallback(v8::
Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 3006 static void activityLoggedInIsolatedWorldsAttrSetterAttributeGetterCallback(v8::
Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
2786 { | 3007 { |
2787 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 3008 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2788 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrSetterAttributeGette
r(info); | 3009 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrSetterAttributeGette
r(info); |
2789 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3010 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2790 } | 3011 } |
2791 | 3012 |
2792 static void activityLoggedInIsolatedWorldsAttrSetterAttributeSetter(v8::Local<v8
::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 3013 static void activityLoggedInIsolatedWorldsAttrSetterAttributeSetter(v8::Local<v8
::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
2793 { | 3014 { |
2794 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
InIsolatedWorldsAttrSetter", "TestObject", info.Holder(), info.GetIsolate()); | 3015 v8::Isolate* isolate = info.GetIsolate(); |
2795 TestObject* impl = V8TestObject::toNative(info.Holder()); | 3016 v8::Handle<v8::Object> holder = info.Holder(); |
| 3017 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
InIsolatedWorldsAttrSetter", "TestObject", holder, isolate); |
| 3018 TestObject* impl = V8TestObject::toNative(holder); |
2796 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 3019 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); |
2797 impl->setActivityLoggedInIsolatedWorldsAttrSetter(cppValue); | 3020 impl->setActivityLoggedInIsolatedWorldsAttrSetter(cppValue); |
2798 } | 3021 } |
2799 | 3022 |
2800 static void activityLoggedInIsolatedWorldsAttrSetterAttributeSetterCallback(v8::
Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<
void>& info) | 3023 static void activityLoggedInIsolatedWorldsAttrSetterAttributeSetterCallback(v8::
Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<
void>& info) |
2801 { | 3024 { |
2802 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 3025 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2803 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 3026 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
2804 if (contextData && contextData->activityLogger()) { | 3027 if (contextData && contextData->activityLogger()) { |
2805 v8::Handle<v8::Value> loggerArg[] = { jsValue }; | 3028 v8::Handle<v8::Value> loggerArg[] = { jsValue }; |
2806 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW
orldsAttrSetter", 1, &loggerArg[0], "Setter"); | 3029 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW
orldsAttrSetter", 1, &loggerArg[0], "Setter"); |
2807 } | 3030 } |
2808 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrSetterAttributeSette
r(jsValue, info); | 3031 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrSetterAttributeSette
r(jsValue, info); |
2809 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3032 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2810 } | 3033 } |
2811 | 3034 |
2812 static void activityLoggedInIsolatedWorldsAttrSetterAttributeGetterForMainWorld(
const v8::PropertyCallbackInfo<v8::Value>& info) | 3035 static void activityLoggedInIsolatedWorldsAttrSetterAttributeGetterForMainWorld(
const v8::PropertyCallbackInfo<v8::Value>& info) |
2813 { | 3036 { |
2814 TestObject* impl = V8TestObject::toNative(info.Holder()); | 3037 v8::Handle<v8::Object> holder = info.Holder(); |
| 3038 TestObject* impl = V8TestObject::toNative(holder); |
2815 v8SetReturnValueInt(info, impl->activityLoggedInIsolatedWorldsAttrSetter()); | 3039 v8SetReturnValueInt(info, impl->activityLoggedInIsolatedWorldsAttrSetter()); |
2816 } | 3040 } |
2817 | 3041 |
2818 static void activityLoggedInIsolatedWorldsAttrSetterAttributeGetterCallbackForMa
inWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 3042 static void activityLoggedInIsolatedWorldsAttrSetterAttributeGetterCallbackForMa
inWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
2819 { | 3043 { |
2820 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 3044 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2821 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrSetterAttributeGette
rForMainWorld(info); | 3045 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrSetterAttributeGette
rForMainWorld(info); |
2822 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3046 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2823 } | 3047 } |
2824 | 3048 |
2825 static void activityLoggedInIsolatedWorldsAttrSetterAttributeSetterForMainWorld(
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 3049 static void activityLoggedInIsolatedWorldsAttrSetterAttributeSetterForMainWorld(
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
2826 { | 3050 { |
2827 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
InIsolatedWorldsAttrSetter", "TestObject", info.Holder(), info.GetIsolate()); | 3051 v8::Isolate* isolate = info.GetIsolate(); |
2828 TestObject* impl = V8TestObject::toNative(info.Holder()); | 3052 v8::Handle<v8::Object> holder = info.Holder(); |
| 3053 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
InIsolatedWorldsAttrSetter", "TestObject", holder, isolate); |
| 3054 TestObject* impl = V8TestObject::toNative(holder); |
2829 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 3055 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); |
2830 impl->setActivityLoggedInIsolatedWorldsAttrSetter(cppValue); | 3056 impl->setActivityLoggedInIsolatedWorldsAttrSetter(cppValue); |
2831 } | 3057 } |
2832 | 3058 |
2833 static void activityLoggedInIsolatedWorldsAttrSetterAttributeSetterCallbackForMa
inWorld(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyC
allbackInfo<void>& info) | 3059 static void activityLoggedInIsolatedWorldsAttrSetterAttributeSetterCallbackForMa
inWorld(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyC
allbackInfo<void>& info) |
2834 { | 3060 { |
2835 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 3061 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2836 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrSetterAttributeSette
rForMainWorld(jsValue, info); | 3062 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrSetterAttributeSette
rForMainWorld(jsValue, info); |
2837 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3063 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2838 } | 3064 } |
2839 | 3065 |
2840 static void activityLoggedAttrGetter1AttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) | 3066 static void activityLoggedAttrGetter1AttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) |
2841 { | 3067 { |
2842 TestObject* impl = V8TestObject::toNative(info.Holder()); | 3068 v8::Handle<v8::Object> holder = info.Holder(); |
| 3069 TestObject* impl = V8TestObject::toNative(holder); |
2843 v8SetReturnValueInt(info, impl->activityLoggedAttrGetter1()); | 3070 v8SetReturnValueInt(info, impl->activityLoggedAttrGetter1()); |
2844 } | 3071 } |
2845 | 3072 |
2846 static void activityLoggedAttrGetter1AttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) | 3073 static void activityLoggedAttrGetter1AttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) |
2847 { | 3074 { |
2848 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 3075 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2849 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 3076 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
2850 if (contextData && contextData->activityLogger()) | 3077 if (contextData && contextData->activityLogger()) |
2851 contextData->activityLogger()->log("TestObject.activityLoggedAttrGetter1
", 0, 0, "Getter"); | 3078 contextData->activityLogger()->log("TestObject.activityLoggedAttrGetter1
", 0, 0, "Getter"); |
2852 TestObjectV8Internal::activityLoggedAttrGetter1AttributeGetter(info); | 3079 TestObjectV8Internal::activityLoggedAttrGetter1AttributeGetter(info); |
2853 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3080 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2854 } | 3081 } |
2855 | 3082 |
2856 static void activityLoggedAttrGetter1AttributeSetter(v8::Local<v8::Value> jsValu
e, const v8::PropertyCallbackInfo<void>& info) | 3083 static void activityLoggedAttrGetter1AttributeSetter(v8::Local<v8::Value> jsValu
e, const v8::PropertyCallbackInfo<void>& info) |
2857 { | 3084 { |
2858 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
AttrGetter1", "TestObject", info.Holder(), info.GetIsolate()); | 3085 v8::Isolate* isolate = info.GetIsolate(); |
2859 TestObject* impl = V8TestObject::toNative(info.Holder()); | 3086 v8::Handle<v8::Object> holder = info.Holder(); |
| 3087 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
AttrGetter1", "TestObject", holder, isolate); |
| 3088 TestObject* impl = V8TestObject::toNative(holder); |
2860 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 3089 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); |
2861 impl->setActivityLoggedAttrGetter1(cppValue); | 3090 impl->setActivityLoggedAttrGetter1(cppValue); |
2862 } | 3091 } |
2863 | 3092 |
2864 static void activityLoggedAttrGetter1AttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 3093 static void activityLoggedAttrGetter1AttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
2865 { | 3094 { |
2866 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 3095 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2867 TestObjectV8Internal::activityLoggedAttrGetter1AttributeSetter(jsValue, info
); | 3096 TestObjectV8Internal::activityLoggedAttrGetter1AttributeSetter(jsValue, info
); |
2868 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3097 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2869 } | 3098 } |
2870 | 3099 |
2871 static void activityLoggedAttrGetter2AttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) | 3100 static void activityLoggedAttrGetter2AttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) |
2872 { | 3101 { |
2873 TestObject* impl = V8TestObject::toNative(info.Holder()); | 3102 v8::Handle<v8::Object> holder = info.Holder(); |
| 3103 TestObject* impl = V8TestObject::toNative(holder); |
2874 v8SetReturnValueInt(info, impl->activityLoggedAttrGetter2()); | 3104 v8SetReturnValueInt(info, impl->activityLoggedAttrGetter2()); |
2875 } | 3105 } |
2876 | 3106 |
2877 static void activityLoggedAttrGetter2AttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) | 3107 static void activityLoggedAttrGetter2AttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) |
2878 { | 3108 { |
2879 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 3109 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2880 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 3110 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
2881 if (contextData && contextData->activityLogger()) | 3111 if (contextData && contextData->activityLogger()) |
2882 contextData->activityLogger()->log("TestObject.activityLoggedAttrGetter2
", 0, 0, "Getter"); | 3112 contextData->activityLogger()->log("TestObject.activityLoggedAttrGetter2
", 0, 0, "Getter"); |
2883 TestObjectV8Internal::activityLoggedAttrGetter2AttributeGetter(info); | 3113 TestObjectV8Internal::activityLoggedAttrGetter2AttributeGetter(info); |
2884 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3114 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2885 } | 3115 } |
2886 | 3116 |
2887 static void activityLoggedAttrGetter2AttributeSetter(v8::Local<v8::Value> jsValu
e, const v8::PropertyCallbackInfo<void>& info) | 3117 static void activityLoggedAttrGetter2AttributeSetter(v8::Local<v8::Value> jsValu
e, const v8::PropertyCallbackInfo<void>& info) |
2888 { | 3118 { |
2889 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
AttrGetter2", "TestObject", info.Holder(), info.GetIsolate()); | 3119 v8::Isolate* isolate = info.GetIsolate(); |
2890 TestObject* impl = V8TestObject::toNative(info.Holder()); | 3120 v8::Handle<v8::Object> holder = info.Holder(); |
| 3121 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
AttrGetter2", "TestObject", holder, isolate); |
| 3122 TestObject* impl = V8TestObject::toNative(holder); |
2891 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 3123 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); |
2892 impl->setActivityLoggedAttrGetter2(cppValue); | 3124 impl->setActivityLoggedAttrGetter2(cppValue); |
2893 } | 3125 } |
2894 | 3126 |
2895 static void activityLoggedAttrGetter2AttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 3127 static void activityLoggedAttrGetter2AttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
2896 { | 3128 { |
2897 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 3129 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2898 TestObjectV8Internal::activityLoggedAttrGetter2AttributeSetter(jsValue, info
); | 3130 TestObjectV8Internal::activityLoggedAttrGetter2AttributeSetter(jsValue, info
); |
2899 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3131 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2900 } | 3132 } |
2901 | 3133 |
2902 static void activityLoggedAttrGetter2AttributeGetterForMainWorld(const v8::Prope
rtyCallbackInfo<v8::Value>& info) | 3134 static void activityLoggedAttrGetter2AttributeGetterForMainWorld(const v8::Prope
rtyCallbackInfo<v8::Value>& info) |
2903 { | 3135 { |
2904 TestObject* impl = V8TestObject::toNative(info.Holder()); | 3136 v8::Handle<v8::Object> holder = info.Holder(); |
| 3137 TestObject* impl = V8TestObject::toNative(holder); |
2905 v8SetReturnValueInt(info, impl->activityLoggedAttrGetter2()); | 3138 v8SetReturnValueInt(info, impl->activityLoggedAttrGetter2()); |
2906 } | 3139 } |
2907 | 3140 |
2908 static void activityLoggedAttrGetter2AttributeGetterCallbackForMainWorld(v8::Loc
al<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 3141 static void activityLoggedAttrGetter2AttributeGetterCallbackForMainWorld(v8::Loc
al<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
2909 { | 3142 { |
2910 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 3143 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2911 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 3144 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
2912 if (contextData && contextData->activityLogger()) | 3145 if (contextData && contextData->activityLogger()) |
2913 contextData->activityLogger()->log("TestObject.activityLoggedAttrGetter2
", 0, 0, "Getter"); | 3146 contextData->activityLogger()->log("TestObject.activityLoggedAttrGetter2
", 0, 0, "Getter"); |
2914 TestObjectV8Internal::activityLoggedAttrGetter2AttributeGetterForMainWorld(i
nfo); | 3147 TestObjectV8Internal::activityLoggedAttrGetter2AttributeGetterForMainWorld(i
nfo); |
2915 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3148 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2916 } | 3149 } |
2917 | 3150 |
2918 static void activityLoggedAttrGetter2AttributeSetterForMainWorld(v8::Local<v8::V
alue> jsValue, const v8::PropertyCallbackInfo<void>& info) | 3151 static void activityLoggedAttrGetter2AttributeSetterForMainWorld(v8::Local<v8::V
alue> jsValue, const v8::PropertyCallbackInfo<void>& info) |
2919 { | 3152 { |
2920 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
AttrGetter2", "TestObject", info.Holder(), info.GetIsolate()); | 3153 v8::Isolate* isolate = info.GetIsolate(); |
2921 TestObject* impl = V8TestObject::toNative(info.Holder()); | 3154 v8::Handle<v8::Object> holder = info.Holder(); |
| 3155 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
AttrGetter2", "TestObject", holder, isolate); |
| 3156 TestObject* impl = V8TestObject::toNative(holder); |
2922 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 3157 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); |
2923 impl->setActivityLoggedAttrGetter2(cppValue); | 3158 impl->setActivityLoggedAttrGetter2(cppValue); |
2924 } | 3159 } |
2925 | 3160 |
2926 static void activityLoggedAttrGetter2AttributeSetterCallbackForMainWorld(v8::Loc
al<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<voi
d>& info) | 3161 static void activityLoggedAttrGetter2AttributeSetterCallbackForMainWorld(v8::Loc
al<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<voi
d>& info) |
2927 { | 3162 { |
2928 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 3163 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2929 TestObjectV8Internal::activityLoggedAttrGetter2AttributeSetterForMainWorld(j
sValue, info); | 3164 TestObjectV8Internal::activityLoggedAttrGetter2AttributeSetterForMainWorld(j
sValue, info); |
2930 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3165 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2931 } | 3166 } |
2932 | 3167 |
2933 static void activityLoggedInIsolatedWorldsAttrGetterAttributeGetter(const v8::Pr
opertyCallbackInfo<v8::Value>& info) | 3168 static void activityLoggedInIsolatedWorldsAttrGetterAttributeGetter(const v8::Pr
opertyCallbackInfo<v8::Value>& info) |
2934 { | 3169 { |
2935 TestObject* impl = V8TestObject::toNative(info.Holder()); | 3170 v8::Handle<v8::Object> holder = info.Holder(); |
| 3171 TestObject* impl = V8TestObject::toNative(holder); |
2936 v8SetReturnValueInt(info, impl->activityLoggedInIsolatedWorldsAttrGetter()); | 3172 v8SetReturnValueInt(info, impl->activityLoggedInIsolatedWorldsAttrGetter()); |
2937 } | 3173 } |
2938 | 3174 |
2939 static void activityLoggedInIsolatedWorldsAttrGetterAttributeGetterCallback(v8::
Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 3175 static void activityLoggedInIsolatedWorldsAttrGetterAttributeGetterCallback(v8::
Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
2940 { | 3176 { |
2941 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 3177 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2942 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 3178 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
2943 if (contextData && contextData->activityLogger()) | 3179 if (contextData && contextData->activityLogger()) |
2944 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW
orldsAttrGetter", 0, 0, "Getter"); | 3180 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW
orldsAttrGetter", 0, 0, "Getter"); |
2945 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttributeGette
r(info); | 3181 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttributeGette
r(info); |
2946 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3182 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2947 } | 3183 } |
2948 | 3184 |
2949 static void activityLoggedInIsolatedWorldsAttrGetterAttributeSetter(v8::Local<v8
::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 3185 static void activityLoggedInIsolatedWorldsAttrGetterAttributeSetter(v8::Local<v8
::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
2950 { | 3186 { |
2951 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
InIsolatedWorldsAttrGetter", "TestObject", info.Holder(), info.GetIsolate()); | 3187 v8::Isolate* isolate = info.GetIsolate(); |
2952 TestObject* impl = V8TestObject::toNative(info.Holder()); | 3188 v8::Handle<v8::Object> holder = info.Holder(); |
| 3189 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
InIsolatedWorldsAttrGetter", "TestObject", holder, isolate); |
| 3190 TestObject* impl = V8TestObject::toNative(holder); |
2953 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 3191 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); |
2954 impl->setActivityLoggedInIsolatedWorldsAttrGetter(cppValue); | 3192 impl->setActivityLoggedInIsolatedWorldsAttrGetter(cppValue); |
2955 } | 3193 } |
2956 | 3194 |
2957 static void activityLoggedInIsolatedWorldsAttrGetterAttributeSetterCallback(v8::
Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<
void>& info) | 3195 static void activityLoggedInIsolatedWorldsAttrGetterAttributeSetterCallback(v8::
Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<
void>& info) |
2958 { | 3196 { |
2959 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 3197 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2960 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttributeSette
r(jsValue, info); | 3198 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttributeSette
r(jsValue, info); |
2961 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3199 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2962 } | 3200 } |
2963 | 3201 |
2964 static void activityLoggedInIsolatedWorldsAttrGetterAttributeGetterForMainWorld(
const v8::PropertyCallbackInfo<v8::Value>& info) | 3202 static void activityLoggedInIsolatedWorldsAttrGetterAttributeGetterForMainWorld(
const v8::PropertyCallbackInfo<v8::Value>& info) |
2965 { | 3203 { |
2966 TestObject* impl = V8TestObject::toNative(info.Holder()); | 3204 v8::Handle<v8::Object> holder = info.Holder(); |
| 3205 TestObject* impl = V8TestObject::toNative(holder); |
2967 v8SetReturnValueInt(info, impl->activityLoggedInIsolatedWorldsAttrGetter()); | 3206 v8SetReturnValueInt(info, impl->activityLoggedInIsolatedWorldsAttrGetter()); |
2968 } | 3207 } |
2969 | 3208 |
2970 static void activityLoggedInIsolatedWorldsAttrGetterAttributeGetterCallbackForMa
inWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 3209 static void activityLoggedInIsolatedWorldsAttrGetterAttributeGetterCallbackForMa
inWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
2971 { | 3210 { |
2972 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 3211 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2973 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttributeGette
rForMainWorld(info); | 3212 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttributeGette
rForMainWorld(info); |
2974 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3213 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2975 } | 3214 } |
2976 | 3215 |
2977 static void activityLoggedInIsolatedWorldsAttrGetterAttributeSetterForMainWorld(
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 3216 static void activityLoggedInIsolatedWorldsAttrGetterAttributeSetterForMainWorld(
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
2978 { | 3217 { |
2979 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
InIsolatedWorldsAttrGetter", "TestObject", info.Holder(), info.GetIsolate()); | 3218 v8::Isolate* isolate = info.GetIsolate(); |
2980 TestObject* impl = V8TestObject::toNative(info.Holder()); | 3219 v8::Handle<v8::Object> holder = info.Holder(); |
| 3220 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
InIsolatedWorldsAttrGetter", "TestObject", holder, isolate); |
| 3221 TestObject* impl = V8TestObject::toNative(holder); |
2981 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 3222 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); |
2982 impl->setActivityLoggedInIsolatedWorldsAttrGetter(cppValue); | 3223 impl->setActivityLoggedInIsolatedWorldsAttrGetter(cppValue); |
2983 } | 3224 } |
2984 | 3225 |
2985 static void activityLoggedInIsolatedWorldsAttrGetterAttributeSetterCallbackForMa
inWorld(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyC
allbackInfo<void>& info) | 3226 static void activityLoggedInIsolatedWorldsAttrGetterAttributeSetterCallbackForMa
inWorld(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyC
allbackInfo<void>& info) |
2986 { | 3227 { |
2987 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 3228 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2988 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttributeSette
rForMainWorld(jsValue, info); | 3229 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttributeSette
rForMainWorld(jsValue, info); |
2989 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3230 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2990 } | 3231 } |
(...skipping 19 matching lines...) Expand all Loading... |
3010 static void deprecatedStaticAttrAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) | 3251 static void deprecatedStaticAttrAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) |
3011 { | 3252 { |
3012 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 3253 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
3013 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use
Counter::StaticAttribute); | 3254 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use
Counter::StaticAttribute); |
3014 TestObjectV8Internal::deprecatedStaticAttrAttributeGetter(info); | 3255 TestObjectV8Internal::deprecatedStaticAttrAttributeGetter(info); |
3015 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3256 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3016 } | 3257 } |
3017 | 3258 |
3018 static void deprecatedStaticAttrAttributeSetter(v8::Local<v8::Value> jsValue, co
nst v8::PropertyCallbackInfo<void>& info) | 3259 static void deprecatedStaticAttrAttributeSetter(v8::Local<v8::Value> jsValue, co
nst v8::PropertyCallbackInfo<void>& info) |
3019 { | 3260 { |
3020 ExceptionState exceptionState(ExceptionState::SetterContext, "deprecatedStat
icAttr", "TestObject", info.Holder(), info.GetIsolate()); | 3261 v8::Isolate* isolate = info.GetIsolate(); |
| 3262 ExceptionState exceptionState(ExceptionState::SetterContext, "deprecatedStat
icAttr", "TestObject", holder, isolate); |
3021 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 3263 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); |
3022 TestObject::setDeprecatedStaticAttr(cppValue); | 3264 TestObject::setDeprecatedStaticAttr(cppValue); |
3023 } | 3265 } |
3024 | 3266 |
3025 static void deprecatedStaticAttrAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 3267 static void deprecatedStaticAttrAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
3026 { | 3268 { |
3027 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 3269 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
3028 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use
Counter::StaticAttribute); | 3270 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use
Counter::StaticAttribute); |
3029 TestObjectV8Internal::deprecatedStaticAttrAttributeSetter(jsValue, info); | 3271 TestObjectV8Internal::deprecatedStaticAttrAttributeSetter(jsValue, info); |
3030 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3272 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3031 } | 3273 } |
3032 | 3274 |
3033 static void deprecatedReadonlyAttrAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) | 3275 static void deprecatedReadonlyAttrAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) |
3034 { | 3276 { |
3035 TestObject* impl = V8TestObject::toNative(info.Holder()); | 3277 v8::Handle<v8::Object> holder = info.Holder(); |
| 3278 TestObject* impl = V8TestObject::toNative(holder); |
3036 v8SetReturnValueInt(info, impl->deprecatedReadonlyAttr()); | 3279 v8SetReturnValueInt(info, impl->deprecatedReadonlyAttr()); |
3037 } | 3280 } |
3038 | 3281 |
3039 static void deprecatedReadonlyAttrAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 3282 static void deprecatedReadonlyAttrAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
3040 { | 3283 { |
3041 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 3284 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
3042 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use
Counter::ReadonlyAttribute); | 3285 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use
Counter::ReadonlyAttribute); |
3043 TestObjectV8Internal::deprecatedReadonlyAttrAttributeGetter(info); | 3286 TestObjectV8Internal::deprecatedReadonlyAttrAttributeGetter(info); |
3044 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3287 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3045 } | 3288 } |
3046 | 3289 |
3047 static void deprecatedAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Val
ue>& info) | 3290 static void deprecatedAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Val
ue>& info) |
3048 { | 3291 { |
3049 TestObject* impl = V8TestObject::toNative(info.Holder()); | 3292 v8::Handle<v8::Object> holder = info.Holder(); |
| 3293 TestObject* impl = V8TestObject::toNative(holder); |
3050 v8SetReturnValueInt(info, impl->deprecatedAttr()); | 3294 v8SetReturnValueInt(info, impl->deprecatedAttr()); |
3051 } | 3295 } |
3052 | 3296 |
3053 static void deprecatedAttrAttributeGetterCallback(v8::Local<v8::String>, const v
8::PropertyCallbackInfo<v8::Value>& info) | 3297 static void deprecatedAttrAttributeGetterCallback(v8::Local<v8::String>, const v
8::PropertyCallbackInfo<v8::Value>& info) |
3054 { | 3298 { |
3055 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 3299 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
3056 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use
Counter::Attribute); | 3300 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use
Counter::Attribute); |
3057 TestObjectV8Internal::deprecatedAttrAttributeGetter(info); | 3301 TestObjectV8Internal::deprecatedAttrAttributeGetter(info); |
3058 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3302 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3059 } | 3303 } |
3060 | 3304 |
3061 static void deprecatedAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8
::PropertyCallbackInfo<void>& info) | 3305 static void deprecatedAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8
::PropertyCallbackInfo<void>& info) |
3062 { | 3306 { |
3063 ExceptionState exceptionState(ExceptionState::SetterContext, "deprecatedAttr
", "TestObject", info.Holder(), info.GetIsolate()); | 3307 v8::Isolate* isolate = info.GetIsolate(); |
3064 TestObject* impl = V8TestObject::toNative(info.Holder()); | 3308 v8::Handle<v8::Object> holder = info.Holder(); |
| 3309 ExceptionState exceptionState(ExceptionState::SetterContext, "deprecatedAttr
", "TestObject", holder, isolate); |
| 3310 TestObject* impl = V8TestObject::toNative(holder); |
3065 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 3311 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); |
3066 impl->setDeprecatedAttr(cppValue); | 3312 impl->setDeprecatedAttr(cppValue); |
3067 } | 3313 } |
3068 | 3314 |
3069 static void deprecatedAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Loc
al<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 3315 static void deprecatedAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Loc
al<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
3070 { | 3316 { |
3071 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 3317 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
3072 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use
Counter::Attribute); | 3318 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use
Counter::Attribute); |
3073 TestObjectV8Internal::deprecatedAttrAttributeSetter(jsValue, info); | 3319 TestObjectV8Internal::deprecatedAttrAttributeSetter(jsValue, info); |
3074 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3320 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3075 } | 3321 } |
3076 | 3322 |
3077 static void locationAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& i
nfo) | 3323 static void locationAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& i
nfo) |
3078 { | 3324 { |
3079 TestObject* impl = V8TestObject::toNative(info.Holder()); | 3325 v8::Handle<v8::Object> holder = info.Holder(); |
| 3326 TestObject* impl = V8TestObject::toNative(holder); |
3080 v8SetReturnValueFast(info, WTF::getPtr(impl->location()), impl); | 3327 v8SetReturnValueFast(info, WTF::getPtr(impl->location()), impl); |
3081 } | 3328 } |
3082 | 3329 |
3083 static void locationAttributeGetterCallback(v8::Local<v8::String>, const v8::Pro
pertyCallbackInfo<v8::Value>& info) | 3330 static void locationAttributeGetterCallback(v8::Local<v8::String>, const v8::Pro
pertyCallbackInfo<v8::Value>& info) |
3084 { | 3331 { |
3085 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 3332 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
3086 TestObjectV8Internal::locationAttributeGetter(info); | 3333 TestObjectV8Internal::locationAttributeGetter(info); |
3087 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3334 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3088 } | 3335 } |
3089 | 3336 |
3090 static void locationAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Prop
ertyCallbackInfo<void>& info) | 3337 static void locationAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Prop
ertyCallbackInfo<void>& info) |
3091 { | 3338 { |
3092 TestObject* proxyImpl = V8TestObject::toNative(info.Holder()); | 3339 v8::Handle<v8::Object> holder = info.Holder(); |
| 3340 TestObject* proxyImpl = V8TestObject::toNative(holder); |
3093 RefPtr<TestNode> impl = WTF::getPtr(proxyImpl->location()); | 3341 RefPtr<TestNode> impl = WTF::getPtr(proxyImpl->location()); |
3094 if (!impl) | 3342 if (!impl) |
3095 return; | 3343 return; |
3096 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 3344 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); |
3097 impl->setHref(cppValue); | 3345 impl->setHref(cppValue); |
3098 } | 3346 } |
3099 | 3347 |
3100 static void locationAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8:
:Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 3348 static void locationAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8:
:Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
3101 { | 3349 { |
3102 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 3350 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
3103 TestObjectV8Internal::locationAttributeSetter(jsValue, info); | 3351 TestObjectV8Internal::locationAttributeSetter(jsValue, info); |
3104 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3352 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3105 } | 3353 } |
3106 | 3354 |
3107 static void locationWithExceptionAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) | 3355 static void locationWithExceptionAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) |
3108 { | 3356 { |
3109 TestObject* impl = V8TestObject::toNative(info.Holder()); | 3357 v8::Handle<v8::Object> holder = info.Holder(); |
| 3358 TestObject* impl = V8TestObject::toNative(holder); |
3110 v8SetReturnValueFast(info, WTF::getPtr(impl->locationWithException()), impl)
; | 3359 v8SetReturnValueFast(info, WTF::getPtr(impl->locationWithException()), impl)
; |
3111 } | 3360 } |
3112 | 3361 |
3113 static void locationWithExceptionAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 3362 static void locationWithExceptionAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
3114 { | 3363 { |
3115 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 3364 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
3116 TestObjectV8Internal::locationWithExceptionAttributeGetter(info); | 3365 TestObjectV8Internal::locationWithExceptionAttributeGetter(info); |
3117 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3366 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3118 } | 3367 } |
3119 | 3368 |
3120 static void locationWithExceptionAttributeSetter(v8::Local<v8::Value> jsValue, c
onst v8::PropertyCallbackInfo<void>& info) | 3369 static void locationWithExceptionAttributeSetter(v8::Local<v8::Value> jsValue, c
onst v8::PropertyCallbackInfo<void>& info) |
3121 { | 3370 { |
3122 TestObject* proxyImpl = V8TestObject::toNative(info.Holder()); | 3371 v8::Handle<v8::Object> holder = info.Holder(); |
| 3372 TestObject* proxyImpl = V8TestObject::toNative(holder); |
3123 RefPtr<TestNode> impl = WTF::getPtr(proxyImpl->locationWithException()); | 3373 RefPtr<TestNode> impl = WTF::getPtr(proxyImpl->locationWithException()); |
3124 if (!impl) | 3374 if (!impl) |
3125 return; | 3375 return; |
3126 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 3376 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); |
3127 impl->setHrefThrows(cppValue); | 3377 impl->setHrefThrows(cppValue); |
3128 } | 3378 } |
3129 | 3379 |
3130 static void locationWithExceptionAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 3380 static void locationWithExceptionAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
3131 { | 3381 { |
3132 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 3382 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
(...skipping 2409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5542 fromInternalPointer(object)->deref(); | 5792 fromInternalPointer(object)->deref(); |
5543 } | 5793 } |
5544 | 5794 |
5545 template<> | 5795 template<> |
5546 v8::Handle<v8::Value> toV8NoInline(TestObject* impl, v8::Handle<v8::Object> crea
tionContext, v8::Isolate* isolate) | 5796 v8::Handle<v8::Value> toV8NoInline(TestObject* impl, v8::Handle<v8::Object> crea
tionContext, v8::Isolate* isolate) |
5547 { | 5797 { |
5548 return toV8(impl, creationContext, isolate); | 5798 return toV8(impl, creationContext, isolate); |
5549 } | 5799 } |
5550 | 5800 |
5551 } // namespace WebCore | 5801 } // namespace WebCore |
OLD | NEW |