Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(587)

Unified Diff: src/isolate.cc

Issue 2276243002: Mark await expressions as caught or uncaught (Closed)
Patch Set: Revert "Tests for caught exception" Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/isolate.h ('k') | src/js/harmony-async-await.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/isolate.cc
diff --git a/src/isolate.cc b/src/isolate.cc
index c7b7486d1e6be0e650d1357e7ca9357efc445745..1b96583cb093cd44eb2022945e59b2a6bc185322 100644
--- a/src/isolate.cc
+++ b/src/isolate.cc
@@ -1311,6 +1311,8 @@ Isolate::CatchType Isolate::PredictExceptionCatcher() {
JavaScriptFrame* js_frame = static_cast<JavaScriptFrame*>(frame);
HandlerTable::CatchPrediction prediction = PredictException(js_frame);
if (prediction == HandlerTable::DESUGARING) return CAUGHT_BY_DESUGARING;
+ if (prediction == HandlerTable::ASYNC_AWAIT) return CAUGHT_BY_ASYNC_AWAIT;
+ if (prediction == HandlerTable::PROMISE) return CAUGHT_BY_PROMISE;
if (prediction != HandlerTable::UNCAUGHT) return CAUGHT_BY_JAVASCRIPT;
}
@@ -1714,6 +1716,7 @@ Handle<Object> Isolate::GetPromiseOnStackOnThrow() {
for (JavaScriptFrameIterator it(this); !it.done(); it.Advance()) {
switch (PredictException(it.frame())) {
case HandlerTable::UNCAUGHT:
+ case HandlerTable::ASYNC_AWAIT:
break;
case HandlerTable::CAUGHT:
case HandlerTable::DESUGARING:
« no previous file with comments | « src/isolate.h ('k') | src/js/harmony-async-await.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698