Bug 17931

Summary: Incorrect decompilation with |new|
Product: WebKit Reporter: Jesse Ruderman <jruderman>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Minor CC: gavin.sharp
Priority: P2 Keywords: HasReduction, InRadar
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.4   
Bug Depends on:    
Bug Blocks: 13638    
Attachments:
Description Flags
Test case oliver: review+

Description Jesse Ruderman 2008-03-18 18:21:31 PDT
> f = (function () { new (a.b()).c })
function () 
{
  new a.b().c;
}

> eval("(" + f + ")")
function () 
{
  (new a.b()).c;
}

At some point, the function changed meaning...

This bug exists in Safari 3.1 and in ToT testkjs.
Comment 1 Mark Rowe (bdash) 2008-03-18 18:59:48 PDT
<rdar://problem/5806713>
Comment 2 Cameron Zwarich (cpst) 2008-06-08 22:19:06 PDT
Created attachment 21589 [details]
Test case

This is trivially fixed by SquirrelFish, because it uses the original source. Here's a test case so we can close the bug.
Comment 3 Cameron Zwarich (cpst) 2008-06-08 22:21:51 PDT
Landed in r34462.