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 |