Skip to content

Commit a78c157

Browse files
committed
chore: remove reformatting changes
1 parent 1de9c7f commit a78c157

1 file changed

Lines changed: 22 additions & 14 deletions

File tree

src/node_util.cc

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -67,18 +67,18 @@ static void GetOwnNonIndexProperties(
6767

6868
PropertyFilter filter = FromV8Value<PropertyFilter>(args[1]);
6969

70-
if (!object
71-
->GetPropertyNames(context,
72-
KeyCollectionMode::kOwnOnly,
73-
filter,
74-
IndexFilter::kSkipIndices)
75-
.ToLocal(&properties)) {
70+
if (!object->GetPropertyNames(
71+
context, KeyCollectionMode::kOwnOnly,
72+
filter,
73+
IndexFilter::kSkipIndices)
74+
.ToLocal(&properties)) {
7675
return;
7776
}
7877
args.GetReturnValue().Set(properties);
7978
}
8079

81-
static void GetConstructorName(const FunctionCallbackInfo<Value>& args) {
80+
static void GetConstructorName(
81+
const FunctionCallbackInfo<Value>& args) {
8282
CHECK(args[0]->IsObject());
8383

8484
Local<Object> object = args[0].As<Object>();
@@ -87,7 +87,8 @@ static void GetConstructorName(const FunctionCallbackInfo<Value>& args) {
8787
args.GetReturnValue().Set(name);
8888
}
8989

90-
static void GetExternalValue(const FunctionCallbackInfo<Value>& args) {
90+
static void GetExternalValue(
91+
const FunctionCallbackInfo<Value>& args) {
9192
CHECK(args[0]->IsExternal());
9293
Isolate* isolate = args.GetIsolate();
9394
Local<External> external = args[0].As<External>();
@@ -100,14 +101,15 @@ static void GetExternalValue(const FunctionCallbackInfo<Value>& args) {
100101

101102
static void GetPromiseDetails(const FunctionCallbackInfo<Value>& args) {
102103
// Return undefined if it's not a Promise.
103-
if (!args[0]->IsPromise()) return;
104+
if (!args[0]->IsPromise())
105+
return;
104106

105107
auto isolate = args.GetIsolate();
106108

107109
Local<Promise> promise = args[0].As<Promise>();
108110

109111
int state = promise->State();
110-
Local<Value> values[2] = {Integer::New(isolate, state)};
112+
Local<Value> values[2] = { Integer::New(isolate, state) };
111113
size_t number_of_values = 1;
112114
if (state != Promise::PromiseState::kPending)
113115
values[number_of_values++] = promise->Result();
@@ -117,15 +119,19 @@ static void GetPromiseDetails(const FunctionCallbackInfo<Value>& args) {
117119

118120
static void GetProxyDetails(const FunctionCallbackInfo<Value>& args) {
119121
// Return undefined if it's not a proxy.
120-
if (!args[0]->IsProxy()) return;
122+
if (!args[0]->IsProxy())
123+
return;
121124

122125
Local<Proxy> proxy = args[0].As<Proxy>();
123126

124127
// TODO(BridgeAR): Remove the length check as soon as we prohibit access to
125128
// the util binding layer. It's accessed in the wild and `esm` would break in
126129
// case the check is removed.
127130
if (args.Length() == 1 || args[1]->IsTrue()) {
128-
Local<Value> ret[] = {proxy->GetTarget(), proxy->GetHandler()};
131+
Local<Value> ret[] = {
132+
proxy->GetTarget(),
133+
proxy->GetHandler()
134+
};
129135

130136
args.GetReturnValue().Set(
131137
Array::New(args.GetIsolate(), ret, arraysize(ret)));
@@ -161,15 +167,17 @@ static void GetCallerLocation(const FunctionCallbackInfo<Value>& args) {
161167
}
162168

163169
static void PreviewEntries(const FunctionCallbackInfo<Value>& args) {
164-
if (!args[0]->IsObject()) return;
170+
if (!args[0]->IsObject())
171+
return;
165172

166173
Isolate* isolate = args.GetIsolate();
167174
bool is_key_value;
168175
Local<Array> entries;
169176
if (!args[0].As<Object>()->PreviewEntries(&is_key_value).ToLocal(&entries))
170177
return;
171178
// Fast path for WeakMap and WeakSet.
172-
if (args.Length() == 1) return args.GetReturnValue().Set(entries);
179+
if (args.Length() == 1)
180+
return args.GetReturnValue().Set(entries);
173181

174182
Local<Value> ret[] = {entries, Boolean::New(isolate, is_key_value)};
175183
return args.GetReturnValue().Set(Array::New(isolate, ret, arraysize(ret)));

0 commit comments

Comments
 (0)