Bug 1388283 - Combine two if statements; r=dao
authorAmi <ami.bugzilla@gmail.com>
Tue, 08 Aug 2017 23:46:00 +0200
changeset 643329 495a724af85c6d8e1efe438334f8f711d9d250fd
parent 643328 092017bb63c960d8961e7cf29e024a68245bb2f5
child 643330 b71ebbcb56f29702e124bf1afbabce9c9228ccc6
push id73068
push usergpascutto@mozilla.com
push dateWed, 09 Aug 2017 16:52:24 +0000
reviewersdao
bugs1388283
milestone57.0a1
Bug 1388283 - Combine two if statements; r=dao
browser/modules/UpdateTopLevelContentWindowIDHelper.jsm
--- a/browser/modules/UpdateTopLevelContentWindowIDHelper.jsm
+++ b/browser/modules/UpdateTopLevelContentWindowIDHelper.jsm
@@ -73,20 +73,19 @@ function _handleEvent(aEvent) {
     case "unload":
       WindowHelper.removeWindow(aEvent.currentTarget);
       break;
   }
 }
 
 function _handleMessage(aMessage) {
   let browser = aMessage.target;
-  if (aMessage.name === "Browser:Init") {
-    if (browser === browser.ownerGlobal.gBrowser.selectedBrowser) {
-      _updateCurrentContentOuterWindowID(browser);
-    }
+  if (aMessage.name === "Browser:Init" &&
+      browser === browser.ownerGlobal.gBrowser.selectedBrowser) {
+    _updateCurrentContentOuterWindowID(browser);
   }
 }
 
 // Methods that impact a window. Put into single object for organization.
 var WindowHelper = {
   addWindow: function NP_WH_addWindow(aWindow) {
     // Add event listeners
     TAB_EVENTS.forEach(function(event) {