| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent df72dc9 commit d1fb8a5
6 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -19,7 +19,7 @@ inline std::unique_ptr<v8_inspector::StringBuffer> ToInspectorString( | |||
| 19 | 19 | inline protocol::String ToProtocolString(v8::Isolate* isolate, | |
| 20 | 20 | v8::Local<v8::Value> value) { | |
| 21 | 21 | Utf8Value buffer(isolate, value); | |
| 22 | - return *buffer; | ||
| 22 | + return buffer.ToString(); | ||
| 23 | 23 | } | |
| 24 | 24 | ||
| 25 | 25 | } // namespace node::inspector | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -439,11 +439,9 @@ void Blob::StoreDataObject(const FunctionCallbackInfo<Value>& args) { | |||
| 439 | 439 | Utf8Value type(isolate, args[3]); | |
| 440 | 440 | ||
| 441 | 441 | binding_data->store_data_object( | |
| 442 | - std::string(*key, key.length()), | ||
| 442 | + key.ToString(), | ||
| 443 | 443 | BlobBindingData::StoredDataObject( | |
| 444 | - BaseObjectPtr<Blob>(blob), | ||
| 445 | - length, | ||
| 446 | - std::string(*type, type.length()))); | ||
| 444 | + BaseObjectPtr<Blob>(blob), length, type.ToString())); | ||
| 447 | 445 | } | |
| 448 | 446 | ||
| 449 | 447 | // Note: applying the V8 Fast API to the following function does not produce | |
@@ -483,7 +481,7 @@ void Blob::GetDataObject(const FunctionCallbackInfo<Value>& args) { | |||
| 483 | 481 | Utf8Value key(isolate, args[0]); | |
| 484 | 482 | ||
| 485 | 483 | BlobBindingData::StoredDataObject stored = | |
| 486 | - binding_data->get_data_object(std::string(*key, key.length())); | ||
| 484 | + binding_data->get_data_object(key.ToString()); | ||
| 487 | 485 | if (stored.blob) { | |
| 488 | 486 | Local<Value> type; | |
| 489 | 487 | if (!String::NewFromUtf8(isolate, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -292,10 +292,10 @@ BaseObjectPtr<ContextifyContext> ContextifyContext::New( | |||
| 292 | 292 | options->allow_code_gen_wasm); | |
| 293 | 293 | ||
| 294 | 294 | Utf8Value name_val(env->isolate(), options->name); | |
| 295 | - ContextInfo info(*name_val); | ||
| 295 | + ContextInfo info(name_val.ToString()); | ||
| 296 | 296 | if (!options->origin.IsEmpty()) { | |
| 297 | 297 | Utf8Value origin_val(env->isolate(), options->origin); | |
| 298 | - info.origin = *origin_val; | ||
| 298 | + info.origin = origin_val.ToString(); | ||
| 299 | 299 | } | |
| 300 | 300 | ||
| 301 | 301 | BaseObjectPtr<ContextifyContext> result; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -268,12 +268,12 @@ inline void THROW_ERR_REQUIRE_ASYNC_MODULE( | |||
| 268 | 268 | if (!parent_filename.IsEmpty() && parent_filename->IsString()) { | |
| 269 | 269 | Utf8Value utf8(env->isolate(), parent_filename); | |
| 270 | 270 | message += "\n From "; | |
| 271 | - message += utf8.out(); | ||
| 271 | + message += utf8.ToStringView(); | ||
| 272 | 272 | } | |
| 273 | 273 | if (!filename.IsEmpty() && filename->IsString()) { | |
| 274 | 274 | Utf8Value utf8(env->isolate(), filename); | |
| 275 | 275 | message += "\n Requiring "; | |
| 276 | - message += +utf8.out(); | ||
| 276 | + message += utf8.ToStringView(); | ||
| 277 | 277 | } | |
| 278 | 278 | THROW_ERR_REQUIRE_ASYNC_MODULE(env, message.c_str()); | |
| 279 | 279 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1357,7 +1357,7 @@ std::unique_ptr<TransferData> JSTransferable::TransferOrClone() const { | |||
| 1357 | 1357 | } | |
| 1358 | 1358 | Utf8Value deserialize_info_str(env()->isolate(), deserialize_info); | |
| 1359 | 1359 | if (*deserialize_info_str == nullptr) return {}; | |
| 1360 | - return std::make_unique<Data>(*deserialize_info_str, | ||
| 1360 | + return std::make_unique<Data>(deserialize_info_str.ToString(), | ||
| 1361 | 1361 | Global<Value>(env()->isolate(), data)); | |
| 1362 | 1362 | } | |
| 1363 | 1363 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -39,7 +39,7 @@ bool SetOption(Environment* env, | |||
| 39 | 39 | if (!object->Get(env->context(), name).ToLocal(&value)) return false; | |
| 40 | 40 | if (!value->IsUndefined()) { | |
| 41 | 41 | Utf8Value utf8(env->isolate(), value); | |
| 42 | - options->*member = *utf8; | ||
| 42 | + options->*member = utf8.ToString(); | ||
| 43 | 43 | } | |
| 44 | 44 | return true; | |
| 45 | 45 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments