Bug 1251767 - Add WS filter button to net panel. Follow-up: Use multiple lines for code if necessary to not have more than 80 characters on a line and make eslint happy. r=follow-the-rule-of-eslint
authorSebastian Hengst <archaeopteryx@coole-files.de>
Tue, 22 Mar 2016 00:42:23 +0100
changeset 289607 f7311cafabcba0b9317772633b31e77bcfe1c590
parent 289606 a85b572e0d8cb461253363dc8ac9bfc2f60d953d
child 289608 98189434eea16c181df0c7e8d60af76feceaf492
push id18297
push userarchaeopteryx@coole-files.de
push dateMon, 21 Mar 2016 23:44:21 +0000
treeherderfx-team@f7311cafabcb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfollow-the-rule-of-eslint
bugs1251767
milestone48.0a1
Bug 1251767 - Add WS filter button to net panel. Follow-up: Use multiple lines for code if necessary to not have more than 80 characters on a line and make eslint happy. r=follow-the-rule-of-eslint
devtools/client/netmonitor/netmonitor-view.js
--- a/devtools/client/netmonitor/netmonitor-view.js
+++ b/devtools/client/netmonitor/netmonitor-view.js
@@ -1282,23 +1282,25 @@ RequestsMenuView.prototype = Heritage.ex
     // Find the 'upgrade' header.
     var upgradeHeader = requestHeaders.headers.find(header => {
       return (header.name == "Upgrade");
     });
 
     // If no header found on request, check response - mainly to get
     // something we can unit test, as it is impossible to set
     // the Upgrade header on outgoing XHR as per the spec.
-    if (!upgradeHeader && responseHeaders && Array.isArray(responseHeaders.headers)) {
+    if (!upgradeHeader && responseHeaders &&
+        Array.isArray(responseHeaders.headers)) {
       upgradeHeader = responseHeaders.headers.find(header => {
         return (header.name == "Upgrade");
       });
     }
 
-    // Return false if there is no such header or if its value isn't 'websocket'.
+    // Return false if there is no such header or if its value isn't
+    // 'websocket'.
     if (!upgradeHeader || upgradeHeader.value != "websocket") {
       return false;
     }
 
     return true;
   },
 
   isOther: function(e) {