API compatibility vs. the fix for bug 299209

RESOLVED FIXED

Status

()

Core
JavaScript Engine
RESOLVED FIXED
12 years ago
12 years ago

People

(Reporter: brendan, Assigned: brendan)

Tracking

({js1.5})

Trunk
js1.5
Points:
---
Bug Flags:
blocking1.8b5 +
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

12 years ago
See bug 303163.  Someone remind me of a report (in n.p.m.jseng, or by mail) of
this problem, where compiling or evaluating "function () {...}" via tha JS API
used to work, but no longer does because of the fix for bug 299209.

We could hack an internal flag or option that tells the compiler to allow this
case.  We'd want it to apply only directly (when the API is passed a string of
the form "function (...) {...}"), not for other source strings that embed
anonymous function declarations at lower levels of their syntax trees.

/be

Comment 1

12 years ago
(In reply to comment #0)

Not sure this is what you want since it is not via the C JS API, but
mozilla/js/tests/ecma_3/Statements/regress-194364.js and
mozilla/js/tests/js1_5/Regress/regress-224956.js were modified due to bug 299209.
(Assignee)

Comment 2

12 years ago
Created attachment 191924 [details] [diff] [review]
restore total backward compatibility

Can't be partially backward compatible any more than partly pregnant.  Note the
syntax error for declaration-level anonymous function case that was added for
bug 299209 remains, but only #if !JS_HAS_LEXICAL_CLOSURE.

/be
(Assignee)

Updated

12 years ago
Attachment #191924 - Flags: review?(shaver)
Attachment #191924 - Flags: approval1.8b4+
Comment on attachment 191924 [details] [diff] [review]
restore total backward compatibility

r=shaver
Attachment #191924 - Flags: review?(shaver) → review+
(Assignee)

Comment 4

12 years ago
Fixed, thanks.

/be
Status: NEW → RESOLVED
Last Resolved: 12 years ago
Flags: blocking1.8b4+
Resolution: --- → FIXED

Updated

12 years ago
Flags: testcase-
You need to log in before you can comment on or make changes to this bug.