Open Bug 1830686 Opened 1 year ago Updated 1 year ago

expression in a try block is executed after catch

Categories

(Core :: JavaScript Engine, defect, P3)

Firefox 111
x86_64
Linux
defect

Tracking

()

UNCONFIRMED

People

(Reporter: kes-kes, Unassigned, NeedInfo)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

(deleted), image/png
Details
(deleted), text/html
Details
(deleted), application/x-javascript
Details
Attached image _.png (deleted) —

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/111.0

Steps to reproduce:

I wrote try/catch block. Open attached test.html page. Some error will occure. Ignore it. Then close firefox and open it again and instantly press F12. After 5sec you will be stopped on debugger break point. Press F8 few times and open console.

Actual results:

and noticed that try block continues to execute when exception occurred and captured by catch.

Expected results:

If exception occur, then nothing should be executed inside try block.

Attached file test.html (deleted) —
Attached file jquery.js (deleted) —
Component: Untriaged → JavaScript Engine
OS: Unspecified → Linux
Product: Firefox → Core
Hardware: Unspecified → x86_64

Can you reproduce this in a way that doesn't rely on the devtools printing? I'm suspecting that this is actually just some confusion about how promise resolution happens and how that's displayed in the devtools.

Flags: needinfo?(kes-kes)
Priority: -- → P3
Blocks: sm-runtime
Severity: -- → S4
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: