Closed Bug 604301 Opened 14 years ago Closed 13 years ago

eval() failure with error: missing ; before statement, before let statement

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED INVALID
Tracking Status
blocking2.0 --- betaN+

People

(Reporter: tabmix.onemen, Assigned: cdleary)

References

Details

(Keywords: regression, Whiteboard: hardblocker)

eval() failure with error: missing ; before statement, before let statement

for some time now i see the eval is failed when use from overlay
the error message missing ; before statement appear to triggered by let statement, if i replace the let with var the eval work as expected.

Step to reproduce:
overlay chrome://browser/content/preferences/preferences.xul
from overlay js file call

window.addEventListener("load", function(aEvent) {
  aEvent.currentTarget.removeEventListener("load", arguments.callee, true);
  eval("openUILinkIn =" + openUILinkIn.toString());
}, true);

result:
Error: missing ; before statement
Source code:
        let params = arguments[2];
cdleary: more version fallout?
blocking2.0: --- → ?
Keywords: regression
blocking2.0: ? → betaN+
more ways to reproduce:

with Xmarks Inc. extension http://www.xmarks.com/ almost every eval() fails.

or
Install All-in-One Sidebar (https://addons.mozilla.org/en-US/firefox/addon/1027/) ans Tabmix Plus (https://addons.mozilla.org/en-US/firefox/addon/1122/) then  eval() from Tabmix fails when you open side bar for bookmarks or history
Hmm, this looks kind of problematic with the effects on extensions. Chris, do you have time to look into this?
Not sure how I missed this one in my inbox! On it.
Assignee: general → cdleary
Status: NEW → ASSIGNED
I think this is a duplicate of bug 613383, but the steps to reproduce are not obvious to me -- onemen.one, can you break down the steps a little more or provide a reduced testcase?
i can not reproduce it anymore
When you fix this, please make sure the testcase added in bug 616294 (the let-specific version) has sane behavior, rather than being marked as unconditionally failing (best I could do when let-in-eval-code is a syntax error).
Whiteboard: hardblocker
Depends on: 595691
Waldo: I really left this open as a placeholder for your updates seeing as how there are no STR -- would you like to mutate this bug accordingly for comment 7 and assign it to yon-self, or should I close as wontfix and we can open a new bug for it?
No longer depends on: 595691
Gar, mid-air collision.
Depends on: 595691
(In reply to comment #8)
> Waldo: I really left this open as a placeholder for your updates seeing as how
> there are no STR -- would you like to mutate this bug accordingly for comment 7
> and assign it to yon-self, or should I close as wontfix and we can open a new
> bug for it?

Let's open a new bug, keep things clean.
Resolving as invalid due to lack of STR. Waldo's issue was spawned as bug 628391.
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.