Skip to content

Commit 86cb460

Browse files
committed
format cpp and js
Signed-off-by: TseIan <tseianxwc@gmail.com>
1 parent d0ea011 commit 86cb460

1 file changed

Lines changed: 11 additions & 7 deletions

File tree

‎src/pipe_wrap.cc‎

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,6 @@ void PipeWrap::WatchPeerClose(const FunctionCallbackInfo<Value>& args) {
229229
CHECK_GT(args.Length(), 0);
230230
CHECK(args[0]->IsBoolean());
231231
const bool enable = args[0].As<v8::Boolean>()->Value();
232-
233232
Environment* env = wrap->env();
234233
Isolate* isolate = env->isolate();
235234
v8::HandleScope handle_scope(isolate);
@@ -238,7 +237,9 @@ void PipeWrap::WatchPeerClose(const FunctionCallbackInfo<Value>& args) {
238237

239238
// UnwatchPeerClose
240239
if (!enable) {
241-
if (obj->GetInternalField(kPeerCloseCallbackField).As<Value>()->IsUndefined()) {
240+
if (obj->GetInternalField(kPeerCloseCallbackField)
241+
.As<Value>()
242+
->IsUndefined()) {
242243
return;
243244
}
244245

@@ -250,8 +251,9 @@ void PipeWrap::WatchPeerClose(const FunctionCallbackInfo<Value>& args) {
250251
if (!wrap->IsAlive()) {
251252
return;
252253
}
253-
254-
if (!obj->GetInternalField(kPeerCloseCallbackField).As<Value>()->IsUndefined()) {
254+
if (!obj->GetInternalField(kPeerCloseCallbackField)
255+
.As<Value>()
256+
->IsUndefined()) {
255257
return;
256258
}
257259

@@ -302,11 +304,13 @@ void PipeWrap::PeerCloseRead(uv_stream_t* stream,
302304
Local<Object> obj = wrap->object();
303305

304306
// Check if callback is set
305-
if (obj->GetInternalField(kPeerCloseCallbackField).As<Value>()->IsUndefined()) {
307+
if (obj->GetInternalField(kPeerCloseCallbackField)
308+
.As<Value>()
309+
->IsUndefined()) {
306310
return;
307311
}
308-
309-
Local<Value> cb_value = obj->GetInternalField(kPeerCloseCallbackField).As<Value>();
312+
Local<Value> cb_value =
313+
obj->GetInternalField(kPeerCloseCallbackField).As<Value>();
310314
Local<Function> cb = cb_value.As<Function>();
311315
// Reset before calling to prevent re-entrancy issues
312316
obj->SetInternalField(kPeerCloseCallbackField, v8::Undefined(isolate));

0 commit comments

Comments
 (0)