mirror of
https://github.com/bellard/quickjs.git
synced 2024-11-24 22:58:13 +08:00
fix microbench when microbench.txt is missing (#246)
This commit is contained in:
parent
35b7b3c379
commit
3dd93eb4e4
@ -1134,11 +1134,12 @@ function load_result(filename)
|
||||
if (typeof std !== "undefined") {
|
||||
// read the file in QuickJS
|
||||
var f = std.open(filename, "r");
|
||||
if (!f) {
|
||||
has_error = true;
|
||||
}
|
||||
if (f) {
|
||||
str = f.readAsString();
|
||||
f.close();
|
||||
} else {
|
||||
has_error = true;
|
||||
}
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user