Index: src/contexts.cc |
diff --git a/src/contexts.cc b/src/contexts.cc |
index a18f181bef8ccb3e0ca80d43dc5a1f3107105d73..b599971ab979a2d50f50c8c026789f4f508ccdca 100644 |
--- a/src/contexts.cc |
+++ b/src/contexts.cc |
@@ -589,5 +589,18 @@ bool Context::IsBootstrappingOrGlobalObject(Isolate* isolate, Object* object) { |
} |
#endif |
+ |
+void Context::IncrementErrorsThrown() { |
+ DCHECK(IsNativeContext()); |
+ |
+ int previous_value = Smi::cast(errors_thrown())->value(); |
Yang
2015/11/02 05:48:57
this cast would be unnecessary if the type of this
Michael Hablich
2015/11/04 10:58:07
Done.
|
+ set_errors_thrown(Smi::FromInt(previous_value+1)); |
+} |
+ |
+ |
+int Context::GetErrorsThrown() { |
+ return Smi::cast(errors_thrown())->value(); |
+} |
+ |
} // namespace internal |
} // namespace v8 |