Index: src/factory.cc |
diff --git a/src/factory.cc b/src/factory.cc |
index f475efcc7725c72a9179a1b580baae0e44116ecb..da7ba35c6e4dc23828509eee98f34a8f9a4f8389 100644 |
--- a/src/factory.cc |
+++ b/src/factory.cc |
@@ -726,6 +726,7 @@ 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()); |
+ context->set_exceptions_thrown(Smi::FromInt(0)); |
DCHECK(context->IsNativeContext()); |
return context; |
} |
@@ -1159,6 +1160,7 @@ Handle<Object> Factory::NewError(Handle<JSFunction> constructor, |
Handle<Object> Factory::New##NAME(MessageTemplate::Template template_index, \ |
Handle<Object> arg0, Handle<Object> arg1, \ |
Handle<Object> arg2) { \ |
+ isolate()->native_context()->IncrementExceptionsThrown(); \ |
jochen (gone - plz use gerrit)
2015/10/30 12:13:38
this looks wrong. It's not uncommon to do
var a =
Yang
2015/10/30 13:01:02
As discussed offline, I suggested to do it in %For
Michael Hablich
2015/10/30 15:55:03
I moved the call to %FormatMessageString. During t
|
return NewError(isolate()->name##_function(), template_index, arg0, arg1, \ |
arg2); \ |
} |