bug1448582-1.js (738B)
1 // Overview: 2 // - The outer function is an IIFE which gets marked as a singleton. 3 // - The |o[index]| inner function is then also marked as a singleton. 4 // - The |o[index]| inner function has a dynamic name from a computed property name. 5 // - The |self| inner function uses |Function.prototype.caller| to reinvoke the outer function. 6 // 7 // When we reinvoke outer, we end up cloning a previously reused, i.e. non-cloned, 8 // function which triggered an assertion in js::SetFunctionNameIfNoOwnName(). 9 10 (function(index) { 11 var o = { 12 [index]: function() {} 13 }; 14 15 // Reinvoke the IIFE through |Function.prototype.caller|. 16 if (index === 0) { 17 (function self() { 18 self.caller(1); 19 })(); 20 } 21 })(0);