Bug 1282334 followup - Remove pointless DOMFullscreenHandler._fullscreenDoc. r?dao draft
authorXidorn Quan <me@upsuper.org>
Wed, 29 Jun 2016 11:58:32 +1000
changeset 382163 7a4f77a77923d2c5c8754b607e0fcc74057201af
parent 382162 a258bc82dcded36513e32db86b085de38f856980
child 524119 7589fd2ee7cd6711707b589243ffe95fa09e7c0d
push id21643
push userxquan@mozilla.com
push dateWed, 29 Jun 2016 03:37:41 +0000
reviewersdao
bugs1282334
milestone50.0a1
Bug 1282334 followup - Remove pointless DOMFullscreenHandler._fullscreenDoc. r?dao MozReview-Commit-ID: HHoDOeVJNu2
browser/base/content/tab-content.js
--- a/browser/base/content/tab-content.js
+++ b/browser/base/content/tab-content.js
@@ -610,17 +610,16 @@ if (Services.appinfo.processType == Serv
 }
 
 
 var DOMFullscreenHandler = {
   // Smaller than any real transaction id, so that if the id is not set
   // elsewhere (which is the case for non-e10s), the condition in the
   // handler of MozAfterPaint can always be true.
   _lastTransactionId: -1,
-  _fullscreenDoc: null,
 
   init: function() {
     addMessageListener("DOMFullscreen:Entered", this);
     addMessageListener("DOMFullscreen:CleanUp", this);
     addEventListener("MozDOMFullscreen:Request", this);
     addEventListener("MozDOMFullscreen:Entered", this);
     addEventListener("MozDOMFullscreen:NewOrigin", this);
     addEventListener("MozDOMFullscreen:Exit", this);
@@ -649,32 +648,30 @@ var DOMFullscreenHandler = {
         }
         break;
       }
       case "DOMFullscreen:CleanUp": {
         if (content.document.fullscreenElement && windowUtils) {
           this._lastTransactionId = windowUtils.lastTransactionId;
           windowUtils.exitFullscreen();
         }
-        this._fullscreenDoc = null;
         break;
       }
     }
   },
 
   handleEvent: function(aEvent) {
     switch (aEvent.type) {
       case "MozDOMFullscreen:Request": {
         sendAsyncMessage("DOMFullscreen:Request");
         break;
       }
       case "MozDOMFullscreen:NewOrigin": {
-        this._fullscreenDoc = aEvent.target;
         sendAsyncMessage("DOMFullscreen:NewOrigin", {
-          originNoSuffix: this._fullscreenDoc.nodePrincipal.originNoSuffix,
+          originNoSuffix: aEvent.target.nodePrincipal.originNoSuffix,
         });
         break;
       }
       case "MozDOMFullscreen:Exit": {
         sendAsyncMessage("DOMFullscreen:Exit");
         break;
       }
       case "MozDOMFullscreen:Entered":