Chromium Code Reviews| Index: src/contexts.cc |
| diff --git a/src/contexts.cc b/src/contexts.cc |
| index 9da13fe9e8a00665090f207aa7c6d7066d234bb4..d5cbf21cb7b33605b5657b567955925b933184aa 100644 |
| --- a/src/contexts.cc |
| +++ b/src/contexts.cc |
| @@ -577,5 +577,18 @@ 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)); |
|
Yang
2015/11/05 07:50:01
I think "git cl format" would add spaces around +.
Michael Hablich
2015/11/05 13:23:11
Done.
|
| +} |
| + |
| + |
| +int Context::GetErrorsThrown() { |
| + return errors_thrown()->value(); |
| +} |
| + |
| } // namespace internal |
| } // namespace v8 |