| Index: Source/bindings/tests/results/V8TestInterfacePython.cpp
|
| diff --git a/Source/bindings/tests/results/V8TestInterfacePython.cpp b/Source/bindings/tests/results/V8TestInterfacePython.cpp
|
| index f38941832577faea693911c8257a003eebd29f51..dadcc249c3428e0c9fdaa51a81dd26662575664b 100644
|
| --- a/Source/bindings/tests/results/V8TestInterfacePython.cpp
|
| +++ b/Source/bindings/tests/results/V8TestInterfacePython.cpp
|
| @@ -364,6 +364,39 @@ static void implementsRuntimeEnabledNodeAttributeAttributeSetterCallback(v8::Loc
|
| TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
|
| }
|
|
|
| +static void implementsPerContextEnabledNodeAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
|
| +{
|
| + TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(info.Holder());
|
| + v8SetReturnValueFast(info, TestImplements::implementsPerContextEnabledNodeAttribute(imp), imp);
|
| +}
|
| +
|
| +static void implementsPerContextEnabledNodeAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
|
| +{
|
| + TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
|
| + TestInterfacePythonImplementationV8Internal::implementsPerContextEnabledNodeAttributeAttributeGetter(info);
|
| + TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
|
| +}
|
| +
|
| +static void implementsPerContextEnabledNodeAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
|
| +{
|
| + ExceptionState exceptionState(ExceptionState::SetterContext, "implementsPerContextEnabledNodeAttribute", "TestInterfacePython", info.Holder(), info.GetIsolate());
|
| + if (!isUndefinedOrNull(jsValue) && !V8Node::hasInstance(jsValue, info.GetIsolate())) {
|
| + exceptionState.throwTypeError("The provided value is not of type 'Node'.");
|
| + exceptionState.throwIfNeeded();
|
| + return;
|
| + }
|
| + TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(info.Holder());
|
| + V8TRYCATCH_VOID(Node*, cppValue, V8Node::hasInstance(jsValue, info.GetIsolate()) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(jsValue)) : 0);
|
| + TestImplements::setImplementsPerContextEnabledNodeAttribute(imp, WTF::getPtr(cppValue));
|
| +}
|
| +
|
| +static void implementsPerContextEnabledNodeAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
|
| +{
|
| + TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
|
| + TestInterfacePythonImplementationV8Internal::implementsPerContextEnabledNodeAttributeAttributeSetter(jsValue, info);
|
| + TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
|
| +}
|
| +
|
| static void implements2StaticStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
|
| {
|
| v8SetReturnValueString(info, TestImplements2Implementation::implements2StaticStringAttribute(), info.GetIsolate());
|
| @@ -1030,6 +1063,16 @@ bool V8TestInterfacePython::hasInstance(v8::Handle<v8::Value> jsValue, v8::Isola
|
| || V8PerIsolateData::from(isolate)->hasInstanceInNonMainWorld(&wrapperTypeInfo, jsValue);
|
| }
|
|
|
| +void V8TestInterfacePython::installPerContextEnabledProperties(v8::Handle<v8::Object> instanceTemplate, TestInterfacePythonImplementation* impl, v8::Isolate* isolate)
|
| +{
|
| + v8::Local<v8::Object> prototypeTemplate = v8::Local<v8::Object>::Cast(instanceTemplate->GetPrototype());
|
| + if (ContextFeatures::implementsContextNameEnabled(impl->document())) {
|
| + static const V8DOMConfiguration::AttributeConfiguration attributeConfiguration =\
|
| + {"implementsPerContextEnabledNodeAttribute", TestInterfacePythonImplementationV8Internal::implementsPerContextEnabledNodeAttributeAttributeGetterCallback, TestInterfacePythonImplementationV8Internal::implementsPerContextEnabledNodeAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */};
|
| + V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate, attributeConfiguration, isolate);
|
| + }
|
| +}
|
| +
|
| ActiveDOMObject* V8TestInterfacePython::toActiveDOMObject(v8::Handle<v8::Object> wrapper)
|
| {
|
| return toNative(wrapper);
|
|
|