WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
177457
[WebIDL] Factor out IsExceptionOr check from toJS/toJSNewlyCreated signature
https://bugs.webkit.org/show_bug.cgi?id=177457
Summary
[WebIDL] Factor out IsExceptionOr check from toJS/toJSNewlyCreated signature
Sam Weinig
Reported
2017-09-25 12:48:20 PDT
[WebIDL] Factor out IsExceptionOr check from toJS/toJSNewlyCreated signature
Attachments
Patch
(7.70 KB, patch)
2017-09-25 12:49 PDT
,
Sam Weinig
no flags
Details
Formatted Diff
Diff
This also works...
(616 bytes, patch)
2017-09-25 16:52 PDT
,
Sam Weinig
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Sam Weinig
Comment 1
2017-09-25 12:49:38 PDT
Created
attachment 321727
[details]
Patch
youenn fablet
Comment 2
2017-09-25 14:01:31 PDT
Comment on
attachment 321727
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=321727&action=review
> Source/WebCore/bindings/js/JSDOMConvertBase.h:91 > +struct IsExceptionOr : public std::integral_constant<bool, WTF::IsTemplate<std::decay_t<T>, ExceptionOr>::value> { };
Would the following work? template<typename T> using IsExceptionOr = std::integral_constant...
WebKit Commit Bot
Comment 3
2017-09-25 16:27:06 PDT
Comment on
attachment 321727
[details]
Patch Clearing flags on attachment: 321727 Committed
r222480
: <
http://trac.webkit.org/changeset/222480
>
WebKit Commit Bot
Comment 4
2017-09-25 16:27:08 PDT
All reviewed patches have been landed. Closing bug.
Sam Weinig
Comment 5
2017-09-25 16:52:08 PDT
Created
attachment 321767
[details]
This also works...
Sam Weinig
Comment 6
2017-09-25 16:53:27 PDT
(In reply to youenn fablet from
comment #2
)
> Comment on
attachment 321727
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=321727&action=review
> > > Source/WebCore/bindings/js/JSDOMConvertBase.h:91 > > +struct IsExceptionOr : public std::integral_constant<bool, WTF::IsTemplate<std::decay_t<T>, ExceptionOr>::value> { }; > > Would the following work? > template<typename T> using IsExceptionOr = std::integral_constant...
That would work too (posted a patch with it above). I have not found a good feel for when to use using vs. inheritance in situations like these. Is there a reason to prefer one over the other here?
youenn fablet
Comment 7
2017-09-25 16:59:30 PDT
'using' seems a bit more readable/closer to the intent than 'struct' as we probably do not want to specialize the struct or add any method to it. Mostly a style thingy I guess
Radar WebKit Bug Importer
Comment 8
2017-09-27 12:16:59 PDT
<
rdar://problem/34692938
>
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