WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-217667-20201013150944.patch (text/plain), 30.27 KB, created by
Sam Weinig
on 2020-10-13 15:09:45 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Sam Weinig
Created:
2020-10-13 15:09:45 PDT
Size:
30.27 KB
patch
obsolete
>Index: Source/WebCore/ChangeLog >=================================================================== >--- Source/WebCore/ChangeLog (revision 268419) >+++ Source/WebCore/ChangeLog (working copy) >@@ -1,3 +1,37 @@ >+2020-10-13 Sam Weinig <weinig@apple.com> >+ >+ [WebIDL] Add support for identifiers with dashes ('-') >+ https://bugs.webkit.org/show_bug.cgi?id=217667 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ To support CSSStyleDeclaration.idl correctly, we need to add support for dashes ('-') >+ in WebIDL identifers. >+ >+ * bindings/scripts/IDLParser.pm: >+ Update identifer regular expression to match current spec which allows for dashes ('-'). >+ >+ * bindings/scripts/CodeGeneratorJS.pm: >+ (MangleAttributeOrFunctionName): >+ Helper to centralize mangling required to construct valid c++ identifiers from the WebIDL >+ identifiers, since now WebIDL identifiers can contain dashes ('-'), which is not valid in >+ c++. For now, we use a very simple mangling which replaces all dashes ('-') with the string >+ "_dash_". >+ >+ (GetAttributeGetterName): >+ (GetAttributeSetterName): >+ (GetFunctionName): >+ Clarify and cleanup logic a bit and call the new mangler. >+ >+ (GenerateImplementation): >+ GetAttributeGetterName will now always use the $className, so this caller needs to actually >+ pass the right value in. Previously, the $generatorName it passed in was not actually used. >+ Also removes some duplicate definitions of $interfaceName. >+ >+ * bindings/scripts/test/JS/JSTestObj.cpp: >+ * bindings/scripts/test/TestObj.idl: >+ Adds tests for various combinations of underscores and dashes in identifiers. >+ > 2020-10-13 Simon Fraser <simon.fraser@apple.com> > > Plumb OptionSet<WheelEventProcessingSteps> through the wheel event handling code >Index: Source/WebCore/bindings/scripts/CodeGeneratorJS.pm >=================================================================== >--- Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (revision 268392) >+++ Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (working copy) >@@ -1847,22 +1847,33 @@ sub PassArgumentExpression > return "WTFMove(${name})"; > } > >+sub MangleAttributeOrFunctionName >+{ >+ my ($name) = @_; >+ >+ $name =~ s/-/_dash_/g; >+ >+ return $name; >+} >+ > sub GetAttributeGetterName > { > my ($interface, $className, $attribute) = @_; > >- return $codeGenerator->WK_lcfirst($className) . "Constructor" . $codeGenerator->WK_ucfirst($attribute->name) if $attribute->isStatic; > return GetJSBuiltinFunctionName($className, $attribute) if IsJSBuiltin($interface, $attribute); >- return "js" . $interface->type->name . $codeGenerator->WK_ucfirst($attribute->name) . ($codeGenerator->IsConstructorType($attribute->type) ? "Constructor" : ""); >+ return $codeGenerator->WK_lcfirst($className) . "Constructor" . $codeGenerator->WK_ucfirst(MangleAttributeOrFunctionName($attribute->name)) if $attribute->isStatic; >+ return $codeGenerator->WK_lcfirst($className) . $codeGenerator->WK_ucfirst(MangleAttributeOrFunctionName($attribute->name)) . "Constructor" if $codeGenerator->IsConstructorType($attribute->type); >+ return $codeGenerator->WK_lcfirst($className) . $codeGenerator->WK_ucfirst(MangleAttributeOrFunctionName($attribute->name)); > } > > sub GetAttributeSetterName > { > my ($interface, $className, $attribute) = @_; > >- return "set" . $codeGenerator->WK_ucfirst($className) . "Constructor" . $codeGenerator->WK_ucfirst($attribute->name) if $attribute->isStatic; > return "set" . $codeGenerator->WK_ucfirst(GetJSBuiltinFunctionName($className, $attribute)) if IsJSBuiltin($interface, $attribute); >- return "setJS" . $interface->type->name . $codeGenerator->WK_ucfirst($attribute->name) . ($codeGenerator->IsConstructorType($attribute->type) ? "Constructor" : ""); >+ return "set" . $codeGenerator->WK_ucfirst($className) . "Constructor" . $codeGenerator->WK_ucfirst(MangleAttributeOrFunctionName($attribute->name)) if $attribute->isStatic; >+ return "set" . $codeGenerator->WK_ucfirst($className) . $codeGenerator->WK_ucfirst(MangleAttributeOrFunctionName($attribute->name)) . "Constructor" if $codeGenerator->IsConstructorType($attribute->type); >+ return "set" . $codeGenerator->WK_ucfirst($className) . $codeGenerator->WK_ucfirst(MangleAttributeOrFunctionName($attribute->name)); > } > > sub GetFunctionName >@@ -1875,7 +1886,7 @@ sub GetFunctionName > $functionName = "SymbolIterator" if $functionName eq "[Symbol.Iterator]"; > > my $kind = $operation->isStatic ? "Constructor" : (OperationShouldBeOnInstance($interface, $operation) ? "Instance" : "Prototype"); >- return $codeGenerator->WK_lcfirst($className) . $kind . "Function" . $codeGenerator->WK_ucfirst($functionName); >+ return $codeGenerator->WK_lcfirst($className) . $kind . "Function" . $codeGenerator->WK_ucfirst(MangleAttributeOrFunctionName($functionName)); > } > > sub GetFullyQualifiedImplementationCallName >@@ -4360,7 +4371,6 @@ sub GenerateImplementation > die "Overloads is not supported in DOMJIT" if $isOverloaded; > die "Currently ReadDOM value is only allowed" unless $codeGenerator->ExtendedAttributeContains($operation->extendedAttributes->{DOMJIT}, "ReadDOM"); > >- my $interfaceName = $interface->type->name; > my $functionName = GetFunctionName($interface, $className, $operation); > my $nameOfFunctionWithoutTypeCheck = $codeGenerator->WK_lcfirst($functionName) . "WithoutTypeCheck"; > my $domJITSignatureName = "DOMJITSignatureFor" . $interface->type->name . $codeGenerator->WK_ucfirst($operation->name); >@@ -4390,10 +4400,9 @@ sub GenerateImplementation > my $conditionalString = $codeGenerator->GenerateConditionalString($attribute); > push(@implContent, "#if ${conditionalString}\n\n") if $conditionalString; > AddToImplIncludes("DOMJITIDLTypeFilter.h", $conditionalString); >- my $interfaceName = $interface->type->name; > my $generatorName = $interfaceName . $codeGenerator->WK_ucfirst($attribute->name); > my $domJITClassName = $generatorName . "Attribute"; >- my $getter = GetAttributeGetterName($interface, $generatorName, $attribute); >+ my $getter = GetAttributeGetterName($interface, $className, $attribute); > my $resultType = "JSC::SpecBytecodeTop"; > if ($attribute->extendedAttributes->{DOMJIT}) { > $resultType = GetResultTypeFilter($interface, $attribute->type); >Index: Source/WebCore/bindings/scripts/IDLParser.pm >=================================================================== >--- Source/WebCore/bindings/scripts/IDLParser.pm (revision 268392) >+++ Source/WebCore/bindings/scripts/IDLParser.pm (working copy) >@@ -403,7 +403,7 @@ my $whitespaceTokenPattern = '^[\t\n\r ] > my $floatTokenPattern = '^(-?(([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([Ee][+-]?[0-9]+)?|[0-9]+[Ee][+-]?[0-9]+))'; > my $integerTokenPattern = '^(-?[1-9][0-9]*|-?0[Xx][0-9A-Fa-f]+|-?0[0-7]*)'; > my $stringTokenPattern = '^(\"[^\"]*\")'; >-my $identifierTokenPattern = '^([A-Z_a-z][0-9A-Z_a-z]*)'; >+my $identifierTokenPattern = '^([_-]?[A-Z_a-z][0-9A-Z_a-z-]*)'; > my $otherTokenPattern = '^(\.\.\.|[^\t\n\r 0-9A-Z_a-z])'; > > sub getTokenInternal >Index: Source/WebCore/bindings/scripts/test/TestObj.idl >=================================================================== >--- Source/WebCore/bindings/scripts/test/TestObj.idl (revision 268392) >+++ Source/WebCore/bindings/scripts/test/TestObj.idl (working copy) >@@ -455,6 +455,18 @@ enum TestConfidence { "high", "kinda-low > [Exposed=Window] undefined conditionallyExposedToWindowFunction(); > [Exposed=Worker] undefined conditionallyExposedToWorkerFunction(); > [Exposed=(Window, Worker)] undefined conditionallyExposedToWindowAndWorkerFunction(); >+ >+ [ImplementedAs=leadingHyphenAttribute] attribute DOMString -leading-hyphen-attribute; >+ [ImplementedAs=trailingHyphenAttribute] attribute DOMString trailing-hyphen-attribute-; >+ attribute DOMString _leading_underscore_attribute; // NOTE: IDL removes the leading underscore so this is interpreted as "leading_underscore_attribute" >+ attribute DOMString __double_leading_underscore_attribute; // NOTE: IDL removes the leading underscore so this is interpreted as "_double_leading_underscore_attribute" >+ attribute DOMString trailing_underscore_attribute_; >+ >+ [ImplementedAs=leadingHyphenFunction] undefined -leading-hyphen-function(); >+ [ImplementedAs=trailingHyphenFunction] undefined trailing-hyphen-function-(); >+ undefined _leading_underscore_function(); // NOTE: WebIDL removes the leading underscore so this is interpreted as "leading_underscore_function" >+ undefined __double_leading_underscore_function(); // NOTE: WebIDL removes the leading underscore so this is interpreted as "_double_leading_underscore_function" >+ undefined trailing_underscore_function_(); > }; > > // The following comments should not generate any code. >Index: Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp >=================================================================== >--- Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp (revision 268392) >+++ Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp (working copy) >@@ -1597,6 +1597,11 @@ JSC_DECLARE_HOST_FUNCTION(jsTestObjProto > JSC_DECLARE_HOST_FUNCTION(jsTestObjPrototypeFunctionConditionallyExposedToWindowFunction); > JSC_DECLARE_HOST_FUNCTION(jsTestObjPrototypeFunctionConditionallyExposedToWorkerFunction); > JSC_DECLARE_HOST_FUNCTION(jsTestObjPrototypeFunctionConditionallyExposedToWindowAndWorkerFunction); >+JSC_DECLARE_HOST_FUNCTION(jsTestObjPrototypeFunction_dash_leading_dash_hyphen_dash_function); >+JSC_DECLARE_HOST_FUNCTION(jsTestObjPrototypeFunctionTrailing_dash_hyphen_dash_function_dash_); >+JSC_DECLARE_HOST_FUNCTION(jsTestObjPrototypeFunctionLeading_underscore_function); >+JSC_DECLARE_HOST_FUNCTION(jsTestObjPrototypeFunction_double_leading_underscore_function); >+JSC_DECLARE_HOST_FUNCTION(jsTestObjPrototypeFunctionTrailing_underscore_function_); > JSC_DECLARE_HOST_FUNCTION(jsTestObjPrototypeFunctionToString); > > // Attributes >@@ -1796,6 +1801,16 @@ JSC_DECLARE_CUSTOM_GETTER(jsTestObjCondi > JSC_DECLARE_CUSTOM_SETTER(setJSTestObjConditionallyExposedToWorkerAttribute); > JSC_DECLARE_CUSTOM_GETTER(jsTestObjConditionallyExposedToWindowAndWorkerAttribute); > JSC_DECLARE_CUSTOM_SETTER(setJSTestObjConditionallyExposedToWindowAndWorkerAttribute); >+JSC_DECLARE_CUSTOM_GETTER(jsTestObj_dash_leading_dash_hyphen_dash_attribute); >+JSC_DECLARE_CUSTOM_SETTER(setJSTestObj_dash_leading_dash_hyphen_dash_attribute); >+JSC_DECLARE_CUSTOM_GETTER(jsTestObjTrailing_dash_hyphen_dash_attribute_dash_); >+JSC_DECLARE_CUSTOM_SETTER(setJSTestObjTrailing_dash_hyphen_dash_attribute_dash_); >+JSC_DECLARE_CUSTOM_GETTER(jsTestObjLeading_underscore_attribute); >+JSC_DECLARE_CUSTOM_SETTER(setJSTestObjLeading_underscore_attribute); >+JSC_DECLARE_CUSTOM_GETTER(jsTestObj_double_leading_underscore_attribute); >+JSC_DECLARE_CUSTOM_SETTER(setJSTestObj_double_leading_underscore_attribute); >+JSC_DECLARE_CUSTOM_GETTER(jsTestObjTrailing_underscore_attribute_); >+JSC_DECLARE_CUSTOM_SETTER(setJSTestObjTrailing_underscore_attribute_); > > class JSTestObjPrototype final : public JSC::JSNonFinalObject { > public: >@@ -2128,6 +2143,11 @@ static const HashTableValue JSTestObjPro > { "conditionallyExposedToWindowAttribute", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjConditionallyExposedToWindowAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjConditionallyExposedToWindowAttribute) } }, > { "conditionallyExposedToWorkerAttribute", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjConditionallyExposedToWorkerAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjConditionallyExposedToWorkerAttribute) } }, > { "conditionallyExposedToWindowAndWorkerAttribute", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjConditionallyExposedToWindowAndWorkerAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjConditionallyExposedToWindowAndWorkerAttribute) } }, >+ { "-leading-hyphen-attribute", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObj_dash_leading_dash_hyphen_dash_attribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObj_dash_leading_dash_hyphen_dash_attribute) } }, >+ { "trailing-hyphen-attribute-", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjTrailing_dash_hyphen_dash_attribute_dash_), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjTrailing_dash_hyphen_dash_attribute_dash_) } }, >+ { "leading_underscore_attribute", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjLeading_underscore_attribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjLeading_underscore_attribute) } }, >+ { "_double_leading_underscore_attribute", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObj_double_leading_underscore_attribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObj_double_leading_underscore_attribute) } }, >+ { "trailing_underscore_attribute_", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjTrailing_underscore_attribute_), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjTrailing_underscore_attribute_) } }, > #if ENABLE(TEST_FEATURE) > { "enabledAtRuntimeOperation", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestObjPrototypeFunctionEnabledAtRuntimeOperation), (intptr_t) (1) } }, > #else >@@ -2309,6 +2329,11 @@ static const HashTableValue JSTestObjPro > { "conditionallyExposedToWindowFunction", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestObjPrototypeFunctionConditionallyExposedToWindowFunction), (intptr_t) (0) } }, > { "conditionallyExposedToWorkerFunction", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestObjPrototypeFunctionConditionallyExposedToWorkerFunction), (intptr_t) (0) } }, > { "conditionallyExposedToWindowAndWorkerFunction", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestObjPrototypeFunctionConditionallyExposedToWindowAndWorkerFunction), (intptr_t) (0) } }, >+ { "-leading-hyphen-function", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestObjPrototypeFunction_dash_leading_dash_hyphen_dash_function), (intptr_t) (0) } }, >+ { "trailing-hyphen-function-", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestObjPrototypeFunctionTrailing_dash_hyphen_dash_function_dash_), (intptr_t) (0) } }, >+ { "leading_underscore_function", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestObjPrototypeFunctionLeading_underscore_function), (intptr_t) (0) } }, >+ { "_double_leading_underscore_function", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestObjPrototypeFunction_double_leading_underscore_function), (intptr_t) (0) } }, >+ { "trailing_underscore_function_", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestObjPrototypeFunctionTrailing_underscore_function_), (intptr_t) (0) } }, > { "toString", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestObjPrototypeFunctionToString), (intptr_t) (0) } }, > #if ENABLE(Condition1) > { "CONDITIONAL_CONST", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(0) } }, >@@ -5328,6 +5353,161 @@ JSC_DEFINE_CUSTOM_SETTER(setJSTestObjCon > return IDLAttribute<JSTestObj>::set<setJSTestObjConditionallyExposedToWindowAndWorkerAttributeSetter>(*lexicalGlobalObject, thisValue, encodedValue, "conditionallyExposedToWindowAndWorkerAttribute"); > } > >+static inline JSValue jsTestObj_dash_leading_dash_hyphen_dash_attributeGetter(JSGlobalObject& lexicalGlobalObject, JSTestObj& thisObject) >+{ >+ auto& vm = JSC::getVM(&lexicalGlobalObject); >+ auto throwScope = DECLARE_THROW_SCOPE(vm); >+ auto& impl = thisObject.wrapped(); >+ RELEASE_AND_RETURN(throwScope, (toJS<IDLDOMString>(lexicalGlobalObject, throwScope, impl.leadingHyphenAttribute()))); >+} >+ >+JSC_DEFINE_CUSTOM_GETTER(jsTestObj_dash_leading_dash_hyphen_dash_attribute, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, PropertyName)) >+{ >+ return IDLAttribute<JSTestObj>::get<jsTestObj_dash_leading_dash_hyphen_dash_attributeGetter, CastedThisErrorBehavior::Assert>(*lexicalGlobalObject, thisValue, "-leading-hyphen-attribute"); >+} >+ >+static inline bool setJSTestObj_dash_leading_dash_hyphen_dash_attributeSetter(JSGlobalObject& lexicalGlobalObject, JSTestObj& thisObject, JSValue value) >+{ >+ auto& vm = JSC::getVM(&lexicalGlobalObject); >+ auto throwScope = DECLARE_THROW_SCOPE(vm); >+ auto& impl = thisObject.wrapped(); >+ auto nativeValue = convert<IDLDOMString>(lexicalGlobalObject, value); >+ RETURN_IF_EXCEPTION(throwScope, false); >+ AttributeSetter::call(lexicalGlobalObject, throwScope, [&] { >+ return impl.setLeadingHyphenAttribute(WTFMove(nativeValue)); >+ }); >+ return true; >+} >+ >+JSC_DEFINE_CUSTOM_SETTER(setJSTestObj_dash_leading_dash_hyphen_dash_attribute, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)) >+{ >+ return IDLAttribute<JSTestObj>::set<setJSTestObj_dash_leading_dash_hyphen_dash_attributeSetter>(*lexicalGlobalObject, thisValue, encodedValue, "-leading-hyphen-attribute"); >+} >+ >+static inline JSValue jsTestObjTrailing_dash_hyphen_dash_attribute_dash_Getter(JSGlobalObject& lexicalGlobalObject, JSTestObj& thisObject) >+{ >+ auto& vm = JSC::getVM(&lexicalGlobalObject); >+ auto throwScope = DECLARE_THROW_SCOPE(vm); >+ auto& impl = thisObject.wrapped(); >+ RELEASE_AND_RETURN(throwScope, (toJS<IDLDOMString>(lexicalGlobalObject, throwScope, impl.trailingHyphenAttribute()))); >+} >+ >+JSC_DEFINE_CUSTOM_GETTER(jsTestObjTrailing_dash_hyphen_dash_attribute_dash_, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, PropertyName)) >+{ >+ return IDLAttribute<JSTestObj>::get<jsTestObjTrailing_dash_hyphen_dash_attribute_dash_Getter, CastedThisErrorBehavior::Assert>(*lexicalGlobalObject, thisValue, "trailing-hyphen-attribute-"); >+} >+ >+static inline bool setJSTestObjTrailing_dash_hyphen_dash_attribute_dash_Setter(JSGlobalObject& lexicalGlobalObject, JSTestObj& thisObject, JSValue value) >+{ >+ auto& vm = JSC::getVM(&lexicalGlobalObject); >+ auto throwScope = DECLARE_THROW_SCOPE(vm); >+ auto& impl = thisObject.wrapped(); >+ auto nativeValue = convert<IDLDOMString>(lexicalGlobalObject, value); >+ RETURN_IF_EXCEPTION(throwScope, false); >+ AttributeSetter::call(lexicalGlobalObject, throwScope, [&] { >+ return impl.setTrailingHyphenAttribute(WTFMove(nativeValue)); >+ }); >+ return true; >+} >+ >+JSC_DEFINE_CUSTOM_SETTER(setJSTestObjTrailing_dash_hyphen_dash_attribute_dash_, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)) >+{ >+ return IDLAttribute<JSTestObj>::set<setJSTestObjTrailing_dash_hyphen_dash_attribute_dash_Setter>(*lexicalGlobalObject, thisValue, encodedValue, "trailing-hyphen-attribute-"); >+} >+ >+static inline JSValue jsTestObjLeading_underscore_attributeGetter(JSGlobalObject& lexicalGlobalObject, JSTestObj& thisObject) >+{ >+ auto& vm = JSC::getVM(&lexicalGlobalObject); >+ auto throwScope = DECLARE_THROW_SCOPE(vm); >+ auto& impl = thisObject.wrapped(); >+ RELEASE_AND_RETURN(throwScope, (toJS<IDLDOMString>(lexicalGlobalObject, throwScope, impl.leading_underscore_attribute()))); >+} >+ >+JSC_DEFINE_CUSTOM_GETTER(jsTestObjLeading_underscore_attribute, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, PropertyName)) >+{ >+ return IDLAttribute<JSTestObj>::get<jsTestObjLeading_underscore_attributeGetter, CastedThisErrorBehavior::Assert>(*lexicalGlobalObject, thisValue, "leading_underscore_attribute"); >+} >+ >+static inline bool setJSTestObjLeading_underscore_attributeSetter(JSGlobalObject& lexicalGlobalObject, JSTestObj& thisObject, JSValue value) >+{ >+ auto& vm = JSC::getVM(&lexicalGlobalObject); >+ auto throwScope = DECLARE_THROW_SCOPE(vm); >+ auto& impl = thisObject.wrapped(); >+ auto nativeValue = convert<IDLDOMString>(lexicalGlobalObject, value); >+ RETURN_IF_EXCEPTION(throwScope, false); >+ AttributeSetter::call(lexicalGlobalObject, throwScope, [&] { >+ return impl.setLeading_underscore_attribute(WTFMove(nativeValue)); >+ }); >+ return true; >+} >+ >+JSC_DEFINE_CUSTOM_SETTER(setJSTestObjLeading_underscore_attribute, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)) >+{ >+ return IDLAttribute<JSTestObj>::set<setJSTestObjLeading_underscore_attributeSetter>(*lexicalGlobalObject, thisValue, encodedValue, "leading_underscore_attribute"); >+} >+ >+static inline JSValue jsTestObj_double_leading_underscore_attributeGetter(JSGlobalObject& lexicalGlobalObject, JSTestObj& thisObject) >+{ >+ auto& vm = JSC::getVM(&lexicalGlobalObject); >+ auto throwScope = DECLARE_THROW_SCOPE(vm); >+ auto& impl = thisObject.wrapped(); >+ RELEASE_AND_RETURN(throwScope, (toJS<IDLDOMString>(lexicalGlobalObject, throwScope, impl._double_leading_underscore_attribute()))); >+} >+ >+JSC_DEFINE_CUSTOM_GETTER(jsTestObj_double_leading_underscore_attribute, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, PropertyName)) >+{ >+ return IDLAttribute<JSTestObj>::get<jsTestObj_double_leading_underscore_attributeGetter, CastedThisErrorBehavior::Assert>(*lexicalGlobalObject, thisValue, "_double_leading_underscore_attribute"); >+} >+ >+static inline bool setJSTestObj_double_leading_underscore_attributeSetter(JSGlobalObject& lexicalGlobalObject, JSTestObj& thisObject, JSValue value) >+{ >+ auto& vm = JSC::getVM(&lexicalGlobalObject); >+ auto throwScope = DECLARE_THROW_SCOPE(vm); >+ auto& impl = thisObject.wrapped(); >+ auto nativeValue = convert<IDLDOMString>(lexicalGlobalObject, value); >+ RETURN_IF_EXCEPTION(throwScope, false); >+ AttributeSetter::call(lexicalGlobalObject, throwScope, [&] { >+ return impl.set_double_leading_underscore_attribute(WTFMove(nativeValue)); >+ }); >+ return true; >+} >+ >+JSC_DEFINE_CUSTOM_SETTER(setJSTestObj_double_leading_underscore_attribute, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)) >+{ >+ return IDLAttribute<JSTestObj>::set<setJSTestObj_double_leading_underscore_attributeSetter>(*lexicalGlobalObject, thisValue, encodedValue, "_double_leading_underscore_attribute"); >+} >+ >+static inline JSValue jsTestObjTrailing_underscore_attribute_Getter(JSGlobalObject& lexicalGlobalObject, JSTestObj& thisObject) >+{ >+ auto& vm = JSC::getVM(&lexicalGlobalObject); >+ auto throwScope = DECLARE_THROW_SCOPE(vm); >+ auto& impl = thisObject.wrapped(); >+ RELEASE_AND_RETURN(throwScope, (toJS<IDLDOMString>(lexicalGlobalObject, throwScope, impl.trailing_underscore_attribute_()))); >+} >+ >+JSC_DEFINE_CUSTOM_GETTER(jsTestObjTrailing_underscore_attribute_, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, PropertyName)) >+{ >+ return IDLAttribute<JSTestObj>::get<jsTestObjTrailing_underscore_attribute_Getter, CastedThisErrorBehavior::Assert>(*lexicalGlobalObject, thisValue, "trailing_underscore_attribute_"); >+} >+ >+static inline bool setJSTestObjTrailing_underscore_attribute_Setter(JSGlobalObject& lexicalGlobalObject, JSTestObj& thisObject, JSValue value) >+{ >+ auto& vm = JSC::getVM(&lexicalGlobalObject); >+ auto throwScope = DECLARE_THROW_SCOPE(vm); >+ auto& impl = thisObject.wrapped(); >+ auto nativeValue = convert<IDLDOMString>(lexicalGlobalObject, value); >+ RETURN_IF_EXCEPTION(throwScope, false); >+ AttributeSetter::call(lexicalGlobalObject, throwScope, [&] { >+ return impl.setTrailing_underscore_attribute_(WTFMove(nativeValue)); >+ }); >+ return true; >+} >+ >+JSC_DEFINE_CUSTOM_SETTER(setJSTestObjTrailing_underscore_attribute_, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)) >+{ >+ return IDLAttribute<JSTestObj>::set<setJSTestObjTrailing_underscore_attribute_Setter>(*lexicalGlobalObject, thisValue, encodedValue, "trailing_underscore_attribute_"); >+} >+ > #if ENABLE(TEST_FEATURE) > static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionEnabledAtRuntimeOperation1Body(JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame, typename IDLOperation<JSTestObj>::ClassParameter castedThis) > { >@@ -9246,6 +9426,91 @@ JSC_DEFINE_HOST_FUNCTION(jsTestObjProtot > return IDLOperation<JSTestObj>::call<jsTestObjPrototypeFunctionConditionallyExposedToWindowAndWorkerFunctionBody>(*lexicalGlobalObject, *callFrame, "conditionallyExposedToWindowAndWorkerFunction"); > } > >+static inline JSC::EncodedJSValue jsTestObjPrototypeFunction_dash_leading_dash_hyphen_dash_functionBody(JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame, typename IDLOperation<JSTestObj>::ClassParameter castedThis) >+{ >+ auto& vm = JSC::getVM(lexicalGlobalObject); >+ auto throwScope = DECLARE_THROW_SCOPE(vm); >+ UNUSED_PARAM(throwScope); >+ UNUSED_PARAM(callFrame); >+ auto& impl = castedThis->wrapped(); >+ throwScope.release(); >+ impl.leadingHyphenFunction(); >+ return JSValue::encode(jsUndefined()); >+} >+ >+JSC_DEFINE_HOST_FUNCTION(jsTestObjPrototypeFunction_dash_leading_dash_hyphen_dash_function, (JSGlobalObject* lexicalGlobalObject, CallFrame* callFrame)) >+{ >+ return IDLOperation<JSTestObj>::call<jsTestObjPrototypeFunction_dash_leading_dash_hyphen_dash_functionBody>(*lexicalGlobalObject, *callFrame, "-leading-hyphen-function"); >+} >+ >+static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionTrailing_dash_hyphen_dash_function_dash_Body(JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame, typename IDLOperation<JSTestObj>::ClassParameter castedThis) >+{ >+ auto& vm = JSC::getVM(lexicalGlobalObject); >+ auto throwScope = DECLARE_THROW_SCOPE(vm); >+ UNUSED_PARAM(throwScope); >+ UNUSED_PARAM(callFrame); >+ auto& impl = castedThis->wrapped(); >+ throwScope.release(); >+ impl.trailingHyphenFunction(); >+ return JSValue::encode(jsUndefined()); >+} >+ >+JSC_DEFINE_HOST_FUNCTION(jsTestObjPrototypeFunctionTrailing_dash_hyphen_dash_function_dash_, (JSGlobalObject* lexicalGlobalObject, CallFrame* callFrame)) >+{ >+ return IDLOperation<JSTestObj>::call<jsTestObjPrototypeFunctionTrailing_dash_hyphen_dash_function_dash_Body>(*lexicalGlobalObject, *callFrame, "trailing-hyphen-function-"); >+} >+ >+static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionLeading_underscore_functionBody(JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame, typename IDLOperation<JSTestObj>::ClassParameter castedThis) >+{ >+ auto& vm = JSC::getVM(lexicalGlobalObject); >+ auto throwScope = DECLARE_THROW_SCOPE(vm); >+ UNUSED_PARAM(throwScope); >+ UNUSED_PARAM(callFrame); >+ auto& impl = castedThis->wrapped(); >+ throwScope.release(); >+ impl.leading_underscore_function(); >+ return JSValue::encode(jsUndefined()); >+} >+ >+JSC_DEFINE_HOST_FUNCTION(jsTestObjPrototypeFunctionLeading_underscore_function, (JSGlobalObject* lexicalGlobalObject, CallFrame* callFrame)) >+{ >+ return IDLOperation<JSTestObj>::call<jsTestObjPrototypeFunctionLeading_underscore_functionBody>(*lexicalGlobalObject, *callFrame, "leading_underscore_function"); >+} >+ >+static inline JSC::EncodedJSValue jsTestObjPrototypeFunction_double_leading_underscore_functionBody(JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame, typename IDLOperation<JSTestObj>::ClassParameter castedThis) >+{ >+ auto& vm = JSC::getVM(lexicalGlobalObject); >+ auto throwScope = DECLARE_THROW_SCOPE(vm); >+ UNUSED_PARAM(throwScope); >+ UNUSED_PARAM(callFrame); >+ auto& impl = castedThis->wrapped(); >+ throwScope.release(); >+ impl._double_leading_underscore_function(); >+ return JSValue::encode(jsUndefined()); >+} >+ >+JSC_DEFINE_HOST_FUNCTION(jsTestObjPrototypeFunction_double_leading_underscore_function, (JSGlobalObject* lexicalGlobalObject, CallFrame* callFrame)) >+{ >+ return IDLOperation<JSTestObj>::call<jsTestObjPrototypeFunction_double_leading_underscore_functionBody>(*lexicalGlobalObject, *callFrame, "_double_leading_underscore_function"); >+} >+ >+static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionTrailing_underscore_function_Body(JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame, typename IDLOperation<JSTestObj>::ClassParameter castedThis) >+{ >+ auto& vm = JSC::getVM(lexicalGlobalObject); >+ auto throwScope = DECLARE_THROW_SCOPE(vm); >+ UNUSED_PARAM(throwScope); >+ UNUSED_PARAM(callFrame); >+ auto& impl = castedThis->wrapped(); >+ throwScope.release(); >+ impl.trailing_underscore_function_(); >+ return JSValue::encode(jsUndefined()); >+} >+ >+JSC_DEFINE_HOST_FUNCTION(jsTestObjPrototypeFunctionTrailing_underscore_function_, (JSGlobalObject* lexicalGlobalObject, CallFrame* callFrame)) >+{ >+ return IDLOperation<JSTestObj>::call<jsTestObjPrototypeFunctionTrailing_underscore_function_Body>(*lexicalGlobalObject, *callFrame, "trailing_underscore_function_"); >+} >+ > static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionToStringBody(JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame, typename IDLOperation<JSTestObj>::ClassParameter castedThis) > { > auto& vm = JSC::getVM(lexicalGlobalObject);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 217667
:
411258
| 411264