summaryrefslogtreecommitdiff
path: root/src/env-inl.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/env-inl.h')
-rw-r--r--src/env-inl.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/env-inl.h b/src/env-inl.h
index a489a4001a..a78ed024d2 100644
--- a/src/env-inl.h
+++ b/src/env-inl.h
@@ -934,7 +934,7 @@ inline void Environment::SetMethod(v8::Local<v8::Object> that,
const v8::NewStringType type = v8::NewStringType::kInternalized;
v8::Local<v8::String> name_string =
v8::String::NewFromUtf8(isolate(), name, type).ToLocalChecked();
- that->Set(context, name_string, function).FromJust();
+ that->Set(context, name_string, function).Check();
function->SetName(name_string); // NODE_SET_METHOD() compatibility.
}
@@ -952,7 +952,7 @@ inline void Environment::SetMethodNoSideEffect(v8::Local<v8::Object> that,
const v8::NewStringType type = v8::NewStringType::kInternalized;
v8::Local<v8::String> name_string =
v8::String::NewFromUtf8(isolate(), name, type).ToLocalChecked();
- that->Set(context, name_string, function).FromJust();
+ that->Set(context, name_string, function).Check();
function->SetName(name_string); // NODE_SET_METHOD() compatibility.
}