[webkit-reviews] review granted: [Bug 177422] [WebIDL] Remove GetterMayThrowException : [Attachment 321663] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Sep 25 09:12:53 PDT 2017


youenn fablet <youennf at gmail.com> has granted Sam Weinig <sam at webkit.org>'s
request for review:
Bug 177422: [WebIDL] Remove GetterMayThrowException
https://bugs.webkit.org/show_bug.cgi?id=177422

Attachment 321663: Patch

https://bugs.webkit.org/attachment.cgi?id=321663&action=review




--- Comment #3 from youenn fablet <youennf at gmail.com> ---
Comment on attachment 321663
  --> https://bugs.webkit.org/attachment.cgi?id=321663
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.


More information about the webkit-reviews mailing list