Bug 104309

Summary: try-finally should return try's completion value if finally returned normally
Product: WebKit Reporter: André Bargull <andre.bargull>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED CONFIGURATION CHANGED    
Severity: Normal CC: ashvayka, barraclough, oliver
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   

Description André Bargull 2012-12-06 15:15:57 PST
Steps to reproduce:

Test case:
---
try{ "try-value" }finally{ "finally-value" }
---



Expected results:

Per [ES5.1, 12.14 The try Statement], the code should return "try-value", but V8, JSC, IE and Spidermonkey return "finally-value". Opera does return "try-value".
Comment 1 Alexey Shvayka 2020-08-22 13:46:27 PDT
(In reply to André Bargull from comment #0)
> try{ "try-value" }finally{ "finally-value" }
> 
> Expected results:
> 
> Per [ES5.1, 12.14 The try Statement], the code should return "try-value",

The code returns as expected in Safari 13.1, Chrome 84, and Firefox 81.
Test coverage: https://test262.report/browse/language/statements/try/cptn-finally-wo-catch.js