Bug 188680 - REGRESSION(r234930): Don't embed a #if in an ASSERT
Summary: REGRESSION(r234930): Don't embed a #if in an ASSERT
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ross Kirsling
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-08-16 15:28 PDT by Ross Kirsling
Modified: 2018-08-16 16:32 PDT (History)
5 users (show)

See Also:


Attachments
Patch (2.07 KB, patch)
2018-08-16 15:32 PDT, Ross Kirsling
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ross Kirsling 2018-08-16 15:28:58 PDT
r234930 embeds a #if in an ASSERT, which is an error for MSVC:
> Source\WebCore\page/EventHandler.cpp(3707): error C2121: '#': invalid character: possibly the result of a macro expansion
> Source\WebCore\page/EventHandler.cpp(3699): error C2059: syntax error: 'if'
> Source\WebCore\page/EventHandler.cpp(3707): error C2143: syntax error: missing ';' before '{'

It is also a warning for Clang (-Wembedded-directive):
> warning: embedding a directive within macro arguments has undefined behavior
Comment 1 Ross Kirsling 2018-08-16 15:32:10 PDT
Created attachment 347314 [details]
Patch
Comment 2 WebKit Commit Bot 2018-08-16 16:30:50 PDT
Comment on attachment 347314 [details]
Patch

Clearing flags on attachment: 347314

Committed r234969: <https://trac.webkit.org/changeset/234969>
Comment 3 WebKit Commit Bot 2018-08-16 16:30:51 PDT
All reviewed patches have been landed.  Closing bug.
Comment 4 Wenson Hsieh 2018-08-16 16:31:29 PDT
Thank you for fixing this, Ross!
Comment 5 Radar WebKit Bug Importer 2018-08-16 16:32:20 PDT
<rdar://problem/43401346>
Comment 6 Radar WebKit Bug Importer 2018-08-16 16:32:24 PDT
<rdar://problem/43401348>