Closed Bug 541026 Opened 16 years ago Closed 2 years ago

including chrome://browser/content/utilityOverlay.js throws exceptions

Categories

(Core :: JavaScript Engine, defect)

x86
All
defect

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: anotherjesse, Unassigned)

Details

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6 Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6 Error console reports: Error: missing ; before statement Source File: chrome://browser/content/utilityOverlay.js Line: 219, Column: 4 Source Code: let browser = w.getBrowser(); Whenever you try to use utilityOverlay.js Reproducible: Always Steps to Reproduce: 1. open the error console: Tools -> Error Console 2. clear all current errors 3. add utilityOverlay.js src=document.createElement('script'); window.document.body.appendChild(src); src.setAttribute('src', 'chrome://browser/content/utilityOverlay.js'); Actual Results: Error: missing ; before statement Source File: chrome://browser/content/utilityOverlay.js Line: 219, Column: 4 Source Code: let browser = w.getBrowser(); Expected Results: It should be able to use load utilityOverlay.js without error. My extension taboo uses utilityOverlay to be able to call openUILinkIn to open a new link in the proper location based on the users preferences (obtained via whereToOpenLink) It seems like this breakage could break many extensions in FF 3.6
Summary: openUILinkIn fails when called with where='tab' → including chrome://browser/content/utilityOverlay.js throws exceptions
type="application/x-javascript;version=1.7" fixes this. Perhaps the bug is that there should be a list of files that now require a specific version of JS?
I get the same error, except my error (on trunk) says Error: missing ; before statement Source File: chrome://browser/content/utilityOverlay.js Line: 149, Column: 4 Source Code: let params = arguments[2]; This line was added in http://hg.mozilla.org/mozilla-central/rev/f53d65371670 The line in the error for this original report was added by http://hg.mozilla.org/releases/mozilla-1.9.2/rev/7f9ef4bef487 It seems to be caused by using let instead of var. I'll also post a testcase. Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.3a1pre) Gecko/20100120 Minefield/3.7a1pre (.NET CLR 3.5.30729) ID:20100120043108
Status: UNCONFIRMED → NEW
Ever confirmed: true
Version: unspecified → 3.6 Branch
This testcase loads the script using the method in the report. Also, this may have something to do with Bug 522858, but I'm not totally sure.
(In reply to comment #1) > type="application/x-javascript;version=1.7" fixes this. > > Perhaps the bug is that there should be a list of files that now require a > specific version of JS? You should always specify the latest version when loading a chrome script from a content page.
Severity: major → minor
Component: Tabbed Browser → Extension Compatibility
QA Contact: tabbed.browser → extension.compatibility
> You should always specify the latest version when loading a chrome script from > a content page. If we should always specify it, why not make it default? I've been reading these pages for years and this was never recommended: https://developer.mozilla.org/en/Firefox_3.6_for_developers https://developer.mozilla.org/en/Firefox_3.5_for_developers https://developer.mozilla.org/en/Firefox_3.0_for_developers https://developer.mozilla.org/En/Updating_extensions_for_Firefox_3.6 https://developer.mozilla.org/En/Updating_extensions_for_Firefox_3.5 https://developer.mozilla.org/En/Updating_extensions_for_Firefox_3.0 So I'm not how we should have known. Either FF3.6 versions of libraries is more strict about specifying versions, or the libraries changed. There has been NO communication about this and as a result we are spending many hours trying to figure out WTF is wrong with our code. The only page I can find that says anything about using version in our extensions is on the FAQ which states we should use 1.7 not the latest (currently 1.8.2): https://developer.mozilla.org/en/Extension_Frequently_Asked_Questions --------- So while this issue might be minor to you, it isn't to the thousands of extension authors who have wasted hours trying to fix their extensions.
Assignee: nobody → general
Component: Extension Compatibility → JavaScript Engine
Product: Firefox → Core
QA Contact: extension.compatibility → general
Version: 3.6 Branch → unspecified
Assignee: general → nobody
Severity: minor → S4
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: