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

Unified Diff: src/objects.h

Issue 2161263003: [debug] use catch prediction flag for promise rejections. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 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
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index ec90247ba7a92bdeafdeaf454b30d2650361e57d..682a5de652e8bd8e64940f2899845985c7435167 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -4860,7 +4860,11 @@ class HandlerTable : public FixedArray {
// Conservative prediction whether a given handler will locally catch an
// exception or cause a re-throw to outside the code boundary. Since this is
// undecidable it is merely an approximation (e.g. useful for debugger).
- enum CatchPrediction { UNCAUGHT, CAUGHT };
+ enum CatchPrediction {
+ UNCAUGHT, // the handler will (likely) rethrow the exception.
+ CAUGHT, // the exception will be caught by the handler.
+ PROMISE // the exception will be caught and cause a promise rejection.
+ };
// Getters for handler table based on ranges.
inline int GetRangeStart(int index) const;
@@ -4915,8 +4919,8 @@ class HandlerTable : public FixedArray {
static const int kReturnEntrySize = 2;
// Encoding of the {handler} field.
- class HandlerPredictionField : public BitField<CatchPrediction, 0, 1> {};
- class HandlerOffsetField : public BitField<int, 1, 30> {};
+ class HandlerPredictionField : public BitField<CatchPrediction, 0, 2> {};
+ class HandlerOffsetField : public BitField<int, 2, 30> {};
};

Powered by Google App Engine
This is Rietveld 408576698