diff --git a/src/env.cc b/src/env.cc index 571a8ed5ce257f..ff8d3952cf20a3 100644 --- a/src/env.cc +++ b/src/env.cc @@ -347,6 +347,11 @@ void IsolateData::DeserializeProperties(const IsolateDataSerializeInfo* info) { size_t i = 0; HandleScope handle_scope(isolate_); + if (per_process::enabled_debug_list.enabled(DebugCategory::MKSNAPSHOT)) { + fprintf(stderr, "deserializing IsolateDataSerializeInfo...\n"); + std::cerr << *info << "\n"; + } + #define VP(PropertyName, StringValue) V(Private, PropertyName) #define VY(PropertyName, StringValue) V(Symbol, PropertyName) #define VS(PropertyName, StringValue) V(String, PropertyName) @@ -1704,6 +1709,11 @@ void Environment::RunDeserializeRequests() { void Environment::DeserializeProperties(const EnvSerializeInfo* info) { Local ctx = context(); + if (enabled_debug_list_.enabled(DebugCategory::MKSNAPSHOT)) { + fprintf(stderr, "deserializing EnvSerializeInfo...\n"); + std::cerr << *info << "\n"; + } + RunDeserializeRequests(); async_hooks_.Deserialize(ctx); @@ -1716,11 +1726,6 @@ void Environment::DeserializeProperties(const EnvSerializeInfo* info) { should_abort_on_uncaught_toggle_.Deserialize(ctx); principal_realm_->DeserializeProperties(&info->principal_realm); - - if (enabled_debug_list_.enabled(DebugCategory::MKSNAPSHOT)) { - fprintf(stderr, "deserializing...\n"); - std::cerr << *info << "\n"; - } } uint64_t GuessMemoryAvailableToTheProcess() { diff --git a/src/env_properties.h b/src/env_properties.h index 095094714aa400..320d08d22577c8 100644 --- a/src/env_properties.h +++ b/src/env_properties.h @@ -30,6 +30,7 @@ // Symbols are per-isolate primitives but Environment proxies them // for the sake of convenience. #define PER_ISOLATE_SYMBOL_PROPERTIES(V) \ + V(fs_use_promises_symbol, "fs_use_promises_symbol") \ V(async_id_symbol, "async_id_symbol") \ V(handle_onclose_symbol, "handle_onclose") \ V(no_message_symbol, "no_message_symbol") \ @@ -390,7 +391,6 @@ V(domexception_function, v8::Function) \ V(enhance_fatal_stack_after_inspector, v8::Function) \ V(enhance_fatal_stack_before_inspector, v8::Function) \ - V(fs_use_promises_symbol, v8::Symbol) \ V(get_source_map_error_source, v8::Function) \ V(host_import_module_dynamically_callback, v8::Function) \ V(host_initialize_import_meta_object_callback, v8::Function) \ diff --git a/src/node_file.cc b/src/node_file.cc index 81e076d6ec646d..dc9e1a1606a78a 100644 --- a/src/node_file.cc +++ b/src/node_file.cc @@ -2939,13 +2939,9 @@ void Initialize(Local target, fdcloset->SetInternalFieldCount(FSReqBase::kInternalFieldCount); env->set_fdclose_constructor_template(fdcloset); - Local use_promises_symbol = - Symbol::New(isolate, - FIXED_ONE_BYTE_STRING(isolate, "use promises")); - env->set_fs_use_promises_symbol(use_promises_symbol); target->Set(context, FIXED_ONE_BYTE_STRING(isolate, "kUsePromises"), - use_promises_symbol).Check(); + env->fs_use_promises_symbol()).Check(); } BindingData* FSReqBase::binding_data() {