diff --git a/src/inspector/protocol_helper.h b/src/inspector/protocol_helper.h index a0f88aa93532a4..5529ef523a0101 100644 --- a/src/inspector/protocol_helper.h +++ b/src/inspector/protocol_helper.h @@ -19,7 +19,7 @@ inline std::unique_ptr ToInspectorString( inline protocol::String ToProtocolString(v8::Isolate* isolate, v8::Local value) { Utf8Value buffer(isolate, value); - return *buffer; + return buffer.ToString(); } } // namespace node::inspector diff --git a/src/node_blob.cc b/src/node_blob.cc index bdc939b6794377..d278a32c9934c1 100644 --- a/src/node_blob.cc +++ b/src/node_blob.cc @@ -442,11 +442,9 @@ void Blob::StoreDataObject(const FunctionCallbackInfo& args) { Utf8Value type(isolate, args[3]); binding_data->store_data_object( - std::string(*key, key.length()), + key.ToString(), BlobBindingData::StoredDataObject( - BaseObjectPtr(blob), - length, - std::string(*type, type.length()))); + BaseObjectPtr(blob), length, type.ToString())); } // Note: applying the V8 Fast API to the following function does not produce @@ -486,7 +484,7 @@ void Blob::GetDataObject(const FunctionCallbackInfo& args) { Utf8Value key(isolate, args[0]); BlobBindingData::StoredDataObject stored = - binding_data->get_data_object(std::string(*key, key.length())); + binding_data->get_data_object(key.ToString()); if (stored.blob) { Local type; if (!String::NewFromUtf8(isolate, diff --git a/src/node_contextify.cc b/src/node_contextify.cc index 92c7ba0249778d..b5bf8bd768b87e 100644 --- a/src/node_contextify.cc +++ b/src/node_contextify.cc @@ -284,10 +284,10 @@ ContextifyContext* ContextifyContext::New(Local v8_context, options->allow_code_gen_wasm); Utf8Value name_val(env->isolate(), options->name); - ContextInfo info(*name_val); + ContextInfo info(name_val.ToString()); if (!options->origin.IsEmpty()) { Utf8Value origin_val(env->isolate(), options->origin); - info.origin = *origin_val; + info.origin = origin_val.ToString(); } ContextifyContext* result; diff --git a/src/node_errors.h b/src/node_errors.h index 1bfcf03f1dc4e0..29ff6d556bc8b8 100644 --- a/src/node_errors.h +++ b/src/node_errors.h @@ -276,12 +276,12 @@ inline void THROW_ERR_REQUIRE_ASYNC_MODULE( if (!parent_filename.IsEmpty() && parent_filename->IsString()) { Utf8Value utf8(env->isolate(), parent_filename); message += "\n From "; - message += utf8.out(); + message += utf8.ToStringView(); } if (!filename.IsEmpty() && filename->IsString()) { Utf8Value utf8(env->isolate(), filename); message += "\n Requiring "; - message += +utf8.out(); + message += utf8.ToStringView(); } THROW_ERR_REQUIRE_ASYNC_MODULE(env, message.c_str()); } diff --git a/src/node_messaging.cc b/src/node_messaging.cc index ad4a7b3974df90..57e068ae249d61 100644 --- a/src/node_messaging.cc +++ b/src/node_messaging.cc @@ -1368,7 +1368,7 @@ std::unique_ptr JSTransferable::TransferOrClone() const { } Utf8Value deserialize_info_str(env()->isolate(), deserialize_info); if (*deserialize_info_str == nullptr) return {}; - return std::make_unique(*deserialize_info_str, + return std::make_unique(deserialize_info_str.ToString(), Global(env()->isolate(), data)); } diff --git a/src/quic/defs.h b/src/quic/defs.h index abbc0ed182b130..eb59e694bb0452 100644 --- a/src/quic/defs.h +++ b/src/quic/defs.h @@ -39,7 +39,7 @@ bool SetOption(Environment* env, if (!object->Get(env->context(), name).ToLocal(&value)) return false; if (!value->IsUndefined()) { Utf8Value utf8(env->isolate(), value); - options->*member = *utf8; + options->*member = utf8.ToString(); } return true; }