Debian Codegraph @

js/src/tests/test262/built-ins/Promise/executor-call-context-sloppy.js

raw
1 // Copyright 2014 Cubane Canada, Inc. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3 /*---
4 esid: sec-promise-executor
5 author: Sam Mikes
6 description: >
7 Promise executor is called in global object context in sloppy mode.
8 info: |
9 25.6.3.1 Promise ( executor )
10
11 [...]
12 9. Let completion be Call(executor, undefined, « resolvingFunctions.[[Resolve]], resolvingFunctions.[[Reject]] »).
13 flags: [noStrict]
14 ---*/
15
16 var _this;
17
18 new Promise(function() {
19 _this = this;
20 });
21
22 assert.sameValue(_this, this);
23
24 reportCompare(0, 0);