Index: src/contexts.cc |
diff --git a/src/contexts.cc b/src/contexts.cc |
index 9da13fe9e8a00665090f207aa7c6d7066d234bb4..67d19a1eff96a8ac2f8ea7b66fac3a56b253f65a 100644 |
--- a/src/contexts.cc |
+++ b/src/contexts.cc |
@@ -577,5 +577,16 @@ bool Context::IsBootstrappingOrGlobalObject(Isolate* isolate, Object* object) { |
} |
#endif |
+ |
+void Context::IncrementErrorsThrown() { |
+ DCHECK(IsNativeContext()); |
+ |
+ int previous_value = errors_thrown()->value(); |
+ set_errors_thrown(Smi::FromInt(previous_value + 1)); |
+} |
+ |
+ |
+int Context::GetErrorsThrown() { return errors_thrown()->value(); } |
+ |
} // namespace internal |
} // namespace v8 |