summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/gc/bug-1892564.js
blob: c834615b9175481d746ee3b01c6ec9353708f46b (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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
try { evalInWorker(`
gczeal(0);
try {
  Object.defineProperty(this, "x", {
    value:{
        parseInt: parseInt,
    }
  });
} catch(exc) {}
function dummyAssertCallFunction(f) {}
try { evaluate(\`
(function(global) {
  var ObjectCreate = global.Object.create;
  var ObjectDefineProperty = global.Object.defineProperty;
  function ArrayPush(arr, val) {
    var desc = ObjectCreate(null);
    desc.value = val;
    desc.enumerable = true;
    desc.configurable = true;
    desc.writable = true;
    ObjectDefineProperty(arr, arr.length, desc);
  }
  var testCasesArray = [];
  function TestCase(d, e, a, r) {
    this.description = d;
    ArrayPush(testCasesArray, this);
  }
  global.TestCase = TestCase;
})(this);
(function f42(x99) {
  new TestCase(new ArrayBuffer());
  f42(x99)
  function t9() {}
})();
\`); } catch(exc) {}
try { evaluate(\`
gczeal(14);
(function(global) {
  global.makeIterator = function makeIterator(overrides) {
    global.assertThrowsValue = function assertThrowsValue(f, val, msg) {};
  }
  global.assertDeepEq = (function(){
    var call = Function.prototype.call,
      Symbol_description = call.bind(Object.getOwnPropertyDescriptor(Symbol.prototype, "description").get),
      Map_has = call.bind(Map.prototype.has),
      Object_getOwnPropertyNames = Object.getOwnPropertyNames;
  })();
})(this);
\`); } catch(exc) {}
`); throw "x"; } catch(exc) {}