WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 206037
Expand _WKResourceLoadDelegate callbacks
https://bugs.webkit.org/show_bug.cgi?id=206037
Summary
Expand _WKResourceLoadDelegate callbacks
Alex Christensen
Reported
2020-01-09 14:38:37 PST
Expand _WKResourceLoadDelegate callbacks
Attachments
Patch
(73.12 KB, patch)
2020-01-09 14:58 PST
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
Patch
(72.64 KB, patch)
2020-01-09 15:08 PST
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
Patch
(72.64 KB, patch)
2020-01-09 15:53 PST
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
Patch
(77.90 KB, patch)
2020-01-10 09:48 PST
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Alex Christensen
Comment 1
2020-01-09 14:58:52 PST
Created
attachment 387277
[details]
Patch
Alex Christensen
Comment 2
2020-01-09 15:08:10 PST
Created
attachment 387280
[details]
Patch
Alex Christensen
Comment 3
2020-01-09 15:53:34 PST
Created
attachment 387284
[details]
Patch
youenn fablet
Comment 4
2020-01-10 09:08:18 PST
Comment on
attachment 387284
[details]
Patch Seems fine but I have some questions. This API is read-only. Do we also want to modify/cancel all these requests? Do we envision replacing InjectedBundle loading API with this API? Do we want to see these requests before or after service worker? Currently, this is after service worker. View in context:
https://bugs.webkit.org/attachment.cgi?id=387284&action=review
> Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp:104 > + return nextIdentifier++;
Can we use an ObjectIdentifier?
> Source/WebKit/NetworkProcess/NetworkResourceLoader.h:111 > + void didReceiveChallenge(const WebCore::AuthenticationChallenge&) override;
final
> Source/WebKit/UIProcess/API/APIResourceLoadInfo.h:40 > + ResourceLoadInfo(WebKit::ResourceLoadInfo&& info)
explicit and private.
Alex Christensen
Comment 5
2020-01-10 09:11:31 PST
(In reply to youenn fablet from
comment #4
)
> Comment on
attachment 387284
[details]
> Patch > > Seems fine but I have some questions. > > This API is read-only. > Do we also want to modify/cancel all these requests?
That is not planned right now. Hopefully never.
> Do we envision replacing InjectedBundle loading API with this API?
The InjectedBundle has the ability to mutate requests before sending. This is not a replacement for that ability.
> > Do we want to see these requests before or after service worker? > Currently, this is after service worker.
After. This records what is actually sent on the network. If we find we need service worker requests, too, we can add that.
> > View in context: >
https://bugs.webkit.org/attachment.cgi?id=387284&action=review
> > > Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp:104 > > + return nextIdentifier++; > > Can we use an ObjectIdentifier?
No, because NetworkResourceLoader already has an identifier() method that returns the identifier according to the web process, but this identifier needs to be unique to the network process.
> > > Source/WebKit/NetworkProcess/NetworkResourceLoader.h:111 > > + void didReceiveChallenge(const WebCore::AuthenticationChallenge&) override; > > final > > > Source/WebKit/UIProcess/API/APIResourceLoadInfo.h:40 > > + ResourceLoadInfo(WebKit::ResourceLoadInfo&& info) > > explicit and private.
Will do before committing.
youenn fablet
Comment 6
2020-01-10 09:17:15 PST
> > Can we use an ObjectIdentifier? > No, because NetworkResourceLoader already has an identifier() method that > returns the identifier according to the web process, but this identifier > needs to be unique to the network process.
I mean, can we use an ObjectIdentifier<NetworkResourceLoadIdentifierType> instead of an integer.
Alex Christensen
Comment 7
2020-01-10 09:48:18 PST
Created
attachment 387350
[details]
Patch
Alex Christensen
Comment 8
2020-01-10 09:53:18 PST
(In reply to youenn fablet from
comment #6
)
> I mean, can we use an ObjectIdentifier<NetworkResourceLoadIdentifierType> > instead of an integer.
That worked, but it made it so my identifiers were not 1, 2, 3... but rather numbers with all ObjectIdentifiers mixed in. That's probably fine, but I had to update the test too. I shouldn't be relying on deterministic identifiers anyways.
Alex Christensen
Comment 9
2020-01-10 10:06:56 PST
http://trac.webkit.org/r254345
Radar WebKit Bug Importer
Comment 10
2020-01-10 10:07:16 PST
<
rdar://problem/58482281
>
Jonathan Bedard
Comment 11
2020-01-10 13:40:34 PST
New test has been crashing since it was committed:
https://results.webkit.org/?suite=api-tests&test=TestWebKitAPI.ResourceLoadDelegate.BeaconAndSyncXHR
Alex Christensen
Comment 12
2020-01-10 13:41:22 PST
Looking into it...
Alex Christensen
Comment 13
2020-01-10 14:38:46 PST
http://trac.webkit.org/r254367
should fix those tests.
Alex Christensen
Comment 14
2020-02-12 10:02:48 PST
http://trac.webkit.org/r256444
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug