Bug 187975

Summary: Use CompletionHandler for policy decisions
Product: WebKit Reporter: Alex Christensen <achristensen>
Component: New BugsAssignee: Alex Christensen <achristensen>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, commit-queue, ews-watchlist, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 188011    
Bug Blocks:    
Attachments:
Description Flags
Patch
none
Archive of layout-test-results from ews200 for win-future none

Description Alex Christensen 2018-07-24 15:26:42 PDT
Use CompletionHandler for policy decisions
Comment 1 Alex Christensen 2018-07-24 15:35:17 PDT
Created attachment 345720 [details]
Patch
Comment 2 EWS Watchlist 2018-07-24 18:52:27 PDT
Comment on attachment 345720 [details]
Patch

Attachment 345720 [details] did not pass win-ews (win):
Output: https://webkit-queues.webkit.org/results/8644755

New failing tests:
http/tests/security/canvas-remote-read-remote-video-localhost.html
Comment 3 EWS Watchlist 2018-07-24 18:52:38 PDT
Created attachment 345734 [details]
Archive of layout-test-results from ews200 for win-future

The attached test failures were seen while running run-webkit-tests on the win-ews.
Bot: ews200  Port: win-future  Platform: CYGWIN_NT-6.1-2.9.0-0.318-5-3-x86_64-64bit
Comment 4 Chris Dumez 2018-07-25 08:41:17 PDT
Comment on attachment 345720 [details]
Patch

r=me
Comment 5 WebKit Commit Bot 2018-07-25 09:08:01 PDT
Comment on attachment 345720 [details]
Patch

Clearing flags on attachment: 345720

Committed r234196: <https://trac.webkit.org/changeset/234196>
Comment 6 WebKit Commit Bot 2018-07-25 09:08:03 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 Radar WebKit Bug Importer 2018-07-25 09:10:17 PDT
<rdar://problem/42585164>
Comment 8 WebKit Commit Bot 2018-07-25 11:01:46 PDT
Re-opened since this is blocked by bug 188011
Comment 9 Alex Christensen 2018-07-25 11:25:45 PDT
Comment on attachment 345720 [details]
Patch

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

> Source/WebKit/UIProcess/WebPageProxy.cpp:4121
> +        receivedPolicyDecision(policyAction, frame.get(), listenerID, nullptr, std::nullopt);

This nullptr should've been navigation.get()
:|
Comment 10 Alex Christensen 2018-07-25 11:32:15 PDT
http://trac.webkit.org/r234210
Comment 11 Alex Christensen 2018-07-25 11:33:14 PDT
Comment on attachment 345720 [details]
Patch

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

> Source/WebKit/UIProcess/WebPageProxy.cpp:4022
> +                RunLoop::main().dispatch([this, protectedThis = makeRef(*this), navigation = makeRef(*navigation), proposedProcess = WTFMove(proposedProcess)]() mutable {

I changed this from makeRef(*this) to WTFMove(protectedThis) because of the ol' MSVC-inconsistently-thinks-this-means-containing-lambda bug
Comment 12 Chris Dumez 2018-07-26 12:27:54 PDT
Comment on attachment 345720 [details]
Patch

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

> Source/WebKit/UIProcess/WebPageProxy.cpp:4119
> +        ASSERT_UNUSED(policies, !policies);

I am frequently hitting this assertion when browsing in debug :( Could you please look into it?