Chromium Code Reviews| Index: src/bootstrapper.cc |
| diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc |
| index 069a2c2e3400d7b0838e6990b87ebf00bc247893..9d2ae1b56c44aa82cb8b5cdf1f1ad0f3eaee105f 100644 |
| --- a/src/bootstrapper.cc |
| +++ b/src/bootstrapper.cc |
| @@ -370,6 +370,9 @@ static void SetObjectPrototype(Handle<JSObject> object, Handle<Object> proto) { |
| void Bootstrapper::DetachGlobal(Handle<Context> env) { |
| + env->GetIsolate()->counters()->errors_thrown_per_context()->AddSample( |
| + env->GetErrorsThrown()); |
| + |
| Factory* factory = env->GetIsolate()->factory(); |
| Handle<JSGlobalProxy> global_proxy(JSGlobalProxy::cast(env->global_proxy())); |
| global_proxy->set_native_context(*factory->null_value()); |
| @@ -3151,6 +3154,11 @@ Genesis::Genesis(Isolate* isolate, |
| AddToWeakNativeContextList(*native_context()); |
| isolate->set_context(*native_context()); |
| isolate->counters()->contexts_created_by_snapshot()->Increment(); |
| + |
| + // Re-initialize the counter because it got incremented during snapshot |
| + // creation. |
| + isolate->native_context()->set_errors_thrown(Smi::FromInt(0)); |
|
Yang
2015/11/05 07:50:01
Move this below please. Otherwise we would get wro
Michael Hablich
2015/11/05 13:23:11
After an offline discussion I now get it why it sh
|
| + |
| #if TRACE_MAPS |
| if (FLAG_trace_maps) { |
| Handle<JSFunction> object_fun = isolate->object_function(); |