diff --git a/src/node_snapshotable.cc b/src/node_snapshotable.cc index 7f5d9b9e182..e861e499534 100644 --- a/src/node_snapshotable.cc +++ b/src/node_snapshotable.cc @@ -1571,17 +1571,17 @@ void CompileSerializeMain(const FunctionCallbackInfo& args) { CHECK(args[0]->IsString()); Local filename = args[0].As(); Local source = args[1].As(); + Environment* env = Environment::GetCurrent(args); Isolate* isolate = args.GetIsolate(); Local context = isolate->GetCurrentContext(); // TODO(joyeecheung): do we need all of these? Maybe we would want a less // internal version of them. - LocalVector parameters( - isolate, - { - FIXED_ONE_BYTE_STRING(isolate, "require"), - FIXED_ONE_BYTE_STRING(isolate, "__filename"), - FIXED_ONE_BYTE_STRING(isolate, "__dirname"), - }); + LocalVector parameters(isolate, + { + env->require_string(), + env->__filename_string(), + env->__dirname_string(), + }); ScriptOrigin script_origin(filename, 0, 0, true); ScriptCompiler::Source script_source(source, script_origin);