Bug 17663
Summary: | Wrong sequencing of argument list evaluation | ||
---|---|---|---|
Product: | WebKit | Reporter: | Maks Orlovich <maksim> |
Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | ap, ggaren, mjs |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | Other | ||
OS: | OS X 10.5 |
Maks Orlovich
Per 11.2.3, the argument list is evaluate right after evaluating the
function, and before checking whether the result is actually and object and callable. Hence, the following must print "hi":
<script>
function bad() {
throw "hi";
}
try {
var f = 42;
f(bad());
} catch (e) {
alert(e);
}
</script>
JSC evaluates the argument list later down in the sequence.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Cameron Zwarich (cpst)
This was fixed by SquirrelFish, and I landed a test in r34413.