1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/src/jit-test/tests/ion/bug984830.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,15 @@ 1.4 +function getTestCaseResult(expected, actual) { 1.5 + if (actual != expected) 1.6 + return Math.abs(actual - expected) <= 1E-10; 1.7 +} 1.8 +function InstanceOf(object, constructor) { 1.9 + while ( object != null ) 1.10 + object = object.__proto__; 1.11 +} 1.12 +function WorkerBee () {} 1.13 +function Engineer () {} 1.14 +Engineer.prototype = new WorkerBee(); 1.15 +var pat = new Engineer(); 1.16 +getTestCaseResult(pat.__proto__.__proto__.__proto__.__proto__ == Object.prototype); 1.17 +getTestCaseResult(InstanceOf(pat, Engineer)); 1.18 +evaluate("getTestCaseResult( Object.prototype.__proto__ );", { compileAndGo: true });