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 73ccfc8

Browse filesBrowse files
cjihrigtargos
authored andcommitted
src: fix compiler warnings in node_crypto.cc
During the time between #24234 being opened and it landing, a V8 update occurred that deprecated several APIs. This commit fixes the following compiler warnings: ../src/node_crypto.cc:3342:11: warning: 'Set' is deprecated: Use maybe version ../src/node_crypto.cc:3345:13: warning: 'GetFunction' is deprecated: Use maybe version PR-URL: #25205 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
1 parent 7365b00 commit 73ccfc8
Copy full SHA for 73ccfc8

File tree

Expand file treeCollapse file tree

1 file changed

+5
-3
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-3
lines changed
Open diff view settings
Collapse file

‎src/node_crypto.cc‎

Copy file name to clipboardExpand all lines: src/node_crypto.cc
+5-3Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3312,10 +3312,12 @@ Local<Function> KeyObject::Initialize(Environment* env, Local<Object> target) {
33123312
GetAsymmetricKeyType);
33133313
env->SetProtoMethod(t, "export", Export);
33143314

3315-
target->Set(FIXED_ONE_BYTE_STRING(env->isolate(), "KeyObject"),
3316-
t->GetFunction(env->context()).ToLocalChecked());
3315+
auto function = t->GetFunction(env->context()).ToLocalChecked();
3316+
target->Set(env->context(),
3317+
FIXED_ONE_BYTE_STRING(env->isolate(), "KeyObject"),
3318+
function).FromJust();
33173319

3318-
return t->GetFunction();
3320+
return function;
33193321
}
33203322

33213323
Local<Object> KeyObject::Create(Environment* env,

0 commit comments

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