Bug 700495 - [birch] Use ES5 strict mode in browser.js [r=wesj]
authorMatt Brubeck <mbrubeck@mozilla.com>
Mon, 07 Nov 2011 17:10:59 -0800
changeset 81764 91bedac30ac3a422c7b7a4038a6db70a902e75a6
parent 81763 6cb39cb201d00aba8522742e19b4a26658d2a3c5
child 81765 1416e594077ae47c00e78968cda3c84a0aca94f5
push idunknown
push userunknown
push dateunknown
reviewerswesj
bugs700495
milestone10.0a1
Bug 700495 - [birch] Use ES5 strict mode in browser.js [r=wesj]
mobile/chrome/content/browser.js
--- a/mobile/chrome/content/browser.js
+++ b/mobile/chrome/content/browser.js
@@ -30,16 +30,17 @@
  * under the terms of either the GPL or the LGPL, and not to allow others to
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
+"use strict";
 
 let Cc = Components.classes;
 let Ci = Components.interfaces;
 let Cu = Components.utils;
 let Cr = Components.results;
 
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 Cu.import("resource://gre/modules/NetUtil.jsm");
@@ -1083,19 +1084,19 @@ var BrowserEventHandler = {
 
         // Attach a listener to watch for "click" events bubbling up from error
         // pages and other similar page. This lets us fix bugs like 401575 which
         // require error page UI to do privileged things, without letting error
         // pages have any privilege themselves.
         if (/^about:/.test(aEvent.originalTarget.documentURI)) {
           let browser = BrowserApp.getBrowserForDocument(aEvent.originalTarget);
           browser.addEventListener("click", ErrorPageEventHandler, false);
-          browser.addEventListener("pagehide", function () {
+          browser.addEventListener("pagehide", function listener() {
             browser.removeEventListener("click", ErrorPageEventHandler, false);
-            browser.removeEventListener("pagehide", arguments.callee, true);
+            browser.removeEventListener("pagehide", listener, true);
           }, true);
         }
         break;
       }
 
       case "DOMLinkAdded": {
         let target = aEvent.originalTarget;
         if (!target.href || target.disabled)