Closed Bug 1564173 Opened 6 years ago Closed 6 years ago

[jsdbg2] Let execution engines validate, modify, and reject changes to continuation

Categories

(Core :: JavaScript Engine, task, P3)

task

Tracking

()

RESOLVED INVALID

People

(Reporter: jimb, Unassigned)

References

(Blocks 1 open bug)

Details

SpiderMonkey's execution engines should have a clearer way to validate, modify, and/or reject Debugger's attempts to redirect the debuggee's execution.

Normally, a Debugger callback returns a 'resumption value' that describes how the debuggee should continue execution. Resumption values can request that execution continue as usual, force an immediate return with a given value, throw an exception, or terminate execution (as if by a slow script dialog).

However, not all resumption values are permitted in all cases. A call to a generator object must always return a generator. A call to a derived class constructor may not return a primitive value. An onNewGlobalObject handler must not request any changes to execution at all.

When an execution engine reports an event, it should pass along its own implementation of an abstract base class with methods for changing the resumption. These methods should be fallible; they should be able to adjust the resumption requested; and they should be able to report back the resumption that will occur if no further changes are made.

Priority: -- → P3
Blocks: dbg-70
Whiteboard: [debugger-mvp]
Whiteboard: [debugger-mvp] → [debugger-reserve]
No longer blocks: dbg-70
Whiteboard: [debugger-reserve]

I'm not sure this is such a good idea any more. The existing call sites with their ResumeMode switches are probably about right, and we don't want to make things much more complicated than that.

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.