Index: src/contexts.cc |
diff --git a/src/contexts.cc b/src/contexts.cc |
index a18f181bef8ccb3e0ca80d43dc5a1f3107105d73..f43e579138a9bc89fedf35c0c95a18038cb18063 100644 |
--- a/src/contexts.cc |
+++ b/src/contexts.cc |
@@ -589,5 +589,17 @@ bool Context::IsBootstrappingOrGlobalObject(Isolate* isolate, Object* object) { |
} |
#endif |
Michael Starzinger
2015/10/30 12:27:10
nit: Two empty newlines between top-level declarat
Michael Hablich
2015/10/30 15:55:03
Done.
|
+void Context::IncrementExceptionsThrown() { |
+ DCHECK(IsNativeContext()); |
+ |
+ int previous_value = Smi::cast(exceptions_thrown())->value(); |
+ set_exceptions_thrown(Smi::FromInt(previous_value+1)); |
+} |
+ |
+ |
+int Context::GetExceptionsThrown() { |
+ return Smi::cast(exceptions_thrown())->value(); |
+} |
+ |
} // namespace internal |
} // namespace v8 |