summaryrefslogtreecommitdiffstats
path: root/js/src/tests/ecma_6/Promise/bug-1287334.js
blob: 0bd25decd8cd5b6e0b766388a7effc89ea0a0907 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
if (!this.Promise) {
    this.reportCompare && reportCompare(true, true);
    quit(0);
}

var promise = Promise.resolve(1);
var FakeCtor = function(exec){ exec(function(){}, function(){}); };
Object.defineProperty(Promise, Symbol.species, {value: FakeCtor});
// This just shouldn't crash. It does without bug 1287334 fixed.
promise.then(function(){});

this.reportCompare && reportCompare(true, true);