Bug 179515 - REGRESSION(r224267): WebViews scheduled with custom run loop modes don't load
Summary: REGRESSION(r224267): WebViews scheduled with custom run loop modes don't load
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, Regression
Depends on:
Blocks:
 
Reported: 2017-11-09 17:05 PST by Alex Christensen
Modified: 2017-11-15 09:37 PST (History)
10 users (show)

See Also:


Attachments
Patch (27.07 KB, patch)
2017-11-09 17:56 PST, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (25.74 KB, patch)
2017-11-09 19:00 PST, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (19.75 KB, patch)
2017-11-09 20:56 PST, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (19.71 KB, patch)
2017-11-09 21:23 PST, Alex Christensen
aestes: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Christensen 2017-11-09 17:05:22 PST
REGRESSION(r224267): WebViews scheduled with custom run loop modes don't load
Comment 1 Alex Christensen 2017-11-09 17:56:36 PST
Created attachment 326521 [details]
Patch
Comment 2 Build Bot 2017-11-09 17:58:43 PST
Attachment 326521 [details] did not pass style-queue:


ERROR: Source/WTF/wtf/NeverDestroyed.h:26:  Use #pragma once instead of #ifndef for header guard.  [build/header_guard] [5]
Total errors found: 1 in 15 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Tim Horton 2017-11-09 18:24:53 PST
Comment on attachment 326521 [details]
Patch

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

> Source/WTF/ChangeLog:15
> +        Unfortunately we need to go back to #ifdef guards because different copies of this header are included while building WTF.

Wat

> Source/WTF/wtf/mac/MainThreadMac.mm:125
> +static RetainPtr<NSArray<NSString *>> nsArrayFromVector(const Vector<String>& strings)

The name of this function should be way more clear that it does crazy things.
Comment 4 Alex Christensen 2017-11-09 19:00:03 PST
Created attachment 326531 [details]
Patch
Comment 5 Geoffrey Garen 2017-11-09 20:11:06 PST
Comment on attachment 326531 [details]
Patch

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

> Source/WebCore/platform/network/mac/ResourceHandleMac.mm:277
> +    RetainPtr<NSArray<NSString *>> runLoopModes;
> +    if (auto* scheduledPairs = d->m_context->scheduledRunLoopPairs()) {
> +        runLoopModes = adoptNS([[NSMutableArray alloc] initWithCapacity:scheduledPairs->size()]);
> +        for (auto& pair : *scheduledPairs)
> +            [runLoopModes addObject:(NSString *)pair->mode()];
> +    }

Can we just pass though the SchedulePairHashSet instead of copying into an NSArray *?

Reasons to prefer:

(1) A full fix for this bug requires honoring not just the run loop mode but also the run loop, which need not be the main run loop.

(2) It's nice to pass C++ types to C++ code -- and faster too.
Comment 6 Alex Christensen 2017-11-09 20:56:52 PST
Created attachment 326547 [details]
Patch
Comment 7 Alex Christensen 2017-11-09 21:23:23 PST
Created attachment 326550 [details]
Patch
Comment 8 Alex Christensen 2017-11-10 09:31:15 PST
http://trac.webkit.org/r224687
Comment 9 Radar WebKit Bug Importer 2017-11-15 09:37:36 PST
<rdar://problem/35562089>