diff --git a/src/env.cc b/src/env.cc index 5bdbfad4f4d3ef..2722322fae9f11 100644 --- a/src/env.cc +++ b/src/env.cc @@ -330,6 +330,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) @@ -1648,6 +1653,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(); builtins_in_snapshot = info->builtins; @@ -1661,11 +1671,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 4e75a19e8180ef..5fc5106c0c5ad2 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") \ @@ -386,7 +387,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 4993da585322db..cc077a9d43a6f6 100644 --- a/src/node_file.cc +++ b/src/node_file.cc @@ -70,7 +70,6 @@ using v8::Object; using v8::ObjectTemplate; using v8::Promise; using v8::String; -using v8::Symbol; using v8::Undefined; using v8::Value; @@ -2792,13 +2791,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() {