blob: b0c0f3f4becb7924ef15b70eb14f0f18187178c4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
// These tests are checking that CacheEntry_getBytecode properly set an error
// when there is no bytecode registered.
var caught = 0;
var code = cacheEntry("");
try {
offThreadDecodeScript(code);
}
catch (e) {
// offThreadDecodeScript does not work with the --no-thread command line option.
assertEq(e.message.includes("CacheEntry") || e.message.includes("offThreadDecodeScript"), true);
caught++;
}
code = cacheEntry("");
try {
evaluate(code, {loadBytecode: true});
}
catch (e) {
assertEq(e.message.includes("CacheEntry"), true);
caught++;
}
assertEq(caught, 2);
|