Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 36d4a43

Browse filesBrowse files
juanarboldanielleadams
authored andcommitted
src: remove redundant v8 namespaces in env.cc
PR-URL: #38792 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
1 parent 0c063a1 commit 36d4a43
Copy full SHA for 36d4a43

File tree

Expand file treeCollapse file tree

1 file changed

+16
-17
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+16
-17
lines changed
Open diff view settings
Collapse file

‎src/env.cc‎

Copy file name to clipboardExpand all lines: src/env.cc
+16-17Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,14 @@
3131
namespace node {
3232

3333
using errors::TryCatchScope;
34+
using v8::Array;
3435
using v8::Boolean;
3536
using v8::Context;
3637
using v8::EmbedderGraph;
3738
using v8::Function;
3839
using v8::FunctionTemplate;
3940
using v8::HandleScope;
41+
using v8::HeapSpaceStatistics;
4042
using v8::Integer;
4143
using v8::Isolate;
4244
using v8::Local;
@@ -1013,11 +1015,11 @@ void Environment::CollectUVExceptionInfo(Local<Value> object,
10131015
syscall, message, path, dest);
10141016
}
10151017

1016-
ImmediateInfo::ImmediateInfo(v8::Isolate* isolate, const SerializeInfo* info)
1018+
ImmediateInfo::ImmediateInfo(Isolate* isolate, const SerializeInfo* info)
10171019
: fields_(isolate, kFieldsCount, MAYBE_FIELD_PTR(info, fields)) {}
10181020

10191021
ImmediateInfo::SerializeInfo ImmediateInfo::Serialize(
1020-
v8::Local<v8::Context> context, v8::SnapshotCreator* creator) {
1022+
Local<Context> context, SnapshotCreator* creator) {
10211023
return {fields_.Serialize(context, creator)};
10221024
}
10231025

@@ -1035,8 +1037,8 @@ void ImmediateInfo::MemoryInfo(MemoryTracker* tracker) const {
10351037
tracker->TrackField("fields", fields_);
10361038
}
10371039

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) {
10401042
return {fields_.Serialize(context, creator)};
10411043
}
10421044

@@ -1054,17 +1056,17 @@ void TickInfo::MemoryInfo(MemoryTracker* tracker) const {
10541056
tracker->TrackField("fields", fields_);
10551057
}
10561058

1057-
TickInfo::TickInfo(v8::Isolate* isolate, const SerializeInfo* info)
1059+
TickInfo::TickInfo(Isolate* isolate, const SerializeInfo* info)
10581060
: fields_(
10591061
isolate, kFieldsCount, info == nullptr ? nullptr : &(info->fields)) {}
10601062

1061-
AsyncHooks::AsyncHooks(v8::Isolate* isolate, const SerializeInfo* info)
1063+
AsyncHooks::AsyncHooks(Isolate* isolate, const SerializeInfo* info)
10621064
: async_ids_stack_(isolate, 16 * 2, MAYBE_FIELD_PTR(info, async_ids_stack)),
10631065
fields_(isolate, kFieldsCount, MAYBE_FIELD_PTR(info, fields)),
10641066
async_id_fields_(
10651067
isolate, kUidFieldsCount, MAYBE_FIELD_PTR(info, async_id_fields)),
10661068
info_(info) {
1067-
v8::HandleScope handle_scope(isolate);
1069+
HandleScope handle_scope(isolate);
10681070
if (info == nullptr) {
10691071
clear_async_id_stack();
10701072

@@ -1092,21 +1094,18 @@ void AsyncHooks::Deserialize(Local<Context> context) {
10921094
fields_.Deserialize(context);
10931095
async_id_fields_.Deserialize(context);
10941096
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();
10991100
js_execution_async_resources_.Reset(context->GetIsolate(), arr);
11001101
}
11011102

11021103
native_execution_async_resources_.resize(
11031104
info_->native_execution_async_resources.size());
11041105
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();
11101109
native_execution_async_resources_[i].Reset(context->GetIsolate(), obj);
11111110
}
11121111
info_ = nullptr;
@@ -1523,7 +1522,7 @@ size_t Environment::NearHeapLimitCallback(void* data,
15231522
size_t young_gen_size = 0;
15241523
size_t old_gen_size = 0;
15251524

1526-
v8::HeapSpaceStatistics stats;
1525+
HeapSpaceStatistics stats;
15271526
size_t num_heap_spaces = env->isolate()->NumberOfHeapSpaces();
15281527
for (size_t i = 0; i < num_heap_spaces; ++i) {
15291528
env->isolate()->GetHeapSpaceStatistics(&stats, i);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.