Closed
Bug 1103597
Opened 11 years ago
Closed 11 years ago
ES6 CONST causes loadSubScript("chrome://messenger/content/pref-mailnews.js") failed: SyntaxError: const declaration not directly within block
Categories
(SeaMonkey :: Preferences, defect)
SeaMonkey
Preferences
Tracking
(seamonkey2.33 fixed)
RESOLVED
FIXED
seamonkey2.33
Tracking | Status | |
---|---|---|
seamonkey2.33 | --- | fixed |
People
(Reporter: philip.chee, Assigned: philip.chee)
Details
Attachments
(1 file, 1 obsolete file)
2.08 KB,
patch
|
neil
:
review+
|
Details | Diff | Splinter Review |
Sun Nov 23 2014 21:13:58
Error: prefpane.paneload: loadSubScript("chrome://messenger/content/pref-mailnews.js") failed:
SyntaxError: const declaration not directly within block
Source file: chrome://communicator/content/bindings/prefwindow.xml
Line: 523
See Bug 611388 - const should be block-scoped and an initializer should be required
![]() |
Assignee | |
Comment 1•11 years ago
|
||
> -if ("@mozilla.org/suite/shell-service;1" in Components.classes)
> - const nsIShellService = Components.interfaces.nsIShellService;
> +const nsIShellService = "@mozilla.org/suite/shell-service;1" in Components.classes ?
> + Components.interfaces.nsIShellService : null;
...
> - if ("@mozilla.org/suite/shell-service;1" in Components.classes) try {
> + if (nsIShellService) try {
I wonder if I could just use:
const nsIShellService = Components.interfaces.nsIShellService;
and then rely on truthy/falsy:
if (nsIShellService) {....}
I'll open a separate bug to audit /suite/ for non ES6 compliant uses of CONST.
Comment 2•11 years ago
|
||
Comment on attachment 8527309 [details] [diff] [review]
Patch v1.0 fix use of CONST
Not really want I want, sorry. Just change it to var for now.
Attachment #8527309 -
Flags: review?(neil) → review-
![]() |
Assignee | |
Comment 3•11 years ago
|
||
(In reply to neil@parkwaycc.co.uk from comment #2)
> Comment on attachment 8527309 [details] [diff] [review]
> Not really want I want, sorry. Just change it to var for now.
OK. Done.
Attachment #8527309 -
Attachment is obsolete: true
Attachment #8527316 -
Flags: review?(neil)
Updated•11 years ago
|
Attachment #8527316 -
Flags: review?(neil) → review+
![]() |
Assignee | |
Comment 4•11 years ago
|
||
Pushed to comm-central:
http://hg.mozilla.org/comm-central/rev/43ceb691f62c
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
status-seamonkey2.33:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → seamonkey2.33
You need to log in
before you can comment on or make changes to this bug.
Description
•