Closed Bug 303723 Opened 19 years ago Closed 19 years ago

API compatibility vs. the fix for bug 299209

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: brendan, Assigned: brendan)

Details

(Keywords: js1.5)

Attachments

(1 file)

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
(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.
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
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+
Fixed, thanks. /be
Status: NEW → RESOLVED
Closed: 19 years ago
Flags: blocking1.8b4+
Resolution: --- → FIXED
Flags: testcase-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: