Debian Codegraph @

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

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