Bug 209358 - [MSVC] Remove experimental lambda processor usage
Summary: [MSVC] Remove experimental lambda processor usage
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Don Olmstead
URL:
Keywords: InRadar
: 209311 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-03-20 12:33 PDT by Don Olmstead
Modified: 2021-05-21 00:12 PDT (History)
11 users (show)

See Also:


Attachments
Patch (3.30 KB, patch)
2020-03-20 12:42 PDT, Don Olmstead
no flags Details | Formatted Diff | Diff
Patch (3.31 KB, patch)
2020-03-24 11:57 PDT, Don Olmstead
no flags Details | Formatted Diff | Diff
Patch (3.53 KB, patch)
2020-03-26 20:00 PDT, Fujii Hironori
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 2020-03-20 12:33:05 PDT
The experimental lambda processor is currently crashing MSVC when compiling WebKit code in Visual Studio 16.5.0.
Comment 1 Don Olmstead 2020-03-20 12:42:56 PDT
Created attachment 394111 [details]
Patch
Comment 2 Fujii Hironori 2020-03-20 13:41:19 PDT
*** Bug 209311 has been marked as a duplicate of this bug. ***
Comment 3 Fujii Hironori 2020-03-20 13:43:32 PDT Comment hidden (obsolete)
Comment 4 Fujii Hironori 2020-03-20 13:55:55 PDT
Comment on attachment 394111 [details]
Patch

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

> Source/WebCore/dom/DocumentStorageAccess.cpp:200
> +            m_document.eventLoop().queueMicrotask([this, weakThis = WTFMove(weakThis)] {

You can't WTFMove(weakThis) twice. You need to copy the weak ptr.
Comment 5 Fujii Hironori 2020-03-20 14:25:14 PDT
Comment on attachment 394111 [details]
Patch

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

>> Source/WebCore/dom/DocumentStorageAccess.cpp:200
>> +            m_document.eventLoop().queueMicrotask([this, weakThis = WTFMove(weakThis)] {
> 
> You can't WTFMove(weakThis) twice. You need to copy the weak ptr.

It can be copied by [this, weakThis].
Comment 6 Don Olmstead 2020-03-24 11:57:26 PDT
Created attachment 394390 [details]
Patch
Comment 7 Darin Adler 2020-03-24 12:31:02 PDT
Comment on attachment 394390 [details]
Patch

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

> Source/WebCore/dom/DocumentStorageAccess.cpp:185
> +            m_document.eventLoop().queueMicrotask([this, weakThis = makeWeakPtr(*weakThis)] {

Doesn’t the syntax [this, weakThis] work without a call to makeWeakPtr?
Comment 8 Don Olmstead 2020-03-24 13:42:30 PDT
Confirmed that the crash is still there in VS 16.5.1.
Comment 9 Darin Adler 2020-03-24 13:47:27 PDT
You mean you tried [this, weakThis] and it also failed?

I think we need a comment here otherwise people won't know and will keep re-breaking it.
Comment 10 Fujii Hironori 2020-03-24 13:53:47 PDT
Did you test it by removing /experimental:newLambdaProcessor switch?
The compiler crash is caused by the switch.
I confirmed [this, weakThis] works with my VS 16.5.1.
Comment 11 Fujii Hironori 2020-03-26 20:00:26 PDT
Created attachment 394697 [details]
Patch
Comment 12 EWS 2020-03-26 21:31:07 PDT
Committed r259104: <https://trac.webkit.org/changeset/259104>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 394697 [details].
Comment 13 Radar WebKit Bug Importer 2020-03-26 21:32:13 PDT
<rdar://problem/60951813>