Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(59)

Issue 350353002: Test that trailing commas in object literals are allowed (Closed)

Created:
6 years, 6 months ago by wingo
Modified:
6 years, 5 months ago
CC:
v8-dev
Visibility:
Public.

Description

Test that trailing commas in object literals are allowed ES6 will allow trailing commas in object literals. It turns out that V8 already allowed it, too, as does JSC and SpiderMonkey. R=marja@chromium.org BUG= Committed: https://code.google.com/p/v8/source/detail?r=22005

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+6 lines, -1 line) Patch
M src/preparser.h View 1 chunk +1 line, -1 line 1 comment Download
M test/cctest/test-parsing.cc View 3 chunks +5 lines, -0 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
wingo
6 years, 6 months ago (2014-06-25 09:58:14 UTC) #1
wingo
It seems that ES5 allows a trailing comma as well: http://es5.github.io/#x11.1.5
6 years, 6 months ago (2014-06-25 09:59:54 UTC) #2
marja
lgtm; a nice catch! https://codereview.chromium.org/350353002/diff/1/src/preparser.h File src/preparser.h (right): https://codereview.chromium.org/350353002/diff/1/src/preparser.h#newcode1677 src/preparser.h:1677: // TODO(1240767): Consider allowing trailing ...
6 years, 6 months ago (2014-06-25 10:04:01 UTC) #3
wingo
Committed patchset #1 manually as r22005 (presubmit successful).
6 years, 6 months ago (2014-06-25 10:13:17 UTC) #4
marja
On 2014/06/25 10:13:17, wingo wrote: > Committed patchset #1 manually as r22005 (presubmit successful). ...
6 years, 6 months ago (2014-06-25 10:24:58 UTC) #5
wingo
On 2014/06/25 10:24:58, marja wrote: > On 2014/06/25 10:13:17, wingo wrote: > > Committed patchset ...
6 years, 6 months ago (2014-06-25 10:43:07 UTC) #6
wingo
On 2014/06/25 10:43:07, wingo wrote: > On 2014/06/25 10:24:58, marja wrote: > > On 2014/06/25 ...
6 years, 6 months ago (2014-06-25 10:45:59 UTC) #7
marja
On 2014/06/25 10:45:59, wingo wrote: > On 2014/06/25 10:43:07, wingo wrote: > > On 2014/06/25 ...
6 years, 6 months ago (2014-06-25 11:08:48 UTC) #8
marja
Yes, this seems to be the case; checked the actual commit. So it was the ...
6 years, 6 months ago (2014-06-25 11:10:57 UTC) #9
wingo
On 2014/06/25 11:08:48, marja wrote: > I'd say you should always upload the patch set ...
6 years, 6 months ago (2014-06-25 11:27:22 UTC) #10
arv (Not doing code reviews)
6 years, 5 months ago (2014-06-25 17:19:27 UTC) #11
Message was sent while issue was closed.
FWIW, ES5 added the trailing commas since it was required for the web.

I'm surprised that test-262 does not cover this?

Powered by Google App Engine
This is Rietveld 408576698