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

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

StrFormat() understands std::string, std::string_view

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
This commit is contained in:
trop[bot] 2025-06-26 11:41:48 -05:00 committed by GitHub
commit 4268bf91e4
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);
}