Bug 17929

Summary: Incorrect decompilation with |const|, comma
Product: WebKit Reporter: Jesse Ruderman <jruderman>
Component: JavaScriptCoreAssignee: Oliver Hunt <oliver>
Status: RESOLVED FIXED    
Severity: Normal CC: gavin.sharp, oliver, sam
Priority: P2 Keywords: HasReduction, InRadar
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.5   
Bug Depends on:    
Bug Blocks: 13638    
Attachments:
Description Flags
Patch-fu! mrowe: review+

Description Jesse Ruderman 2008-03-18 17:57:44 PDT
> function f() { const x = (1, 2); }

> f
function f() 
{
  const x = 1, 2;
}

> eval("" + f)
SyntaxError: Parse error

Tested with (Safari 3.1) and (ToT Debug/testkjs).
Comment 1 Mark Rowe (bdash) 2008-03-18 18:59:51 PDT
<rdar://problem/5806714>
Comment 2 Oliver Hunt 2008-03-18 23:06:39 PDT
Created attachment 19879 [details]
Patch-fu!
Comment 3 Mark Rowe (bdash) 2008-03-18 23:12:41 PDT
Comment on attachment 19879 [details]
Patch-fu!

r=me.  It'd be good if you could improve the grammar in the changelog entry (giant run-on sentences make me sad), and reference the bug URL in the layout test changelog too for easy reference.
Comment 4 Oliver Hunt 2008-03-18 23:18:13 PDT
	M	JavaScriptCore/ChangeLog
	M	JavaScriptCore/kjs/nodes2string.cpp
	M	LayoutTests/ChangeLog
	M	LayoutTests/fast/js/function-toString-parentheses-expected.txt
	M	LayoutTests/fast/js/resources/function-toString-parentheses.js
Committed r31148