Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(771)

Unified Diff: Source/devtools/front_end/NetworkManager.js

Issue 209343005: Move 'response' check in responseReceived() to the backend. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/inspector/InspectorResourceAgent.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/NetworkManager.js
diff --git a/Source/devtools/front_end/NetworkManager.js b/Source/devtools/front_end/NetworkManager.js
index 76c0fafce15d25d36fdbb84571eb29a583ef7510..fd77f7335cd2befe64d4b306b9d867db764724a6 100644
--- a/Source/devtools/front_end/NetworkManager.js
+++ b/Source/devtools/front_end/NetworkManager.js
@@ -164,9 +164,6 @@ WebInspector.NetworkDispatcher.prototype = {
*/
_updateNetworkRequestWithResponse: function(networkRequest, response)
{
- if (!response)
- return;
-
if (response.url && networkRequest.url !== response.url)
networkRequest.url = response.url;
networkRequest.mimeType = response.mimeType;
@@ -235,17 +232,6 @@ WebInspector.NetworkDispatcher.prototype = {
},
/**
- * @param {!NetworkAgent.Response} response
- * @return {boolean}
- */
- _isNull: function(response)
- {
- if (!response)
- return true;
- return !response.status && !response.mimeType && (!response.headers || !Object.keys(response.headers).length);
- },
-
- /**
* @param {!NetworkAgent.RequestId} requestId
* @param {!PageAgent.FrameId} frameId
* @param {!NetworkAgent.LoaderId} loaderId
@@ -295,10 +281,6 @@ WebInspector.NetworkDispatcher.prototype = {
*/
responseReceived: function(requestId, frameId, loaderId, time, resourceType, response)
{
- // FIXME: move this check to the backend.
- if (this._isNull(response))
- return;
-
var networkRequest = this._inflightRequestsById[requestId];
if (!networkRequest) {
// We missed the requestWillBeSent.
« no previous file with comments | « Source/core/inspector/InspectorResourceAgent.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698