Bug 18732

Summary: SQUIRRELFISH: exceptions thrown by native constructors are ignored
Product: WebKit Reporter: Cameron Zwarich (cpst) <zwarich>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 18624    
Description Flags
Proposed patch
mjs: review+
Revised proposed patch mjs: review+

Description Cameron Zwarich (cpst) 2008-04-24 21:45:01 PDT
This problem is seen in the JavaScriptCore regression test js1_5/Regress/regress-118849.js. There is only one easy way of fixing this, adding an exception check to op_construct, so hopefully that doesn't regress performance.
Comment 1 Cameron Zwarich (cpst) 2008-04-24 21:56:15 PDT
Created attachment 20808 [details]
Proposed patch

Here's the natural patch. It fixes the test, and is either a slight speedup on SunSpider or no regression.
Comment 2 Maciej Stachowiak 2008-04-24 21:58:37 PDT
Comment on attachment 20808 [details]
Proposed patch

Comment 3 Cameron Zwarich (cpst) 2008-04-24 22:05:59 PDT
Created attachment 20809 [details]
Revised proposed patch

We should do the exception check before writing to any register. The code currently doing the check after writing is incorrect. This version does slightly better on SunSpider, for a pretty definite 0.4% progression.
Comment 4 Maciej Stachowiak 2008-04-24 22:06:46 PDT
Comment on attachment 20809 [details]
Revised proposed patch

Comment 5 Oliver Hunt 2008-04-25 01:33:30 PDT
Landed r 32538