(JSObject promise)
| 54 | } |
| 55 | |
| 56 | private void then(JSObject promise) { |
| 57 | JSFunction then = promise.getJSFunction("then"); |
| 58 | if (then == null) { |
| 59 | future.complete(promise); |
| 60 | } else { |
| 61 | consume(then, success); |
| 62 | consume(promise.getJSFunction("catch"), error); |
| 63 | } |
| 64 | } |
| 65 | |
| 66 | private void consume(JSFunction func, JSCallFunction callback) { |
| 67 | if (func == null) return; |
no test coverage detected