Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion Thread.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,17 @@ class Thread {
step() {
console.log(`Stepping thread: ${this.id}`);
var hasMore = this.interpreter.run();
if (!hasMore) this.die();
// if (!hasMore) this.die();
if (!hasMore) {
this.die();
}
}

die() {
let thread = this;
Thread.FinishedAll({
targetID: thread.target.id,
});
this.target.removeThread(this.id);
}

Expand Down Expand Up @@ -107,5 +114,14 @@ class Thread {
'data': data,
}));

}

static FinishedAll(data) {
console.log('Finished All!', data);
window.socket.send(JSON.stringify({
'type': 'FinishedAll',
'data': data,
}));

}
}
6 changes: 4 additions & 2 deletions custom-dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,14 @@
.appendChild(document.createTextNode(message));

var onOkay = function(event) {
CustomDialog.hide();
dialogDiv.style.display = 'none';
backdropDiv.style.display = 'none';
options.onOkay && options.onOkay();
event && event.stopPropagation();
};
var onCancel = function(event) {
CustomDialog.hide();
dialogDiv.style.display = 'none';
backdropDiv.style.display = 'none';
options.onCancel && options.onCancel();
event && event.stopPropagation();
};
Expand Down