WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
199896
Expose additional resource load statistics to clients
https://bugs.webkit.org/show_bug.cgi?id=199896
Summary
Expose additional resource load statistics to clients
Saagar Jha
Reported
2019-07-17 20:24:49 PDT
Expose additional resource load statistics to clients
Attachments
Patch
(13.40 KB, patch)
2019-07-17 20:32 PDT
,
Saagar Jha
no flags
Details
Formatted Diff
Diff
Patch
(14.39 KB, patch)
2019-07-22 09:37 PDT
,
Saagar Jha
saagarjha
: review?
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Saagar Jha
Comment 1
2019-07-17 20:32:59 PDT
Created
attachment 374365
[details]
Patch
Sam Weinig
Comment 2
2019-07-18 16:31:31 PDT
Comment on
attachment 374365
[details]
Patch What is the use case for this information? Also, this needs tests.
Chris Dumez
Comment 3
2019-07-19 11:14:14 PDT
Comment on
attachment 374365
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=374365&action=review
> Source/WebKit/NetworkProcess/NetworkSession.cpp:154 > +void NetworkSession::didLoadResourceWithoutCookies(const String& resource, WebCore::PageIdentifier pageID)
This should not be a String, likely a URL.
> Source/WebKit/NetworkProcess/NetworkSession.h:90 > + void didLoadResourceWithoutCookies(const String &resource, WebCore::PageIdentifier);
& on wrong side.
> Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:210 > + session.didLoadResourceWithoutCookies(request.url().string(), pageID);
I would call this willLoad... rather than didLoad.. given that we have not started loading yet.
> Source/WebKit/UIProcess/API/APINavigationClient.h:156 > + virtual void didLoadResourceWithoutCookies(const WTF::String& resource) { }
URL, also WTF:: is not needed.
> Source/WebKit/UIProcess/Cocoa/NavigationState.h:146 > + void didLoadResourceWithoutCookies(const WTF::String& resource) override;
URL, also WTF:: is not needed.
> Source/WebKit/UIProcess/Cocoa/NavigationState.mm:1165 > +void NavigationState::NavigationClient::didLoadResourceWithoutCookies(const WTF::String& resource)
URL, also WTF:: is not needed.
> Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp:931 > +void NetworkProcessProxy::didLoadResourceWithoutCookies(const String &resource, PageIdentifier pageID)
& on wrong side, and should be a URL.
> Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp:933 > + if (auto page = WebProcessProxy::webPage(pageID))
auto*
> Source/WebKit/UIProcess/Network/NetworkProcessProxy.messages.in:52 > + DidLoadResourceWithoutCookies(String resource, WebCore::PageIdentifier pageID);
URL
Saagar Jha
Comment 4
2019-07-22 09:37:02 PDT
Created
attachment 374602
[details]
Patch
Saagar Jha
Comment 5
2019-07-22 09:44:57 PDT
(In reply to Chris Dumez from
comment #3
) I've uploaded a new patch that takes your feedback into account. Specifically:
> Comment on
attachment 374365
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=374365&action=review
> > > Source/WebKit/NetworkProcess/NetworkSession.cpp:154 > > +void NetworkSession::didLoadResourceWithoutCookies(const String& resource, WebCore::PageIdentifier pageID) > > This should not be a String, likely a URL.
Yes, this has been changed.
> > Source/WebKit/NetworkProcess/NetworkSession.h:90 > > + void didLoadResourceWithoutCookies(const String &resource, WebCore::PageIdentifier); > > & on wrong side.
Fixed.
> > Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:210 > > + session.didLoadResourceWithoutCookies(request.url().string(), pageID); > > I would call this willLoad... rather than didLoad.. given that we have not > started loading yet.
Good point, renamed.
> > Source/WebKit/UIProcess/API/APINavigationClient.h:156 > > + virtual void didLoadResourceWithoutCookies(const WTF::String& resource) { } > > URL, also WTF:: is not needed.
I seemed to need it: since this is in the API namespace, URL resolves to API::URL instead of WTF::URL (I think that's why the other instances also qualify using the namespace?)
> > Source/WebKit/UIProcess/Cocoa/NavigationState.h:146 > > + void didLoadResourceWithoutCookies(const WTF::String& resource) override; > > URL, also WTF:: is not needed.
Done.
> > Source/WebKit/UIProcess/Cocoa/NavigationState.mm:1165 > > +void NavigationState::NavigationClient::didLoadResourceWithoutCookies(const WTF::String& resource) > > URL, also WTF:: is not needed.
Done.
> > Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp:931 > > +void NetworkProcessProxy::didLoadResourceWithoutCookies(const String &resource, PageIdentifier pageID) > > & on wrong side, and should be a URL.
Done.
> > Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp:933 > > + if (auto page = WebProcessProxy::webPage(pageID)) > > auto*
Does it actually matter, or is this just part of WebKit's style?
> > Source/WebKit/UIProcess/Network/NetworkProcessProxy.messages.in:52 > > + DidLoadResourceWithoutCookies(String resource, WebCore::PageIdentifier pageID); > > URL
Done.
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