| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent e8de2bf commit e3503ac
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -306,7 +306,7 @@ inline Environment::Environment(IsolateData* isolate_data, | |||
| 306 | 306 | emit_napi_warning_(true), | |
| 307 | 307 | makecallback_cntr_(0), | |
| 308 | 308 | #if HAVE_INSPECTOR | |
| 309 | - inspector_agent_(this), | ||
| 309 | + inspector_agent_(new inspector::Agent(this)), | ||
| 310 | 310 | #endif | |
| 311 | 311 | handle_cleanup_waiting_(0), | |
| 312 | 312 | http_parser_buffer_(nullptr), | |
@@ -347,6 +347,11 @@ inline Environment::Environment(IsolateData* isolate_data, | |||
| 347 | 347 | inline Environment::~Environment() { | |
| 348 | 348 | v8::HandleScope handle_scope(isolate()); | |
| 349 | 349 | ||
| 350 | + #if HAVE_INSPECTOR | ||
| 351 | + // Destroy inspector agent before erasing the context. | ||
| 352 | + delete inspector_agent_; | ||
| 353 | + #endif | ||
| 354 | + | ||
| 350 | 355 | context()->SetAlignedPointerInEmbedderData(kContextEmbedderDataIndex, | |
| 351 | 356 | nullptr); | |
| 352 | 357 | #define V(PropertyName, TypeName) PropertyName ## _.Reset(); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -667,8 +667,8 @@ class Environment { | |||
| 667 | 667 | #undef V | |
| 668 | 668 | ||
| 669 | 669 | #if HAVE_INSPECTOR | |
| 670 | - inline inspector::Agent* inspector_agent() { | ||
| 671 | - return &inspector_agent_; | ||
| 670 | + inline inspector::Agent* inspector_agent() const { | ||
| 671 | + return inspector_agent_; | ||
| 672 | 672 | } | |
| 673 | 673 | #endif | |
| 674 | 674 | ||
@@ -713,7 +713,7 @@ class Environment { | |||
| 713 | 713 | std::map<std::string, uint64_t> performance_marks_; | |
| 714 | 714 | ||
| 715 | 715 | #if HAVE_INSPECTOR | |
| 716 | - inspector::Agent inspector_agent_; | ||
| 716 | + inspector::Agent* const inspector_agent_; | ||
| 717 | 717 | #endif | |
| 718 | 718 | ||
| 719 | 719 | HandleWrapQueue handle_wrap_queue_; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments