зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset c209cb1c0341 (bug 1658146) for browser_resources_network_events.js failures CLOSED TREE
This commit is contained in:
Родитель
6d322bffe4
Коммит
789e572738
|
@ -192,7 +192,7 @@ class HeadersPanel extends Component {
|
|||
urlDetails.url.split(
|
||||
requestHeaders.headers.find(ele => ele.name === "Host").value
|
||||
)[1]
|
||||
} ${httpVersion || ""}`;
|
||||
} ${httpVersion}`;
|
||||
result = `${title} (${getFormattedSize(
|
||||
writeHeaderText(requestHeaders.headers, preHeaderText).length,
|
||||
3
|
||||
|
@ -357,7 +357,7 @@ class HeadersPanel extends Component {
|
|||
urlDetails.url.split(
|
||||
requestHeaders.headers.find(ele => ele.name === "Host").value
|
||||
)[1]
|
||||
} ${httpVersion || ""}`;
|
||||
} ${httpVersion}`;
|
||||
value = writeHeaderText(requestHeaders.headers, preHeaderText).trim();
|
||||
break;
|
||||
case "RESPONSE":
|
||||
|
|
|
@ -368,25 +368,18 @@ NetworkObserver.prototype = {
|
|||
|
||||
const httpActivity = this.createOrGetActivityObject(channel);
|
||||
const serverTimings = this._extractServerTimings(channel);
|
||||
if (!httpActivity.owner) {
|
||||
// If the owner isn't set we need to create the network event and send
|
||||
// it to the client. This happens in case where the request has been
|
||||
// blocked (e.g. CORS) and "http-on-stop-request" is the first notification.
|
||||
|
||||
// Also we need make sure there is a valid reason to block. These reason
|
||||
// - Either the id is set to a valid string in case of extension blocking
|
||||
// - Or the reason is set to anything other than 0 (BLOCKING_REASON_NONE) which is default for
|
||||
// any request (blocked or unblocked). See https://searchfox.org/mozilla-central/rev/23dd7c485a6525bb3a974abeaafaf34bfb43d76b/netwerk/base/nsILoadInfo.idl#1256-1310 for details.
|
||||
if (reason || id) {
|
||||
this._createNetworkEvent(subject, {
|
||||
blockedReason: reason,
|
||||
blockingExtension: id,
|
||||
});
|
||||
}
|
||||
} else {
|
||||
if (httpActivity.owner) {
|
||||
// Try extracting server timings. Note that they will be sent to the client
|
||||
// in the `_onTransactionClose` method together with network event timings.
|
||||
httpActivity.owner.addSeverTimings(serverTimings);
|
||||
} else {
|
||||
// If the owner isn't set we need to create the network event and send
|
||||
// it to the client. This happens in case where the request has been
|
||||
// blocked (e.g. CORS) and "http-on-stop-request" is the first notification.
|
||||
this._createNetworkEvent(subject, {
|
||||
blockedReason: reason,
|
||||
blockingExtension: id,
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче