Created
August 13, 2012 12:18
-
-
Save hzr/3340118 to your computer and use it in GitHub Desktop.
Revisions
-
hzr revised this gist
Aug 13, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,7 +4,7 @@ function test() { var g1 = f(function(){ this.x = 2; return {y: 3}; }); for (var i = 0; i < 50; i++) { if ((new g1(2)).x !== undefined) throw Error(); } } -
hzr created this gist
Aug 13, 2012 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ function test() { function testApply() { function f(a) { return function() { return a.apply(this, arguments); }} var g1 = f(function(){ this.x = 2; return {y: 3}; }); for (var i = 0; i < 50; i++) { if ((new g1(2)).x !== undefined) throw i; } } try { for (var c = 0; c < 100; c++) { testApply(); } } catch(e) { return false; } return true; }