From a572d8d4195525c4aaa7d20ebf5e18efcb28af76 Mon Sep 17 00:00:00 2001 From: fur Date: Wed, 24 Jun 1998 05:37:44 +0000 Subject: [PATCH] Allow closures when the JS version is JSVERSION_DEFAULT. git-svn-id: svn://10.0.0.236/trunk@4395 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/js/ref/jsparse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mozilla/js/ref/jsparse.c b/mozilla/js/ref/jsparse.c index f45a2288494..ec4a79de47d 100644 --- a/mozilla/js/ref/jsparse.c +++ b/mozilla/js/ref/jsparse.c @@ -159,7 +159,7 @@ WellTerminated(JSContext *cx, JSTokenStream *ts, JSTokenType lastExprType) if (tt != TOK_EOF && tt != TOK_EOL && tt != TOK_SEMI && tt != TOK_RC) { #if JS_HAS_LEXICAL_CLOSURE if ((tt == TOK_FUNCTION || lastExprType == TOK_FUNCTION) && - cx->version < JSVERSION_1_2) { + (cx->version < JSVERSION_1_2) && (cx->version >= JSVERSION_1_0)) { return JS_TRUE; } #endif