Bug 189777 - Use a Variant for FormDataElement
Summary: Use a Variant for FormDataElement
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alex Christensen
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-09-19 22:13 PDT by Alex Christensen
Modified: 2018-09-21 15:52 PDT (History)
12 users (show)

See Also:


Attachments
Patch (41.08 KB, patch)
2018-09-19 22:14 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews102 for mac-sierra (2.09 MB, application/zip)
2018-09-19 23:13 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews106 for mac-sierra-wk2 (2.61 MB, application/zip)
2018-09-19 23:25 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews117 for mac-sierra (1.32 MB, application/zip)
2018-09-19 23:39 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews121 for ios-simulator-wk2 (76.24 MB, application/zip)
2018-09-19 23:59 PDT, EWS Watchlist
no flags Details
Patch (42.53 KB, patch)
2018-09-20 11:47 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (45.48 KB, patch)
2018-09-20 12:09 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (45.47 KB, patch)
2018-09-20 12:18 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (45.49 KB, patch)
2018-09-20 12:46 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (45.53 KB, patch)
2018-09-20 13:59 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (45.42 KB, patch)
2018-09-20 15:24 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (47.83 KB, patch)
2018-09-20 17:22 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (47.85 KB, patch)
2018-09-20 18:33 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews123 for ios-simulator-wk2 (21.77 MB, application/zip)
2018-09-20 20:45 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews107 for mac-sierra-wk2 (3.57 MB, application/zip)
2018-09-20 21:21 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews125 for ios-simulator-wk2 (19.43 MB, application/zip)
2018-09-20 22:46 PDT, EWS Watchlist
no flags Details
Patch (47.51 KB, patch)
2018-09-20 23:32 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (49.34 KB, patch)
2018-09-21 14:17 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (49.32 KB, patch)
2018-09-21 14:42 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Christensen 2018-09-19 22:13:45 PDT
Use a Variant for FormDataElement
Comment 1 Alex Christensen 2018-09-19 22:14:26 PDT
Created attachment 350169 [details]
Patch
Comment 2 EWS Watchlist 2018-09-19 23:13:36 PDT
Comment on attachment 350169 [details]
Patch

Attachment 350169 [details] did not pass mac-ews (mac):
Output: https://webkit-queues.webkit.org/results/9277810

Number of test failures exceeded the failure limit.
Comment 3 EWS Watchlist 2018-09-19 23:13:38 PDT
Created attachment 350171 [details]
Archive of layout-test-results from ews102 for mac-sierra

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews102  Port: mac-sierra  Platform: Mac OS X 10.12.6
Comment 4 EWS Watchlist 2018-09-19 23:25:57 PDT
Comment on attachment 350169 [details]
Patch

Attachment 350169 [details] did not pass mac-wk2-ews (mac-wk2):
Output: https://webkit-queues.webkit.org/results/9277821

Number of test failures exceeded the failure limit.
Comment 5 EWS Watchlist 2018-09-19 23:25:58 PDT
Created attachment 350173 [details]
Archive of layout-test-results from ews106 for mac-sierra-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews106  Port: mac-sierra-wk2  Platform: Mac OS X 10.12.6
Comment 6 EWS Watchlist 2018-09-19 23:39:19 PDT
Comment on attachment 350169 [details]
Patch

Attachment 350169 [details] did not pass mac-debug-ews (mac):
Output: https://webkit-queues.webkit.org/results/9277814

Number of test failures exceeded the failure limit.
Comment 7 EWS Watchlist 2018-09-19 23:39:21 PDT
Created attachment 350176 [details]
Archive of layout-test-results from ews117 for mac-sierra

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews117  Port: mac-sierra  Platform: Mac OS X 10.12.6
Comment 8 EWS Watchlist 2018-09-19 23:59:02 PDT
Comment on attachment 350169 [details]
Patch

Attachment 350169 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: https://webkit-queues.webkit.org/results/9277857

Number of test failures exceeded the failure limit.
Comment 9 EWS Watchlist 2018-09-19 23:59:06 PDT
Created attachment 350177 [details]
Archive of layout-test-results from ews121 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews121  Port: ios-simulator-wk2  Platform: Mac OS X 10.13.6
Comment 10 Alex Christensen 2018-09-20 11:47:54 PDT
Created attachment 350240 [details]
Patch
Comment 11 Alex Christensen 2018-09-20 12:09:00 PDT
Created attachment 350245 [details]
Patch
Comment 12 Alex Christensen 2018-09-20 12:18:09 PDT
Created attachment 350246 [details]
Patch
Comment 13 Alex Christensen 2018-09-20 12:46:49 PDT
Created attachment 350249 [details]
Patch
Comment 14 Alex Christensen 2018-09-20 13:59:34 PDT
Created attachment 350260 [details]
Patch
Comment 15 Alex Christensen 2018-09-20 15:24:59 PDT
Created attachment 350270 [details]
Patch
Comment 16 Alex Christensen 2018-09-20 17:22:02 PDT
Created attachment 350285 [details]
Patch
Comment 17 Alex Christensen 2018-09-20 18:33:56 PDT
Created attachment 350299 [details]
Patch
Comment 18 EWS Watchlist 2018-09-20 20:45:50 PDT
Comment on attachment 350299 [details]
Patch

