WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
137323
Fail better when is<>() / downcast<>() is used for an unsupported type
https://bugs.webkit.org/show_bug.cgi?id=137323
Summary
Fail better when is<>() / downcast<>() is used for an unsupported type
Chris Dumez
Reported
2014-10-01 16:35:05 PDT
We should fail better when is<>() / downcast<>() is used for an unsupported type (i.e. a type that doesn't have the needed TypeCastTraits template specialization). Currently, we get an obscure linking error, which is sub-optimal.
Attachments
Patch
(2.24 KB, patch)
2014-10-01 16:52 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Chris Dumez
Comment 1
2014-10-01 16:52:17 PDT
Created
attachment 239067
[details]
Patch
Chris Dumez
Comment 2
2014-10-01 16:56:09 PDT
Comment on
attachment 239067
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=239067&action=review
> Source/WTF/wtf/TypeCasts.h:42 > + static_assert(std::is_void<ExpectedType>::value, "Missing TypeCastTraits specialization");
I cannot use a static_assert(false, ""); because the compiler would then evaluate it and fail the build even if this template was not instantiated. By having the static_assert() depend on the template parameter type, I avoid that issue and we hit the static_assert() only if this is actually instantiated. And this one is only instantiated if there is no specialization for the type.
WebKit Commit Bot
Comment 3
2014-10-01 18:18:51 PDT
Comment on
attachment 239067
[details]
Patch Clearing flags on attachment: 239067 Committed
r174193
: <
http://trac.webkit.org/changeset/174193
>
WebKit Commit Bot
Comment 4
2014-10-01 18:18:57 PDT
All reviewed patches have been landed. Closing bug.
Gyuyoung Kim
Comment 5
2014-10-01 19:02:06 PDT
EFL port has been broken since
r174193
.
https://build.webkit.org/builders/EFL%20Linux%2064-bit%20Release%20WK2/builds/16694
Chris Dumez
Comment 6
2014-10-01 19:22:04 PDT
(In reply to
comment #5
)
> EFL port has been broken since
r174193
. > >
https://build.webkit.org/builders/EFL%20Linux%2064-bit%20Release%20WK2/builds/16694
Build fix landed in <
http://trac.webkit.org/changeset/174195
>
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