Index: Source/bindings/tests/results/V8TestObjectPython.cpp |
diff --git a/Source/bindings/tests/results/V8TestObjectPython.cpp b/Source/bindings/tests/results/V8TestObjectPython.cpp |
index cc5b6aae48bf152f7c7bae04bc584929cb257557..303a4efb71bea013f2815a9275ad45b0c67ca99b 100644 |
--- a/Source/bindings/tests/results/V8TestObjectPython.cpp |
+++ b/Source/bindings/tests/results/V8TestObjectPython.cpp |
@@ -40,6 +40,7 @@ |
#include "bindings/v8/ExceptionMessages.h" |
#include "bindings/v8/ExceptionState.h" |
#include "bindings/v8/ScriptController.h" |
+#include "bindings/v8/ScriptValue.h" |
#include "bindings/v8/SerializedScriptValue.h" |
#include "bindings/v8/V8AbstractEventListener.h" |
#include "bindings/v8/V8Binding.h" |
@@ -87,6 +88,52 @@ namespace TestObjectPythonV8Internal { |
template <typename T> void V8_USE(T) { } |
+static void readonlyStringAttributeAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
+{ |
+ TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); |
+ v8SetReturnValueString(info, imp->readonlyStringAttribute(), info.GetIsolate()); |
+} |
+ |
+static void readonlyStringAttributeAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
+{ |
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
+ TestObjectPythonV8Internal::readonlyStringAttributeAttributeGetter(name, info); |
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
+} |
+ |
+static void readonlyTestInterfaceEmptyAttributeAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
+{ |
+ TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); |
+ RefPtr<TestInterfaceEmpty> result = imp->readonlyTestInterfaceEmptyAttribute(); |
+ if (result && DOMDataStore::setReturnValueFromWrapper<V8TestInterfaceEmpty>(info.GetReturnValue(), result.get())) |
+ return; |
+ v8::Handle<v8::Value> wrapper = toV8(result.get(), info.Holder(), info.GetIsolate()); |
+ if (!wrapper.IsEmpty()) { |
+ V8HiddenPropertyName::setNamedHiddenReference(info.Holder(), "readonlyTestInterfaceEmptyAttribute", wrapper); |
+ v8SetReturnValue(info, wrapper); |
+ } |
+} |
+ |
+static void readonlyTestInterfaceEmptyAttributeAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
+{ |
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
+ TestObjectPythonV8Internal::readonlyTestInterfaceEmptyAttributeAttributeGetter(name, info); |
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
+} |
+ |
+static void readonlyLongAttributeAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
+{ |
+ TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); |
+ v8SetReturnValueInt(info, imp->readonlyLongAttribute()); |
+} |
+ |
+static void readonlyLongAttributeAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
+{ |
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
+ TestObjectPythonV8Internal::readonlyLongAttributeAttributeGetter(name, info); |
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
+} |
+ |
static void readonlyDateAttributeAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
{ |
TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); |
@@ -126,146 +173,300 @@ static void readonlyDOMTimeStampAttributeAttributeGetterCallback(v8::Local<v8::S |
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
} |
-static void readonlyBooleanAttributeAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
+static void booleanAttributeAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
{ |
TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); |
- v8SetReturnValueBool(info, imp->readonlyBooleanAttribute()); |
+ v8SetReturnValueBool(info, imp->booleanAttribute()); |
} |
-static void readonlyBooleanAttributeAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
+static void booleanAttributeAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
{ |
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
- TestObjectPythonV8Internal::readonlyBooleanAttributeAttributeGetter(name, info); |
+ TestObjectPythonV8Internal::booleanAttributeAttributeGetter(name, info); |
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
} |
-static void readonlyByteAttributeAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
+static void booleanAttributeAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
{ |
TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); |
- v8SetReturnValueInt(info, imp->readonlyByteAttribute()); |
+ V8TRYCATCH_VOID(bool, v, value->BooleanValue()); |
+ imp->setBooleanAttribute(v); |
} |
-static void readonlyByteAttributeAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
+static void booleanAttributeAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
+{ |
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
+ TestObjectPythonV8Internal::booleanAttributeAttributeSetter(name, value, info); |
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
+} |
+ |
+static void byteAttributeAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
+{ |
+ TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); |
+ v8SetReturnValueInt(info, imp->byteAttribute()); |
+} |
+ |
+static void byteAttributeAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
{ |
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
- TestObjectPythonV8Internal::readonlyByteAttributeAttributeGetter(name, info); |
+ TestObjectPythonV8Internal::byteAttributeAttributeGetter(name, info); |
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
} |
-static void readonlyDoubleAttributeAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
+static void byteAttributeAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
{ |
TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); |
- v8SetReturnValue(info, imp->readonlyDoubleAttribute()); |
+ V8TRYCATCH_VOID(int, v, toInt8(value)); |
+ imp->setByteAttribute(v); |
} |
-static void readonlyDoubleAttributeAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
+static void byteAttributeAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
+{ |
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
+ TestObjectPythonV8Internal::byteAttributeAttributeSetter(name, value, info); |
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
+} |
+ |
+static void doubleAttributeAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
+{ |
+ TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); |
+ v8SetReturnValue(info, imp->doubleAttribute()); |
+} |
+ |
+static void doubleAttributeAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
{ |
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
- TestObjectPythonV8Internal::readonlyDoubleAttributeAttributeGetter(name, info); |
+ TestObjectPythonV8Internal::doubleAttributeAttributeGetter(name, info); |
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
+} |
+ |
+static void doubleAttributeAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
+{ |
+ TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); |
+ V8TRYCATCH_VOID(double, v, static_cast<double>(value->NumberValue())); |
+ imp->setDoubleAttribute(v); |
+} |
+ |
+static void doubleAttributeAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
+{ |
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
+ TestObjectPythonV8Internal::doubleAttributeAttributeSetter(name, value, info); |
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
} |
-static void readonlyFloatAttributeAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
+static void floatAttributeAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
{ |
TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); |
- v8SetReturnValue(info, imp->readonlyFloatAttribute()); |
+ v8SetReturnValue(info, imp->floatAttribute()); |
} |
-static void readonlyFloatAttributeAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
+static void floatAttributeAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
{ |
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
- TestObjectPythonV8Internal::readonlyFloatAttributeAttributeGetter(name, info); |
+ TestObjectPythonV8Internal::floatAttributeAttributeGetter(name, info); |
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
} |
-static void readonlyLongAttributeAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
+static void floatAttributeAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
{ |
TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); |
- v8SetReturnValueInt(info, imp->readonlyLongAttribute()); |
+ V8TRYCATCH_VOID(float, v, static_cast<float>(value->NumberValue())); |
+ imp->setFloatAttribute(v); |
} |
-static void readonlyLongAttributeAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
+static void floatAttributeAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
+{ |
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
+ TestObjectPythonV8Internal::floatAttributeAttributeSetter(name, value, info); |
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
+} |
+ |
+static void longAttributeAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
+{ |
+ TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); |
+ v8SetReturnValueInt(info, imp->longAttribute()); |
+} |
+ |
+static void longAttributeAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
{ |
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
- TestObjectPythonV8Internal::readonlyLongAttributeAttributeGetter(name, info); |
+ TestObjectPythonV8Internal::longAttributeAttributeGetter(name, info); |
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
} |
-static void readonlyLongLongAttributeAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
+static void longAttributeAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
{ |
TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); |
- v8SetReturnValue(info, static_cast<double>(imp->readonlyLongLongAttribute())); |
+ V8TRYCATCH_VOID(int, v, toInt32(value)); |
+ imp->setLongAttribute(v); |
} |
-static void readonlyLongLongAttributeAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
+static void longAttributeAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
+{ |
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
+ TestObjectPythonV8Internal::longAttributeAttributeSetter(name, value, info); |
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
+} |
+ |
+static void longLongAttributeAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
+{ |
+ TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); |
+ v8SetReturnValue(info, static_cast<double>(imp->longLongAttribute())); |
+} |
+ |
+static void longLongAttributeAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
{ |
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
- TestObjectPythonV8Internal::readonlyLongLongAttributeAttributeGetter(name, info); |
+ TestObjectPythonV8Internal::longLongAttributeAttributeGetter(name, info); |
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
+} |
+ |
+static void longLongAttributeAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
+{ |
+ TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); |
+ V8TRYCATCH_VOID(long long, v, toInt64(value)); |
+ imp->setLongLongAttribute(v); |
+} |
+ |
+static void longLongAttributeAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
+{ |
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
+ TestObjectPythonV8Internal::longLongAttributeAttributeSetter(name, value, info); |
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
} |
-static void readonlyOctetAttributeAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
+static void octetAttributeAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
{ |
TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); |
- v8SetReturnValueUnsigned(info, imp->readonlyOctetAttribute()); |
+ v8SetReturnValueUnsigned(info, imp->octetAttribute()); |
} |
-static void readonlyOctetAttributeAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
+static void octetAttributeAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
{ |
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
- TestObjectPythonV8Internal::readonlyOctetAttributeAttributeGetter(name, info); |
+ TestObjectPythonV8Internal::octetAttributeAttributeGetter(name, info); |
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
} |
-static void readonlyShortAttributeAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
+static void octetAttributeAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
{ |
TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); |
- v8SetReturnValueInt(info, imp->readonlyShortAttribute()); |
+ V8TRYCATCH_VOID(unsigned, v, toUInt8(value)); |
+ imp->setOctetAttribute(v); |
+} |
+ |
+static void octetAttributeAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
+{ |
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
+ TestObjectPythonV8Internal::octetAttributeAttributeSetter(name, value, info); |
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
} |
-static void readonlyShortAttributeAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
+static void shortAttributeAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
+{ |
+ TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); |
+ v8SetReturnValueInt(info, imp->shortAttribute()); |
+} |
+ |
+static void shortAttributeAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
{ |
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
- TestObjectPythonV8Internal::readonlyShortAttributeAttributeGetter(name, info); |
+ TestObjectPythonV8Internal::shortAttributeAttributeGetter(name, info); |
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
} |
-static void readonlyUnsignedLongAttributeAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
+static void shortAttributeAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
{ |
TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); |
- v8SetReturnValueUnsigned(info, imp->readonlyUnsignedLongAttribute()); |
+ V8TRYCATCH_VOID(int, v, toInt32(value)); |
+ imp->setShortAttribute(v); |
} |
-static void readonlyUnsignedLongAttributeAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
+static void shortAttributeAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
+{ |
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
+ TestObjectPythonV8Internal::shortAttributeAttributeSetter(name, value, info); |
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
+} |
+ |
+static void unsignedLongAttributeAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
+{ |
+ TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); |
+ v8SetReturnValueUnsigned(info, imp->unsignedLongAttribute()); |
+} |
+ |
+static void unsignedLongAttributeAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
{ |
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
- TestObjectPythonV8Internal::readonlyUnsignedLongAttributeAttributeGetter(name, info); |
+ TestObjectPythonV8Internal::unsignedLongAttributeAttributeGetter(name, info); |
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
+} |
+ |
+static void unsignedLongAttributeAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
+{ |
+ TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); |
+ V8TRYCATCH_VOID(unsigned, v, toUInt32(value)); |
+ imp->setUnsignedLongAttribute(v); |
+} |
+ |
+static void unsignedLongAttributeAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
+{ |
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
+ TestObjectPythonV8Internal::unsignedLongAttributeAttributeSetter(name, value, info); |
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
} |
-static void readonlyUnsignedLongLongAttributeAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
+static void unsignedLongLongAttributeAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
{ |
TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); |
- v8SetReturnValue(info, static_cast<double>(imp->readonlyUnsignedLongLongAttribute())); |
+ v8SetReturnValue(info, static_cast<double>(imp->unsignedLongLongAttribute())); |
} |
-static void readonlyUnsignedLongLongAttributeAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
+static void unsignedLongLongAttributeAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
{ |
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
- TestObjectPythonV8Internal::readonlyUnsignedLongLongAttributeAttributeGetter(name, info); |
+ TestObjectPythonV8Internal::unsignedLongLongAttributeAttributeGetter(name, info); |
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
} |
-static void readonlyUnsignedShortAttributeAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
+static void unsignedLongLongAttributeAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
{ |
TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); |
- v8SetReturnValueUnsigned(info, imp->readonlyUnsignedShortAttribute()); |
+ V8TRYCATCH_VOID(unsigned long long, v, toUInt64(value)); |
+ imp->setUnsignedLongLongAttribute(v); |
} |
-static void readonlyUnsignedShortAttributeAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
+static void unsignedLongLongAttributeAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
+{ |
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
+ TestObjectPythonV8Internal::unsignedLongLongAttributeAttributeSetter(name, value, info); |
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
+} |
+ |
+static void unsignedShortAttributeAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
+{ |
+ TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); |
+ v8SetReturnValueUnsigned(info, imp->unsignedShortAttribute()); |
+} |
+ |
+static void unsignedShortAttributeAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
{ |
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
- TestObjectPythonV8Internal::readonlyUnsignedShortAttributeAttributeGetter(name, info); |
+ TestObjectPythonV8Internal::unsignedShortAttributeAttributeGetter(name, info); |
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
+} |
+ |
+static void unsignedShortAttributeAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
+{ |
+ TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); |
+ V8TRYCATCH_VOID(unsigned, v, toUInt32(value)); |
+ imp->setUnsignedShortAttribute(v); |
+} |
+ |
+static void unsignedShortAttributeAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
+{ |
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
+ TestObjectPythonV8Internal::unsignedShortAttributeAttributeSetter(name, value, info); |
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
} |
@@ -295,16 +496,30 @@ static void readonlySerializedScriptValueAttributeAttributeGetterCallback(v8::Lo |
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
} |
-static void readonlyAnyAttributeAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
+static void anyAttributeAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
{ |
TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); |
- v8SetReturnValue(info, imp->readonlyAnyAttribute().v8Value()); |
+ v8SetReturnValue(info, imp->anyAttribute().v8Value()); |
} |
-static void readonlyAnyAttributeAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
+static void anyAttributeAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
{ |
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
- TestObjectPythonV8Internal::readonlyAnyAttributeAttributeGetter(name, info); |
+ TestObjectPythonV8Internal::anyAttributeAttributeGetter(name, info); |
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
+} |
+ |
+static void anyAttributeAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
+{ |
+ TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); |
+ V8TRYCATCH_VOID(ScriptValue, v, ScriptValue(value, info.GetIsolate())); |
+ imp->setAnyAttribute(v); |
+} |
+ |
+static void anyAttributeAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
+{ |
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
+ TestObjectPythonV8Internal::anyAttributeAttributeSetter(name, value, info); |
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
} |
@@ -1534,23 +1749,26 @@ static void unforgeableReadonlyLongAttributeAttributeGetterCallback(v8::Local<v8 |
} // namespace TestObjectPythonV8Internal |
static const V8DOMConfiguration::AttributeConfiguration V8TestObjectPythonAttributes[] = { |
+ {"readonlyStringAttribute", TestObjectPythonV8Internal::readonlyStringAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
+ {"readonlyTestInterfaceEmptyAttribute", TestObjectPythonV8Internal::readonlyTestInterfaceEmptyAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
+ {"readonlyLongAttribute", TestObjectPythonV8Internal::readonlyLongAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
{"readonlyDateAttribute", TestObjectPythonV8Internal::readonlyDateAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
{"readonlyStringAttribute", TestObjectPythonV8Internal::readonlyStringAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
{"readonlyDOMTimeStampAttribute", TestObjectPythonV8Internal::readonlyDOMTimeStampAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
- {"readonlyBooleanAttribute", TestObjectPythonV8Internal::readonlyBooleanAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
- {"readonlyByteAttribute", TestObjectPythonV8Internal::readonlyByteAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
- {"readonlyDoubleAttribute", TestObjectPythonV8Internal::readonlyDoubleAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
- {"readonlyFloatAttribute", TestObjectPythonV8Internal::readonlyFloatAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
- {"readonlyLongAttribute", TestObjectPythonV8Internal::readonlyLongAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
- {"readonlyLongLongAttribute", TestObjectPythonV8Internal::readonlyLongLongAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
- {"readonlyOctetAttribute", TestObjectPythonV8Internal::readonlyOctetAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
- {"readonlyShortAttribute", TestObjectPythonV8Internal::readonlyShortAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
- {"readonlyUnsignedLongAttribute", TestObjectPythonV8Internal::readonlyUnsignedLongAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
- {"readonlyUnsignedLongLongAttribute", TestObjectPythonV8Internal::readonlyUnsignedLongLongAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
- {"readonlyUnsignedShortAttribute", TestObjectPythonV8Internal::readonlyUnsignedShortAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
+ {"booleanAttribute", TestObjectPythonV8Internal::booleanAttributeAttributeGetterCallback, TestObjectPythonV8Internal::booleanAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
+ {"byteAttribute", TestObjectPythonV8Internal::byteAttributeAttributeGetterCallback, TestObjectPythonV8Internal::byteAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
+ {"doubleAttribute", TestObjectPythonV8Internal::doubleAttributeAttributeGetterCallback, TestObjectPythonV8Internal::doubleAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
+ {"floatAttribute", TestObjectPythonV8Internal::floatAttributeAttributeGetterCallback, TestObjectPythonV8Internal::floatAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
+ {"longAttribute", TestObjectPythonV8Internal::longAttributeAttributeGetterCallback, TestObjectPythonV8Internal::longAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
+ {"longLongAttribute", TestObjectPythonV8Internal::longLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::longLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
+ {"octetAttribute", TestObjectPythonV8Internal::octetAttributeAttributeGetterCallback, TestObjectPythonV8Internal::octetAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
+ {"shortAttribute", TestObjectPythonV8Internal::shortAttributeAttributeGetterCallback, TestObjectPythonV8Internal::shortAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
+ {"unsignedLongAttribute", TestObjectPythonV8Internal::unsignedLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::unsignedLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
+ {"unsignedLongLongAttribute", TestObjectPythonV8Internal::unsignedLongLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::unsignedLongLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
+ {"unsignedShortAttribute", TestObjectPythonV8Internal::unsignedShortAttributeAttributeGetterCallback, TestObjectPythonV8Internal::unsignedShortAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
{"readonlyNodeFilterAttribute", TestObjectPythonV8Internal::readonlyNodeFilterAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
{"readonlySerializedScriptValueAttribute", TestObjectPythonV8Internal::readonlySerializedScriptValueAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
- {"readonlyAnyAttribute", TestObjectPythonV8Internal::readonlyAnyAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
+ {"anyAttribute", TestObjectPythonV8Internal::anyAttributeAttributeGetterCallback, TestObjectPythonV8Internal::anyAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
{"readonlyDocumentAttribute", TestObjectPythonV8Internal::readonlyDocumentAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
{"readonlyDocumentFragmentAttribute", TestObjectPythonV8Internal::readonlyDocumentFragmentAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
{"readonlyDocumentTypeAttribute", TestObjectPythonV8Internal::readonlyDocumentTypeAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |