diff --git a/src/node_native_module.cc b/src/node_native_module.cc index 1b916d645d8639..a47b80617f1476 100644 --- a/src/node_native_module.cc +++ b/src/node_native_module.cc @@ -284,14 +284,14 @@ MaybeLocal NativeModuleLoader::LookupAndCompile( // This could fail when there are early errors in the native modules, // e.g. the syntax errors - if (maybe_fun.IsEmpty()) { + Local fun; + if (!maybe_fun.ToLocal(&fun)) { // In the case of early errors, v8 is already capable of // decorating the stack for us - note that we use CompileFunctionInContext // so there is no need to worry about wrappers. return MaybeLocal(); } - Local fun = maybe_fun.ToLocalChecked(); // XXX(joyeecheung): this bookkeeping is not exactly accurate because // it only starts after the Environment is created, so the per_context.js // will never be in any of these two sets, but the two sets are only for