Skip to content

Instantly share code, notes, and snippets.

@hzr
Created August 13, 2012 12:18
Show Gist options
  • Select an option

  • Save hzr/3340118 to your computer and use it in GitHub Desktop.

Select an option

Save hzr/3340118 to your computer and use it in GitHub Desktop.
Opera JIT bug
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 Error();
}
}
try {
for (var c = 0; c < 100; c++) {
testApply();
}
} catch(e) {
return false;
}
return true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment