bug1238003.js (297B)
1 function f(str) { 2 if (typeof str === 'string') 3 str = new RegExp(str); 4 for (var i = 0; i < 2000; i++) 5 str.test('foo'); 6 } 7 f("abc"); 8 9 function g(str) { 10 if (typeof str === 'string') 11 str = new RegExp(str); 12 for (var i = 0; i < 2000; i++) 13 str.exec('foo'); 14 } 15 g("abc");