Debian Codegraph @

src/scripttools/debugging/scripts/commands/return.qs

raw
1 name = "return";
2
3 group = "running";
4
5 shortDescription = "Make selected stack frame return to its caller";
6
7 longDescription = "";
8
9 argumentTypes = [ "script" ];
10
11 function execute() {
12 // TODO:
13 // 1. schedule evaluate of the expression.
14 // 2. install event handler/filter, so that we're notified when the evaluate is done.
15 // - what if another event occurs while we evaluate? (e.g. an exception or breakpoint)
16 // - the event filter needs to uninstall itself, or the event needs to be consumed internally
17 // 3. in the event handler, schedule forced return with the result as argument.
18 setEvaluateAction(1);
19 scheduleEvaluate(getCurrentFrameIndex(), arguments[0], "console input (" + Date() + ")");
20 };