mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
30 lines
491 B
JavaScript
30 lines
491 B
JavaScript
"use strict";
|
|
|
|
let frames = [];
|
|
|
|
var dbg = new Debugger(global);
|
|
dbg.onDebuggerStatement = function (frame) {
|
|
frames.push(frame);
|
|
postMessage("paused");
|
|
enterEventLoop();
|
|
frames.pop();
|
|
postMessage("resumed");
|
|
};
|
|
|
|
this.onmessage = function (event) {
|
|
switch (event.data) {
|
|
case "eval":
|
|
frames[frames.length - 1].eval("f()");
|
|
postMessage("evalled");
|
|
break;
|
|
|
|
case "ping":
|
|
postMessage("pong");
|
|
break;
|
|
|
|
case "resume":
|
|
leaveEventLoop();
|
|
break;
|
|
};
|
|
};
|