NO BUG - s/if(/if (/ in toolkit/devtools JS; r=jimb DONTBUILD
authorNick Fitzgerald <fitzgen@gmail.com>
Tue, 01 Sep 2015 11:25:13 -0700
changeset 260390 b2a5bd71898a3aebbc78c1425d6f39138584a173
parent 260389 aec72f4f3fa82e6e57da1e16a93d38ff33b659a9
child 260391 83844eb33969cc1fdcb44d2fb5c73b4782091ab7
push id29308
push userryanvm@gmail.com
push dateWed, 02 Sep 2015 01:15:13 +0000
treeherdermozilla-central@fb720c90eb49 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjimb
milestone43.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
NO BUG - s/if(/if (/ in toolkit/devtools JS; r=jimb DONTBUILD
toolkit/devtools/css-color.js
toolkit/devtools/gcli/source/lib/gcli/util/prism.js
toolkit/devtools/path.js
toolkit/devtools/server/actors/object.js
toolkit/devtools/server/actors/utils/TabSources.js
toolkit/devtools/shared/worker.js
toolkit/devtools/webconsole/network-monitor.js
toolkit/devtools/webconsole/test/network_requests_iframe.html
--- a/toolkit/devtools/css-color.js
+++ b/toolkit/devtools/css-color.js
@@ -355,17 +355,17 @@ function rgbToHsl([r,g,b]) {
   b = b / 255;
 
   let max = Math.max(r, g, b);
   let min = Math.min(r, g, b);
   let h;
   let s;
   let l = (max + min) / 2;
 
-  if(max == min){
+  if (max == min){
     h = s = 0;
   } else {
     let d = max - min;
     s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
 
     switch(max) {
       case r:
         h = ((g - b) / d) % 6;
--- a/toolkit/devtools/gcli/source/lib/gcli/util/prism.js
+++ b/toolkit/devtools/gcli/source/lib/gcli/util/prism.js
@@ -124,17 +124,17 @@ var Prism = exports.Prism = {
     parent = element.parentNode;
 
     if (/pre/i.test(parent.nodeName)) {
       parent.className = parent.className.replace(lang, '').replace(/\s+/g, ' ') + ' language-' + language;
     }
 
     var code = element.textContent;
 
-    if(!code) {
+    if (!code) {
       return;
     }
 
     code = code.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/\u00a0/g, ' ');
 
     var env = {
       element: element,
       language: language,
@@ -173,17 +173,17 @@ var Prism = exports.Prism = {
         grammar[token] = rest[token];
       }
 
       delete grammar.rest;
     }
 
     tokenloop:
     for (token in grammar) {
-      if(!grammar.hasOwnProperty(token) || !grammar[token]) {
+      if (!grammar.hasOwnProperty(token) || !grammar[token]) {
         continue;
       }
 
       var pattern = grammar[token],
         inside = pattern.inside,
         lookbehind = !!pattern.lookbehind,
         lookbehindLength = 0;
 
@@ -202,17 +202,17 @@ var Prism = exports.Prism = {
           continue;
         }
 
         pattern.lastIndex = 0;
 
         var match = pattern.exec(str);
 
         if (match) {
-          if(lookbehind) {
+          if (lookbehind) {
             lookbehindLength = match[1].length;
           }
 
           var from = match.index - 1 + lookbehindLength;
           match = match[0].slice(lookbehindLength);
           var len = match.length;
           var to = from + len;
           var before = str.slice(0, from + 1);
--- a/toolkit/devtools/path.js
+++ b/toolkit/devtools/path.js
@@ -24,15 +24,15 @@ exports.joinURI = (initialPath, ...paths
   try {
     uri = Services.io.newURI(initialPath, null, null);
   }
   catch(e) {
     return;
   }
 
   for(let path of paths) {
-    if(path) {
+    if (path) {
       uri = Services.io.newURI(path, null, uri);
     }
   }
 
   return uri.spec;
 }
--- a/toolkit/devtools/server/actors/object.js
+++ b/toolkit/devtools/server/actors/object.js
@@ -1893,19 +1893,19 @@ function createValueGrip(value, pool, ma
 
     case "undefined":
       return { type: "undefined" };
 
     case "object":
       if (value === null) {
         return { type: "null" };
       }
-    else if(value.optimizedOut ||
-            value.uninitialized ||
-            value.missingArguments) {
+    else if (value.optimizedOut ||
+             value.uninitialized ||
+             value.missingArguments) {
         // The slot is optimized out, an uninitialized binding, or
         // arguments on a dead scope
         return {
           type: "null",
           optimizedOut: value.optimizedOut,
           uninitialized: value.uninitialized,
           missingArguments: value.missingArguments
         };
--- a/toolkit/devtools/server/actors/utils/TabSources.js
+++ b/toolkit/devtools/server/actors/utils/TabSources.js
@@ -52,21 +52,21 @@ function TabSources(threadActor, allowSo
  */
 const MINIFIED_SOURCE_REGEXP = /\bmin\.js$/;
 
 TabSources.prototype = {
   /**
    * Update preferences and clear out existing sources
    */
   reconfigure: function(options) {
-    if('useSourceMaps' in options) {
+    if ('useSourceMaps' in options) {
       this._useSourceMaps = options.useSourceMaps;
     }
 
-    if('autoBlackBox' in options) {
+    if ('autoBlackBox' in options) {
       this._autoBlackBox = options.autoBlackBox;
     }
 
     this.reset();
   },
 
   /**
    * Clear existing sources so they are recreated on the next access.
@@ -75,17 +75,17 @@ TabSources.prototype = {
    *        Specify { sourceMaps: true } if you also want to clear
    *        the source map cache (usually done on reload).
    */
   reset: function(opts={}) {
     this._sourceActors = new Map();
     this._sourceMaps = new Map();
     this._sourceMappedSourceActors = Object.create(null);
 
-    if(opts.sourceMaps) {
+    if (opts.sourceMaps) {
       this._sourceMapCache = Object.create(null);
     }
   },
 
   /**
    * Return the source actor representing the `source` (or
    * `originalUrl`), creating one if none exists already. May return
    * null if the source is disallowed.
@@ -180,33 +180,33 @@ TabSources.prototype = {
       this._sourceMappedSourceActors[originalUrl] = actor;
     }
 
     this._emitNewSource(actor);
     return actor;
   },
 
   _emitNewSource: function(actor) {
-    if(!actor.source) {
+    if (!actor.source) {
       // Always notify if we don't have a source because that means
       // it's something that has been sourcemapped, or it represents
       // the HTML file that contains inline sources.
       this.emit('newSource', actor);
     }
     else {
       // If sourcemapping is enabled and a source has sourcemaps, we
       // create `SourceActor` instances for both the original and
       // generated sources. The source actors for the generated
       // sources are only for internal use, however; breakpoints are
       // managed by these internal actors. We only want to notify the
       // user of the original sources though, so if the actor has a
       // `Debugger.Source` instance and a valid source map (meaning
       // it's a generated source), don't send the notification.
       this.fetchSourceMap(actor.source).then(map => {
-        if(!map) {
+        if (!map) {
           this.emit('newSource', actor);
         }
       });
     }
   },
 
   getSourceActor: function(source) {
     if (source.url in this._sourceMappedSourceActors) {
--- a/toolkit/devtools/shared/worker.js
+++ b/toolkit/devtools/shared/worker.js
@@ -62,27 +62,27 @@ exports.DevToolsWorker = DevToolsWorker;
 DevToolsWorker.prototype.performTask = function (task, data) {
   if (this._destroyed) {
     return Promise.reject("Cannot call performTask on a destroyed DevToolsWorker");
   }
   let worker = this._worker;
   let id = ++MESSAGE_COUNTER;
   let payload = { task, id, data };
 
-  if(this._verbose && dumpn) {
+  if (this._verbose && dumpn) {
     dumpn("Sending message to worker" +
           (this._name ? (" (" + this._name + ")") : "" ) +
           ": " +
           JSON.stringify(payload, null, 2));
   }
   worker.postMessage(payload);
 
   return new Promise((resolve, reject) => {
     let listener = ({ data }) => {
-      if(this._verbose && dumpn) {
+      if (this._verbose && dumpn) {
         dumpn("Received message from worker" +
               (this._name ? (" (" + this._name + ")") : "" ) +
               ": " +
               JSON.stringify(data, null, 2));
       }
 
       if (data.id !== id) {
         return;
--- a/toolkit/devtools/webconsole/network-monitor.js
+++ b/toolkit/devtools/webconsole/network-monitor.js
@@ -625,17 +625,17 @@ NetworkMonitor.prototype = {
 
     response.status = channel.responseStatus;
     response.statusText = channel.responseStatusText;
     response.httpVersion = "HTTP/" + httpVersionMaj.value + "." +
                                      httpVersionMin.value;
 
     this.openResponses[response.id] = response;
 
-    if(aTopic === "http-on-examine-cached-response") {
+    if (aTopic === "http-on-examine-cached-response") {
       // If this is a cached response, there never was a request event
       // so we need to construct one here so the frontend gets all the
       // expected events.
       let httpActivity = this._createNetworkEvent(channel, { fromCache: true });
       httpActivity.owner.addResponseStart({
         httpVersion: response.httpVersion,
         remoteAddress: "",
         remotePort: "",
@@ -814,32 +814,32 @@ NetworkMonitor.prototype = {
     let httpActivity = this.createActivityObject(aChannel);
 
     // see NM__onRequestBodySent()
     httpActivity.charset = win ? win.document.characterSet : null;
 
     aChannel.QueryInterface(Ci.nsIPrivateBrowsingChannel);
     httpActivity.private = aChannel.isChannelPrivate;
 
-    if(timestamp) {
+    if (timestamp) {
       httpActivity.timings.REQUEST_HEADER = {
         first: timestamp,
         last: timestamp
       };
     }
 
     let event = {};
     event.method = aChannel.requestMethod;
     event.url = aChannel.URI.spec;
     event.private = httpActivity.private;
     event.headersSize = 0;
     event.startedDateTime = (timestamp ? new Date(Math.round(timestamp / 1000)) : new Date()).toISOString();
     event.fromCache = fromCache;
 
-    if(extraStringData) {
+    if (extraStringData) {
       event.headersSize = extraStringData.length;
     }
 
     // Determine if this is an XHR request.
     httpActivity.isXHR = event.isXHR =
         (aChannel.loadInfo.contentPolicyType === Ci.nsIContentPolicy.TYPE_XMLHTTPREQUEST);
 
     // Determine the HTTP version.
@@ -1096,17 +1096,17 @@ NetworkMonitor.prototype = {
    *        Indicates that the result was returned from the browser cache
    * @return object
    *         This object holds two properties:
    *         - total - the total time for all of the request and response.
    *         - timings - the HAR timings object.
    */
   _setupHarTimings: function NM__setupHarTimings(aHttpActivity, fromCache)
   {
-    if(fromCache) {
+    if (fromCache) {
       // If it came from the browser cache, we have no timing
       // information and these should all be 0
       return {
         total: 0,
         timings: {
           blocked: 0,
           dns: 0,
           connect: 0,
--- a/toolkit/devtools/webconsole/test/network_requests_iframe.html
+++ b/toolkit/devtools/webconsole/test/network_requests_iframe.html
@@ -5,17 +5,17 @@
     <title>Console HTTP test page</title>
     <!-- Any copyright is dedicated to the Public Domain.
        - http://creativecommons.org/publicdomain/zero/1.0/ -->
     <script type="text/javascript"><!--
       var setAllowAllCookies = false;
 
       function makeXhr(aMethod, aUrl, aRequestBody, aCallback) {
         // On the first call, allow all cookies and set cookies, then resume the actual test
-        if(!setAllowAllCookies)
+        if (!setAllowAllCookies)
           SpecialPowers.pushPrefEnv({"set": [["network.cookie.cookieBehavior", 0]]}, function () {
             setAllowAllCookies = true;
             setCookies();
             makeXhrCallback(aMethod, aUrl, aRequestBody, aCallback);
           });
         else
           makeXhrCallback(aMethod, aUrl, aRequestBody, aCallback);
       }
@@ -36,17 +36,17 @@
       function testXhrGet(aCallback) {
         makeXhr('get', 'data.json', null, aCallback);
       }
 
       function testXhrPost(aCallback) {
         var body = "Hello world! " + (new Array(50)).join("foobaz barr");
         makeXhr('post', 'data.json', body, aCallback);
       }
-      
+
       function setCookies() {
         document.cookie = "foobar=fooval";
         document.cookie = "omgfoo=bug768096";
         document.cookie = "badcookie=bug826798=st3fan";
       }
     // --></script>
   </head>
   <body>