[WebIDL] Remove GetterMayThrowException
Created attachment 321663 [details] Patch
Attachment 321663 [details] did not pass style-queue: ERROR: Source/WebCore/bindings/js/JSDOMConvertBase.h:171: This { should be at the end of the previous line [whitespace/braces] [4] ERROR: Source/WebCore/bindings/js/JSDOMConvertBase.h:201: This { should be at the end of the previous line [whitespace/braces] [4] Total errors found: 2 in 41 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 321663 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=321663&action=review > Source/WebCore/bindings/js/JSDOMConvertBase.h:101 > +template<typename T, typename U> inline auto toJSNewlyCreated(JSC::ExecState&, JSDOMGlobalObject&, JSC::ThrowScope&, U&&) -> std::enable_if_t<!WTF::IsTemplate<std::decay_t<U>, ExceptionOr>::value, JSC::JSValue>; WTF::IsTemplate<std::decay_t<U>, ExceptionOr>::value is used quite a lot. Can we add a shorthand for it? > Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:-5248 > - assert("Attributes that throw exceptions are not supported with serializers yet.") if $attribute->extendedAttributes->{GetterMayThrowException} || $attribute->extendedAttributes->{MayThrowException}; Serializers will now be able to trigger exceptions without the binding generator noticing it. Do we need to add any specific exception handling for serializers, like skip or rethrow? Maybe add a FIXME for now. > Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:6565 > + my $mayThrowException = ref($context) eq "IDLAttribute" || $context->extendedAttributes->{MayThrowException}; Maybe we can remove mayThrowException declaration here since it is only used in one place. > Source/WebCore/bindings/scripts/test/TestObj.idl:171 > + attribute DOMString stringAttrWithGetterException; Do we really need these anymore? > Source/WebCore/bindings/scripts/test/TestTypedefs.idl:72 > + attribute DOMString stringAttrWithGetterException; Ditto.
(In reply to youenn fablet from comment #3) > Comment on attachment 321663 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=321663&action=review > > > Source/WebCore/bindings/js/JSDOMConvertBase.h:101 > > +template<typename T, typename U> inline auto toJSNewlyCreated(JSC::ExecState&, JSDOMGlobalObject&, JSC::ThrowScope&, U&&) -> std::enable_if_t<!WTF::IsTemplate<std::decay_t<U>, ExceptionOr>::value, JSC::JSValue>; > > WTF::IsTemplate<std::decay_t<U>, ExceptionOr>::value is used quite a lot. > Can we add a shorthand for it? > I will try. > > Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:-5248 > > - assert("Attributes that throw exceptions are not supported with serializers yet.") if $attribute->extendedAttributes->{GetterMayThrowException} || $attribute->extendedAttributes->{MayThrowException}; > > Serializers will now be able to trigger exceptions without the binding > generator noticing it. > Do we need to add any specific exception handling for serializers, like skip > or rethrow? > Maybe add a FIXME for now. Yeah, I'll add a FIXME. It will assert at runtime right now. I need to rip out all the this stuff and add the new toJSON / [Default] stuff. > > > Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:6565 > > + my $mayThrowException = ref($context) eq "IDLAttribute" || $context->extendedAttributes->{MayThrowException}; > > Maybe we can remove mayThrowException declaration here since it is only used > in one place. It's used in two places, so I'll keep it for now. > > > Source/WebCore/bindings/scripts/test/TestObj.idl:171 > > + attribute DOMString stringAttrWithGetterException; > > Do we really need these anymore? > > > Source/WebCore/bindings/scripts/test/TestTypedefs.idl:72 > > + attribute DOMString stringAttrWithGetterException; > > Ditto. No. Will remove.
Committed r222454: <http://trac.webkit.org/changeset/222454>
<rdar://problem/34692990>