@@ -319,67 +319,6 @@ inline Environment* Environment::GetThreadLocalEnv() {
319319 return static_cast <Environment*>(uv_key_get (&thread_local_env));
320320}
321321
322- inline Environment::Environment (IsolateData* isolate_data,
323- v8::Local<v8::Context> context)
324- : isolate_(context->GetIsolate ()),
325- isolate_data_(isolate_data),
326- immediate_info_(context->GetIsolate ()),
327- tick_info_(context->GetIsolate ()),
328- timer_base_(uv_now(isolate_data->event_loop ())),
329- printed_error_(false ),
330- trace_sync_io_(false ),
331- abort_on_uncaught_exception_(false ),
332- emit_napi_warning_(true ),
333- emit_env_nonstring_warning_(true ),
334- makecallback_cntr_(0 ),
335- should_abort_on_uncaught_toggle_(isolate_, 1 ),
336- #if HAVE_INSPECTOR
337- inspector_agent_ (new inspector::Agent(this )),
338- #endif
339- handle_cleanup_waiting_ (0 ),
340- http_parser_buffer_(nullptr ),
341- fs_stats_field_array_(isolate_, kFsStatsFieldsLength ),
342- context_(context->GetIsolate (), context) {
343- // We'll be creating new objects so make sure we've entered the context.
344- v8::HandleScope handle_scope (isolate ());
345- v8::Context::Scope context_scope (context);
346- set_as_external (v8::External::New (isolate (), this ));
347-
348- AssignToContext (context, ContextInfo (" " ));
349-
350- destroy_async_id_list_.reserve (512 );
351- performance_state_.reset (new performance::performance_state (isolate ()));
352- performance_state_->milestones [
353- performance::NODE_PERFORMANCE_MILESTONE_ENVIRONMENT] =
354- PERFORMANCE_NOW ();
355- performance_state_->milestones [
356- performance::NODE_PERFORMANCE_MILESTONE_NODE_START] =
357- performance::performance_node_start;
358- performance_state_->milestones [
359- performance::NODE_PERFORMANCE_MILESTONE_V8_START] =
360- performance::performance_v8_start;
361-
362- // By default, always abort when --abort-on-uncaught-exception was passed.
363- should_abort_on_uncaught_toggle_[0 ] = 1 ;
364- }
365-
366- inline Environment::~Environment () {
367- v8::HandleScope handle_scope (isolate ());
368-
369- #if HAVE_INSPECTOR
370- // Destroy inspector agent before erasing the context. The inspector
371- // destructor depends on the context still being accessible.
372- inspector_agent_.reset ();
373- #endif
374-
375- context ()->SetAlignedPointerInEmbedderData (
376- ContextEmbedderIndex::kEnvironment , nullptr );
377-
378- delete[] heap_statistics_buffer_;
379- delete[] heap_space_statistics_buffer_;
380- delete[] http_parser_buffer_;
381- }
382-
383322inline v8::Isolate* Environment::isolate () const {
384323 return isolate_;
385324}
0 commit comments