| 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 "bindings/core/v8/BindingSecurity.h" | 10 #include "bindings/core/v8/BindingSecurity.h" |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 149 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 150 } | 150 } |
| 151 | 151 |
| 152 static void readonlyTestInterfaceEmptyAttributeAttributeGetter(const v8::Propert
yCallbackInfo<v8::Value>& info) | 152 static void readonlyTestInterfaceEmptyAttributeAttributeGetter(const v8::Propert
yCallbackInfo<v8::Value>& info) |
| 153 { | 153 { |
| 154 v8::Local<v8::Object> holder = info.Holder(); | 154 v8::Local<v8::Object> holder = info.Holder(); |
| 155 TestObject* impl = V8TestObject::toImpl(holder); | 155 TestObject* impl = V8TestObject::toImpl(holder); |
| 156 RefPtr<TestInterfaceEmpty> cppValue(impl->readonlyTestInterfaceEmptyAttribut
e()); | 156 RefPtr<TestInterfaceEmpty> cppValue(impl->readonlyTestInterfaceEmptyAttribut
e()); |
| 157 if (cppValue && DOMDataStore::setReturnValue(info.GetReturnValue(), cppValue
.get())) | 157 if (cppValue && DOMDataStore::setReturnValue(info.GetReturnValue(), cppValue
.get())) |
| 158 return; | 158 return; |
| 159 v8::Local<v8::Value> wrapper = toV8(cppValue.get(), holder, info.GetIsolate(
)); | 159 v8::Local<v8::Value> v8Value(toV8(cppValue.get(), holder, info.GetIsolate())
); |
| 160 if (!wrapper.IsEmpty()) { | 160 if (!v8Value.IsEmpty()) { |
| 161 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, v8AtomicString(
info.GetIsolate(), "readonlyTestInterfaceEmptyAttribute"), wrapper); | 161 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, v8AtomicString(
info.GetIsolate(), "readonlyTestInterfaceEmptyAttribute"), v8Value); |
| 162 v8SetReturnValue(info, wrapper); | 162 v8SetReturnValue(info, v8Value); |
| 163 } | 163 } |
| 164 } | 164 } |
| 165 | 165 |
| 166 static void readonlyTestInterfaceEmptyAttributeAttributeGetterCallback(v8::Local
<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 166 static void readonlyTestInterfaceEmptyAttributeAttributeGetterCallback(v8::Local
<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 167 { | 167 { |
| 168 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 168 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 169 TestObjectV8Internal::readonlyTestInterfaceEmptyAttributeAttributeGetter(inf
o); | 169 TestObjectV8Internal::readonlyTestInterfaceEmptyAttributeAttributeGetter(inf
o); |
| 170 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 170 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 171 } | 171 } |
| 172 | 172 |
| (...skipping 1994 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2167 v8::Local<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "cach
edAttributeAnyAttribute"); | 2167 v8::Local<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "cach
edAttributeAnyAttribute"); |
| 2168 TestObject* impl = V8TestObject::toImpl(holder); | 2168 TestObject* impl = V8TestObject::toImpl(holder); |
| 2169 if (!impl->isValueDirty()) { | 2169 if (!impl->isValueDirty()) { |
| 2170 v8::Local<v8::Value> v8Value = V8HiddenValue::getHiddenValue(info.GetIso
late(), holder, propertyName); | 2170 v8::Local<v8::Value> v8Value = V8HiddenValue::getHiddenValue(info.GetIso
late(), holder, propertyName); |
| 2171 if (!v8Value.IsEmpty()) { | 2171 if (!v8Value.IsEmpty()) { |
| 2172 v8SetReturnValue(info, v8Value); | 2172 v8SetReturnValue(info, v8Value); |
| 2173 return; | 2173 return; |
| 2174 } | 2174 } |
| 2175 } | 2175 } |
| 2176 ScriptValue cppValue(impl->cachedAttributeAnyAttribute()); | 2176 ScriptValue cppValue(impl->cachedAttributeAnyAttribute()); |
| 2177 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, propertyName, cppVa
lue.v8Value()); | 2177 v8::Local<v8::Value> v8Value(cppValue.v8Value()); |
| 2178 v8SetReturnValue(info, cppValue.v8Value()); | 2178 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, propertyName, v8Val
ue); |
| 2179 v8SetReturnValue(info, v8Value); |
| 2179 } | 2180 } |
| 2180 | 2181 |
| 2181 static void cachedAttributeAnyAttributeAttributeGetterCallback(v8::Local<v8::Str
ing>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2182 static void cachedAttributeAnyAttributeAttributeGetterCallback(v8::Local<v8::Str
ing>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2182 { | 2183 { |
| 2183 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 2184 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 2184 TestObjectV8Internal::cachedAttributeAnyAttributeAttributeGetter(info); | 2185 TestObjectV8Internal::cachedAttributeAnyAttributeAttributeGetter(info); |
| 2185 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2186 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2186 } | 2187 } |
| 2187 | 2188 |
| 2188 static void cachedAttributeAnyAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::PropertyCallbackInfo<void>& info) | 2189 static void cachedAttributeAnyAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::PropertyCallbackInfo<void>& info) |
| (...skipping 18 matching lines...) Expand all Loading... |
| 2207 v8::Local<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "cach
edArrayAttribute"); | 2208 v8::Local<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "cach
edArrayAttribute"); |
| 2208 TestObject* impl = V8TestObject::toImpl(holder); | 2209 TestObject* impl = V8TestObject::toImpl(holder); |
| 2209 if (!impl->isArrayDirty()) { | 2210 if (!impl->isArrayDirty()) { |
| 2210 v8::Local<v8::Value> v8Value = V8HiddenValue::getHiddenValue(info.GetIso
late(), holder, propertyName); | 2211 v8::Local<v8::Value> v8Value = V8HiddenValue::getHiddenValue(info.GetIso
late(), holder, propertyName); |
| 2211 if (!v8Value.IsEmpty()) { | 2212 if (!v8Value.IsEmpty()) { |
| 2212 v8SetReturnValue(info, v8Value); | 2213 v8SetReturnValue(info, v8Value); |
| 2213 return; | 2214 return; |
| 2214 } | 2215 } |
| 2215 } | 2216 } |
| 2216 Vector<String> cppValue(impl->cachedArrayAttribute()); | 2217 Vector<String> cppValue(impl->cachedArrayAttribute()); |
| 2217 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, propertyName, toV8(
cppValue, info.Holder(), info.GetIsolate())); | 2218 v8::Local<v8::Value> v8Value(toV8(cppValue, info.Holder(), info.GetIsolate()
)); |
| 2218 v8SetReturnValue(info, toV8(cppValue, info.Holder(), info.GetIsolate())); | 2219 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, propertyName, v8Val
ue); |
| 2220 v8SetReturnValue(info, v8Value); |
| 2219 } | 2221 } |
| 2220 | 2222 |
| 2221 static void cachedArrayAttributeAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) | 2223 static void cachedArrayAttributeAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) |
| 2222 { | 2224 { |
| 2223 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 2225 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 2224 TestObjectV8Internal::cachedArrayAttributeAttributeGetter(info); | 2226 TestObjectV8Internal::cachedArrayAttributeAttributeGetter(info); |
| 2225 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2227 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2226 } | 2228 } |
| 2227 | 2229 |
| 2228 static void cachedArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::PropertyCallbackInfo<void>& info) | 2230 static void cachedArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::PropertyCallbackInfo<void>& info) |
| (...skipping 21 matching lines...) Expand all Loading... |
| 2250 v8::Local<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "cach
edStringOrNoneAttribute"); | 2252 v8::Local<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "cach
edStringOrNoneAttribute"); |
| 2251 TestObject* impl = V8TestObject::toImpl(holder); | 2253 TestObject* impl = V8TestObject::toImpl(holder); |
| 2252 if (!impl->isStringDirty()) { | 2254 if (!impl->isStringDirty()) { |
| 2253 v8::Local<v8::Value> v8Value = V8HiddenValue::getHiddenValue(info.GetIso
late(), holder, propertyName); | 2255 v8::Local<v8::Value> v8Value = V8HiddenValue::getHiddenValue(info.GetIso
late(), holder, propertyName); |
| 2254 if (!v8Value.IsEmpty()) { | 2256 if (!v8Value.IsEmpty()) { |
| 2255 v8SetReturnValue(info, v8Value); | 2257 v8SetReturnValue(info, v8Value); |
| 2256 return; | 2258 return; |
| 2257 } | 2259 } |
| 2258 } | 2260 } |
| 2259 String cppValue(impl->cachedStringOrNoneAttribute()); | 2261 String cppValue(impl->cachedStringOrNoneAttribute()); |
| 2260 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, propertyName, cppVa
lue.isNull() ? v8::Local<v8::Value>(v8::Null(info.GetIsolate())) : v8String(info
.GetIsolate(), cppValue)); | 2262 v8::Local<v8::Value> v8Value(cppValue.isNull() ? v8::Local<v8::Value>(v8::Nu
ll(info.GetIsolate())) : v8String(info.GetIsolate(), cppValue)); |
| 2261 v8SetReturnValueStringOrNull(info, cppValue, info.GetIsolate()); | 2263 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, propertyName, v8Val
ue); |
| 2264 v8SetReturnValue(info, v8Value); |
| 2262 } | 2265 } |
| 2263 | 2266 |
| 2264 static void cachedStringOrNoneAttributeAttributeGetterCallback(v8::Local<v8::Str
ing>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2267 static void cachedStringOrNoneAttributeAttributeGetterCallback(v8::Local<v8::Str
ing>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2265 { | 2268 { |
| 2266 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 2269 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 2267 TestObjectV8Internal::cachedStringOrNoneAttributeAttributeGetter(info); | 2270 TestObjectV8Internal::cachedStringOrNoneAttributeAttributeGetter(info); |
| 2268 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2271 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2269 } | 2272 } |
| 2270 | 2273 |
| 2271 static void cachedStringOrNoneAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::PropertyCallbackInfo<void>& info) | 2274 static void cachedStringOrNoneAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::PropertyCallbackInfo<void>& info) |
| (...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2867 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2870 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2868 } | 2871 } |
| 2869 | 2872 |
| 2870 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetter(c
onst v8::PropertyCallbackInfo<v8::Value>& info) | 2873 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetter(c
onst v8::PropertyCallbackInfo<v8::Value>& info) |
| 2871 { | 2874 { |
| 2872 v8::Local<v8::Object> holder = info.Holder(); | 2875 v8::Local<v8::Object> holder = info.Holder(); |
| 2873 TestObject* impl = V8TestObject::toImpl(holder); | 2876 TestObject* impl = V8TestObject::toImpl(holder); |
| 2874 RefPtr<TestInterfaceEmpty> cppValue(impl->perWorldBindingsReadonlyTestInterf
aceEmptyAttribute()); | 2877 RefPtr<TestInterfaceEmpty> cppValue(impl->perWorldBindingsReadonlyTestInterf
aceEmptyAttribute()); |
| 2875 if (cppValue && DOMDataStore::setReturnValue(info.GetReturnValue(), cppValue
.get())) | 2878 if (cppValue && DOMDataStore::setReturnValue(info.GetReturnValue(), cppValue
.get())) |
| 2876 return; | 2879 return; |
| 2877 v8::Local<v8::Value> wrapper = toV8(cppValue.get(), holder, info.GetIsolate(
)); | 2880 v8::Local<v8::Value> v8Value(toV8(cppValue.get(), holder, info.GetIsolate())
); |
| 2878 if (!wrapper.IsEmpty()) { | 2881 if (!v8Value.IsEmpty()) { |
| 2879 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, v8AtomicString(
info.GetIsolate(), "perWorldBindingsReadonlyTestInterfaceEmptyAttribute"), wrapp
er); | 2882 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, v8AtomicString(
info.GetIsolate(), "perWorldBindingsReadonlyTestInterfaceEmptyAttribute"), v8Val
ue); |
| 2880 v8SetReturnValue(info, wrapper); | 2883 v8SetReturnValue(info, v8Value); |
| 2881 } | 2884 } |
| 2882 } | 2885 } |
| 2883 | 2886 |
| 2884 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCa
llback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2887 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCa
llback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2885 { | 2888 { |
| 2886 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 2889 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 2887 TestObjectV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttributeAtt
ributeGetter(info); | 2890 TestObjectV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttributeAtt
ributeGetter(info); |
| 2888 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2891 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2889 } | 2892 } |
| 2890 | 2893 |
| 2891 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterFo
rMainWorld(const v8::PropertyCallbackInfo<v8::Value>& info) | 2894 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterFo
rMainWorld(const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2892 { | 2895 { |
| 2893 v8::Local<v8::Object> holder = info.Holder(); | 2896 v8::Local<v8::Object> holder = info.Holder(); |
| 2894 TestObject* impl = V8TestObject::toImpl(holder); | 2897 TestObject* impl = V8TestObject::toImpl(holder); |
| 2895 RefPtr<TestInterfaceEmpty> cppValue(impl->perWorldBindingsReadonlyTestInterf
aceEmptyAttribute()); | 2898 RefPtr<TestInterfaceEmpty> cppValue(impl->perWorldBindingsReadonlyTestInterf
aceEmptyAttribute()); |
| 2896 if (cppValue && DOMDataStore::setReturnValueForMainWorld(info.GetReturnValue
(), cppValue.get())) | 2899 if (cppValue && DOMDataStore::setReturnValueForMainWorld(info.GetReturnValue
(), cppValue.get())) |
| 2897 return; | 2900 return; |
| 2898 v8::Local<v8::Value> wrapper = toV8(cppValue.get(), holder, info.GetIsolate(
)); | 2901 v8::Local<v8::Value> v8Value(toV8(cppValue.get(), holder, info.GetIsolate())
); |
| 2899 if (!wrapper.IsEmpty()) { | 2902 if (!v8Value.IsEmpty()) { |
| 2900 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, v8AtomicString(
info.GetIsolate(), "perWorldBindingsReadonlyTestInterfaceEmptyAttribute"), wrapp
er); | 2903 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, v8AtomicString(
info.GetIsolate(), "perWorldBindingsReadonlyTestInterfaceEmptyAttribute"), v8Val
ue); |
| 2901 v8SetReturnValue(info, wrapper); | 2904 v8SetReturnValue(info, v8Value); |
| 2902 } | 2905 } |
| 2903 } | 2906 } |
| 2904 | 2907 |
| 2905 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCa
llbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Val
ue>& info) | 2908 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCa
llbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Val
ue>& info) |
| 2906 { | 2909 { |
| 2907 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 2910 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 2908 TestObjectV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttributeAtt
ributeGetterForMainWorld(info); | 2911 TestObjectV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttributeAtt
ributeGetterForMainWorld(info); |
| 2909 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2912 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2910 } | 2913 } |
| 2911 | 2914 |
| (...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3446 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3449 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3447 } | 3450 } |
| 3448 | 3451 |
| 3449 static void locationGarbageCollectedAttributeGetter(const v8::PropertyCallbackIn
fo<v8::Value>& info) | 3452 static void locationGarbageCollectedAttributeGetter(const v8::PropertyCallbackIn
fo<v8::Value>& info) |
| 3450 { | 3453 { |
| 3451 v8::Local<v8::Object> holder = info.Holder(); | 3454 v8::Local<v8::Object> holder = info.Holder(); |
| 3452 TestObject* impl = V8TestObject::toImpl(holder); | 3455 TestObject* impl = V8TestObject::toImpl(holder); |
| 3453 RawPtr<TestInterfaceGarbageCollected> cppValue(impl->locationGarbageCollecte
d()); | 3456 RawPtr<TestInterfaceGarbageCollected> cppValue(impl->locationGarbageCollecte
d()); |
| 3454 if (cppValue && DOMDataStore::setReturnValue(info.GetReturnValue(), cppValue
.get())) | 3457 if (cppValue && DOMDataStore::setReturnValue(info.GetReturnValue(), cppValue
.get())) |
| 3455 return; | 3458 return; |
| 3456 v8::Local<v8::Value> wrapper = toV8(cppValue.get(), holder, info.GetIsolate(
)); | 3459 v8::Local<v8::Value> v8Value(toV8(cppValue.get(), holder, info.GetIsolate())
); |
| 3457 if (!wrapper.IsEmpty()) { | 3460 if (!v8Value.IsEmpty()) { |
| 3458 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, v8AtomicString(
info.GetIsolate(), "locationGarbageCollected"), wrapper); | 3461 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, v8AtomicString(
info.GetIsolate(), "locationGarbageCollected"), v8Value); |
| 3459 v8SetReturnValue(info, wrapper); | 3462 v8SetReturnValue(info, v8Value); |
| 3460 } | 3463 } |
| 3461 } | 3464 } |
| 3462 | 3465 |
| 3463 static void locationGarbageCollectedAttributeGetterCallback(v8::Local<v8::String
>, const v8::PropertyCallbackInfo<v8::Value>& info) | 3466 static void locationGarbageCollectedAttributeGetterCallback(v8::Local<v8::String
>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 3464 { | 3467 { |
| 3465 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 3468 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 3466 TestObjectV8Internal::locationGarbageCollectedAttributeGetter(info); | 3469 TestObjectV8Internal::locationGarbageCollectedAttributeGetter(info); |
| 3467 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3470 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3468 } | 3471 } |
| 3469 | 3472 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 3485 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3488 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3486 } | 3489 } |
| 3487 | 3490 |
| 3488 static void locationWillBeGarbageCollectedAttributeGetter(const v8::PropertyCall
backInfo<v8::Value>& info) | 3491 static void locationWillBeGarbageCollectedAttributeGetter(const v8::PropertyCall
backInfo<v8::Value>& info) |
| 3489 { | 3492 { |
| 3490 v8::Local<v8::Object> holder = info.Holder(); | 3493 v8::Local<v8::Object> holder = info.Holder(); |
| 3491 TestObject* impl = V8TestObject::toImpl(holder); | 3494 TestObject* impl = V8TestObject::toImpl(holder); |
| 3492 RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> cppValue(impl->locat
ionWillBeGarbageCollected()); | 3495 RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> cppValue(impl->locat
ionWillBeGarbageCollected()); |
| 3493 if (cppValue && DOMDataStore::setReturnValue(info.GetReturnValue(), cppValue
.get())) | 3496 if (cppValue && DOMDataStore::setReturnValue(info.GetReturnValue(), cppValue
.get())) |
| 3494 return; | 3497 return; |
| 3495 v8::Local<v8::Value> wrapper = toV8(cppValue.get(), holder, info.GetIsolate(
)); | 3498 v8::Local<v8::Value> v8Value(toV8(cppValue.get(), holder, info.GetIsolate())
); |
| 3496 if (!wrapper.IsEmpty()) { | 3499 if (!v8Value.IsEmpty()) { |
| 3497 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, v8AtomicString(
info.GetIsolate(), "locationWillBeGarbageCollected"), wrapper); | 3500 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, v8AtomicString(
info.GetIsolate(), "locationWillBeGarbageCollected"), v8Value); |
| 3498 v8SetReturnValue(info, wrapper); | 3501 v8SetReturnValue(info, v8Value); |
| 3499 } | 3502 } |
| 3500 } | 3503 } |
| 3501 | 3504 |
| 3502 static void locationWillBeGarbageCollectedAttributeGetterCallback(v8::Local<v8::
String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 3505 static void locationWillBeGarbageCollectedAttributeGetterCallback(v8::Local<v8::
String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 3503 { | 3506 { |
| 3504 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 3507 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 3505 TestObjectV8Internal::locationWillBeGarbageCollectedAttributeGetter(info); | 3508 TestObjectV8Internal::locationWillBeGarbageCollectedAttributeGetter(info); |
| 3506 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3509 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3507 } | 3510 } |
| 3508 | 3511 |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3674 v8::Local<v8::Value> v8Value = V8HiddenValue::getHiddenValue(info.GetIso
late(), holder, propertyName); | 3677 v8::Local<v8::Value> v8Value = V8HiddenValue::getHiddenValue(info.GetIso
late(), holder, propertyName); |
| 3675 if (!v8Value.IsEmpty()) { | 3678 if (!v8Value.IsEmpty()) { |
| 3676 v8SetReturnValue(info, v8Value); | 3679 v8SetReturnValue(info, v8Value); |
| 3677 return; | 3680 return; |
| 3678 } | 3681 } |
| 3679 } | 3682 } |
| 3680 ExceptionState exceptionState(ExceptionState::GetterContext, "cachedAttribut
eRaisesExceptionGetterAnyAttribute", "TestObject", holder, info.GetIsolate()); | 3683 ExceptionState exceptionState(ExceptionState::GetterContext, "cachedAttribut
eRaisesExceptionGetterAnyAttribute", "TestObject", holder, info.GetIsolate()); |
| 3681 ScriptValue cppValue(impl->cachedAttributeRaisesExceptionGetterAnyAttribute(
exceptionState)); | 3684 ScriptValue cppValue(impl->cachedAttributeRaisesExceptionGetterAnyAttribute(
exceptionState)); |
| 3682 if (UNLIKELY(exceptionState.throwIfNeeded())) | 3685 if (UNLIKELY(exceptionState.throwIfNeeded())) |
| 3683 return; | 3686 return; |
| 3684 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, propertyName, cppVa
lue.v8Value()); | 3687 v8::Local<v8::Value> v8Value(cppValue.v8Value()); |
| 3685 v8SetReturnValue(info, cppValue.v8Value()); | 3688 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, propertyName, v8Val
ue); |
| 3689 v8SetReturnValue(info, v8Value); |
| 3686 } | 3690 } |
| 3687 | 3691 |
| 3688 static void cachedAttributeRaisesExceptionGetterAnyAttributeAttributeGetterCallb
ack(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 3692 static void cachedAttributeRaisesExceptionGetterAnyAttributeAttributeGetterCallb
ack(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 3689 { | 3693 { |
| 3690 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 3694 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 3691 TestObjectV8Internal::cachedAttributeRaisesExceptionGetterAnyAttributeAttrib
uteGetter(info); | 3695 TestObjectV8Internal::cachedAttributeRaisesExceptionGetterAnyAttributeAttrib
uteGetter(info); |
| 3692 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3696 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3693 } | 3697 } |
| 3694 | 3698 |
| 3695 static void cachedAttributeRaisesExceptionGetterAnyAttributeAttributeSetter(v8::
Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 3699 static void cachedAttributeRaisesExceptionGetterAnyAttributeAttributeSetter(v8::
Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| (...skipping 1065 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4761 v8::Local<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "cach
edTreatReturnedNullStringAsUndefinedStringAttribute"); | 4765 v8::Local<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "cach
edTreatReturnedNullStringAsUndefinedStringAttribute"); |
| 4762 TestObject* impl = V8TestObject::toImpl(holder); | 4766 TestObject* impl = V8TestObject::toImpl(holder); |
| 4763 if (!impl->isStringDirty()) { | 4767 if (!impl->isStringDirty()) { |
| 4764 v8::Local<v8::Value> v8Value = V8HiddenValue::getHiddenValue(info.GetIso
late(), holder, propertyName); | 4768 v8::Local<v8::Value> v8Value = V8HiddenValue::getHiddenValue(info.GetIso
late(), holder, propertyName); |
| 4765 if (!v8Value.IsEmpty()) { | 4769 if (!v8Value.IsEmpty()) { |
| 4766 v8SetReturnValue(info, v8Value); | 4770 v8SetReturnValue(info, v8Value); |
| 4767 return; | 4771 return; |
| 4768 } | 4772 } |
| 4769 } | 4773 } |
| 4770 String cppValue(impl->cachedTreatReturnedNullStringAsUndefinedStringAttribut
e()); | 4774 String cppValue(impl->cachedTreatReturnedNullStringAsUndefinedStringAttribut
e()); |
| 4771 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, propertyName, cppVa
lue.isNull() ? v8Undefined() : v8String(info.GetIsolate(), cppValue)); | 4775 v8::Local<v8::Value> v8Value(cppValue.isNull() ? v8Undefined() : v8String(in
fo.GetIsolate(), cppValue)); |
| 4772 v8SetReturnValueStringOrUndefined(info, cppValue, info.GetIsolate()); | 4776 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, propertyName, v8Val
ue); |
| 4777 v8SetReturnValue(info, v8Value); |
| 4773 } | 4778 } |
| 4774 | 4779 |
| 4775 static void cachedTreatReturnedNullStringAsUndefinedStringAttributeAttributeGett
erCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& inf
o) | 4780 static void cachedTreatReturnedNullStringAsUndefinedStringAttributeAttributeGett
erCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& inf
o) |
| 4776 { | 4781 { |
| 4777 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 4782 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 4778 TestObjectV8Internal::cachedTreatReturnedNullStringAsUndefinedStringAttribut
eAttributeGetter(info); | 4783 TestObjectV8Internal::cachedTreatReturnedNullStringAsUndefinedStringAttribut
eAttributeGetter(info); |
| 4779 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4784 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4780 } | 4785 } |
| 4781 | 4786 |
| 4782 static void cachedTreatReturnedNullStringAsUndefinedStringAttributeAttributeSett
er(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 4787 static void cachedTreatReturnedNullStringAsUndefinedStringAttributeAttributeSett
er(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| (...skipping 8368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13151 return false; | 13156 return false; |
| 13152 | 13157 |
| 13153 ScriptState::Scope scope(scriptState); | 13158 ScriptState::Scope scope(scriptState); |
| 13154 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa
l(), scriptState->isolate()); | 13159 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa
l(), scriptState->isolate()); |
| 13155 | 13160 |
| 13156 ExceptionState exceptionState(ExceptionState::SetterContext, "enumForPrivate
Script", "TestObject", scriptState->context()->Global(), scriptState->isolate())
; | 13161 ExceptionState exceptionState(ExceptionState::SetterContext, "enumForPrivate
Script", "TestObject", scriptState->context()->Global(), scriptState->isolate())
; |
| 13157 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn
UserScript, "TestObject", "enumForPrivateScript", holder, v8String(scriptState->
isolate(), cppValue)); | 13162 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn
UserScript, "TestObject", "enumForPrivateScript", holder, v8String(scriptState->
isolate(), cppValue)); |
| 13158 } | 13163 } |
| 13159 | 13164 |
| 13160 } // namespace blink | 13165 } // namespace blink |
| OLD | NEW |