WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
177422
[WebIDL] Remove GetterMayThrowException
https://bugs.webkit.org/show_bug.cgi?id=177422
Summary
[WebIDL] Remove GetterMayThrowException
Sam Weinig
Reported
2017-09-24 18:50:46 PDT
[WebIDL] Remove GetterMayThrowException
Attachments
Patch
(103.09 KB, patch)
2017-09-24 19:45 PDT
,
Sam Weinig
youennf
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Sam Weinig
Comment 1
2017-09-24 19:45:16 PDT
Created
attachment 321663
[details]
Patch
Build Bot
Comment 2
2017-09-24 19:47:59 PDT
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.
youenn fablet
Comment 3
2017-09-25 09:12:53 PDT
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.
Sam Weinig
Comment 4
2017-09-25 10:47:50 PDT
(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.
Sam Weinig
Comment 5
2017-09-25 12:16:16 PDT
Committed
r222454
: <
http://trac.webkit.org/changeset/222454
>
Radar WebKit Bug Importer
Comment 6
2017-09-27 12:18:15 PDT
<
rdar://problem/34692990
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug