Skip to content

Commit 097009a

Browse files
committed
[squash] v9.x-specific fixups
1 parent 9f426f7 commit 097009a

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

src/node_crypto.cc

+2-1
Original file line numberDiff line numberDiff line change
@@ -3600,7 +3600,8 @@ void Connection::GetServername(const FunctionCallbackInfo<Value>& args) {
36003600
ASSIGN_OR_RETURN_UNWRAP(&conn, args.Holder());
36013601

36023602
if (conn->is_server() && !conn->servername_.IsEmpty()) {
3603-
args.GetReturnValue().Set(conn->servername_);
3603+
args.GetReturnValue().Set(
3604+
PersistentToLocal(args.GetIsolate(), conn->servername_));
36043605
} else {
36053606
args.GetReturnValue().Set(false);
36063607
}

src/node_crypto.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -380,13 +380,13 @@ class Connection : public AsyncWrap, public SSLWrap<Connection> {
380380
void NewSessionDoneCb();
381381

382382
#ifndef OPENSSL_NO_NEXTPROTONEG
383-
v8::Persistent<v8::Object> npnProtos_;
384-
v8::Persistent<v8::Value> selectedNPNProto_;
383+
Persistent<v8::Object> npnProtos_;
384+
Persistent<v8::Value> selectedNPNProto_;
385385
#endif
386386

387387
#ifdef SSL_CTRL_SET_TLSEXT_SERVERNAME_CB
388-
v8::Persistent<v8::Object> sniObject_;
389-
v8::Persistent<v8::String> servername_;
388+
Persistent<v8::Object> sniObject_;
389+
Persistent<v8::String> servername_;
390390
#endif
391391

392392
size_t self_size() const override { return sizeof(*this); }

src/node_file.cc

+4-2
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,8 @@ class fs_req_wrap {
366366
After(uv_req); \
367367
req_wrap = nullptr; \
368368
} else { \
369-
args.GetReturnValue().Set(req_wrap->persistent()); \
369+
args.GetReturnValue().Set( \
370+
PersistentToLocal(env->isolate(), req_wrap->persistent())); \
370371
}
371372

372373
#define ASYNC_CALL(func, req, encoding, ...) \
@@ -1140,7 +1141,8 @@ static void WriteString(const FunctionCallbackInfo<Value>& args) {
11401141
return;
11411142
}
11421143

1143-
return args.GetReturnValue().Set(req_wrap->persistent());
1144+
return args.GetReturnValue().Set(
1145+
PersistentToLocal(env->isolate(), req_wrap->persistent()));
11441146
}
11451147

11461148

0 commit comments

Comments
 (0)