summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/evaluate-worker.js
blob: 3c810a43e5515cddd22de11bd9183126a988e13f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// |jit-test| slow

if (typeof evalInWorker == "undefined")
    quit();

gcslice(11);
evalInWorker("print('helo world');");
for (i = 0; i < 100000; i++) {}

evalInWorker("\
  for (var i = 0; i < 10; i++) { \
    var o = {}; \
    for (var j = 0; j < 100; j++) \
      o['a' + j] = j; \
    JSON.stringify(o); \
    o = null; \
    gc(); \
}");
for (var i = 0; i < 10; i++) {
    gc();
    for (var j = 0; j < 100000; j++) {}
}