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