Test case for custom deferred promise still missing. Addressed comments for now.

https://codereview.chromium.org/249503002/diff/1/src/runtime.cc
File src/runtime.cc (right):

https://codereview.chromium.org/249503002/diff/1/src/runtime.cc#newcode5660
src/runtime.cc:5660: isolate->debugger()->OnException(exception, false,
deferred_promise);
On 2014/04/24 07:48:43, yurys wrote:
It might make sense to report the exception as uncaught=true here in
case there
is no catch handler on the promise yet.

Done.

Alternatively, we could always fire this runtime function, and set
uncaught depending on whether we already have a catch handler. Devtools
would then filter out caught ones. That would give you guys more
flexibility (not sure if necessary).

https://codereview.chromium.org/249503002/diff/1/test/mjsunit/es6/debug-promises-caught.js
File test/mjsunit/es6/debug-promises-caught.js (right):

https://codereview.chromium.org/249503002/diff/1/test/mjsunit/es6/debug-promises-caught.js#newcode29
test/mjsunit/es6/debug-promises-caught.js:29: assertEquals(["resolve",
"end main", "throw"], log);
On 2014/04/24 07:48:43, yurys wrote:
Just curious: I'd expect "end main" to be logged before "resolve" or
does
Promise evaluate synchronously in this case?

Yes. The function in line 12 is executed immediately. However, the
chained function in line 18 is put into the micro task queue and
executed after this test script is finished executing.

https://codereview.chromium.org/249503002/

--
--
v8-dev mailing list
[email protected]
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to