Closed
Bug 429535
Opened 16 years ago
Closed 11 years ago
Treehydra: weird JS faults in strict mode
Categories
(Developer Infrastructure :: Source Code Analysis, defect)
Developer Infrastructure
Source Code Analysis
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: dmandelin, Unassigned)
References
Details
When code a.x is executed, and a has no property x, and running in Treehydra in strict mode with warnings as errors, sometimes instead of an exception, SpiderMonkey aborts with some kind of breakpoint trap with an error message that suggests an exception is thrown while another exception is still pending. I haven't found a way to duplicate the bug in a small test case, but I'm pretty sure I know what the problem is. When a property lookup fails on a lazy object, Treehydra calls unhandledLazyProperty, a JS function in treehydra.js, to handle the error. In almost all cases, unhandledLazyProperty throws an exception. My guess is that in strict mode, there is already an exception pending from the lookup, and this second exception causes the abort. Or the other way around. It is certainly true that commenting out the body of unhandledLazyProperty fixes the problem in all cases: you get the normal strict mode exception.
Comment 1•16 years ago
|
||
Well, this sounds like a good argument against using a JS function for that. Lets go back to doing that check in C. Since you have something you can reproduce, please post a patch.
Throwing with an exception pending is legal, in the general case (pretty sure it's in our test suite, even) -- without a stack, it's pretty hard to tell if what you're seeing is just a simple bug in your code or SpiderMonkey, or a reason to not use JS. Don't necessarily need a minimal test case if you have a stack and clear steps for a SM developer to reproduce, even if it involves setting up treehydra...
Comment 3•11 years ago
|
||
Dehydra and treehydra are no longer maintained by Mozilla.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WONTFIX
Updated•6 years ago
|
Product: Core → Firefox Build System
Updated•2 years ago
|
Product: Firefox Build System → Developer Infrastructure
You need to log in
before you can comment on or make changes to this bug.
Description
•