mirror of
https://github.com/github/codeql.git
synced 2026-04-28 02:05:14 +02:00
JS: basic model of closure Promises
This commit is contained in:
@@ -23,6 +23,8 @@
|
||||
| partialCalls.js:4:17:4:24 | source() | partialCalls.js:51:14:51:14 | x |
|
||||
| promise.js:4:24:4:31 | source() | promise.js:4:8:4:32 | Promise ... urce()) |
|
||||
| promise.js:5:25:5:32 | source() | promise.js:5:8:5:33 | bluebir ... urce()) |
|
||||
| promise.js:10:24:10:31 | source() | promise.js:10:8:10:32 | Promise ... urce()) |
|
||||
| promise.js:12:20:12:27 | source() | promise.js:13:8:13:23 | resolver.promise |
|
||||
| sanitizer-guards.js:2:11:2:18 | source() | sanitizer-guards.js:4:8:4:8 | x |
|
||||
| sanitizer-guards.js:13:14:13:21 | source() | sanitizer-guards.js:15:10:15:15 | this.x |
|
||||
| sanitizer-guards.js:13:14:13:21 | source() | sanitizer-guards.js:21:14:21:19 | this.x |
|
||||
|
||||
@@ -4,3 +4,11 @@ function test() {
|
||||
sink(Promise.resolve(source())); // NOT OK
|
||||
sink(bluebird.resolve(source())); // NOT OK
|
||||
}
|
||||
|
||||
function closure() {
|
||||
let Promise = goog.require('goog.Promise');
|
||||
sink(Promise.resolve(source())); // NOT OK
|
||||
let resolver = Promise.withResolver();
|
||||
resolver.resolve(source());
|
||||
sink(resolver.promise); // NOT OK
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user