RESOLVED FIXED 184396
Web Inspector backend should get headers & cookies from network process separately from resource requests
https://bugs.webkit.org/show_bug.cgi?id=184396
Summary Web Inspector backend should get headers & cookies from network process separ...
youenn fablet
Reported 2018-04-07 23:26:21 PDT
Web Inspector backend should get headers & cookies from network process separately from resource requests
Attachments
Patch (18.72 KB, patch)
2018-04-07 23:37 PDT, youenn fablet
no flags
Archive of layout-test-results from ews107 for mac-sierra-wk2 (21.51 MB, application/zip)
2018-04-08 00:49 PDT, EWS Watchlist
no flags
Patch (21.18 KB, patch)
2018-04-18 23:38 PDT, youenn fablet
no flags
Patch for landing (21.43 KB, patch)
2018-04-19 10:24 PDT, youenn fablet
no flags
Win fix (21.45 KB, patch)
2018-04-19 13:57 PDT, youenn fablet
no flags
youenn fablet
Comment 1 2018-04-07 23:26:55 PDT
youenn fablet
Comment 2 2018-04-07 23:37:56 PDT
youenn fablet
Comment 3 2018-04-07 23:39:42 PDT
There is no test, I guess there should be some related to headers and inspector. Probably when increasing the scope of response filtering, this patch will make sure inspector tests do not fail.
EWS Watchlist
Comment 4 2018-04-08 00:49:20 PDT
Comment on attachment 337446 [details] Patch Attachment 337446 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/7242791 New failing tests: http/tests/inspector/network/resource-response-source-memory-cache-revalidate-expired-only.html
EWS Watchlist
Comment 5 2018-04-08 00:49:22 PDT
Created attachment 337448 [details] Archive of layout-test-results from ews107 for mac-sierra-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews107 Port: mac-sierra-wk2 Platform: Mac OS X 10.12.6
Blaze Burg
Comment 6 2018-04-08 13:54:51 PDT
Comment on attachment 337446 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=337446&action=review > Source/WebCore/loader/LoaderStrategy.h:82 > + virtual ResourceResponse responseFromResourceLoaIdentifier(uint64_t /* resourceLoadIdentifier */); There is a typo in these two methods, please fix. > Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h:84 > + void takeNetworkLoadInformationResponse(ResourceLoadIdentifier identifier, WebCore::ResourceResponse& response) Is there any particular reason to use an out-parameter? > Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h:184 > + HashMap<ResourceLoadIdentifier, NetworkLoadInformation> m_networkLoadInformations; The plural of information is information, so adding 's' doesn't sound good. I would rename the typedef to NetworkLoadData/NetworkLoadResponseData and call this m_responseDataForResourceLoad.
youenn fablet
Comment 7 2018-04-08 22:17:31 PDT
(In reply to Brian Burg from comment #6) > Comment on attachment 337446 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=337446&action=review > > > Source/WebCore/loader/LoaderStrategy.h:82 > > + virtual ResourceResponse responseFromResourceLoaIdentifier(uint64_t /* resourceLoadIdentifier */); > > There is a typo in these two methods, please fix. OK > > Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h:84 > > + void takeNetworkLoadInformationResponse(ResourceLoadIdentifier identifier, WebCore::ResourceResponse& response) > > Is there any particular reason to use an out-parameter? Sync IPC, but I think I will update it so that there is no need to create a ResourceResponse and copy it. > > Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h:184 > > + HashMap<ResourceLoadIdentifier, NetworkLoadInformation> m_networkLoadInformations; > > The plural of information is information, so adding 's' doesn't sound good. > I would rename the typedef to NetworkLoadData/NetworkLoadResponseData and > call this m_responseDataForResourceLoad. OK
youenn fablet
Comment 8 2018-04-18 23:38:05 PDT
Blaze Burg
Comment 9 2018-04-19 09:48:12 PDT
Comment on attachment 338314 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=338314&action=review r=me > Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp:426 > + return source != ResourceResponse::Source::MemoryCache && source != ResourceResponse::Source::ServiceWorker && source != ResourceResponse::Source::ApplicationCache && source != ResourceResponse::Source::MemoryCacheAfterValidation; Nit; a switch would be easier to read & maintain. > Source/WebCore/loader/LoaderStrategy.h:85 > + virtual ResourceResponse responseFromResourceLoadIdentifier(uint64_t /* resourceLoadIdentifier */); Nit: no need to comment out the parameter names in the declaration. > Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp:279 > + // FIXME: All loaders should provide their origin if navigation mode is cors/no-cors/same-origin. I don't quite understand this part. On the assumption it's going to be used for things other than Inspector, I'll let you determine the best way forward to make it more accurate.
youenn fablet
Comment 10 2018-04-19 10:14:24 PDT
Thanks for the review. (In reply to Brian Burg from comment #9) > Comment on attachment 338314 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=338314&action=review > > r=me > > > Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp:426 > > + return source != ResourceResponse::Source::MemoryCache && source != ResourceResponse::Source::ServiceWorker && source != ResourceResponse::Source::ApplicationCache && source != ResourceResponse::Source::MemoryCacheAfterValidation; > > Nit; a switch would be easier to read & maintain. OK > > Source/WebCore/loader/LoaderStrategy.h:85 > > + virtual ResourceResponse responseFromResourceLoadIdentifier(uint64_t /* resourceLoadIdentifier */); > > Nit: no need to comment out the parameter names in the declaration. OK > > Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp:279 > > + // FIXME: All loaders should provide their origin if navigation mode is cors/no-cors/same-origin. > > I don't quite understand this part. On the assumption it's going to be used > for things other than Inspector, I'll let you determine the best way forward > to make it more accurate. We are using sourceOrigin to do CORS checks in NetworkProcess. This is currently limited to sync XHR and beacon API but will be extended to other types of loads.
youenn fablet
Comment 11 2018-04-19 10:24:07 PDT
Created attachment 338338 [details] Patch for landing
youenn fablet
Comment 12 2018-04-19 13:57:12 PDT
WebKit Commit Bot
Comment 13 2018-04-19 14:27:08 PDT
Comment on attachment 338354 [details] Win fix Clearing flags on attachment: 338354 Committed r230820: <https://trac.webkit.org/changeset/230820>
WebKit Commit Bot
Comment 14 2018-04-19 14:27:10 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.