regress-1466387-worker-grayroot.js (811B)
1 var BUGNUMBER = 1466387; 2 var summary = 'grayRoot() testing on worker thread'; 3 4 // Before bug 1466387, the gray root tracer was not set up on worker threads, 5 // but the grayRoot() function was still available. This resulted in a GC 6 // collecting the gray root, then a read barrier firing on the dead object. 7 // 8 // This is a crashtest. If it does not crash, it will throw a ReferenceError, 9 // but that's ok. 10 11 print('BUGNUMBER: ' + BUGNUMBER); 12 print("STATUS: " + summary); 13 14 if (typeof 'evalInWorder' == 'function') { 15 evalInWorker(` 16 var wm = new WeakMap(); 17 grayRoot().map = wm; 18 gczeal(4,10); 19 evaluate(\` 20 grayRoot().map = __v_1173; 21 if (!class i { constructor() { } } ()) { 22 (function __f_252( get , ) {})(); 23 } 24 \`); 25 `); 26 } 27 28 this.reportCompare && reportCompare(true, true, summary);