fix: -Wunsafe-buffer-usage warnings in AddComponentResourceEntries() (#44024)

fix: -Wunsafe-buffer-usage warnings in ElectronComponentExtensionResourceManager::AddComponentResourceEntries()

just replace pointer-and-length args with a span
This commit is contained in:
Charles Kerr 2024-09-30 11:01:24 -05:00 committed by GitHub
parent 77f7ba96ca
commit 1d4b86cb3e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 12 deletions

View file

@ -10,6 +10,7 @@
#include <map>
#include <string>
#include "base/containers/span.h"
#include "base/files/file_path.h"
#include "extensions/browser/component_extension_resource_manager.h"
#include "ui/base/webui/resource_path.h"
@ -38,8 +39,8 @@ class ElectronComponentExtensionResourceManager
const std::string& extension_id) const override;
private:
void AddComponentResourceEntries(const webui::ResourcePath* entries,
size_t size);
void AddComponentResourceEntries(
base::span<const webui::ResourcePath> entries);
// A map from a resource path to the resource ID. Used by
// IsComponentExtensionResource.