Hey

I notice that when I terminate an async function using TerminateExecution 
the promise that was suppose to be resolved/rejected as a result of this 
async function termination are not resolved nor rejected. To demonstrate, 
look at the following example:

```js
async function foo(){
    await test();
    throw "foo";
}
```

Calling `foo()` will return a promise that will be rejected after the first 
await returns because we raise an error. But if I change the code to be the 
following:

```js
async function foo(){
    await test();
    while (true);
}
```

 and assuming the embedder will terminate the execution on the `while 
(true)` after some timeout (using TerminateExecution), the promise that was 
returned by calling `foo()` will never be resolved nor rejected.

Am I getting it right or am I missing something? Assuming I am right, any 
suggestions how to solve it?

Thanks.

Disclaimer

The information contained in this communication from the sender is 
confidential. It is intended solely for use by the recipient and others 
authorized to receive it. If you are not the recipient, you are hereby notified 
that any disclosure, copying, distribution or taking action in relation of the 
contents of this information is strictly prohibited and may be unlawful.

This email has been scanned for viruses and malware, and may have been 
automatically archived by Mimecast Ltd, an innovator in Software as a Service 
(SaaS) for business. Providing a safer and more useful place for your human 
generated data. Specializing in; Security, archiving and compliance. To find 
out more visit the Mimecast website.

-- 
-- 
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
--- 
You received this message because you are subscribed to the Google Groups 
"v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/v8-dev/efb34b07-2fd4-4c53-96a9-ae1f97187878n%40googlegroups.com.

Reply via email to