Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (209246 => 209247)
--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm 2016-12-02 18:38:12 UTC (rev 209246)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm 2016-12-02 18:40:50 UTC (rev 209247)
@@ -3325,34 +3325,6 @@
push(@implContent, " return jsUndefined();\n");
}
- if ($attribute->extendedAttributes->{Nondeterministic}) {
- AddToImplIncludes("MemoizedDOMResult.h", "WEB_REPLAY");
- AddToImplIncludes("<replay/InputCursor.h>", "WEB_REPLAY");
- AddToImplIncludes("<wtf/NeverDestroyed.h>", "WEB_REPLAY");
-
- push(@implContent, "#if ENABLE(WEB_REPLAY)\n");
- push(@implContent, " auto& cursor = state.lexicalGlobalObject()->inputCursor();\n");
-
- my $nativeType = GetNativeType($interface, $type);
- my $memoizedType = GetNativeTypeForMemoization($interface, $type);
- push(@implContent, " static NeverDestroyed<const AtomicString> bindingName(\"$interfaceName.$name\", AtomicString::ConstructFromLiteral);\n");
- push(@implContent, " if (cursor.isCapturing()) {\n");
- push(@implContent, " $memoizedType memoizedResult = thisObject.wrapped().$implGetterFunctionName();\n");
- push(@implContent, " cursor.appendInput<MemoizedDOMResult<$memoizedType>>(bindingName.get().string(), memoizedResult, 0);\n");
- push(@implContent, " return " . NativeToJSValueUsingReferences($attribute, 0, $interface, "memoizedResult", "thisObject") . ";\n");
- push(@implContent, " }\n");
- push(@implContent, "\n");
- push(@implContent, " if (cursor.isReplaying()) {\n");
- push(@implContent, " $memoizedType memoizedResult;\n");
- push(@implContent, " MemoizedDOMResultBase* input = cursor.fetchInput<MemoizedDOMResultBase>();\n");
- push(@implContent, " if (input && input->convertTo<$memoizedType>(memoizedResult)) {\n");
- # FIXME: the generated code should report an error if an input cannot be fetched or converted.
- push(@implContent, " return " . NativeToJSValueUsingReferences($attribute, 0, $interface, "memoizedResult", "thisObject") . ";\n");
- push(@implContent, " }\n");
- push(@implContent, " }\n");
- push(@implContent, "#endif\n");
- } # attribute Nondeterministic
-
if (HasCustomGetter($attribute->extendedAttributes)) {
push(@implContent, " return thisObject.$implGetterFunctionName(state);\n");
} elsif ($type->name eq "EventHandler") {
@@ -4868,49 +4840,11 @@
{
my ($function, $functionString, $indent, $interface) = @_;
- my $nondeterministic = $function->extendedAttributes->{Nondeterministic};
-
if ($function->type->name eq "void" || IsReturningPromise($function)) {
- if ($nondeterministic) {
- AddToImplIncludes("<replay/InputCursor.h>", "WEB_REPLAY");
- push(@implContent, "#if ENABLE(WEB_REPLAY)\n");
- push(@implContent, $indent . "InputCursor& cursor = state->lexicalGlobalObject()->inputCursor();\n");
- push(@implContent, $indent . "if (!cursor.isReplaying())\n");
- push(@implContent, $indent . " $functionString;\n");
- push(@implContent, "#else\n");
- push(@implContent, $indent . "$functionString;\n");
- push(@implContent, "#endif\n");
- } else {
- push(@implContent, $indent . "$functionString;\n");
- }
+ push(@implContent, $indent . "$functionString;\n");
push(@implContent, $indent . "return JSValue::encode(jsUndefined());\n");
} else {
my $thisObject = $function->isStatic ? 0 : "castedThis";
- if ($nondeterministic) {
- AddToImplIncludes("MemoizedDOMResult.h", "WEB_REPLAY");
- AddToImplIncludes("<replay/InputCursor.h>", "WEB_REPLAY");
- AddToImplIncludes("<wtf/NeverDestroyed.h>", "WEB_REPLAY");
-
- my $nativeType = GetNativeType($interface, $function->type);
- my $memoizedType = GetNativeTypeForMemoization($interface, $function->type);
- my $bindingName = $interface->type->name . "." . $function->name;
- push(@implContent, "#if ENABLE(WEB_REPLAY)\n");
- push(@implContent, $indent . "auto& cursor = state->lexicalGlobalObject()->inputCursor();\n");
- push(@implContent, $indent . "static NeverDestroyed<const AtomicString> bindingName(\"$bindingName\", AtomicString::ConstructFromLiteral);\n");
- push(@implContent, $indent . "if (cursor.isCapturing()) {\n");
- push(@implContent, $indent . " $nativeType memoizedResult = $functionString;\n");
- push(@implContent, $indent . " cursor.appendInput<MemoizedDOMResult<$memoizedType>>(bindingName.get().string(), memoizedResult, 0);\n");
- push(@implContent, $indent . " return JSValue::encode(" . NativeToJSValueUsingPointers($function, 1, $interface, "memoizedResult", $thisObject) . ");\n");
- push(@implContent, $indent . "}\n");
- push(@implContent, $indent . "if (cursor.isReplaying()) {\n");
- push(@implContent, $indent . " auto* input = cursor.fetchInput<MemoizedDOMResultBase>();\n");
- push(@implContent, $indent . " $memoizedType memoizedResult;\n");
- # FIXME: the generated code should report an error if an input cannot be fetched or converted.
- push(@implContent, $indent . " if (input && input->convertTo<$memoizedType>(memoizedResult))\n");
- push(@implContent, $indent . " return JSValue::encode(" . NativeToJSValueUsingPointers($function, 1, $interface, "memoizedResult", $thisObject) . ");\n");
- push(@implContent, $indent . "}\n");
- push(@implContent, "#endif\n");
- }
push(@implContent, $indent . "return JSValue::encode(" . NativeToJSValueUsingPointers($function, 1, $interface, $functionString, $thisObject) . ");\n");
}
}
@@ -5202,13 +5136,6 @@
return GetNativeType($interface, $type);
}
-sub GetNativeTypeForMemoization
-{
- my ($interface, $type) = @_;
-
- return GetNativeType($interface, $type);
-}
-
sub ShouldPassArgumentByReference
{
my ($argument) = @_;
Deleted: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.cpp (209246 => 209247)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.cpp 2016-12-02 18:38:12 UTC (rev 209246)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.cpp 2016-12-02 18:40:50 UTC (rev 209247)
@@ -1,520 +0,0 @@
-/*
- This file is part of the WebKit open source project.
- This file has been generated by generate-bindings.pl. DO NOT MODIFY!
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to
- the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA.
-*/
-
-#include "config.h"
-#include "JSTestNondeterministic.h"
-
-#include "JSDOMBinding.h"
-#include "JSDOMConstructor.h"
-#include "JSDOMConvert.h"
-#include <runtime/Error.h>
-#include <runtime/FunctionPrototype.h>
-#include <wtf/GetPtr.h>
-
-#if ENABLE(WEB_REPLAY)
-#include "MemoizedDOMResult.h"
-#include <replay/InputCursor.h>
-#endif
-
-using namespace JSC;
-
-namespace WebCore {
-
-// Functions
-
-JSC::EncodedJSValue JSC_HOST_CALL jsTestNondeterministicPrototypeFunctionNondeterministicZeroArgFunction(JSC::ExecState*);
-
-// Attributes
-
-JSC::EncodedJSValue jsTestNondeterministicNondeterministicReadonlyAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
-JSC::EncodedJSValue jsTestNondeterministicNondeterministicWriteableAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
-bool setJSTestNondeterministicNondeterministicWriteableAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
-JSC::EncodedJSValue jsTestNondeterministicNondeterministicExceptionAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
-bool setJSTestNondeterministicNondeterministicExceptionAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
-JSC::EncodedJSValue jsTestNondeterministicNondeterministicGetterExceptionAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
-bool setJSTestNondeterministicNondeterministicGetterExceptionAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
-JSC::EncodedJSValue jsTestNondeterministicNondeterministicSetterExceptionAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
-bool setJSTestNondeterministicNondeterministicSetterExceptionAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
-JSC::EncodedJSValue jsTestNondeterministicConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
-bool setJSTestNondeterministicConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
-
-class JSTestNondeterministicPrototype : public JSC::JSNonFinalObject {
-public:
- using Base = JSC::JSNonFinalObject;
- static JSTestNondeterministicPrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
- {
- JSTestNondeterministicPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestNondeterministicPrototype>(vm.heap)) JSTestNondeterministicPrototype(vm, globalObject, structure);
- ptr->finishCreation(vm);
- return ptr;
- }
-
- DECLARE_INFO;
- static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
- {
- return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
- }
-
-private:
- JSTestNondeterministicPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure)
- : JSC::JSNonFinalObject(vm, structure)
- {
- }
-
- void finishCreation(JSC::VM&);
-};
-
-using JSTestNondeterministicConstructor = JSDOMConstructorNotConstructable<JSTestNondeterministic>;
-
-template<> JSValue JSTestNondeterministicConstructor::prototypeForStructure(JSC::VM& vm, const JSDOMGlobalObject& globalObject)
-{
- UNUSED_PARAM(vm);
- return globalObject.functionPrototype();
-}
-
-template<> void JSTestNondeterministicConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
-{
- putDirect(vm, vm.propertyNames->prototype, JSTestNondeterministic::prototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum);
- putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestNondeterministic"))), ReadOnly | DontEnum);
- putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum);
-}
-
-template<> const ClassInfo JSTestNondeterministicConstructor::s_info = { "TestNondeterministic", &Base::s_info, 0, CREATE_METHOD_TABLE(JSTestNondeterministicConstructor) };
-
-/* Hash table for prototype */
-
-static const HashTableValue JSTestNondeterministicPrototypeTableValues[] =
-{
- { "constructor", DontEnum, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestNondeterministicConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestNondeterministicConstructor) } },
- { "nondeterministicReadonlyAttr", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestNondeterministicNondeterministicReadonlyAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
- { "nondeterministicWriteableAttr", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestNondeterministicNondeterministicWriteableAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestNondeterministicNondeterministicWriteableAttr) } },
- { "nondeterministicExceptionAttr", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestNondeterministicNondeterministicExceptionAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestNondeterministicNondeterministicExceptionAttr) } },
- { "nondeterministicGetterExceptionAttr", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestNondeterministicNondeterministicGetterExceptionAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestNondeterministicNondeterministicGetterExceptionAttr) } },
- { "nondeterministicSetterExceptionAttr", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestNondeterministicNondeterministicSetterExceptionAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestNondeterministicNondeterministicSetterExceptionAttr) } },
- { "nondeterministicZeroArgFunction", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestNondeterministicPrototypeFunctionNondeterministicZeroArgFunction), (intptr_t) (0) } },
-};
-
-const ClassInfo JSTestNondeterministicPrototype::s_info = { "TestNondeterministicPrototype", &Base::s_info, 0, CREATE_METHOD_TABLE(JSTestNondeterministicPrototype) };
-
-void JSTestNondeterministicPrototype::finishCreation(VM& vm)
-{
- Base::finishCreation(vm);
- reifyStaticProperties(vm, JSTestNondeterministicPrototypeTableValues, *this);
-}
-
-const ClassInfo JSTestNondeterministic::s_info = { "TestNondeterministic", &Base::s_info, 0, CREATE_METHOD_TABLE(JSTestNondeterministic) };
-
-JSTestNondeterministic::JSTestNondeterministic(Structure* structure, JSDOMGlobalObject& globalObject, Ref<TestNondeterministic>&& impl)
- : JSDOMWrapper<TestNondeterministic>(structure, globalObject, WTFMove(impl))
-{
-}
-
-void JSTestNondeterministic::finishCreation(VM& vm)
-{
- Base::finishCreation(vm);
- ASSERT(inherits(info()));
-
-}
-
-JSObject* JSTestNondeterministic::createPrototype(VM& vm, JSGlobalObject* globalObject)
-{
- return JSTestNondeterministicPrototype::create(vm, globalObject, JSTestNondeterministicPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));
-}
-
-JSObject* JSTestNondeterministic::prototype(VM& vm, JSGlobalObject* globalObject)
-{
- return getDOMPrototype<JSTestNondeterministic>(vm, globalObject);
-}
-
-void JSTestNondeterministic::destroy(JSC::JSCell* cell)
-{
- JSTestNondeterministic* thisObject = static_cast<JSTestNondeterministic*>(cell);
- thisObject->JSTestNondeterministic::~JSTestNondeterministic();
-}
-
-template<> inline JSTestNondeterministic* BindingCaller<JSTestNondeterministic>::castForAttribute(ExecState&, EncodedJSValue thisValue)
-{
- return jsDynamicDowncast<JSTestNondeterministic*>(JSValue::decode(thisValue));
-}
-
-template<> inline JSTestNondeterministic* BindingCaller<JSTestNondeterministic>::castForOperation(ExecState& state)
-{
- return jsDynamicDowncast<JSTestNondeterministic*>(state.thisValue());
-}
-
-static inline JSValue jsTestNondeterministicNondeterministicReadonlyAttrGetter(ExecState&, JSTestNondeterministic&, ThrowScope& throwScope);
-
-EncodedJSValue jsTestNondeterministicNondeterministicReadonlyAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
-{
- return BindingCaller<JSTestNondeterministic>::attribute<jsTestNondeterministicNondeterministicReadonlyAttrGetter>(state, thisValue, "nondeterministicReadonlyAttr");
-}
-
-static inline JSValue jsTestNondeterministicNondeterministicReadonlyAttrGetter(ExecState& state, JSTestNondeterministic& thisObject, ThrowScope& throwScope)
-{
- UNUSED_PARAM(throwScope);
- UNUSED_PARAM(state);
-#if ENABLE(WEB_REPLAY)
- auto& cursor = state.lexicalGlobalObject()->inputCursor();
- static NeverDestroyed<const AtomicString> bindingName("TestNondeterministic.nondeterministicReadonlyAttr", AtomicString::ConstructFromLiteral);
- if (cursor.isCapturing()) {
- int32_t memoizedResult = thisObject.wrapped().nondeterministicReadonlyAttr();
- cursor.appendInput<MemoizedDOMResult<int32_t>>(bindingName.get().string(), memoizedResult, 0);
- return toJS<IDLLong>(memoizedResult);
- }
-
- if (cursor.isReplaying()) {
- int32_t memoizedResult;
- MemoizedDOMResultBase* input = cursor.fetchInput<MemoizedDOMResultBase>();
- if (input && input->convertTo<int32_t>(memoizedResult)) {
- return toJS<IDLLong>(memoizedResult);
- }
- }
-#endif
- auto& impl = thisObject.wrapped();
- JSValue result = toJS<IDLLong>(impl.nondeterministicReadonlyAttr());
- return result;
-}
-
-static inline JSValue jsTestNondeterministicNondeterministicWriteableAttrGetter(ExecState&, JSTestNondeterministic&, ThrowScope& throwScope);
-
-EncodedJSValue jsTestNondeterministicNondeterministicWriteableAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
-{
- return BindingCaller<JSTestNondeterministic>::attribute<jsTestNondeterministicNondeterministicWriteableAttrGetter>(state, thisValue, "nondeterministicWriteableAttr");
-}
-
-static inline JSValue jsTestNondeterministicNondeterministicWriteableAttrGetter(ExecState& state, JSTestNondeterministic& thisObject, ThrowScope& throwScope)
-{
- UNUSED_PARAM(throwScope);
- UNUSED_PARAM(state);
-#if ENABLE(WEB_REPLAY)
- auto& cursor = state.lexicalGlobalObject()->inputCursor();
- static NeverDestroyed<const AtomicString> bindingName("TestNondeterministic.nondeterministicWriteableAttr", AtomicString::ConstructFromLiteral);
- if (cursor.isCapturing()) {
- String memoizedResult = thisObject.wrapped().nondeterministicWriteableAttr();
- cursor.appendInput<MemoizedDOMResult<String>>(bindingName.get().string(), memoizedResult, 0);
- return toJS<IDLDOMString>(state, memoizedResult);
- }
-
- if (cursor.isReplaying()) {
- String memoizedResult;
- MemoizedDOMResultBase* input = cursor.fetchInput<MemoizedDOMResultBase>();
- if (input && input->convertTo<String>(memoizedResult)) {
- return toJS<IDLDOMString>(state, memoizedResult);
- }
- }
-#endif
- auto& impl = thisObject.wrapped();
- JSValue result = toJS<IDLDOMString>(state, impl.nondeterministicWriteableAttr());
- return result;
-}
-
-static inline JSValue jsTestNondeterministicNondeterministicExceptionAttrGetter(ExecState&, JSTestNondeterministic&, ThrowScope& throwScope);
-
-EncodedJSValue jsTestNondeterministicNondeterministicExceptionAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
-{
- return BindingCaller<JSTestNondeterministic>::attribute<jsTestNondeterministicNondeterministicExceptionAttrGetter>(state, thisValue, "nondeterministicExceptionAttr");
-}
-
-static inline JSValue jsTestNondeterministicNondeterministicExceptionAttrGetter(ExecState& state, JSTestNondeterministic& thisObject, ThrowScope& throwScope)
-{
- UNUSED_PARAM(throwScope);
- UNUSED_PARAM(state);
-#if ENABLE(WEB_REPLAY)
- auto& cursor = state.lexicalGlobalObject()->inputCursor();
- static NeverDestroyed<const AtomicString> bindingName("TestNondeterministic.nondeterministicExceptionAttr", AtomicString::ConstructFromLiteral);
- if (cursor.isCapturing()) {
- String memoizedResult = thisObject.wrapped().nondeterministicExceptionAttr();
- cursor.appendInput<MemoizedDOMResult<String>>(bindingName.get().string(), memoizedResult, 0);
- return toJS<IDLDOMString>(state, memoizedResult);
- }
-
- if (cursor.isReplaying()) {
- String memoizedResult;
- MemoizedDOMResultBase* input = cursor.fetchInput<MemoizedDOMResultBase>();
- if (input && input->convertTo<String>(memoizedResult)) {
- return toJS<IDLDOMString>(state, memoizedResult);
- }
- }
-#endif
- auto& impl = thisObject.wrapped();
- JSValue result = toJS<IDLDOMString>(state, impl.nondeterministicExceptionAttr());
- return result;
-}
-
-static inline JSValue jsTestNondeterministicNondeterministicGetterExceptionAttrGetter(ExecState&, JSTestNondeterministic&, ThrowScope& throwScope);
-
-EncodedJSValue jsTestNondeterministicNondeterministicGetterExceptionAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
-{
- return BindingCaller<JSTestNondeterministic>::attribute<jsTestNondeterministicNondeterministicGetterExceptionAttrGetter>(state, thisValue, "nondeterministicGetterExceptionAttr");
-}
-
-static inline JSValue jsTestNondeterministicNondeterministicGetterExceptionAttrGetter(ExecState& state, JSTestNondeterministic& thisObject, ThrowScope& throwScope)
-{
- UNUSED_PARAM(throwScope);
- UNUSED_PARAM(state);
-#if ENABLE(WEB_REPLAY)
- auto& cursor = state.lexicalGlobalObject()->inputCursor();
- static NeverDestroyed<const AtomicString> bindingName("TestNondeterministic.nondeterministicGetterExceptionAttr", AtomicString::ConstructFromLiteral);
- if (cursor.isCapturing()) {
- String memoizedResult = thisObject.wrapped().nondeterministicGetterExceptionAttr();
- cursor.appendInput<MemoizedDOMResult<String>>(bindingName.get().string(), memoizedResult, 0);
- return toJS<IDLDOMString>(state, memoizedResult);
- }
-
- if (cursor.isReplaying()) {
- String memoizedResult;
- MemoizedDOMResultBase* input = cursor.fetchInput<MemoizedDOMResultBase>();
- if (input && input->convertTo<String>(memoizedResult)) {
- return toJS<IDLDOMString>(state, memoizedResult);
- }
- }
-#endif
- auto& impl = thisObject.wrapped();
- JSValue result = toJS<IDLDOMString>(state, impl.nondeterministicGetterExceptionAttr());
- return result;
-}
-
-static inline JSValue jsTestNondeterministicNondeterministicSetterExceptionAttrGetter(ExecState&, JSTestNondeterministic&, ThrowScope& throwScope);
-
-EncodedJSValue jsTestNondeterministicNondeterministicSetterExceptionAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
-{
- return BindingCaller<JSTestNondeterministic>::attribute<jsTestNondeterministicNondeterministicSetterExceptionAttrGetter>(state, thisValue, "nondeterministicSetterExceptionAttr");
-}
-
-static inline JSValue jsTestNondeterministicNondeterministicSetterExceptionAttrGetter(ExecState& state, JSTestNondeterministic& thisObject, ThrowScope& throwScope)
-{
- UNUSED_PARAM(throwScope);
- UNUSED_PARAM(state);
-#if ENABLE(WEB_REPLAY)
- auto& cursor = state.lexicalGlobalObject()->inputCursor();
- static NeverDestroyed<const AtomicString> bindingName("TestNondeterministic.nondeterministicSetterExceptionAttr", AtomicString::ConstructFromLiteral);
- if (cursor.isCapturing()) {
- String memoizedResult = thisObject.wrapped().nondeterministicSetterExceptionAttr();
- cursor.appendInput<MemoizedDOMResult<String>>(bindingName.get().string(), memoizedResult, 0);
- return toJS<IDLDOMString>(state, memoizedResult);
- }
-
- if (cursor.isReplaying()) {
- String memoizedResult;
- MemoizedDOMResultBase* input = cursor.fetchInput<MemoizedDOMResultBase>();
- if (input && input->convertTo<String>(memoizedResult)) {
- return toJS<IDLDOMString>(state, memoizedResult);
- }
- }
-#endif
- auto& impl = thisObject.wrapped();
- JSValue result = toJS<IDLDOMString>(state, impl.nondeterministicSetterExceptionAttr());
- return result;
-}
-
-EncodedJSValue jsTestNondeterministicConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
-{
- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
- JSTestNondeterministicPrototype* domObject = jsDynamicDowncast<JSTestNondeterministicPrototype*>(JSValue::decode(thisValue));
- if (UNLIKELY(!domObject))
- return throwVMTypeError(state, throwScope);
- return JSValue::encode(JSTestNondeterministic::getConstructor(state->vm(), domObject->globalObject()));
-}
-
-bool setJSTestNondeterministicConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
-{
- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
- JSValue value = JSValue::decode(encodedValue);
- JSTestNondeterministicPrototype* domObject = jsDynamicDowncast<JSTestNondeterministicPrototype*>(JSValue::decode(thisValue));
- if (UNLIKELY(!domObject)) {
- throwVMTypeError(state, throwScope);
- return false;
- }
- // Shadowing a built-in constructor
- return domObject->putDirect(state->vm(), state->propertyNames().constructor, value);
-}
-
-static inline bool setJSTestNondeterministicNondeterministicWriteableAttrFunction(ExecState&, JSTestNondeterministic&, JSValue, ThrowScope&);
-
-bool setJSTestNondeterministicNondeterministicWriteableAttr(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
-{
- return BindingCaller<JSTestNondeterministic>::setAttribute<setJSTestNondeterministicNondeterministicWriteableAttrFunction>(state, thisValue, encodedValue, "nondeterministicWriteableAttr");
-}
-
-static inline bool setJSTestNondeterministicNondeterministicWriteableAttrFunction(ExecState& state, JSTestNondeterministic& thisObject, JSValue value, ThrowScope& throwScope)
-{
- UNUSED_PARAM(state);
- UNUSED_PARAM(throwScope);
- auto& impl = thisObject.wrapped();
- auto nativeValue = convert<IDLDOMString>(state, value, StringConversionConfiguration::Normal);
- RETURN_IF_EXCEPTION(throwScope, false);
- impl.setNondeterministicWriteableAttr(WTFMove(nativeValue));
- return true;
-}
-
-
-static inline bool setJSTestNondeterministicNondeterministicExceptionAttrFunction(ExecState&, JSTestNondeterministic&, JSValue, ThrowScope&);
-
-bool setJSTestNondeterministicNondeterministicExceptionAttr(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
-{
- return BindingCaller<JSTestNondeterministic>::setAttribute<setJSTestNondeterministicNondeterministicExceptionAttrFunction>(state, thisValue, encodedValue, "nondeterministicExceptionAttr");
-}
-
-static inline bool setJSTestNondeterministicNondeterministicExceptionAttrFunction(ExecState& state, JSTestNondeterministic& thisObject, JSValue value, ThrowScope& throwScope)
-{
- UNUSED_PARAM(state);
- UNUSED_PARAM(throwScope);
- auto& impl = thisObject.wrapped();
- auto nativeValue = convert<IDLDOMString>(state, value, StringConversionConfiguration::Normal);
- RETURN_IF_EXCEPTION(throwScope, false);
- impl.setNondeterministicExceptionAttr(WTFMove(nativeValue));
- return true;
-}
-
-
-static inline bool setJSTestNondeterministicNondeterministicGetterExceptionAttrFunction(ExecState&, JSTestNondeterministic&, JSValue, ThrowScope&);
-
-bool setJSTestNondeterministicNondeterministicGetterExceptionAttr(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
-{
- return BindingCaller<JSTestNondeterministic>::setAttribute<setJSTestNondeterministicNondeterministicGetterExceptionAttrFunction>(state, thisValue, encodedValue, "nondeterministicGetterExceptionAttr");
-}
-
-static inline bool setJSTestNondeterministicNondeterministicGetterExceptionAttrFunction(ExecState& state, JSTestNondeterministic& thisObject, JSValue value, ThrowScope& throwScope)
-{
- UNUSED_PARAM(state);
- UNUSED_PARAM(throwScope);
- auto& impl = thisObject.wrapped();
- auto nativeValue = convert<IDLDOMString>(state, value, StringConversionConfiguration::Normal);
- RETURN_IF_EXCEPTION(throwScope, false);
- impl.setNondeterministicGetterExceptionAttr(WTFMove(nativeValue));
- return true;
-}
-
-
-static inline bool setJSTestNondeterministicNondeterministicSetterExceptionAttrFunction(ExecState&, JSTestNondeterministic&, JSValue, ThrowScope&);
-
-bool setJSTestNondeterministicNondeterministicSetterExceptionAttr(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
-{
- return BindingCaller<JSTestNondeterministic>::setAttribute<setJSTestNondeterministicNondeterministicSetterExceptionAttrFunction>(state, thisValue, encodedValue, "nondeterministicSetterExceptionAttr");
-}
-
-static inline bool setJSTestNondeterministicNondeterministicSetterExceptionAttrFunction(ExecState& state, JSTestNondeterministic& thisObject, JSValue value, ThrowScope& throwScope)
-{
- UNUSED_PARAM(state);
- UNUSED_PARAM(throwScope);
- auto& impl = thisObject.wrapped();
- auto nativeValue = convert<IDLDOMString>(state, value, StringConversionConfiguration::Normal);
- RETURN_IF_EXCEPTION(throwScope, false);
- impl.setNondeterministicSetterExceptionAttr(WTFMove(nativeValue));
- return true;
-}
-
-
-JSValue JSTestNondeterministic::getConstructor(VM& vm, const JSGlobalObject* globalObject)
-{
- return getDOMConstructor<JSTestNondeterministicConstructor>(vm, *jsCast<const JSDOMGlobalObject*>(globalObject));
-}
-
-static inline JSC::EncodedJSValue jsTestNondeterministicPrototypeFunctionNondeterministicZeroArgFunctionCaller(JSC::ExecState*, JSTestNondeterministic*, JSC::ThrowScope&);
-
-EncodedJSValue JSC_HOST_CALL jsTestNondeterministicPrototypeFunctionNondeterministicZeroArgFunction(ExecState* state)
-{
- return BindingCaller<JSTestNondeterministic>::callOperation<jsTestNondeterministicPrototypeFunctionNondeterministicZeroArgFunctionCaller>(state, "nondeterministicZeroArgFunction");
-}
-
-static inline JSC::EncodedJSValue jsTestNondeterministicPrototypeFunctionNondeterministicZeroArgFunctionCaller(JSC::ExecState* state, JSTestNondeterministic* castedThis, JSC::ThrowScope& throwScope)
-{
- UNUSED_PARAM(state);
- UNUSED_PARAM(throwScope);
- auto& impl = castedThis->wrapped();
-#if ENABLE(WEB_REPLAY)
- auto& cursor = state->lexicalGlobalObject()->inputCursor();
- static NeverDestroyed<const AtomicString> bindingName("TestNondeterministic.nondeterministicZeroArgFunction", AtomicString::ConstructFromLiteral);
- if (cursor.isCapturing()) {
- bool memoizedResult = impl.nondeterministicZeroArgFunction();
- cursor.appendInput<MemoizedDOMResult<bool>>(bindingName.get().string(), memoizedResult, 0);
- return JSValue::encode(toJS<IDLBoolean>(memoizedResult));
- }
- if (cursor.isReplaying()) {
- auto* input = cursor.fetchInput<MemoizedDOMResultBase>();
- bool memoizedResult;
- if (input && input->convertTo<bool>(memoizedResult))
- return JSValue::encode(toJS<IDLBoolean>(memoizedResult));
- }
-#endif
- return JSValue::encode(toJS<IDLBoolean>(impl.nondeterministicZeroArgFunction()));
-}
-
-bool JSTestNondeterministicOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor)
-{
- UNUSED_PARAM(handle);
- UNUSED_PARAM(visitor);
- return false;
-}
-
-void JSTestNondeterministicOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)
-{
- auto* jsTestNondeterministic = jsCast<JSTestNondeterministic*>(handle.slot()->asCell());
- auto& world = *static_cast<DOMWrapperWorld*>(context);
- uncacheWrapper(world, &jsTestNondeterministic->wrapped(), jsTestNondeterministic);
-}
-
-#if ENABLE(BINDING_INTEGRITY)
-#if PLATFORM(WIN)
-#pragma warning(disable: 4483)
-extern "C" { extern void (*const __identifier("??_7TestNondeterministic@WebCore@@6B@")[])(); }
-#else
-extern "C" { extern void* _ZTVN7WebCore20TestNondeterministicE[]; }
-#endif
-#endif
-
-JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, Ref<TestNondeterministic>&& impl)
-{
-
-#if ENABLE(BINDING_INTEGRITY)
- void* actualVTablePointer = *(reinterpret_cast<void**>(impl.ptr()));
-#if PLATFORM(WIN)
- void* expectedVTablePointer = reinterpret_cast<void*>(__identifier("??_7TestNondeterministic@WebCore@@6B@"));
-#else
- void* expectedVTablePointer = &_ZTVN7WebCore20TestNondeterministicE[2];
-#if COMPILER(CLANG)
- // If this fails TestNondeterministic does not have a vtable, so you need to add the
- // ImplementationLacksVTable attribute to the interface definition
- static_assert(__is_polymorphic(TestNondeterministic), "TestNondeterministic is not polymorphic");
-#endif
-#endif
- // If you hit this assertion you either have a use after free bug, or
- // TestNondeterministic has subclasses. If TestNondeterministic has subclasses that get passed
- // to toJS() we currently require TestNondeterministic you to opt out of binding hardening
- // by adding the SkipVTableValidation attribute to the interface IDL definition
- RELEASE_ASSERT(actualVTablePointer == expectedVTablePointer);
-#endif
- return createWrapper<TestNondeterministic>(globalObject, WTFMove(impl));
-}
-
-JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestNondeterministic& impl)
-{
- return wrap(state, globalObject, impl);
-}
-
-TestNondeterministic* JSTestNondeterministic::toWrapped(JSC::JSValue value)
-{
- if (auto* wrapper = jsDynamicDowncast<JSTestNondeterministic*>(value))
- return &wrapper->wrapped();
- return nullptr;
-}
-
-}