Bug 182873 - [MSVC] Unknown a type definition error in WebResourceLoadStatisticsStore on wincairo webkit
Summary: [MSVC] Unknown a type definition error in WebResourceLoadStatisticsStore on w...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks: 174003
  Show dependency treegraph
 
Reported: 2018-02-16 06:55 PST by Yousuke Kimoto
Modified: 2018-02-23 10:33 PST (History)
12 users (show)

See Also:


Attachments
Test Patch (Work In Progress) (2.88 KB, patch)
2018-02-16 06:57 PST, Yousuke Kimoto
no flags Details | Formatted Diff | Diff
bz182873-1.patch (3.28 KB, patch)
2018-02-17 05:42 PST, Yousuke Kimoto
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yousuke Kimoto 2018-02-16 06:55:36 PST
In WebResourceLoadStatisticsStore.h, MSVC doesn't seem to treat a type name which is specified by "using WTF::Vector". Its Intellisense understands the "using" definition, but the compiler doesn't.
Currently there are two methods:
 1) Add a new declaration to avoid this issue for MSVC.
 2) Use WTF::Vector in a lambda definition
Comment 1 Yousuke Kimoto 2018-02-16 06:57:01 PST
Created attachment 334039 [details]
Test Patch (Work In Progress)
Comment 2 Yousuke Kimoto 2018-02-17 05:42:05 PST
Created attachment 334106 [details]
bz182873-1.patch
Comment 3 Don Olmstead 2018-02-20 12:02:24 PST
The webkitpy bot seems to have not applied this patch.
Comment 4 Alexey Proskuryakov 2018-02-20 12:58:37 PST
> The webkitpy bot seems to have not applied this patch.

Timed out talking to Bugzilla.
Comment 5 Don Olmstead 2018-02-21 11:29:40 PST
Its kinda unclear on why this is needed here as its including <wtf/Vector.h> and other definitions in the file refer to Vector directly. There are a few places in that file that are using WTF::Function as well so its a bit unclear on what is going on.
Comment 6 Yusuke Suzuki 2018-02-22 19:01:43 PST
Comment on attachment 334106 [details]
bz182873-1.patch

r=me for this workaround.
Maybe this `using` does not work if we use it for lambda parameter, which lambda is defined for default parameter.
I believe it is MSVC's bug.
Comment 7 Yusuke Suzuki 2018-02-22 19:03:07 PST
JF, do you have any insight for this?
(Is it known issue in MSVC? Or is it something wrong in our side?)
Comment 8 JF Bastien 2018-02-22 21:25:29 PST
(In reply to Yusuke Suzuki from comment #7)
> JF, do you have any insight for this?
> (Is it known issue in MSVC? Or is it something wrong in our side?)

Not known to me. Can you craft a small repro? This seems to work:
  https://godbolt.org/g/Tm9Yec
Comment 9 Yousuke Kimoto 2018-02-23 07:07:47 PST
(In reply to JF Bastien from comment #8)
> (In reply to Yusuke Suzuki from comment #7)
> > JF, do you have any insight for this?
> > (Is it known issue in MSVC? Or is it something wrong in our side?)
> 
> Not known to me. Can you craft a small repro? This seems to work:
>   https://godbolt.org/g/Tm9Yec

Yusuke Suzuki, JF Bastien,

I made a simple sample. Does this example show what happen in MSVC?
https://godbolt.org/g/TtDbAL
Comment 10 JF Bastien 2018-02-23 08:41:48 PST
(In reply to Yousuke Kimoto from comment #9)
> (In reply to JF Bastien from comment #8)
> > (In reply to Yusuke Suzuki from comment #7)
> > > JF, do you have any insight for this?
> > > (Is it known issue in MSVC? Or is it something wrong in our side?)
> > 
> > Not known to me. Can you craft a small repro? This seems to work:
> >   https://godbolt.org/g/Tm9Yec
> 
> Yusuke Suzuki, JF Bastien,
> 
> I made a simple sample. Does this example show what happen in MSVC?
> https://godbolt.org/g/TtDbAL

Ping'd a friend on the MSVC team. Confirmed to be an MSVC bug:
  https://twitter.com/apardoe/status/967076489085599744
Comment 11 Yusuke Suzuki 2018-02-23 09:18:07 PST
(In reply to JF Bastien from comment #10)
> (In reply to Yousuke Kimoto from comment #9)
> > (In reply to JF Bastien from comment #8)
> > > (In reply to Yusuke Suzuki from comment #7)
> > > > JF, do you have any insight for this?
> > > > (Is it known issue in MSVC? Or is it something wrong in our side?)
> > > 
> > > Not known to me. Can you craft a small repro? This seems to work:
> > >   https://godbolt.org/g/Tm9Yec
> > 
> > Yusuke Suzuki, JF Bastien,
> > 
> > I made a simple sample. Does this example show what happen in MSVC?
> > https://godbolt.org/g/TtDbAL
> 
> Ping'd a friend on the MSVC team. Confirmed to be an MSVC bug:
>   https://twitter.com/apardoe/status/967076489085599744

Cool!
Comment 12 WebKit Commit Bot 2018-02-23 10:32:46 PST
Comment on attachment 334106 [details]
bz182873-1.patch

Clearing flags on attachment: 334106

Committed r228951: <https://trac.webkit.org/changeset/228951>
Comment 13 WebKit Commit Bot 2018-02-23 10:32:48 PST
All reviewed patches have been landed.  Closing bug.
Comment 14 Radar WebKit Bug Importer 2018-02-23 10:33:23 PST
<rdar://problem/37830659>