#include "HTMLNames.h"
#include "RuntimeEnabledFeatures.h"
#include "V8Attr.h"
-#include "V8CompareHow.h"
#include "V8Document.h"
#include "V8DocumentFragment.h"
#include "V8DocumentType.h"
#include "V8Element.h"
-#include "V8Entity.h"
+#include "V8Event.h"
#include "V8EventTarget.h"
#include "V8HTMLCollection.h"
#include "V8HTMLElement.h"
#include "V8TestInterface.h"
#include "V8TestInterfaceEmpty.h"
#include "V8TestInterfacePython.h"
+#include "V8TestInterfaceWillBeGarbageCollected.h"
#include "V8TestNode.h"
#include "V8TestObjectA.h"
#include "V8Window.h"
}
namespace WebCore {
-const WrapperTypeInfo V8TestObjectPython::wrapperTypeInfo = { gin::kEmbedderBlink, V8TestObjectPython::domTemplate, V8TestObjectPython::derefObject, 0, 0, 0, V8TestObjectPython::installPerContextEnabledMethods, 0, WrapperTypeObjectPrototype };
+const WrapperTypeInfo V8TestObjectPython::wrapperTypeInfo = { gin::kEmbedderBlink, V8TestObjectPython::domTemplate, V8TestObjectPython::derefObject, 0, 0, 0, V8TestObjectPython::installPerContextEnabledMethods, 0, WrapperTypeObjectPrototype, false };
namespace TestObjectPythonV8Internal {
static void dateAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
- V8TRYCATCH_VOID(double, cppValue, toWebCoreDate(jsValue));
+ V8TRYCATCH_VOID(double, cppValue, toCoreDate(jsValue));
imp->setDateAttribute(cppValue);
}
static void windowAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
- V8TRYCATCH_VOID(DOMWindow*, cppValue, toNativeDOMWindow(jsValue, info.GetIsolate()));
+ V8TRYCATCH_VOID(DOMWindow*, cppValue, toDOMWindow(jsValue, info.GetIsolate()));
imp->setWindowAttribute(WTF::getPtr(cppValue));
}
TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
}
-static void entityAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
-{
- TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
- v8SetReturnValueFast(info, imp->entityAttribute(), imp);
-}
-
-static void entityAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
-{
- TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
- TestObjectPythonV8Internal::entityAttributeAttributeGetter(info);
- TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
-}
-
-static void entityAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
-{
- TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
- V8TRYCATCH_VOID(Entity*, cppValue, V8Entity::hasInstance(jsValue, info.GetIsolate()) ? V8Entity::toNative(v8::Handle<v8::Object>::Cast(jsValue)) : 0);
- imp->setEntityAttribute(WTF::getPtr(cppValue));
-}
-
-static void entityAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
-{
- TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
- TestObjectPythonV8Internal::entityAttributeAttributeSetter(jsValue, info);
- TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
-}
-
static void nodeAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
static void eventHandlerAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
- EventListener* jsValue = imp->eventHandlerAttribute(isolatedWorldForIsolate(info.GetIsolate()));
+ EventListener* jsValue = imp->eventHandlerAttribute();
v8SetReturnValue(info, jsValue ? v8::Handle<v8::Value>(V8AbstractEventListener::cast(jsValue)->getListenerObject(imp->executionContext())) : v8::Handle<v8::Value>(v8::Null(info.GetIsolate())));
}
static void eventHandlerAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
- transferHiddenDependency(info.Holder(), imp->eventHandlerAttribute(isolatedWorldForIsolate(info.GetIsolate())), jsValue, V8TestObjectPython::eventListenerCacheIndex, info.GetIsolate());
- imp->setEventHandlerAttribute(V8EventListenerList::getEventListener(jsValue, true, ListenerFindOrCreate), isolatedWorldForIsolate(info.GetIsolate()));
+ moveEventListenerToNewWrapper(info.Holder(), imp->eventHandlerAttribute(), jsValue, V8TestObjectPython::eventListenerCacheIndex, info.GetIsolate());
+ imp->setEventHandlerAttribute(V8EventListenerList::getEventListener(jsValue, true, ListenerFindOrCreate));
}
static void eventHandlerAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
static void callWithExecutionContextAnyAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
- ExecutionContext* scriptContext = getExecutionContext();
+ ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate());
v8SetReturnValue(info, imp->callWithExecutionContextAnyAttribute(scriptContext).v8Value());
}
{
TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
V8TRYCATCH_VOID(ScriptValue, cppValue, ScriptValue(jsValue, info.GetIsolate()));
- ExecutionContext* scriptContext = getExecutionContext();
+ ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate());
imp->setCallWithExecutionContextAnyAttribute(scriptContext, cppValue);
}
{
TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
ExceptionState exceptionState(ExceptionState::GetterContext, "checkSecurityForNodeReadonlyDocumentAttribute", "TestObjectPython", info.Holder(), info.GetIsolate());
- if (!BindingSecurity::shouldAllowAccessToNode(imp->checkSecurityForNodeReadonlyDocumentAttribute(), exceptionState)) {
+ if (!BindingSecurity::shouldAllowAccessToNode(info.GetIsolate(), imp->checkSecurityForNodeReadonlyDocumentAttribute(), exceptionState)) {
v8SetReturnValueNull(info);
exceptionState.throwIfNeeded();
return;
static void deprecatedLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
- UseCounter::countDeprecation(activeExecutionContext(), UseCounter::LongAttribute);
+ UseCounter::countDeprecation(activeExecutionContext(info.GetIsolate()), UseCounter::LongAttribute);
TestObjectPythonV8Internal::deprecatedLongAttributeAttributeGetter(info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
}
static void deprecatedLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
- UseCounter::countDeprecation(activeExecutionContext(), UseCounter::LongAttribute);
+ UseCounter::countDeprecation(activeExecutionContext(info.GetIsolate()), UseCounter::LongAttribute);
TestObjectPythonV8Internal::deprecatedLongAttributeAttributeSetter(jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
}
TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
}
-static void getterRaisesExceptionLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
-{
- TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
- ExceptionState exceptionState(ExceptionState::GetterContext, "getterRaisesExceptionLongAttribute", "TestObjectPython", info.Holder(), info.GetIsolate());
- int jsValue = imp->getterRaisesExceptionLongAttribute(exceptionState);
- if (UNLIKELY(exceptionState.throwIfNeeded()))
- return;
- v8SetReturnValueInt(info, jsValue);
-}
-
-static void getterRaisesExceptionLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
-{
- TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
- TestObjectPythonV8Internal::getterRaisesExceptionLongAttributeAttributeGetter(info);
- TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
-}
-
-static void getterRaisesExceptionLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
-{
- ExceptionState exceptionState(ExceptionState::SetterContext, "getterRaisesExceptionLongAttribute", "TestObjectPython", info.Holder(), info.GetIsolate());
- TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
- V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState);
- imp->setGetterRaisesExceptionLongAttribute(cppValue);
-}
-
-static void getterRaisesExceptionLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
-{
- TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
- TestObjectPythonV8Internal::getterRaisesExceptionLongAttributeAttributeSetter(jsValue, info);
- TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
-}
-
static void implementedAsLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
}
-static void testInterfacePythonAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
-{
- TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
- v8SetReturnValueFast(info, imp->testInterfacePythonAttribute(), imp);
-}
-
-static void testInterfacePythonAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
-{
- TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
- TestObjectPythonV8Internal::testInterfacePythonAttributeAttributeGetter(info);
- TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
-}
-
-static void testInterfacePythonAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
-{
- TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
- V8TRYCATCH_VOID(TestInterfacePythonImplementation*, cppValue, V8TestInterfacePython::hasInstance(jsValue, info.GetIsolate()) ? V8TestInterfacePython::toNative(v8::Handle<v8::Object>::Cast(jsValue)) : 0);
- imp->setTestInterfacePythonAttribute(WTF::getPtr(cppValue));
-}
-
-static void testInterfacePythonAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
-{
- TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
- TestObjectPythonV8Internal::testInterfacePythonAttributeAttributeSetter(jsValue, info);
- TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
-}
-
static void customGetterImplementedAsLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
static void measureAsLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
- UseCounter::count(activeExecutionContext(), UseCounter::TestFeature);
+ UseCounter::count(activeExecutionContext(info.GetIsolate()), UseCounter::TestFeature);
TestObjectPythonV8Internal::measureAsLongAttributeAttributeGetter(info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
}
static void measureAsLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
- UseCounter::count(activeExecutionContext(), UseCounter::TestFeature);
+ UseCounter::count(activeExecutionContext(info.GetIsolate()), UseCounter::TestFeature);
TestObjectPythonV8Internal::measureAsLongAttributeAttributeSetter(jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
}
TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
}
+static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
+ RefPtr<TestInterfaceEmpty> result = imp->perWorldBindingsReadonlyTestInterfaceEmptyAttribute();
+ 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()) {
+ setHiddenValue(info.GetIsolate(), info.Holder(), "perWorldBindingsReadonlyTestInterfaceEmptyAttribute", wrapper);
+ v8SetReturnValue(info, wrapper);
+ }
+}
+
+static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
+ TestObjectPythonV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetter(info);
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
+}
+
+static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterForMainWorld(const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
+ RefPtr<TestInterfaceEmpty> result = imp->perWorldBindingsReadonlyTestInterfaceEmptyAttribute();
+ if (result && DOMDataStore::setReturnValueFromWrapperForMainWorld<V8TestInterfaceEmpty>(info.GetReturnValue(), result.get()))
+ return;
+ v8::Handle<v8::Value> wrapper = toV8(result.get(), info.Holder(), info.GetIsolate());
+ if (!wrapper.IsEmpty()) {
+ setHiddenValue(info.GetIsolate(), info.Holder(), "perWorldBindingsReadonlyTestInterfaceEmptyAttribute", wrapper);
+ v8SetReturnValue(info, wrapper);
+ }
+}
+
+static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCallbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
+ TestObjectPythonV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterForMainWorld(info);
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
+}
+
static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
}
+static void locationWithCallWithAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
+ v8SetReturnValueFast(info, imp->locationWithCallWith(), imp);
+}
+
+static void locationWithCallWithAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
+ TestObjectPythonV8Internal::locationWithCallWithAttributeGetter(info);
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
+}
+
+static void locationWithCallWithAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
+{
+ TestObjectPython* proxyImp = V8TestObjectPython::toNative(info.Holder());
+ TestNode* imp = proxyImp->locationWithCallWith();
+ if (!imp)
+ return;
+ V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
+ imp->setHrefCallWith(activeDOMWindow(info.GetIsolate()), firstDOMWindow(info.GetIsolate()), cppValue);
+}
+
+static void locationWithCallWithAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
+{
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
+ TestObjectPythonV8Internal::locationWithCallWithAttributeSetter(jsValue, info);
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
+}
+
+static void locationWithPerWorldBindingsAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
+ v8SetReturnValueFast(info, imp->locationWithPerWorldBindings(), imp);
+}
+
+static void locationWithPerWorldBindingsAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
+ TestObjectPythonV8Internal::locationWithPerWorldBindingsAttributeGetter(info);
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
+}
+
+static void locationWithPerWorldBindingsAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
+{
+ TestObjectPython* proxyImp = V8TestObjectPython::toNative(info.Holder());
+ TestNode* imp = proxyImp->locationWithPerWorldBindings();
+ if (!imp)
+ return;
+ V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
+ imp->setHref(cppValue);
+}
+
+static void locationWithPerWorldBindingsAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
+{
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
+ TestObjectPythonV8Internal::locationWithPerWorldBindingsAttributeSetter(jsValue, info);
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
+}
+
+static void locationWithPerWorldBindingsAttributeGetterForMainWorld(const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
+ v8SetReturnValueForMainWorld(info, imp->locationWithPerWorldBindings());
+}
+
+static void locationWithPerWorldBindingsAttributeGetterCallbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
+ TestObjectPythonV8Internal::locationWithPerWorldBindingsAttributeGetterForMainWorld(info);
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
+}
+
+static void locationWithPerWorldBindingsAttributeSetterForMainWorld(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
+{
+ TestObjectPython* proxyImp = V8TestObjectPython::toNative(info.Holder());
+ TestNode* imp = proxyImp->locationWithPerWorldBindings();
+ if (!imp)
+ return;
+ V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
+ imp->setHref(cppValue);
+}
+
+static void locationWithPerWorldBindingsAttributeSetterCallbackForMainWorld(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
+{
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
+ TestObjectPythonV8Internal::locationWithPerWorldBindingsAttributeSetterForMainWorld(jsValue, info);
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
+}
+
static void raisesExceptionLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
}
+static void raisesExceptionGetterLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
+ ExceptionState exceptionState(ExceptionState::GetterContext, "raisesExceptionGetterLongAttribute", "TestObjectPython", info.Holder(), info.GetIsolate());
+ int jsValue = imp->raisesExceptionGetterLongAttribute(exceptionState);
+ if (UNLIKELY(exceptionState.throwIfNeeded()))
+ return;
+ v8SetReturnValueInt(info, jsValue);
+}
+
+static void raisesExceptionGetterLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
+ TestObjectPythonV8Internal::raisesExceptionGetterLongAttributeAttributeGetter(info);
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
+}
+
+static void raisesExceptionGetterLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
+{
+ ExceptionState exceptionState(ExceptionState::SetterContext, "raisesExceptionGetterLongAttribute", "TestObjectPython", info.Holder(), info.GetIsolate());
+ TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
+ V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState);
+ imp->setRaisesExceptionGetterLongAttribute(cppValue);
+}
+
+static void raisesExceptionGetterLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
+{
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
+ TestObjectPythonV8Internal::raisesExceptionGetterLongAttributeAttributeSetter(jsValue, info);
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
+}
+
+static void setterRaisesExceptionLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
+ v8SetReturnValueInt(info, imp->setterRaisesExceptionLongAttribute());
+}
+
+static void setterRaisesExceptionLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
+ TestObjectPythonV8Internal::setterRaisesExceptionLongAttributeAttributeGetter(info);
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
+}
+
+static void setterRaisesExceptionLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
+{
+ ExceptionState exceptionState(ExceptionState::SetterContext, "setterRaisesExceptionLongAttribute", "TestObjectPython", info.Holder(), info.GetIsolate());
+ TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
+ V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState);
+ imp->setSetterRaisesExceptionLongAttribute(cppValue, exceptionState);
+ exceptionState.throwIfNeeded();
+}
+
+static void setterRaisesExceptionLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
+{
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
+ TestObjectPythonV8Internal::setterRaisesExceptionLongAttributeAttributeSetter(jsValue, info);
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
+}
+
+static void raisesExceptionTestInterfaceEmptyAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
+ ExceptionState exceptionState(ExceptionState::GetterContext, "raisesExceptionTestInterfaceEmptyAttribute", "TestObjectPython", info.Holder(), info.GetIsolate());
+ RefPtr<TestInterfaceEmpty> jsValue = imp->raisesExceptionTestInterfaceEmptyAttribute(exceptionState);
+ if (UNLIKELY(exceptionState.throwIfNeeded()))
+ return;
+ v8SetReturnValueFast(info, jsValue.release(), imp);
+}
+
+static void raisesExceptionTestInterfaceEmptyAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
+ TestObjectPythonV8Internal::raisesExceptionTestInterfaceEmptyAttributeAttributeGetter(info);
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
+}
+
+static void raisesExceptionTestInterfaceEmptyAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
+{
+ ExceptionState exceptionState(ExceptionState::SetterContext, "raisesExceptionTestInterfaceEmptyAttribute", "TestObjectPython", info.Holder(), info.GetIsolate());
+ TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
+ V8TRYCATCH_VOID(TestInterfaceEmpty*, cppValue, V8TestInterfaceEmpty::hasInstance(jsValue, info.GetIsolate()) ? V8TestInterfaceEmpty::toNative(v8::Handle<v8::Object>::Cast(jsValue)) : 0);
+ imp->setRaisesExceptionTestInterfaceEmptyAttribute(WTF::getPtr(cppValue), exceptionState);
+ exceptionState.throwIfNeeded();
+}
+
+static void raisesExceptionTestInterfaceEmptyAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
+{
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
+ TestObjectPythonV8Internal::raisesExceptionTestInterfaceEmptyAttributeAttributeSetter(jsValue, info);
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
+}
+
+static void cachedAttributeRaisesExceptionGetterAnyAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ v8::Handle<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "cachedAttributeRaisesExceptionGetterAnyAttribute");
+ TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
+ if (!imp->isValueDirty()) {
+ v8::Handle<v8::Value> jsValue = getHiddenValue(info.GetIsolate(), info.Holder(), propertyName);
+ if (!jsValue.IsEmpty()) {
+ v8SetReturnValue(info, jsValue);
+ return;
+ }
+ }
+ ExceptionState exceptionState(ExceptionState::GetterContext, "cachedAttributeRaisesExceptionGetterAnyAttribute", "TestObjectPython", info.Holder(), info.GetIsolate());
+ ScriptValue jsValue = imp->cachedAttributeRaisesExceptionGetterAnyAttribute(exceptionState);
+ if (UNLIKELY(exceptionState.throwIfNeeded()))
+ return;
+ setHiddenValue(info.GetIsolate(), info.Holder(), propertyName, jsValue.v8Value());
+ v8SetReturnValue(info, jsValue.v8Value());
+}
+
+static void cachedAttributeRaisesExceptionGetterAnyAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
+ TestObjectPythonV8Internal::cachedAttributeRaisesExceptionGetterAnyAttributeAttributeGetter(info);
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
+}
+
+static void cachedAttributeRaisesExceptionGetterAnyAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
+{
+ ExceptionState exceptionState(ExceptionState::SetterContext, "cachedAttributeRaisesExceptionGetterAnyAttribute", "TestObjectPython", info.Holder(), info.GetIsolate());
+ TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
+ V8TRYCATCH_VOID(ScriptValue, cppValue, ScriptValue(jsValue, info.GetIsolate()));
+ imp->setCachedAttributeRaisesExceptionGetterAnyAttribute(cppValue, exceptionState);
+ exceptionState.throwIfNeeded();
+ deleteHiddenValue(info.GetIsolate(), info.Holder(), "cachedAttributeRaisesExceptionGetterAnyAttribute"); // Invalidate the cached value.
+}
+
+static void cachedAttributeRaisesExceptionGetterAnyAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
+{
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
+ TestObjectPythonV8Internal::cachedAttributeRaisesExceptionGetterAnyAttributeAttributeSetter(jsValue, info);
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
+}
+
static void reflectTestInterfaceAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
}
-static void reflectedClassAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
+static void reflectedClassAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
+ v8SetReturnValueString(info, imp->getClassAttribute(), info.GetIsolate());
+}
+
+static void reflectedClassAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
+ TestObjectPythonV8Internal::reflectedClassAttributeGetter(info);
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
+}
+
+static void reflectedClassAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
+{
+ TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
+ V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
+ CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
+ imp->setAttribute(HTMLNames::classAttr, cppValue);
+}
+
+static void reflectedClassAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
+{
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
+ CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
+ TestObjectPythonV8Internal::reflectedClassAttributeSetter(jsValue, info);
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
+}
+
+static void limitedToOnlyOneAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
+ String resultValue = imp->fastGetAttribute(HTMLNames::limitedtoonlyoneattributeAttr);
+ if (resultValue.isEmpty()) {
+ ;
+ } else if (equalIgnoringCase(resultValue, "unique")) {
+ resultValue = "unique";
+ } else {
+ resultValue = "";
+ }
+ v8SetReturnValueString(info, resultValue, info.GetIsolate());
+}
+
+static void limitedToOnlyOneAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
+ TestObjectPythonV8Internal::limitedToOnlyOneAttributeAttributeGetter(info);
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
+}
+
+static void limitedToOnlyOneAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
+{
+ TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
+ V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
+ CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
+ imp->setAttribute(HTMLNames::limitedtoonlyoneattributeAttr, cppValue);
+}
+
+static void limitedToOnlyOneAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
+{
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
+ CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
+ TestObjectPythonV8Internal::limitedToOnlyOneAttributeAttributeSetter(jsValue, info);
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
+}
+
+static void limitedToOnlyAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
+ String resultValue = imp->fastGetAttribute(HTMLNames::limitedtoonlyattributeAttr);
+ if (resultValue.isEmpty()) {
+ ;
+ } else if (equalIgnoringCase(resultValue, "Per")) {
+ resultValue = "Per";
+ } else if (equalIgnoringCase(resultValue, "Paal")) {
+ resultValue = "Paal";
+ } else if (equalIgnoringCase(resultValue, "Espen")) {
+ resultValue = "Espen";
+ } else {
+ resultValue = "";
+ }
+ v8SetReturnValueString(info, resultValue, info.GetIsolate());
+}
+
+static void limitedToOnlyAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
+ TestObjectPythonV8Internal::limitedToOnlyAttributeAttributeGetter(info);
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
+}
+
+static void limitedToOnlyAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
+{
+ TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
+ V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
+ CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
+ imp->setAttribute(HTMLNames::limitedtoonlyattributeAttr, cppValue);
+}
+
+static void limitedToOnlyAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
+{
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
+ CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
+ TestObjectPythonV8Internal::limitedToOnlyAttributeAttributeSetter(jsValue, info);
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
+}
+
+static void limitedToOnlyOtherAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
+ String resultValue = imp->fastGetAttribute(HTMLNames::OtherAttr);
+ if (resultValue.isEmpty()) {
+ ;
+ } else if (equalIgnoringCase(resultValue, "Value1")) {
+ resultValue = "Value1";
+ } else if (equalIgnoringCase(resultValue, "Value2")) {
+ resultValue = "Value2";
+ } else {
+ resultValue = "";
+ }
+ v8SetReturnValueString(info, resultValue, info.GetIsolate());
+}
+
+static void limitedToOnlyOtherAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
+ TestObjectPythonV8Internal::limitedToOnlyOtherAttributeAttributeGetter(info);
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
+}
+
+static void limitedToOnlyOtherAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
+{
+ TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
+ V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
+ CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
+ imp->setAttribute(HTMLNames::OtherAttr, cppValue);
+}
+
+static void limitedToOnlyOtherAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
+{
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
+ CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
+ TestObjectPythonV8Internal::limitedToOnlyOtherAttributeAttributeSetter(jsValue, info);
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
+}
+
+static void limitedWithMissingDefaultAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
+ String resultValue = imp->fastGetAttribute(HTMLNames::limitedwithmissingdefaultattributeAttr);
+ if (resultValue.isEmpty()) {
+ resultValue = "rsa";
+ } else if (equalIgnoringCase(resultValue, "rsa")) {
+ resultValue = "rsa";
+ } else if (equalIgnoringCase(resultValue, "dsa")) {
+ resultValue = "dsa";
+ } else {
+ resultValue = "";
+ }
+ v8SetReturnValueString(info, resultValue, info.GetIsolate());
+}
+
+static void limitedWithMissingDefaultAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
+ TestObjectPythonV8Internal::limitedWithMissingDefaultAttributeAttributeGetter(info);
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
+}
+
+static void limitedWithMissingDefaultAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
+{
+ TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
+ V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
+ CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
+ imp->setAttribute(HTMLNames::limitedwithmissingdefaultattributeAttr, cppValue);
+}
+
+static void limitedWithMissingDefaultAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
+{
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
+ CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
+ TestObjectPythonV8Internal::limitedWithMissingDefaultAttributeAttributeSetter(jsValue, info);
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
+}
+
+static void limitedWithInvalidMissingDefaultAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
+ String resultValue = imp->fastGetAttribute(HTMLNames::limitedwithinvalidmissingdefaultattributeAttr);
+ if (resultValue.isEmpty()) {
+ resultValue = "auto";
+ } else if (equalIgnoringCase(resultValue, "ltr")) {
+ resultValue = "ltr";
+ } else if (equalIgnoringCase(resultValue, "rtl")) {
+ resultValue = "rtl";
+ } else if (equalIgnoringCase(resultValue, "auto")) {
+ resultValue = "auto";
+ } else {
+ resultValue = "ltr";
+ }
+ v8SetReturnValueString(info, resultValue, info.GetIsolate());
+}
+
+static void limitedWithInvalidMissingDefaultAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
+ TestObjectPythonV8Internal::limitedWithInvalidMissingDefaultAttributeAttributeGetter(info);
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
+}
+
+static void limitedWithInvalidMissingDefaultAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
+{
+ TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
+ V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
+ CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
+ imp->setAttribute(HTMLNames::limitedwithinvalidmissingdefaultattributeAttr, cppValue);
+}
+
+static void limitedWithInvalidMissingDefaultAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
+{
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
+ CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
+ TestObjectPythonV8Internal::limitedWithInvalidMissingDefaultAttributeAttributeSetter(jsValue, info);
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
+}
+
+static void corsSettingAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
+ String resultValue = imp->fastGetAttribute(HTMLNames::corssettingattributeAttr);
+ if (resultValue.isNull()) {
+ ;
+ } else if (resultValue.isEmpty()) {
+ resultValue = "anonymous";
+ } else if (equalIgnoringCase(resultValue, "anonymous")) {
+ resultValue = "anonymous";
+ } else if (equalIgnoringCase(resultValue, "use-credentials")) {
+ resultValue = "use-credentials";
+ } else {
+ resultValue = "anonymous";
+ }
+ v8SetReturnValueString(info, resultValue, info.GetIsolate());
+}
+
+static void corsSettingAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
+ TestObjectPythonV8Internal::corsSettingAttributeAttributeGetter(info);
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
+}
+
+static void limitedWithEmptyMissingInvalidAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
+ String resultValue = imp->fastGetAttribute(HTMLNames::limitedwithemptymissinginvalidattributeAttr);
+ if (resultValue.isNull()) {
+ resultValue = "missing";
+ } else if (resultValue.isEmpty()) {
+ resultValue = "empty";
+ } else if (equalIgnoringCase(resultValue, "empty")) {
+ resultValue = "empty";
+ } else if (equalIgnoringCase(resultValue, "missing")) {
+ resultValue = "missing";
+ } else if (equalIgnoringCase(resultValue, "invalid")) {
+ resultValue = "invalid";
+ } else if (equalIgnoringCase(resultValue, "a-normal")) {
+ resultValue = "a-normal";
+ } else {
+ resultValue = "invalid";
+ }
+ v8SetReturnValueString(info, resultValue, info.GetIsolate());
+}
+
+static void limitedWithEmptyMissingInvalidAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
+ TestObjectPythonV8Internal::limitedWithEmptyMissingInvalidAttributeAttributeGetter(info);
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
+}
+
+static void replaceableReadonlyLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
- v8SetReturnValueString(info, imp->getClassAttribute(), info.GetIsolate());
+ v8SetReturnValueInt(info, imp->replaceableReadonlyLongAttribute());
}
-static void reflectedClassAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
+static void replaceableReadonlyLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
- TestObjectPythonV8Internal::reflectedClassAttributeGetter(info);
+ TestObjectPythonV8Internal::replaceableReadonlyLongAttributeAttributeGetter(info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
}
-static void reflectedClassAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
+static void locationReplaceableAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
- V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
- CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
- imp->setAttribute(HTMLNames::classAttr, cppValue);
+ v8SetReturnValueFast(info, imp->locationReplaceable(), imp);
}
-static void reflectedClassAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
+static void locationReplaceableAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
{
- TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
- CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
- TestObjectPythonV8Internal::reflectedClassAttributeSetter(jsValue, info);
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
+ TestObjectPythonV8Internal::locationReplaceableAttributeGetter(info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
}
-static void replaceableReadonlyLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
+static void locationReplaceableAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
- TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
- v8SetReturnValueInt(info, imp->replaceableReadonlyLongAttribute());
+ TestObjectPython* proxyImp = V8TestObjectPython::toNative(info.Holder());
+ TestNode* imp = proxyImp->locationReplaceable();
+ if (!imp)
+ return;
+ V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
+ imp->setHref(cppValue);
}
-static void replaceableReadonlyLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
+static void locationReplaceableAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
- TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
- TestObjectPythonV8Internal::replaceableReadonlyLongAttributeAttributeGetter(info);
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
+ TestObjectPythonV8Internal::locationReplaceableAttributeSetter(jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
}
TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
}
+static void perContextEnabledRuntimeEnabledLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
+ v8SetReturnValueInt(info, imp->perContextEnabledRuntimeEnabledLongAttribute());
+}
+
+static void perContextEnabledRuntimeEnabledLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
+ TestObjectPythonV8Internal::perContextEnabledRuntimeEnabledLongAttributeAttributeGetter(info);
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
+}
+
+static void perContextEnabledRuntimeEnabledLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
+{
+ ExceptionState exceptionState(ExceptionState::SetterContext, "perContextEnabledRuntimeEnabledLongAttribute", "TestObjectPython", info.Holder(), info.GetIsolate());
+ TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
+ V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState);
+ imp->setPerContextEnabledRuntimeEnabledLongAttribute(cppValue);
+}
+
+static void perContextEnabledRuntimeEnabledLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
+{
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
+ TestObjectPythonV8Internal::perContextEnabledRuntimeEnabledLongAttributeAttributeSetter(jsValue, info);
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
+}
+
#if ENABLE(CONDITION)
static void conditionalRuntimeEnabledLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
{
{
TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
- imp->setSetterCallWithActiveWindowAndFirstWindowStringAttribute(activeDOMWindow(), firstDOMWindow(), cppValue);
+ imp->setSetterCallWithActiveWindowAndFirstWindowStringAttribute(activeDOMWindow(info.GetIsolate()), firstDOMWindow(info.GetIsolate()), cppValue);
}
static void setterCallWithActiveWindowAndFirstWindowStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
}
-static void setterRaisesExceptionLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
+static void setterCallWithExecutionContextStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
- v8SetReturnValueInt(info, imp->setterRaisesExceptionLongAttribute());
+ v8SetReturnValueString(info, imp->setterCallWithExecutionContextStringAttribute(), info.GetIsolate());
}
-static void setterRaisesExceptionLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
+static void setterCallWithExecutionContextStringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
- TestObjectPythonV8Internal::setterRaisesExceptionLongAttributeAttributeGetter(info);
+ TestObjectPythonV8Internal::setterCallWithExecutionContextStringAttributeAttributeGetter(info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
}
-static void setterRaisesExceptionLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
+static void setterCallWithExecutionContextStringAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
- ExceptionState exceptionState(ExceptionState::SetterContext, "setterRaisesExceptionLongAttribute", "TestObjectPython", info.Holder(), info.GetIsolate());
TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
- V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState);
- imp->setSetterRaisesExceptionLongAttribute(cppValue, exceptionState);
- exceptionState.throwIfNeeded();
+ V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
+ ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate());
+ imp->setSetterCallWithExecutionContextStringAttribute(scriptContext, cppValue);
}
-static void setterRaisesExceptionLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
+static void setterCallWithExecutionContextStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
- TestObjectPythonV8Internal::setterRaisesExceptionLongAttributeAttributeSetter(jsValue, info);
+ TestObjectPythonV8Internal::setterCallWithExecutionContextStringAttributeAttributeSetter(jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
}
TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
}
+static void testInterfacePythonAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
+ v8SetReturnValueFast(info, imp->testInterfacePythonAttribute(), imp);
+}
+
+static void testInterfacePythonAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
+ TestObjectPythonV8Internal::testInterfacePythonAttributeAttributeGetter(info);
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
+}
+
+static void testInterfacePythonAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
+{
+ TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
+ V8TRYCATCH_VOID(TestInterfacePythonImplementation*, cppValue, V8TestInterfacePython::hasInstance(jsValue, info.GetIsolate()) ? V8TestInterfacePython::toNative(v8::Handle<v8::Object>::Cast(jsValue)) : 0);
+ imp->setTestInterfacePythonAttribute(WTF::getPtr(cppValue));
+}
+
+static void testInterfacePythonAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
+{
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
+ TestObjectPythonV8Internal::testInterfacePythonAttributeAttributeSetter(jsValue, info);
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
+}
+
+static void testInterfaceWillBeGarbageCollectedAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
+ bool isNull = false;
+ RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> jsValue = imp->testInterfaceWillBeGarbageCollectedAttribute(isNull);
+ if (isNull) {
+ v8SetReturnValueNull(info);
+ return;
+ }
+ v8SetReturnValueFast(info, jsValue.release(), imp);
+}
+
+static void testInterfaceWillBeGarbageCollectedAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
+ TestObjectPythonV8Internal::testInterfaceWillBeGarbageCollectedAttributeAttributeGetter(info);
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
+}
+
+static void testInterfaceWillBeGarbageCollectedAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
+{
+ TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
+ V8TRYCATCH_VOID(TestInterfaceWillBeGarbageCollected*, cppValue, V8TestInterfaceWillBeGarbageCollected::hasInstance(jsValue, info.GetIsolate()) ? V8TestInterfaceWillBeGarbageCollected::toNative(v8::Handle<v8::Object>::Cast(jsValue)) : 0);
+ imp->setTestInterfaceWillBeGarbageCollectedAttribute(WTF::getPtr(cppValue));
+}
+
+static void testInterfaceWillBeGarbageCollectedAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
+{
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
+ TestObjectPythonV8Internal::testInterfaceWillBeGarbageCollectedAttributeAttributeSetter(jsValue, info);
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
+}
+
static void TestObjectPythonConstructorGetter(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
{
v8::Handle<v8::Value> data = info.Data();
return;
}
TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
- V8TRYCATCH_VOID(double, dateArg, toWebCoreDate(info[0]));
+ V8TRYCATCH_VOID(double, dateArg, toCoreDate(info[0]));
imp->voidMethodDateArg(dateArg);
}
TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
}
-static void voidMethodMediaQueryListListenerArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
+static void voidMethodCompareHowArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
if (UNLIKELY(info.Length() < 1)) {
- throwTypeError(ExceptionMessages::failedToExecute("voidMethodMediaQueryListListenerArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
+ throwTypeError(ExceptionMessages::failedToExecute("voidMethodCompareHowArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
return;
}
TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
- V8TRYCATCH_VOID(RefPtr<MediaQueryListListener>, mediaQueryListListenerArg, MediaQueryListListener::create(ScriptValue(info[0], info.GetIsolate())));
- imp->voidMethodMediaQueryListListenerArg(mediaQueryListListenerArg);
+ V8TRYCATCH_VOID(Range::CompareHow, compareHowArg, static_cast<Range::CompareHow>(info[0]->Int32Value()));
+ imp->voidMethodCompareHowArg(compareHowArg);
}
-static void voidMethodMediaQueryListListenerArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
+static void voidMethodCompareHowArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
- TestObjectPythonV8Internal::voidMethodMediaQueryListListenerArgMethod(info);
+ TestObjectPythonV8Internal::voidMethodCompareHowArgMethod(info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
}
-static void voidMethodCompareHowArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
+static void voidMethodEventTargetArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
if (UNLIKELY(info.Length() < 1)) {
- throwTypeError(ExceptionMessages::failedToExecute("voidMethodCompareHowArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
+ throwTypeError(ExceptionMessages::failedToExecute("voidMethodEventTargetArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
return;
}
TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
- V8TRYCATCH_VOID(Range::CompareHow, compareHowArg, static_cast<Range::CompareHow>(info[0]->Int32Value()));
- imp->voidMethodCompareHowArg(compareHowArg);
+ V8TRYCATCH_VOID(EventTarget*, eventTargetArg, V8DOMWrapper::isDOMWrapper(info[0]) ? toWrapperTypeInfo(v8::Handle<v8::Object>::Cast(info[0]))->toEventTarget(v8::Handle<v8::Object>::Cast(info[0])) : 0);
+ imp->voidMethodEventTargetArg(eventTargetArg);
}
-static void voidMethodCompareHowArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
+static void voidMethodEventTargetArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
- TestObjectPythonV8Internal::voidMethodCompareHowArgMethod(info);
+ TestObjectPythonV8Internal::voidMethodEventTargetArgMethod(info);
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
+}
+
+static void voidMethodMediaQueryListListenerArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
+{
+ if (UNLIKELY(info.Length() < 1)) {
+ throwTypeError(ExceptionMessages::failedToExecute("voidMethodMediaQueryListListenerArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
+ return;
+ }
+ TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
+ V8TRYCATCH_VOID(RefPtr<MediaQueryListListener>, mediaQueryListListenerArg, MediaQueryListListener::create(ScriptValue(info[0], info.GetIsolate())));
+ imp->voidMethodMediaQueryListListenerArg(mediaQueryListListenerArg);
+}
+
+static void voidMethodMediaQueryListListenerArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
+{
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
+ TestObjectPythonV8Internal::voidMethodMediaQueryListListenerArgMethod(info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
}
throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestCallbackInterfaceArg", "TestObjectPython", "The callback provided as parameter 1 is not a function."), info.GetIsolate());
return;
}
- OwnPtr<TestCallbackInterface> testCallbackInterfaceArg = V8TestCallbackInterface::create(v8::Handle<v8::Function>::Cast(info[0]), getExecutionContext());
+ OwnPtr<TestCallbackInterface> testCallbackInterfaceArg = V8TestCallbackInterface::create(v8::Handle<v8::Function>::Cast(info[0]), currentExecutionContext(info.GetIsolate()));
imp->voidMethodTestCallbackInterfaceArg(testCallbackInterfaceArg.release());
}
throwTypeError(ExceptionMessages::failedToExecute("voidMethodOptionalTestCallbackInterfaceArg", "TestObjectPython", "The callback provided as parameter 1 is not a function."), info.GetIsolate());
return;
}
- optionalTestCallbackInterfaceArg = V8TestCallbackInterface::create(v8::Handle<v8::Function>::Cast(info[0]), getExecutionContext());
+ optionalTestCallbackInterfaceArg = V8TestCallbackInterface::create(v8::Handle<v8::Function>::Cast(info[0]), currentExecutionContext(info.GetIsolate()));
}
imp->voidMethodOptionalTestCallbackInterfaceArg(optionalTestCallbackInterfaceArg.release());
}
throwTypeError(ExceptionMessages::failedToExecute("voidMethodNullableTestCallbackInterfaceArg", "TestObjectPython", "The callback provided as parameter 1 is not a function."), info.GetIsolate());
return;
}
- OwnPtr<TestCallbackInterface> testCallbackInterfaceArg = info[0]->IsNull() ? nullptr : V8TestCallbackInterface::create(v8::Handle<v8::Function>::Cast(info[0]), getExecutionContext());
+ OwnPtr<TestCallbackInterface> testCallbackInterfaceArg = info[0]->IsNull() ? nullptr : V8TestCallbackInterface::create(v8::Handle<v8::Function>::Cast(info[0]), currentExecutionContext(info.GetIsolate()));
imp->voidMethodNullableTestCallbackInterfaceArg(testCallbackInterfaceArg.release());
}
throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodH", "TestObjectPython", "The callback provided as parameter 1 is not a function."), info.GetIsolate());
return;
}
- OwnPtr<TestCallbackInterface> testCallbackInterfaceArg = V8TestCallbackInterface::create(v8::Handle<v8::Function>::Cast(info[0]), getExecutionContext());
+ OwnPtr<TestCallbackInterface> testCallbackInterfaceArg = V8TestCallbackInterface::create(v8::Handle<v8::Function>::Cast(info[0]), currentExecutionContext(info.GetIsolate()));
imp->overloadedMethodH(testCallbackInterfaceArg.release());
}
ExceptionState exceptionState(ExceptionState::ExecutionContext, "addEventListener", "TestObjectPython", info.Holder(), info.GetIsolate());
EventTarget* impl = V8TestObjectPython::toNative(info.Holder());
if (DOMWindow* window = impl->toDOMWindow()) {
- if (!BindingSecurity::shouldAllowAccessToFrame(window->frame(), exceptionState)) {
+ if (!BindingSecurity::shouldAllowAccessToFrame(info.GetIsolate(), window->frame(), exceptionState)) {
exceptionState.throwIfNeeded();
return;
}
V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, eventName, info[0]);
impl->addEventListener(eventName, listener, info[2]->BooleanValue());
if (!impl->toNode())
- createHiddenDependency(info.Holder(), info[1], V8TestObjectPython::eventListenerCacheIndex, info.GetIsolate());
+ addHiddenValueToArray(info.Holder(), info[1], V8TestObjectPython::eventListenerCacheIndex, info.GetIsolate());
}
}
ExceptionState exceptionState(ExceptionState::ExecutionContext, "removeEventListener", "TestObjectPython", info.Holder(), info.GetIsolate());
EventTarget* impl = V8TestObjectPython::toNative(info.Holder());
if (DOMWindow* window = impl->toDOMWindow()) {
- if (!BindingSecurity::shouldAllowAccessToFrame(window->frame(), exceptionState)) {
+ if (!BindingSecurity::shouldAllowAccessToFrame(info.GetIsolate(), window->frame(), exceptionState)) {
exceptionState.throwIfNeeded();
return;
}
V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, eventName, info[0]);
impl->removeEventListener(eventName, listener.get(), info[2]->BooleanValue());
if (!impl->toNode())
- removeHiddenDependency(info.Holder(), info[1], V8TestObjectPython::eventListenerCacheIndex, info.GetIsolate());
+ removeHiddenValueFromArray(info.Holder(), info[1], V8TestObjectPython::eventListenerCacheIndex, info.GetIsolate());
}
}
TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
}
+static void dispatchEventMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
+{
+ ExceptionState exceptionState(ExceptionState::ExecutionContext, "dispatchEvent", "TestObjectPython", info.Holder(), info.GetIsolate());
+ EventTarget* impl = V8TestObjectPython::toNative(info.Holder());
+ if (DOMWindow* window = impl->toDOMWindow()) {
+ if (!BindingSecurity::shouldAllowAccessToFrame(info.GetIsolate(), window->frame(), exceptionState)) {
+ exceptionState.throwIfNeeded();
+ return;
+ }
+ if (!window->document())
+ return;
+ }
+ if (UNLIKELY(info.Length() < 1)) {
+ exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length()));
+ exceptionState.throwIfNeeded();
+ return;
+ }
+ TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
+ V8TRYCATCH_VOID(Event*, event, V8Event::hasInstance(info[0], info.GetIsolate()) ? V8Event::toNative(v8::Handle<v8::Object>::Cast(info[0])) : 0);
+ bool result = imp->dispatchEvent(event, exceptionState);
+ if (exceptionState.throwIfNeeded())
+ return;
+ v8SetReturnValueBool(info, result);
+}
+
+static void dispatchEventMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
+{
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
+ TestObjectPythonV8Internal::dispatchEventMethod(info);
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
+}
+
static void voidMethodClampUnsignedShortArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodClampUnsignedShortArg", "TestObjectPython", info.Holder(), info.GetIsolate());
static void callWithExecutionContextVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
- ExecutionContext* scriptContext = getExecutionContext();
+ ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate());
imp->callWithExecutionContextVoidMethod(scriptContext);
}
if (!currentState)
return;
ScriptState& state = *currentState;
- ExecutionContext* scriptContext = getExecutionContext();
+ ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate());
imp->callWithScriptStateExecutionContextVoidMethod(&state, scriptContext);
if (state.hadException()) {
v8::Local<v8::Value> exception = state.exception();
static void callWithActiveWindowMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
- imp->callWithActiveWindow(activeDOMWindow());
+ imp->callWithActiveWindow(activeDOMWindow(info.GetIsolate()));
}
static void callWithActiveWindowMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
static void callWithActiveWindowScriptWindowMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
- imp->callWithActiveWindowScriptWindow(activeDOMWindow(), firstDOMWindow());
+ imp->callWithActiveWindowScriptWindow(activeDOMWindow(info.GetIsolate()), firstDOMWindow(info.GetIsolate()));
}
static void callWithActiveWindowScriptWindowMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
static void checkSecurityForNodeVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
- if (!BindingSecurity::shouldAllowAccessToNode(imp->checkSecurityForNodeVoidMethod(exceptionState), exceptionState)) {
+ if (!BindingSecurity::shouldAllowAccessToNode(info.GetIsolate(), imp->checkSecurityForNodeVoidMethod(exceptionState), exceptionState)) {
v8SetReturnValueNull(info);
exceptionState.throwIfNeeded();
return;
static void deprecatedVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
- UseCounter::countDeprecation(activeExecutionContext(), UseCounter::voidMethod);
+ UseCounter::countDeprecation(activeExecutionContext(info.GetIsolate()), UseCounter::voidMethod);
TestObjectPythonV8Internal::deprecatedVoidMethodMethod(info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
}
static void measureAsVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
- UseCounter::count(activeExecutionContext(), UseCounter::TestFeature);
+ UseCounter::count(activeExecutionContext(info.GetIsolate()), UseCounter::TestFeature);
TestObjectPythonV8Internal::measureAsVoidMethodMethod(info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
}
TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
}
+static void perWorldBindingsVoidMethodTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
+{
+ if (UNLIKELY(info.Length() < 1)) {
+ throwTypeError(ExceptionMessages::failedToExecute("perWorldBindingsVoidMethodTestInterfaceEmptyArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
+ return;
+ }
+ TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
+ V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceEmpty::hasInstance(info[0], info.GetIsolate()) ? V8TestInterfaceEmpty::toNative(v8::Handle<v8::Object>::Cast(info[0])) : 0);
+ imp->perWorldBindingsVoidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg);
+}
+
+static void perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
+{
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
+ TestObjectPythonV8Internal::perWorldBindingsVoidMethodTestInterfaceEmptyArgMethod(info);
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
+}
+
+static void perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
+{
+ if (UNLIKELY(info.Length() < 1)) {
+ throwTypeError(ExceptionMessages::failedToExecute("perWorldBindingsVoidMethodTestInterfaceEmptyArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
+ return;
+ }
+ TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
+ V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceEmpty::hasInstance(info[0], info.GetIsolate()) ? V8TestInterfaceEmpty::toNative(v8::Handle<v8::Object>::Cast(info[0])) : 0);
+ imp->perWorldBindingsVoidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg);
+}
+
+static void perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodCallbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
+{
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
+ TestObjectPythonV8Internal::perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodForMainWorld(info);
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
+}
+
static void activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
}
-static void perWorldBindingsVoidMethodTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- if (UNLIKELY(info.Length() < 1)) {
- throwTypeError(ExceptionMessages::failedToExecute("perWorldBindingsVoidMethodTestInterfaceEmptyArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
- return;
- }
- TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
- V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceEmpty::hasInstance(info[0], info.GetIsolate()) ? V8TestInterfaceEmpty::toNative(v8::Handle<v8::Object>::Cast(info[0])) : 0);
- imp->perWorldBindingsVoidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg);
-}
-
-static void perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
- TestObjectPythonV8Internal::perWorldBindingsVoidMethodTestInterfaceEmptyArgMethod(info);
- TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
-}
-
-static void perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- if (UNLIKELY(info.Length() < 1)) {
- throwTypeError(ExceptionMessages::failedToExecute("perWorldBindingsVoidMethodTestInterfaceEmptyArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
- return;
- }
- TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
- V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceEmpty::hasInstance(info[0], info.GetIsolate()) ? V8TestInterfaceEmpty::toNative(v8::Handle<v8::Object>::Cast(info[0])) : 0);
- imp->perWorldBindingsVoidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg);
-}
-
-static void perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodCallbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
- TestObjectPythonV8Internal::perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodForMainWorld(info);
- TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
-}
-
static void raisesExceptionVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExceptionVoidMethod", "TestObjectPython", info.Holder(), info.GetIsolate());
exceptionState.throwIfNeeded();
return;
}
- OwnPtr<TestCallbackInterface> testCallbackInterfaceArg = V8TestCallbackInterface::create(v8::Handle<v8::Function>::Cast(info[0]), getExecutionContext());
+ OwnPtr<TestCallbackInterface> testCallbackInterfaceArg = V8TestCallbackInterface::create(v8::Handle<v8::Function>::Cast(info[0]), currentExecutionContext(info.GetIsolate()));
imp->raisesExceptionVoidMethodTestCallbackInterfaceArg(testCallbackInterfaceArg.release(), exceptionState);
if (exceptionState.throwIfNeeded())
return;
exceptionState.throwIfNeeded();
return;
}
- optionalTestCallbackInterfaceArg = V8TestCallbackInterface::create(v8::Handle<v8::Function>::Cast(info[0]), getExecutionContext());
+ optionalTestCallbackInterfaceArg = V8TestCallbackInterface::create(v8::Handle<v8::Function>::Cast(info[0]), currentExecutionContext(info.GetIsolate()));
}
imp->raisesExceptionVoidMethodOptionalTestCallbackInterfaceArg(optionalTestCallbackInterfaceArg.release(), exceptionState);
if (exceptionState.throwIfNeeded())
return;
}
TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
- if (info.Length() > 0 && !info[0]->IsUndefined() && !V8TestInterfaceEmpty::hasInstance(info[0], info.GetIsolate())) {
+ if (info.Length() > 0 && !V8TestInterfaceEmpty::hasInstance(info[0], info.GetIsolate())) {
throwTypeError(ExceptionMessages::failedToExecute("strictTypeCheckingVoidMethodTestInterfaceEmptyArg", "TestObjectPython", "parameter 1 is not of type 'TestInterfaceEmpty'."), info.GetIsolate());
return;
}
{"documentFragmentAttribute", TestObjectPythonV8Internal::documentFragmentAttributeAttributeGetterCallback, TestObjectPythonV8Internal::documentFragmentAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
{"documentTypeAttribute", TestObjectPythonV8Internal::documentTypeAttributeAttributeGetterCallback, TestObjectPythonV8Internal::documentTypeAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
{"elementAttribute", TestObjectPythonV8Internal::elementAttributeAttributeGetterCallback, TestObjectPythonV8Internal::elementAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
- {"entityAttribute", TestObjectPythonV8Internal::entityAttributeAttributeGetterCallback, TestObjectPythonV8Internal::entityAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
{"nodeAttribute", TestObjectPythonV8Internal::nodeAttributeAttributeGetterCallback, TestObjectPythonV8Internal::nodeAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
{"shadowRootAttribute", TestObjectPythonV8Internal::shadowRootAttributeAttributeGetterCallback, TestObjectPythonV8Internal::shadowRootAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
{"arrayBufferAttribute", TestObjectPythonV8Internal::arrayBufferAttributeAttributeGetterCallback, TestObjectPythonV8Internal::arrayBufferAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
{"customElementsCallbacksReadonlyLongAttribute", TestObjectPythonV8Internal::customElementsCallbacksReadonlyLongAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
{"deprecatedLongAttribute", TestObjectPythonV8Internal::deprecatedLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::deprecatedLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
{"enforceRangeLongAttribute", TestObjectPythonV8Internal::enforceRangeLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::enforceRangeLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
- {"getterRaisesExceptionLongAttribute", TestObjectPythonV8Internal::getterRaisesExceptionLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::getterRaisesExceptionLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
{"implementedAsLongAttribute", TestObjectPythonV8Internal::implementedAsLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::implementedAsLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
{"customImplementedAsLongAttribute", TestObjectPythonV8Internal::customImplementedAsLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::customImplementedAsLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
- {"testInterfacePythonAttribute", TestObjectPythonV8Internal::testInterfacePythonAttributeAttributeGetterCallback, TestObjectPythonV8Internal::testInterfacePythonAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
{"customGetterImplementedAsLongAttribute", TestObjectPythonV8Internal::customGetterImplementedAsLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::customGetterImplementedAsLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
{"customSetterImplementedAsLongAttribute", TestObjectPythonV8Internal::customSetterImplementedAsLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::customSetterImplementedAsLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
{"measureAsLongAttribute", TestObjectPythonV8Internal::measureAsLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::measureAsLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
{"notEnumerableLongAttribute", TestObjectPythonV8Internal::notEnumerableLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::notEnumerableLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::DontEnum), 0 /* on instance */},
{"perWorldBindingsLongAttribute", TestObjectPythonV8Internal::perWorldBindingsLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::perWorldBindingsLongAttributeAttributeSetterCallback, TestObjectPythonV8Internal::perWorldBindingsLongAttributeAttributeGetterCallbackForMainWorld, TestObjectPythonV8Internal::perWorldBindingsLongAttributeAttributeSetterCallbackForMainWorld, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
{"perWorldBindingsReadonlyLongAttribute", TestObjectPythonV8Internal::perWorldBindingsReadonlyLongAttributeAttributeGetterCallback, 0, TestObjectPythonV8Internal::perWorldBindingsReadonlyLongAttributeAttributeGetterCallbackForMainWorld, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
+ {"perWorldBindingsReadonlyTestInterfaceEmptyAttribute", TestObjectPythonV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCallback, 0, TestObjectPythonV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCallbackForMainWorld, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
{"activityLoggingAccessPerWorldBindingsLongAttribute", TestObjectPythonV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetterCallback, TestObjectPythonV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetterCallbackForMainWorld, TestObjectPythonV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetterCallbackForMainWorld, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
{"activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute", TestObjectPythonV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterCallback, TestObjectPythonV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterCallbackForMainWorld, TestObjectPythonV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterCallbackForMainWorld, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
{"activityLoggingGetterPerWorldBindingsLongAttribute", TestObjectPythonV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetterCallback, TestObjectPythonV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetterCallbackForMainWorld, TestObjectPythonV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetterCallbackForMainWorld, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
{"activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute", TestObjectPythonV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterCallback, TestObjectPythonV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterCallbackForMainWorld, TestObjectPythonV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterCallbackForMainWorld, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
{"location", TestObjectPythonV8Internal::locationAttributeGetterCallback, TestObjectPythonV8Internal::locationAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
{"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 */},
{"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 */},
+ {"raisesExceptionTestInterfaceEmptyAttribute", TestObjectPythonV8Internal::raisesExceptionTestInterfaceEmptyAttributeAttributeGetterCallback, TestObjectPythonV8Internal::raisesExceptionTestInterfaceEmptyAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
+ {"cachedAttributeRaisesExceptionGetterAnyAttribute", TestObjectPythonV8Internal::cachedAttributeRaisesExceptionGetterAnyAttributeAttributeGetterCallback, TestObjectPythonV8Internal::cachedAttributeRaisesExceptionGetterAnyAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
{"reflectTestInterfaceAttribute", TestObjectPythonV8Internal::reflectTestInterfaceAttributeAttributeGetterCallback, TestObjectPythonV8Internal::reflectTestInterfaceAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
{"reflectReflectedNameAttributeTestAttribute", TestObjectPythonV8Internal::reflectReflectedNameAttributeTestAttributeAttributeGetterCallback, TestObjectPythonV8Internal::reflectReflectedNameAttributeTestAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
{"reflectBooleanAttribute", TestObjectPythonV8Internal::reflectBooleanAttributeAttributeGetterCallback, TestObjectPythonV8Internal::reflectBooleanAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
{"reflectedId", TestObjectPythonV8Internal::reflectedIdAttributeGetterCallback, TestObjectPythonV8Internal::reflectedIdAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
{"reflectedName", TestObjectPythonV8Internal::reflectedNameAttributeGetterCallback, TestObjectPythonV8Internal::reflectedNameAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
{"reflectedClass", TestObjectPythonV8Internal::reflectedClassAttributeGetterCallback, TestObjectPythonV8Internal::reflectedClassAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
+ {"limitedToOnlyOneAttribute", TestObjectPythonV8Internal::limitedToOnlyOneAttributeAttributeGetterCallback, TestObjectPythonV8Internal::limitedToOnlyOneAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
+ {"limitedToOnlyAttribute", TestObjectPythonV8Internal::limitedToOnlyAttributeAttributeGetterCallback, TestObjectPythonV8Internal::limitedToOnlyAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
+ {"limitedToOnlyOtherAttribute", TestObjectPythonV8Internal::limitedToOnlyOtherAttributeAttributeGetterCallback, TestObjectPythonV8Internal::limitedToOnlyOtherAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
+ {"limitedWithMissingDefaultAttribute", TestObjectPythonV8Internal::limitedWithMissingDefaultAttributeAttributeGetterCallback, TestObjectPythonV8Internal::limitedWithMissingDefaultAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
+ {"limitedWithInvalidMissingDefaultAttribute", TestObjectPythonV8Internal::limitedWithInvalidMissingDefaultAttributeAttributeGetterCallback, TestObjectPythonV8Internal::limitedWithInvalidMissingDefaultAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
+ {"corsSettingAttribute", TestObjectPythonV8Internal::corsSettingAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
+ {"limitedWithEmptyMissingInvalidAttribute", TestObjectPythonV8Internal::limitedWithEmptyMissingInvalidAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
{"replaceableReadonlyLongAttribute", TestObjectPythonV8Internal::replaceableReadonlyLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::TestObjectPythonReplaceableAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
+ {"locationReplaceable", TestObjectPythonV8Internal::locationReplaceableAttributeGetterCallback, TestObjectPythonV8Internal::locationReplaceableAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
{"setterCallWithActiveWindowAndFirstWindowStringAttribute", TestObjectPythonV8Internal::setterCallWithActiveWindowAndFirstWindowStringAttributeAttributeGetterCallback, TestObjectPythonV8Internal::setterCallWithActiveWindowAndFirstWindowStringAttributeAttributeSetterCallback, 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 */},
+ {"setterCallWithExecutionContextStringAttribute", TestObjectPythonV8Internal::setterCallWithExecutionContextStringAttributeAttributeGetterCallback, TestObjectPythonV8Internal::setterCallWithExecutionContextStringAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
{"strictTypeCheckingFloatAttribute", TestObjectPythonV8Internal::strictTypeCheckingFloatAttributeAttributeGetterCallback, TestObjectPythonV8Internal::strictTypeCheckingFloatAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
{"strictTypeCheckingTestInterfaceAttribute", TestObjectPythonV8Internal::strictTypeCheckingTestInterfaceAttributeAttributeGetterCallback, TestObjectPythonV8Internal::strictTypeCheckingTestInterfaceAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
{"treatNullAsNullStringStringAttribute", TestObjectPythonV8Internal::treatNullAsNullStringStringAttributeAttributeGetterCallback, TestObjectPythonV8Internal::treatNullAsNullStringStringAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
{"urlStringAttribute", TestObjectPythonV8Internal::urlStringAttributeAttributeGetterCallback, TestObjectPythonV8Internal::urlStringAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
{"unforgeableLongAttribute", TestObjectPythonV8Internal::unforgeableLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::unforgeableLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::PROHIBITS_OVERWRITING), static_cast<v8::PropertyAttribute>(v8::DontDelete), 0 /* on instance */},
{"anotherStringAttribute", TestObjectPythonV8Internal::anotherStringAttributeAttributeGetterCallback, TestObjectPythonV8Internal::anotherStringAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
+ {"testInterfacePythonAttribute", TestObjectPythonV8Internal::testInterfacePythonAttributeAttributeGetterCallback, TestObjectPythonV8Internal::testInterfacePythonAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
+ {"testInterfaceWillBeGarbageCollectedAttribute", TestObjectPythonV8Internal::testInterfaceWillBeGarbageCollectedAttributeAttributeGetterCallback, TestObjectPythonV8Internal::testInterfaceWillBeGarbageCollectedAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
};
static const V8DOMConfiguration::AccessorConfiguration V8TestObjectPythonAccessors[] = {
{"voidMethodAnyCallbackFunctionOptionalAnyArg", TestObjectPythonV8Internal::voidMethodAnyCallbackFunctionOptionalAnyArgMethodCallback, 0, 1},
{"compareHowMethod", TestObjectPythonV8Internal::compareHowMethodMethodCallback, 0, 0},
{"anyMethod", TestObjectPythonV8Internal::anyMethodMethodCallback, 0, 0},
- {"voidMethodMediaQueryListListenerArg", TestObjectPythonV8Internal::voidMethodMediaQueryListListenerArgMethodCallback, 0, 1},
{"voidMethodCompareHowArg", TestObjectPythonV8Internal::voidMethodCompareHowArgMethodCallback, 0, 1},
+ {"voidMethodEventTargetArg", TestObjectPythonV8Internal::voidMethodEventTargetArgMethodCallback, 0, 1},
+ {"voidMethodMediaQueryListListenerArg", TestObjectPythonV8Internal::voidMethodMediaQueryListListenerArgMethodCallback, 0, 1},
{"voidMethodAnyArg", TestObjectPythonV8Internal::voidMethodAnyArgMethodCallback, 0, 1},
{"voidMethodAttrArg", TestObjectPythonV8Internal::voidMethodAttrArgMethodCallback, 0, 1},
{"voidMethodDocumentArg", TestObjectPythonV8Internal::voidMethodDocumentArgMethodCallback, 0, 1},
{"overloadedPerWorldBindingsMethod", TestObjectPythonV8Internal::overloadedPerWorldBindingsMethodMethodCallback, TestObjectPythonV8Internal::overloadedPerWorldBindingsMethodMethodCallbackForMainWorld, 0},
{"addEventListener", TestObjectPythonV8Internal::addEventListenerMethodCallback, 0, 2},
{"removeEventListener", TestObjectPythonV8Internal::removeEventListenerMethodCallback, 0, 2},
+ {"dispatchEvent", TestObjectPythonV8Internal::dispatchEventMethodCallback, 0, 1},
{"voidMethodClampUnsignedShortArg", TestObjectPythonV8Internal::voidMethodClampUnsignedShortArgMethodCallback, 0, 1},
{"voidMethodClampUnsignedLongArg", TestObjectPythonV8Internal::voidMethodClampUnsignedLongArgMethodCallback, 0, 1},
{"voidMethodDefaultUndefinedTestInterfaceEmptyArg", TestObjectPythonV8Internal::voidMethodDefaultUndefinedTestInterfaceEmptyArgMethodCallback, 0, 0},
{"implementedAsVoidMethod", TestObjectPythonV8Internal::implementedAsVoidMethodMethodCallback, 0, 0},
{"measureAsVoidMethod", TestObjectPythonV8Internal::measureAsVoidMethodMethodCallback, 0, 0},
{"perWorldBindingsVoidMethod", TestObjectPythonV8Internal::perWorldBindingsVoidMethodMethodCallback, TestObjectPythonV8Internal::perWorldBindingsVoidMethodMethodCallbackForMainWorld, 0},
+ {"perWorldBindingsVoidMethodTestInterfaceEmptyArg", TestObjectPythonV8Internal::perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodCallback, TestObjectPythonV8Internal::perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodCallbackForMainWorld, 1},
{"activityLoggingForAllWorldsPerWorldBindingsVoidMethod", TestObjectPythonV8Internal::activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodCallback, TestObjectPythonV8Internal::activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodCallbackForMainWorld, 0},
{"activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethod", TestObjectPythonV8Internal::activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethodCallback, TestObjectPythonV8Internal::activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethodCallbackForMainWorld, 0},
- {"perWorldBindingsVoidMethodTestInterfaceEmptyArg", TestObjectPythonV8Internal::perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodCallback, TestObjectPythonV8Internal::perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodCallbackForMainWorld, 1},
{"raisesExceptionVoidMethod", TestObjectPythonV8Internal::raisesExceptionVoidMethodMethodCallback, 0, 0},
{"raisesExceptionStringMethod", TestObjectPythonV8Internal::raisesExceptionStringMethodMethodCallback, 0, 0},
{"raisesExceptionVoidMethodOptionalLongArg", TestObjectPythonV8Internal::raisesExceptionVoidMethodOptionalLongArgMethodCallback, 0, 0},
{"perContextEnabledLongAttribute", TestObjectPythonV8Internal::perContextEnabledLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::perContextEnabledLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */};
V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate, attributeConfiguration, isolate);
}
+ if (ContextFeatures::featureNameEnabled(impl->document())) {
+ static const V8DOMConfiguration::AttributeConfiguration attributeConfiguration =\
+ {"perContextEnabledRuntimeEnabledLongAttribute", TestObjectPythonV8Internal::perContextEnabledRuntimeEnabledLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::perContextEnabledRuntimeEnabledLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */};
+ V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate, attributeConfiguration, isolate);
+ }
}
void V8TestObjectPython::installPerContextEnabledMethods(v8::Handle<v8::Object> prototypeTemplate, v8::Isolate* isolate)