build: match upstream with unsafe buffer paths (#45853)

* build: match upstream with unsafe buffer paths

* Don't assume STL iterators are pointers

Refs https://issues.chromium.org/issues/328308661

* chore: spanify process_singleton_win.cc
This commit is contained in:
Robo 2025-03-07 06:04:18 +09:00 committed by GitHub
parent d987bee007
commit 041ada1586
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 44 additions and 126 deletions

View file

@ -568,7 +568,7 @@ gin::Handle<SimpleURLLoaderWrapper> SimpleURLLoaderWrapper::Create(
{"no-cors", Val::kNoCors},
{"same-origin", Val::kSameOrigin},
});
if (auto* iter = Lookup.find(mode); iter != Lookup.end())
if (auto iter = Lookup.find(mode); iter != Lookup.end())
request->mode = iter->second;
}
@ -597,7 +597,7 @@ gin::Handle<SimpleURLLoaderWrapper> SimpleURLLoaderWrapper::Create(
{"worker", Val::kWorker},
{"xslt", Val::kXslt},
});
if (auto* iter = Lookup.find(destination); iter != Lookup.end())
if (auto iter = Lookup.find(destination); iter != Lookup.end())
request->destination = iter->second;
}

View file

@ -224,7 +224,7 @@ bool FromV8WithLookup(v8::Isolate* isolate,
if (key_transform)
key_transform(key);
if (const auto* iter = table.find(key); iter != table.end()) {
if (auto iter = table.find(key); iter != table.end()) {
*out = iter->second;
return true;
}

View file

@ -108,7 +108,7 @@ CodeAndShiftedChar KeyboardCodeFromKeyIdentifier(const std::string_view str) {
{"volumeup", {ui::VKEY_VOLUME_UP, {}}},
});
if (auto* const iter = Lookup.find(str); iter != Lookup.end())
if (auto iter = Lookup.find(str); iter != Lookup.end())
return iter->second;
return {ui::VKEY_UNKNOWN, {}};