Closed Bug 825342 Opened 9 years ago Closed 9 years ago

browser_480893.js | uncaught exception - SyntaxError: missing ( after for at chrome://communicator/content/aboutSessionRestore.js:59

Categories

(SeaMonkey :: Session Restore, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
seamonkey2.17

People

(Reporter: mcsmurf, Assigned: mcsmurf)

Details

(Whiteboard: [perma-orange])

Attachments

(1 file, 1 obsolete file)

This test http://mxr.mozilla.org/comm-central/source/suite/common/tests/browser/browser_480893.js uses sessionrestore, currently sessionrestore throws a JS error:
NEXT ERROR TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/suite/common/tests/browser/browser_480893.js | uncaught exception - SyntaxError: missing ( after for at chrome://communicator/content/aboutSessionRestore.js:59
Stack trace:
    JS frame :: chrome://mochikit/content/tests/SimpleTest/SimpleTest.js :: simpletestOnerror :: line 1067
    native frame :: <unknown filename> :: <TOP_LEVEL> :: line 0

This is due to Bug 804834 which disabled for each for content JavaScript when using the default JS version in content. Two possible solutions for this:
1. Explicitly use JS 1.8:
<script type="application/javascript;version=1.8"

Bug 824289 aims to completely remove for each from content JS though, no matter what JS version is used.
2. Replace for each with for ( ... of ...)
Attached patch Patch (obsolete) — Splinter Review
Assignee: nobody → bugzilla
Status: NEW → ASSIGNED
Attached patch PatchSplinter Review
This patch replaced for each in that file with for (... of ...). ".tabs" is an array, so the results of using for...of should be the same.
Attachment #696473 - Attachment is obsolete: true
Attachment #696479 - Flags: review?(misak.bugzilla)
Attachment #696479 - Flags: review?(misak.bugzilla) → review+
Pushed: https://hg.mozilla.org/comm-central/rev/78fc9697449e
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → seamonkey2.17
You need to log in before you can comment on or make changes to this bug.