mirror of
https://github.com/bellard/quickjs.git
synced 2024-11-22 05:38:11 +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") {
|
if (typeof std !== "undefined") {
|
||||||
// read the file in QuickJS
|
// read the file in QuickJS
|
||||||
var f = std.open(filename, "r");
|
var f = std.open(filename, "r");
|
||||||
if (!f) {
|
if (f) {
|
||||||
|
str = f.readAsString();
|
||||||
|
f.close();
|
||||||
|
} else {
|
||||||
has_error = true;
|
has_error = true;
|
||||||
}
|
}
|
||||||
str = f.readAsString();
|
|
||||||
f.close();
|
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user