| Index: Source/bindings/tests/results/V8TestObjectPython.cpp
|
| diff --git a/Source/bindings/tests/results/V8TestObjectPython.cpp b/Source/bindings/tests/results/V8TestObjectPython.cpp
|
| index e622fee554ba000b98888d873474d98cd9d8d580..c889cb80dba15937e6abc8c51249661c747b5023 100644
|
| --- a/Source/bindings/tests/results/V8TestObjectPython.cpp
|
| +++ b/Source/bindings/tests/results/V8TestObjectPython.cpp
|
| @@ -1028,16 +1028,16 @@ static void raisesExceptionReadonlyLongAttributeAttributeGetterCallback(v8::Loca
|
| TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
|
| }
|
|
|
| -static void enabledAtRuntimeReadonlyLongAttributeAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
|
| +static void runtimeEnabledReadonlyLongAttributeAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
|
| {
|
| TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
|
| - v8SetReturnValueInt(info, imp->enabledAtRuntimeReadonlyLongAttribute());
|
| + v8SetReturnValueInt(info, imp->runtimeEnabledReadonlyLongAttribute());
|
| }
|
|
|
| -static void enabledAtRuntimeReadonlyLongAttributeAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
|
| +static void runtimeEnabledReadonlyLongAttributeAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
|
| {
|
| TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
|
| - TestObjectPythonV8Internal::enabledAtRuntimeReadonlyLongAttributeAttributeGetter(name, info);
|
| + TestObjectPythonV8Internal::runtimeEnabledReadonlyLongAttributeAttributeGetter(name, info);
|
| TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
|
| }
|
|
|
| @@ -1058,6 +1058,19 @@ static void conditionalEnabledAtRuntimeReadonlyLongAttributeAttributeGetterCallb
|
| }
|
| #endif // ENABLE(Condition)
|
|
|
| +static void perContextEnabledReadonlyLongAttributeAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
|
| +{
|
| + TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
|
| + v8SetReturnValueInt(info, imp->perContextEnabledReadonlyLongAttribute());
|
| +}
|
| +
|
| +static void perContextEnabledReadonlyLongAttributeAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
|
| +{
|
| + TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
|
| + TestObjectPythonV8Internal::perContextEnabledReadonlyLongAttributeAttributeGetter(name, info);
|
| + TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
|
| +}
|
| +
|
| } // namespace TestObjectPythonV8Internal
|
|
|
| static const V8DOMConfiguration::AttributeConfiguration V8TestObjectPythonAttributes[] = {
|
| @@ -1154,7 +1167,7 @@ static v8::Handle<v8::FunctionTemplate> ConfigureV8TestObjectPythonTemplate(v8::
|
| UNUSED_PARAM(proto);
|
| if (RuntimeEnabledFeatures::featureNameEnabled()) {
|
| static const V8DOMConfiguration::AttributeConfiguration attributeConfiguration =\
|
| - {"enabledAtRuntimeReadonlyLongAttribute", TestObjectPythonV8Internal::enabledAtRuntimeReadonlyLongAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */};
|
| + {"runtimeEnabledReadonlyLongAttribute", TestObjectPythonV8Internal::runtimeEnabledReadonlyLongAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */};
|
| V8DOMConfiguration::installAttribute(instance, proto, attributeConfiguration, isolate, currentWorldType);
|
| }
|
| #if ENABLE(Condition)
|
| @@ -1199,6 +1212,16 @@ bool V8TestObjectPython::HasInstanceInAnyWorld(v8::Handle<v8::Value> value, v8::
|
| || V8PerIsolateData::from(isolate)->hasInstance(&info, value, WorkerWorld);
|
| }
|
|
|
| +void V8TestObjectPython::installPerContextProperties(v8::Handle<v8::Object> instance, TestObjectPython* impl, v8::Isolate* isolate)
|
| +{
|
| + v8::Local<v8::Object> proto = v8::Local<v8::Object>::Cast(instance->GetPrototype());
|
| + if (ContextFeatures::featureNameEnabled(impl->document())) {
|
| + static const V8DOMConfiguration::AttributeConfiguration attributeConfiguration =\
|
| + {"perContextEnabledReadonlyLongAttribute", TestObjectPythonV8Internal::perContextEnabledReadonlyLongAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */};
|
| + V8DOMConfiguration::installAttribute(instance, proto, attributeConfiguration, isolate);
|
| + }
|
| +}
|
| +
|
| v8::Handle<v8::Object> V8TestObjectPython::createWrapper(PassRefPtr<TestObjectPython> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
|
| {
|
| ASSERT(impl);
|
|
|