| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 0c063a1 commit 36d4a43
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -31,12 +31,14 @@ | |||
| 31 | 31 | namespace node { | |
| 32 | 32 | ||
| 33 | 33 | using errors::TryCatchScope; | |
| 34 | + using v8::Array; | ||
| 34 | 35 | using v8::Boolean; | |
| 35 | 36 | using v8::Context; | |
| 36 | 37 | using v8::EmbedderGraph; | |
| 37 | 38 | using v8::Function; | |
| 38 | 39 | using v8::FunctionTemplate; | |
| 39 | 40 | using v8::HandleScope; | |
| 41 | + using v8::HeapSpaceStatistics; | ||
| 40 | 42 | using v8::Integer; | |
| 41 | 43 | using v8::Isolate; | |
| 42 | 44 | using v8::Local; | |
@@ -1013,11 +1015,11 @@ void Environment::CollectUVExceptionInfo(Local<Value> object, | |||
| 1013 | 1015 | syscall, message, path, dest); | |
| 1014 | 1016 | } | |
| 1015 | 1017 | ||
| 1016 | - ImmediateInfo::ImmediateInfo(v8::Isolate* isolate, const SerializeInfo* info) | ||
| 1018 | + ImmediateInfo::ImmediateInfo(Isolate* isolate, const SerializeInfo* info) | ||
| 1017 | 1019 | : fields_(isolate, kFieldsCount, MAYBE_FIELD_PTR(info, fields)) {} | |
| 1018 | 1020 | ||
| 1019 | 1021 | ImmediateInfo::SerializeInfo ImmediateInfo::Serialize( | |
| 1020 | - v8::Local<v8::Context> context, v8::SnapshotCreator* creator) { | ||
| 1022 | + Local<Context> context, SnapshotCreator* creator) { | ||
| 1021 | 1023 | return {fields_.Serialize(context, creator)}; | |
| 1022 | 1024 | } | |
| 1023 | 1025 | ||
@@ -1035,8 +1037,8 @@ void ImmediateInfo::MemoryInfo(MemoryTracker* tracker) const { | |||
| 1035 | 1037 | tracker->TrackField("fields", fields_); | |
| 1036 | 1038 | } | |
| 1037 | 1039 | ||
| 1038 | - TickInfo::SerializeInfo TickInfo::Serialize(v8::Local<v8::Context> context, | ||
| 1039 | - v8::SnapshotCreator* creator) { | ||
| 1040 | + TickInfo::SerializeInfo TickInfo::Serialize(Local<Context> context, | ||
| 1041 | + SnapshotCreator* creator) { | ||
| 1040 | 1042 | return {fields_.Serialize(context, creator)}; | |
| 1041 | 1043 | } | |
| 1042 | 1044 | ||
@@ -1054,17 +1056,17 @@ void TickInfo::MemoryInfo(MemoryTracker* tracker) const { | |||
| 1054 | 1056 | tracker->TrackField("fields", fields_); | |
| 1055 | 1057 | } | |
| 1056 | 1058 | ||
| 1057 | - TickInfo::TickInfo(v8::Isolate* isolate, const SerializeInfo* info) | ||
| 1059 | + TickInfo::TickInfo(Isolate* isolate, const SerializeInfo* info) | ||
| 1058 | 1060 | : fields_( | |
| 1059 | 1061 | isolate, kFieldsCount, info == nullptr ? nullptr : &(info->fields)) {} | |
| 1060 | 1062 | ||
| 1061 | - AsyncHooks::AsyncHooks(v8::Isolate* isolate, const SerializeInfo* info) | ||
| 1063 | + AsyncHooks::AsyncHooks(Isolate* isolate, const SerializeInfo* info) | ||
| 1062 | 1064 | : async_ids_stack_(isolate, 16 * 2, MAYBE_FIELD_PTR(info, async_ids_stack)), | |
| 1063 | 1065 | fields_(isolate, kFieldsCount, MAYBE_FIELD_PTR(info, fields)), | |
| 1064 | 1066 | async_id_fields_( | |
| 1065 | 1067 | isolate, kUidFieldsCount, MAYBE_FIELD_PTR(info, async_id_fields)), | |
| 1066 | 1068 | info_(info) { | |
| 1067 | - v8::HandleScope handle_scope(isolate); | ||
| 1069 | + HandleScope handle_scope(isolate); | ||
| 1068 | 1070 | if (info == nullptr) { | |
| 1069 | 1071 | clear_async_id_stack(); | |
| 1070 | 1072 | ||
@@ -1092,21 +1094,18 @@ void AsyncHooks::Deserialize(Local<Context> context) { | |||
| 1092 | 1094 | fields_.Deserialize(context); | |
| 1093 | 1095 | async_id_fields_.Deserialize(context); | |
| 1094 | 1096 | if (info_->js_execution_async_resources != 0) { | |
| 1095 | - v8::Local<v8::Array> arr = context | ||
| 1096 | - ->GetDataFromSnapshotOnce<v8::Array>( | ||
| 1097 | - info_->js_execution_async_resources) | ||
| 1098 | - .ToLocalChecked(); | ||
| 1097 | + Local<Array> arr = context->GetDataFromSnapshotOnce<Array>( | ||
| 1098 | + info_->js_execution_async_resources) | ||
| 1099 | + .ToLocalChecked(); | ||
| 1099 | 1100 | js_execution_async_resources_.Reset(context->GetIsolate(), arr); | |
| 1100 | 1101 | } | |
| 1101 | 1102 | ||
| 1102 | 1103 | native_execution_async_resources_.resize( | |
| 1103 | 1104 | info_->native_execution_async_resources.size()); | |
| 1104 | 1105 | for (size_t i = 0; i < info_->native_execution_async_resources.size(); ++i) { | |
| 1105 | - v8::Local<v8::Object> obj = | ||
| 1106 | - context | ||
| 1107 | - ->GetDataFromSnapshotOnce<v8::Object>( | ||
| 1108 | - info_->native_execution_async_resources[i]) | ||
| 1109 | - .ToLocalChecked(); | ||
| 1106 | + Local<Object> obj = context->GetDataFromSnapshotOnce<Object>( | ||
| 1107 | + info_->native_execution_async_resources[i]) | ||
| 1108 | + .ToLocalChecked(); | ||
| 1110 | 1109 | native_execution_async_resources_[i].Reset(context->GetIsolate(), obj); | |
| 1111 | 1110 | } | |
| 1112 | 1111 | info_ = nullptr; | |
@@ -1523,7 +1522,7 @@ size_t Environment::NearHeapLimitCallback(void* data, | |||
| 1523 | 1522 | size_t young_gen_size = 0; | |
| 1524 | 1523 | size_t old_gen_size = 0; | |
| 1525 | 1524 | ||
| 1526 | - v8::HeapSpaceStatistics stats; | ||
| 1525 | + HeapSpaceStatistics stats; | ||
| 1527 | 1526 | size_t num_heap_spaces = env->isolate()->NumberOfHeapSpaces(); | |
| 1528 | 1527 | for (size_t i = 0; i < num_heap_spaces; ++i) { | |
| 1529 | 1528 | env->isolate()->GetHeapSpaceStatistics(&stats, i); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments