summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/modules/bug-1435327.js
blob: bb9f18a220546f41dc72ae76140cd9125f3c548b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// |jit-test| skip-if: !('oomTest' in this)

lfLogBuffer = `
  let c = registerModule('c', parseModule(""));
  let d = registerModule('d', parseModule("import { a } from 'c'; a;"));
  moduleLink(d);
`;
lfLogBuffer = lfLogBuffer.split('\n');
var lfCodeBuffer = "";
while (true) {
    var line = lfLogBuffer.shift();
    if (line == null) {
        break;
    } else {
        lfCodeBuffer += line + "\n";
    }
}
if (lfCodeBuffer) loadFile(lfCodeBuffer);
function loadFile(lfVarx) {
    try {
        oomTest(function() {
            let m = parseModule(lfVarx);
            moduleLink(m);
            moduleEvaluate(m);
        });
    } catch (lfVare) {}
}