Bug 170140 - Move and update WebLoaderStrategy logging statement
Summary: Move and update WebLoaderStrategy logging statement
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Keith Rollin
Depends on:
Reported: 2017-03-27 14:14 PDT by Keith Rollin
Modified: 2017-04-17 14:51 PDT (History)
3 users (show)

See Also:

Patch (5.11 KB, patch)
2017-03-27 14:21 PDT, Keith Rollin
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Keith Rollin 2017-03-27 14:14:23 PDT
WebLoaderStrategy::scheduleLoad has a logging statement that says, in part: "Resource has been queued for scheduling with the NetworkProcess". This statement is emitted after the ScheduleResourceLoad message has been successfully sent to the NetworkProcess. The logging statement was added at this location to indicate that the resource-load had been successfully handed off; it pairs a similar logging statement that is emitted if the sending of the ScheduleResourceLoad message fails.

I think it would be better to move this logging statement before the ScheduleResourceLoad message is sent to the NetworkProcess (and change its wording to "Resource is being scheduled with the NetworkProcess"). The reason for this change is to help make sure that the sequence of logging statements is more deterministic. In the current form, the message "Resource has been queued for scheduling with the NetworkProcess" normally appears before any NetworkProcess logging statements that indicate that the resource-loading is continuing there, but in rare occasions the logging statements can be reversed. This change in the ordering of the statements has caused a problem in a script I've written that examines the resource-loading process and looks for errors. By ensuring that the WebLoaderStrategy statement always appears before the NetworkResourceLoader statement, the flow makes better sense and the script can be more robust.

In making this change, we are probably not giving up any assurance that the ScheduleResourceLoad message has been sent to the NetworkResourceLoader. If the message is successfully sent, we'll see logging in the NetworkProcess. If the message has not been sent, we'll see WebLoaderStrategy logging an error.
Comment 1 Keith Rollin 2017-03-27 14:21:03 PDT
Created attachment 305509 [details]
Comment 2 WebKit Commit Bot 2017-04-17 14:51:31 PDT
Comment on attachment 305509 [details]

Clearing flags on attachment: 305509

Committed r215433: <http://trac.webkit.org/changeset/215433>
Comment 3 WebKit Commit Bot 2017-04-17 14:51:32 PDT
All reviewed patches have been landed.  Closing bug.