From ccaa2e2118f69124171e54f6cd3e4c0c41f9d6f4 Mon Sep 17 00:00:00 2001 From: Jeff Walden Date: Sat, 22 Jan 2011 17:46:22 -0800 Subject: [PATCH] Bug 497869 - Future reserved words are syntax errors in strict mode. r=brendan --- browser/base/content/syncSetup.js | 4 +- browser/components/nsBrowserGlue.js | 6 +- browser/fuel/src/fuelApplication.js | 6 +- content/base/test/chrome/title_window.xul | 4 +- docshell/test/chrome/bug113934_window.xul | 4 +- docshell/test/chrome/bug215405_window.xul | 4 +- docshell/test/chrome/bug449778_window.xul | 4 +- docshell/test/chrome/bug449780_window.xul | 4 +- docshell/test/chrome/docshell_helpers.js | 4 +- js/src/jsemit.cpp | 2 - js/src/jsinterp.cpp | 2 - js/src/jskeyword.tbl | 102 +++++++-------- js/src/jsopcode.cpp | 2 - js/src/jsparse.cpp | 2 - js/src/jsscan.cpp | 10 +- js/src/jsscan.h | 1 + js/src/jsversion.h | 9 -- .../ecma_5/misc/future-reserved-words.js | 122 ++++++++++++++++++ js/src/tests/ecma_5/misc/jstests.list | 1 + js/src/tests/js1_5/Regress/jstests.list | 1 - js/src/tests/js1_5/Regress/regress-240317.js | 68 ---------- .../tests/js1_5/extensions/regress-355736.js | 8 +- .../chrome_content_integration_window.xul | 4 +- .../chrome/chrome_over_plugin_window.xul | 4 +- .../chrome/default_background_window.xul | 4 +- layout/reftests/editor/xul/platform.js | 6 +- layout/style/test/chrome/hover_helper.html | 4 +- testing/mochitest/browser-harness.xul | 4 +- .../ctypes/tests/unit/test_jsctypes.js.in | 4 +- .../content/tests/chrome/bug263683_window.xul | 4 +- .../content/tests/chrome/bug331215_window.xul | 4 +- .../content/tests/chrome/bug451286_window.xul | 4 +- .../content/tests/chrome/bug451540_window.xul | 4 +- 33 files changed, 225 insertions(+), 191 deletions(-) create mode 100644 js/src/tests/ecma_5/misc/future-reserved-words.js delete mode 100644 js/src/tests/js1_5/Regress/regress-240317.js diff --git a/browser/base/content/syncSetup.js b/browser/base/content/syncSetup.js index 8fdf68d94f0..7d379445981 100644 --- a/browser/base/content/syncSetup.js +++ b/browser/base/content/syncSetup.js @@ -880,9 +880,9 @@ var gSyncSetup = { // if no property string is passed in, we clear label/style _setFeedback: function (element, success, string) { element.hidden = success || !string; - let class = success ? "success" : "error"; + let classname = success ? "success" : "error"; let image = element.getElementsByAttribute("class", "statusIcon")[0]; - image.setAttribute("status", class); + image.setAttribute("status", classname); let label = element.getElementsByAttribute("class", "status")[0]; label.value = string; }, diff --git a/browser/components/nsBrowserGlue.js b/browser/components/nsBrowserGlue.js index 38c6482c495..216dca3df00 100644 --- a/browser/components/nsBrowserGlue.js +++ b/browser/components/nsBrowserGlue.js @@ -146,9 +146,9 @@ BrowserGlue.prototype = { // delays are in seconds const MAX_DELAY = 300; let delay = 3; - let enum = Services.wm.getEnumerator("navigator:browser"); - while (enum.hasMoreElements()) { - delay += enum.getNext().gBrowser.tabs.length; + let browserEnum = Services.wm.getEnumerator("navigator:browser"); + while (browserEnum.hasMoreElements()) { + delay += browserEnum.getNext().gBrowser.tabs.length; } delay = delay <= MAX_DELAY ? delay : MAX_DELAY; diff --git a/browser/fuel/src/fuelApplication.js b/browser/fuel/src/fuelApplication.js index d64035f908c..6310af5501b 100644 --- a/browser/fuel/src/fuelApplication.js +++ b/browser/fuel/src/fuelApplication.js @@ -703,10 +703,10 @@ Application.prototype = { get windows() { var win = []; - var enum = Utilities.windowMediator.getEnumerator("navigator:browser"); + var browserEnum = Utilities.windowMediator.getEnumerator("navigator:browser"); - while (enum.hasMoreElements()) - win.push(new Window(enum.getNext())); + while (browserEnum.hasMoreElements()) + win.push(new Window(browserEnum.getNext())); return win; }, diff --git a/content/base/test/chrome/title_window.xul b/content/base/test/chrome/title_window.xul index 9134d65c184..88bae491baf 100644 --- a/content/base/test/chrome/title_window.xul +++ b/content/base/test/chrome/title_window.xul @@ -21,8 +21,8 @@