Summary: | SQUIRRELFISH: correctly handle exceptions in eval code | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Cameron Zwarich (cpst) <zwarich> | ||||
Component: | JavaScriptCore | Assignee: | Oliver Hunt <oliver> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | oliver | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Bug Depends on: | |||||||
Bug Blocks: | 18624 | ||||||
Attachments: |
|
Description
Cameron Zwarich (cpst)
2008-04-20 18:27:10 PDT
The it != end assertion failure is hit when throwing an exception from eval in a global context. Global code is a special case at the beginning, because no unwind is necessary, and the rest of the function deals with the case of function code. If the eval is in a global context, then the end of the scope chain is also the top, hitting the assertion. The addressOffset < instructions.size() assertion failure is hit when throwing an exception from eval in a function context. The top of the scope chain is an activation object, so Machine::unwindCallFrame() thinks it has succeeded when it really hasn't, passing the buck onto CodeBlock::getHandlerForVPC(). Created attachment 20743 [details]
Make eval setup a "native" callframe
Comment on attachment 20743 [details]
Make eval setup a "native" callframe
Need to fix the other eval case. Otherwise, code looks good. Clearing review flag.
Comment on attachment 20743 [details]
Make eval setup a "native" callframe
Sorry, the second version just calls the first, so this looks good.
|