Bug 17663 - Wrong sequencing of argument list evaluation
Summary: Wrong sequencing of argument list evaluation
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-03 21:15 PST by Maks Orlovich
Modified: 2008-06-07 01:01 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Maks Orlovich 2008-03-03 21:15:53 PST
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.
Comment 1 Cameron Zwarich (cpst) 2008-06-07 01:01:11 PDT
This was fixed by SquirrelFish, and I landed a test in r34413.