src: refactor GetCreationContext calls

PR-URL: https://github.com/nodejs/node/pull/51367
Refs: https://github.com/nodejs/node/pull/51287
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
Jungku Lee authored and Michaël Zasso committed 2024-02-15 12:02:29 +01:00
1 parent 29492e2c88
commit b271cc5b16
1 file changed
+1 -1
+1 -1
View File
@@ -120,7 +120,7 @@ void ModuleWrap::New(const FunctionCallbackInfo<Value>& args) {
Local<Context> context;
ContextifyContext* contextify_context = nullptr;
if (args[1]->IsUndefined()) {
context = that->GetCreationContext().ToLocalChecked();
context = that->GetCreationContextChecked();
} else {
CHECK(args[1]->IsObject());
contextify_context = ContextifyContext::ContextFromContextifiedSandbox(