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

Unified Diff: src/runtime.cc

Issue 3275011: Add breakOnCaughtException and breakOnUncaughtException flags (Closed)
Patch Set: merge Created 10 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/runtime.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index 627ea1217fdc7b9f39e49cbd66fe021fb083316a..a5a85ff251342b959fae0f5115cca168ab8f7727 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -8962,6 +8962,20 @@ static Object* Runtime_ChangeBreakOnException(Arguments args) {
}
+// Returns the state of break on exceptions
+// args[0]: boolean indicating uncaught exceptions
+static Object* Runtime_IsBreakOnException(Arguments args) {
+ HandleScope scope;
+ ASSERT(args.length() == 1);
+ ASSERT(args[0]->IsNumber());
+
+ ExceptionBreakType type =
+ static_cast<ExceptionBreakType>(NumberToUint32(args[0]));
+ bool result = Debug::IsBreakOnException(type);
+ return Smi::FromInt(result);
+}
+
+
// Prepare for stepping
// args[0]: break id for checking execution state
// args[1]: step action from the enumeration StepAction
« no previous file with comments | « src/runtime.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698