Attachment 350299 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: https://webkit-queues.webkit.org/results/9290636

New failing tests:
http/tests/local/formdata/send-form-data-constructed-from-form-using-open-panel.html
http/tests/local/formdata/send-form-data-with-empty-file-filename-using-open-panel.html
Comment 19 EWS Watchlist 2018-09-20 20:45:53 PDT
Created attachment 350318 [details]
Archive of layout-test-results from ews123 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews123  Port: ios-simulator-wk2  Platform: Mac OS X 10.13.6
Comment 20 EWS Watchlist 2018-09-20 21:21:28 PDT
Comment on attachment 350299 [details]
Patch

Attachment 350299 [details] did not pass mac-wk2-ews (mac-wk2):
Output: https://webkit-queues.webkit.org/results/9291283

New failing tests:
http/tests/local/formdata/send-form-data-constructed-from-form-using-open-panel.html
http/tests/local/formdata/send-form-data-with-empty-file-filename-using-open-panel.html
Comment 21 EWS Watchlist 2018-09-20 21:21:30 PDT
Created attachment 350324 [details]
Archive of layout-test-results from ews107 for mac-sierra-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews107  Port: mac-sierra-wk2  Platform: Mac OS X 10.12.6
Comment 22 EWS Watchlist 2018-09-20 22:46:13 PDT
Comment on attachment 350299 [details]
Patch

Attachment 350299 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: https://webkit-queues.webkit.org/results/9291812

New failing tests:
http/tests/local/formdata/send-form-data-constructed-from-form-using-open-panel.html
http/tests/local/formdata/send-form-data-with-empty-file-filename-using-open-panel.html
Comment 23 EWS Watchlist 2018-09-20 22:46:16 PDT
Created attachment 350330 [details]
Archive of layout-test-results from ews125 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews125  Port: ios-simulator-wk2  Platform: Mac OS X 10.13.6
Comment 24 Alex Christensen 2018-09-20 23:32:00 PDT
Created attachment 350335 [details]
Patch
Comment 25 Chris Dumez 2018-09-21 14:09:10 PDT
Comment on attachment 350335 [details]
Patch

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

r=me

> Source/WebCore/platform/network/FormData.cpp:142
> +    return WTF::visit(WTF::makeVisitor(

SwitchOn() ?

> Source/WebCore/platform/network/FormData.cpp:160
> +    return WTF::visit(WTF::makeVisitor(

SwitchOn() ?

> Source/WebCore/platform/network/FormData.cpp:358
> +        WTF::visit(WTF::makeVisitor(

SwitchOn() ?

> Source/WebCore/platform/network/FormData.h:44
> +    FormDataElement(Data&& data)

Why isn't this explicit ?

> Source/WebCore/platform/network/FormData.h:75
> +        bool shouldGenerateFile { false };

Can we pack this better and move all booleans to the end?

> Source/WebCore/platform/network/cf/FormDataStreamCFNet.cpp:139
> +    bool success = WTF::visit(WTF::makeVisitor(

SwitchOn() ?

> Source/WebCore/platform/network/curl/CurlFormDataStream.cpp:127
> +        std::optional<size_t> readBytes = WTF::visit(WTF::makeVisitor(

SwitchOn() ?

> Source/WebCore/platform/network/soup/ResourceRequestSoup.cpp:77
> +        return WTF::visit(WTF::makeVisitor(

SwitchOn() ?

> Source/WebKit/WebProcess/WebCoreSupport/SessionStateConversion.cpp:45
> +        WTF::visit(WTF::makeVisitor(

SwitchOn() ?
Comment 26 Alex Christensen 2018-09-21 14:17:50 PDT
Created attachment 350428 [details]
Patch
Comment 27 Alex Christensen 2018-09-21 14:42:14 PDT
Created attachment 350430 [details]
Patch
Comment 28 Alex Christensen 2018-09-21 15:50:48 PDT
http://trac.webkit.org/r236365
Comment 29 Radar WebKit Bug Importer 2018-09-21 15:52:11 PDT
<rdar://problem/44695354>