Bug 194913 - [MSVC] Fix compilation errors with lambdas in ResourceLoadStatistics
Summary: [MSVC] Fix compilation errors with lambdas in ResourceLoadStatistics
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Don Olmstead
URL:
Keywords: InRadar
Depends on:
Blocks: 194267
  Show dependency treegraph
 
Reported: 2019-02-21 12:32 PST by Don Olmstead
Modified: 2019-02-21 17:36 PST (History)
4 users (show)

See Also:


Attachments
Patch (3.82 KB, patch)
2019-02-21 12:40 PST, Don Olmstead
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Don Olmstead 2019-02-21 12:32:39 PST
There are issues compiling ResourceLoadStatisticsMemoryStore in MSVC around nested lambdas.

This is true even in MSVS 2019 Preview 3
Comment 1 Don Olmstead 2019-02-21 12:40:38 PST
Created attachment 362628 [details]
Patch
Comment 2 Brent Fulgham 2019-02-21 16:23:10 PST
Comment on attachment 362628 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=362628&action=review

EWS seems happy, so this change looks good.

> Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp:369
> +        RunLoop::main().dispatch([this, weakThis = WTFMove(weakThis)]() {

Interesting that MSVC doesn't like this. This actually seems like better code anyway.

> Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:33
> +#include "NetworkProcess.h"

I wonder if this was missing because of the vagaries of our Unified Sources behavior.
Comment 3 Don Olmstead 2019-02-21 16:41:43 PST
(In reply to Brent Fulgham from comment #2)
> Comment on attachment 362628 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=362628&action=review
> 
> EWS seems happy, so this change looks good.
> 
> > Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp:369
> > +        RunLoop::main().dispatch([this, weakThis = WTFMove(weakThis)]() {
> 
> Interesting that MSVC doesn't like this. This actually seems like better
> code anyway.

There are a bunch of bugs around lambdas in MSVC. Supposedly they were fixed but this was built with latest preview release of 2019 so 🤷

> > Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:33
> > +#include "NetworkProcess.h"
> 
> I wonder if this was missing because of the vagaries of our Unified Sources
> behavior.

Most likely. I really hate Unified Sources. This https://bugs.webkit.org/show_bug.cgi?id=193073 needs to get fixed first.
Comment 4 WebKit Commit Bot 2019-02-21 17:05:13 PST
Comment on attachment 362628 [details]
Patch

Clearing flags on attachment: 362628

Committed r241924: <https://trac.webkit.org/changeset/241924>
Comment 5 WebKit Commit Bot 2019-02-21 17:05:14 PST
All reviewed patches have been landed.  Closing bug.
Comment 6 Radar WebKit Bug Importer 2019-02-21 17:36:45 PST
<rdar://problem/48297768>