Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/inspector/protocol_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ inline std::unique_ptr<v8_inspector::StringBuffer> ToInspectorString(
inline protocol::String ToProtocolString(v8::Isolate* isolate,
v8::Local<v8::Value> value) {
Utf8Value buffer(isolate, value);
return *buffer;
return buffer.ToString();
}

} // namespace node::inspector
Expand Down
8 changes: 3 additions & 5 deletions src/node_blob.cc
Original file line number Diff line number Diff line change
Expand Up @@ -442,11 +442,9 @@ void Blob::StoreDataObject(const FunctionCallbackInfo<Value>& args) {
Utf8Value type(isolate, args[3]);

binding_data->store_data_object(
std::string(*key, key.length()),
key.ToString(),
BlobBindingData::StoredDataObject(
BaseObjectPtr<Blob>(blob),
length,
std::string(*type, type.length())));
BaseObjectPtr<Blob>(blob), length, type.ToString()));
}

// Note: applying the V8 Fast API to the following function does not produce
Expand Down Expand Up @@ -486,7 +484,7 @@ void Blob::GetDataObject(const FunctionCallbackInfo<Value>& 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<Value> type;
if (!String::NewFromUtf8(isolate,
Expand Down
4 changes: 2 additions & 2 deletions src/node_contextify.cc
Original file line number Diff line number Diff line change
Expand Up @@ -284,10 +284,10 @@ ContextifyContext* ContextifyContext::New(Local<Context> 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;
Expand Down
4 changes: 2 additions & 2 deletions src/node_errors.h
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
Expand Down
2 changes: 1 addition & 1 deletion src/node_messaging.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1368,7 +1368,7 @@ std::unique_ptr<TransferData> JSTransferable::TransferOrClone() const {
}
Utf8Value deserialize_info_str(env()->isolate(), deserialize_info);
if (*deserialize_info_str == nullptr) return {};
return std::make_unique<Data>(*deserialize_info_str,
return std::make_unique<Data>(deserialize_info_str.ToString(),
Global<Value>(env()->isolate(), data));
}

Expand Down
2 changes: 1 addition & 1 deletion src/quic/defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
Loading