refactor: remove stray .c_str() calls for absl::StrFormat() (#47548)

refactor: remove stray .c_str() calls for absl::StrFormat()

StrFormat() understands std::string, std::string_view
This commit is contained in:
Charles Kerr 2025-06-26 04:41:30 -05:00 committed by GitHub
commit f50ad3d022
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 27 additions and 34 deletions

View file

@ -1499,9 +1499,8 @@ v8::Local<v8::Value> Session::ClearData(gin_helper::ErrorThrower thrower,
// Opaque origins cannot be used with this API
if (origin.opaque()) {
thrower.ThrowError(
absl::StrFormat("Invalid origin: '%s'",
origin_url.possibly_invalid_spec().c_str()));
thrower.ThrowError(absl::StrFormat(
"Invalid origin: '%s'", origin_url.possibly_invalid_spec()));
return v8::Undefined(isolate);
}