Skip to content

Commit

Permalink
Fix issue that can hide slow network requests
Browse files Browse the repository at this point in the history
WebKit Inspector contains an apparent implementation bug whereby if the
request does not provide a Page.ResourceType guess then it will hide it
from the UI until Network.responseReceived is delivered with the actual
Page.ResourceType is given.  This works fine when there is a small delay
between requestWillBeSent and responseReceived, but if the delay widens
significantly, the Inspector UI will discard the record and fail to show
it no matter how progress is made after that point.

This can be demonstrated by adding significant timing delays in network
events (such as by using iptables to slow down or stop traffic entirely)
or just adding delays in NetworkEventReporterImpl.
  • Loading branch information
Josh Guilfoyle committed Feb 10, 2015
1 parent 52596d1 commit 8b12919
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ public void requestWillBeSent(InspectorRequest request) {
params.timestamp = stethoNow() / 1000.0;
params.initiator = initiatorJSON;
params.redirectResponse = null;
params.type = Page.ResourceType.OTHER;
peerManager.sendNotificationToPeers("Network.requestWillBeSent", params);
}
}
Expand Down Expand Up @@ -146,7 +147,7 @@ public void responseHeadersReceived(InspectorResponse response) {
}
receivedParams.response = responseJSON;
peerManager.sendNotificationToPeers("Network.responseReceived", receivedParams);
}
}
}

@Override
Expand Down

0 comments on commit 8b12919

Please sign in to comment.