bug1448136.js (578B)
1 print = function(s) { return s.toString(); } 2 assertEq = function(a,b) { 3 try { print(a); print(b); } catch(exc) {} 4 } 5 g = newGlobal({newCompartment: true}); 6 g.parent = this; 7 g.eval("(" + function() { 8 Debugger(parent).onExceptionUnwind = function(frame) { 9 frame.older 10 } 11 } + ")()") 12 function a() {}; 13 function b() {}; 14 for (let _ of Array(100)) 15 assertEq(b instanceof a, true); 16 function c(){}; 17 function d(){}; 18 function e(){}; 19 Object.defineProperty(a, Symbol.hasInstance, {value: assertEq }); 20 let funcs = [a, b, c, d]; 21 for (let f of funcs) 22 assertEq(e instanceof f, true);