Remove std::vector<const T>s in sandbox/
We can make the vector itself const and not lose any guarantees. No behavior change. Bug: 323708866 Change-Id: Icae5232e2ba6b9ff63d21e07a6767ae120c9a776 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5273483 Reviewed-by: Alex Gough <ajgo@chromium.org> Auto-Submit: Nico Weber <thakis@chromium.org> Commit-Queue: Alex Gough <ajgo@chromium.org> Cr-Commit-Position: refs/heads/main@{#1257015}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
3965be1c44
commit
0571795076
sandbox/win/src
@ -786,7 +786,7 @@ void PolicyBase::AddDelegateData(base::span<const uint8_t> data) {
|
||||
// Can only set this once - as there is only one region sent to the child.
|
||||
CHECK(!delegate_data_);
|
||||
delegate_data_ =
|
||||
std::make_unique<std::vector<const uint8_t>>(data.begin(), data.end());
|
||||
std::make_unique<std::vector<uint8_t>>(data.begin(), data.end());
|
||||
}
|
||||
|
||||
} // namespace sandbox
|
||||
|
@ -238,7 +238,7 @@ class PolicyBase final : public TargetPolicy {
|
||||
HANDLE stdout_handle_;
|
||||
HANDLE stderr_handle_;
|
||||
// An opaque blob of data the delegate uses to prime any pre-sandbox hooks.
|
||||
std::unique_ptr<std::vector<const uint8_t>> delegate_data_;
|
||||
std::unique_ptr<const std::vector<uint8_t>> delegate_data_;
|
||||
|
||||
std::unique_ptr<Dispatcher> dispatcher_;
|
||||
|
||||
|
Reference in New Issue
Block a user