Bug 193924 - StorageAccess API calls should be direct to the Network Process
Summary: StorageAccess API calls should be direct to the Network Process
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: Brent Fulgham
URL:
Keywords: InRadar
Depends on:
Blocks: 193705
  Show dependency treegraph
 
Reported: 2019-01-28 14:29 PST by Brent Fulgham
Modified: 2019-01-31 03:10 PST (History)
6 users (show)

See Also:


Attachments
Patch (34.72 KB, patch)
2019-01-29 10:05 PST, Brent Fulgham
no flags Details | Formatted Diff | Diff
Patch (34.78 KB, patch)
2019-01-29 10:16 PST, Brent Fulgham
no flags Details | Formatted Diff | Diff
Patch (35.28 KB, patch)
2019-01-29 10:26 PST, Brent Fulgham
no flags Details | Formatted Diff | Diff
Patch (35.72 KB, patch)
2019-01-29 10:32 PST, Brent Fulgham
achristensen: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brent Fulgham 2019-01-28 14:29:14 PST
The current implementation of the Storage Access API messages the UI Process, which in turn messages the Network Process for answers. We should avoid this extra hop through the UIProcess, since the state is held entirely in the Network Process.

The one exception is when a user prompt is needed, but that should be triggered by the Network Process requesting the UI Process perform that interaction.
Comment 1 Radar WebKit Bug Importer 2019-01-28 14:30:57 PST
<rdar://problem/47611249>
Comment 2 Brent Fulgham 2019-01-29 10:05:39 PST
Created attachment 360468 [details]
Patch
Comment 3 Brent Fulgham 2019-01-29 10:16:03 PST
Created attachment 360469 [details]
Patch
Comment 4 Brent Fulgham 2019-01-29 10:26:28 PST
Created attachment 360470 [details]
Patch
Comment 5 Brent Fulgham 2019-01-29 10:32:24 PST
Created attachment 360471 [details]
Patch
Comment 6 Alex Christensen 2019-01-29 11:43:39 PST
Comment on attachment 360471 [details]
Patch

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

r=me with one minor change.

> Source/WebKit/UIProcess/WebPageProxy.h:1383
> +    static void requestStorageAccessConfirm(uint64_t pageID, uint64_t frameID, const String& subFrameHost, const String& topFrameHost, CompletionHandler<void(bool)>&&);

This should not be static.  The NetworkProcessProxy should find the correct WebPageProxy and call a member function on it.
Comment 7 Brent Fulgham 2019-01-29 13:27:38 PST
Committed r240676: <https://trac.webkit.org/changeset/240676>