Merge branches/quickjs to trunk. This is the way.

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3621 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
2021-01-02 18:10:00 +00:00
parent d293637741
commit 79022e1e1f
703 changed files with 419987 additions and 30640 deletions

View File

@ -3,15 +3,20 @@
cat > test.js << EOF
var task = new Task();
task.activate();
task.execute({name: "child.js", source: File.readFile("child.js")}).then(function() {
task.getExports().then(function(exports) {
return exports.add(1, 1);
task.execute({name: "child.js", source: utf8Decode(File.readFile("child.js"))}).then(function() {
task.getExports().then(function(exp) {
return exp.add(1, 1);
}).then(function(sum) {
exit(1);
}).catch(function(error) {
print("Caught: " + error.message);
if (error.stack) {
print("stack: " + error.stack);
}
exit(0);
});
}).catch(function(e) {
print("caught", e.message);
});
EOF
@ -20,7 +25,7 @@ exports = {
add: function(left, right) {
throw new Error("fail");
}
}
};
EOF
$TILDEFRIENDS test.js