Closed Bug 380632 Opened 19 years ago Closed 6 years ago

executing finally blocks for JSTRAP_RETURN

Categories

(Core :: JavaScript Engine, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: igor, Unassigned)

Details

Currently when a various debug hooks return JSTRAP_RETURN, the interpreter skips the outstanding finally blocks. But this is unintuitive since it does not match the behavior of the return statement. Thus I suggest to change JSTRAP_RETURN so it will execute the finally blocks and behave exactly as if a return instruction was injected into the bytecode. Given the current infrastructure to support generator.close() it should be almost trivial to implement as the interpreter can just throw JSVAL_ARETUN instead of jumping to the out label.
JSTRAP_RETURN and the JS debugger API pre-dates ES3-era work implementing try-catch-finally; apparently the latter work was done without considering the jsdbgapi. Glad you are on this. /be
I am not working on the bug.
Assignee: igor → general
Assignee: general → nobody
Component: JavaScript Engine → JavaScript Debugging APIs
QA Contact: general → jsd
Component: JavaScript Debugging/Profiling APIs → JavaScript Engine

JSTRAP_RETURN is no longer present, therefore resolving as Invalid.

Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.