| Index: Source/bindings/tests/results/V8TestObjectPython.cpp
|
| diff --git a/Source/bindings/tests/results/V8TestObjectPython.cpp b/Source/bindings/tests/results/V8TestObjectPython.cpp
|
| index 0223e130b1a927a6deb34f33bd94eeddf5636441..c9b0e1a6727fcca30ad5453a2e4178258614f668 100644
|
| --- a/Source/bindings/tests/results/V8TestObjectPython.cpp
|
| +++ b/Source/bindings/tests/results/V8TestObjectPython.cpp
|
| @@ -2676,6 +2676,43 @@ static void locationWithPerWorldBindingsAttributeSetterCallbackForMainWorld(v8::
|
| TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
|
| }
|
|
|
| +static void locationWillBeGarbageCollectedAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
|
| +{
|
| + TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
|
| + RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> result(impl->locationWillBeGarbageCollected());
|
| + if (result && DOMDataStore::setReturnValueFromWrapper<V8TestInterfaceWillBeGarbageCollected>(info.GetReturnValue(), result.get()))
|
| + return;
|
| + v8::Handle<v8::Value> wrapper = toV8(result.get(), info.Holder(), info.GetIsolate());
|
| + if (!wrapper.IsEmpty()) {
|
| + V8HiddenValue::setHiddenValue(info.GetIsolate(), info.Holder(), v8AtomicString(info.GetIsolate(), "locationWillBeGarbageCollected"), wrapper);
|
| + v8SetReturnValue(info, wrapper);
|
| + }
|
| +}
|
| +
|
| +static void locationWillBeGarbageCollectedAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
|
| +{
|
| + TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
|
| + TestObjectPythonV8Internal::locationWillBeGarbageCollectedAttributeGetter(info);
|
| + TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
|
| +}
|
| +
|
| +static void locationWillBeGarbageCollectedAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
|
| +{
|
| + TestObjectPython* proxyImpl = V8TestObjectPython::toNative(info.Holder());
|
| + RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> impl = WTF::getPtr(proxyImpl->locationWillBeGarbageCollected());
|
| + if (!impl)
|
| + return;
|
| + V8TRYCATCH_VOID(TestInterfaceWillBeGarbageCollected*, cppValue, V8TestInterfaceWillBeGarbageCollected::toNativeWithTypeCheck(info.GetIsolate(), jsValue));
|
| + impl->setAttr1(WTF::getPtr(cppValue));
|
| +}
|
| +
|
| +static void locationWillBeGarbageCollectedAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
|
| +{
|
| + TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
|
| + TestObjectPythonV8Internal::locationWillBeGarbageCollectedAttributeSetter(jsValue, info);
|
| + TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
|
| +}
|
| +
|
| static void raisesExceptionLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
|
| {
|
| TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
|
| @@ -7377,6 +7414,7 @@ static const V8DOMConfiguration::AttributeConfiguration V8TestObjectPythonAttrib
|
| {"locationWithException", TestObjectPythonV8Internal::locationWithExceptionAttributeGetterCallback, TestObjectPythonV8Internal::locationWithExceptionAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
|
| {"locationWithCallWith", TestObjectPythonV8Internal::locationWithCallWithAttributeGetterCallback, TestObjectPythonV8Internal::locationWithCallWithAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
|
| {"locationWithPerWorldBindings", TestObjectPythonV8Internal::locationWithPerWorldBindingsAttributeGetterCallback, TestObjectPythonV8Internal::locationWithPerWorldBindingsAttributeSetterCallback, TestObjectPythonV8Internal::locationWithPerWorldBindingsAttributeGetterCallbackForMainWorld, TestObjectPythonV8Internal::locationWithPerWorldBindingsAttributeSetterCallbackForMainWorld, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
|
| + {"locationWillBeGarbageCollected", TestObjectPythonV8Internal::locationWillBeGarbageCollectedAttributeGetterCallback, TestObjectPythonV8Internal::locationWillBeGarbageCollectedAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
|
| {"raisesExceptionLongAttribute", TestObjectPythonV8Internal::raisesExceptionLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::raisesExceptionLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
|
| {"raisesExceptionGetterLongAttribute", TestObjectPythonV8Internal::raisesExceptionGetterLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::raisesExceptionGetterLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
|
| {"setterRaisesExceptionLongAttribute", TestObjectPythonV8Internal::setterRaisesExceptionLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::setterRaisesExceptionLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
|
|
|