Index: src/factory.cc |
diff --git a/src/factory.cc b/src/factory.cc |
index f475efcc7725c72a9179a1b580baae0e44116ecb..5266e9d8c5b27027049e2a59284a78c94e25e20e 100644 |
--- a/src/factory.cc |
+++ b/src/factory.cc |
@@ -726,6 +726,10 @@ Handle<Context> Factory::NewNativeContext() { |
array->set_map_no_write_barrier(*native_context_map()); |
Handle<Context> context = Handle<Context>::cast(array); |
context->set_js_array_maps(*undefined_value()); |
+ // Initialize with -1 because the value is incremented once |
+ // during the build. This means the value is correctly initialized to |
+ // 0 afterwards. |
+ context->set_errors_thrown(Smi::FromInt(-1)); |
Yang
2015/11/02 05:48:57
This seems somewhat brittle.
Could we move this l
Michael Hablich
2015/11/04 10:58:08
Thanks for the remark. I left the initialization i
|
DCHECK(context->IsNativeContext()); |
return context; |
} |