fix: -Wunsafe-buffer-usage warnings in WebFrameRenderer::ExecuteJavaScript() (31-x-y) (#44100)

fix: -Wunsafe-buffer-usage warnings in WebFrameRenderer::ExecuteJavaScript() (#44053)

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] 2024-10-02 20:46:47 -05:00 committed by GitHub
parent daca2d327f
commit 6da785fd10
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -9,7 +9,7 @@
#include <utility> #include <utility>
#include <vector> #include <vector>
#include "base/command_line.h" #include "base/containers/span.h"
#include "base/memory/memory_pressure_listener.h" #include "base/memory/memory_pressure_listener.h"
#include "base/strings/utf_string_conversions.h" #include "base/strings/utf_string_conversions.h"
#include "components/spellcheck/renderer/spellcheck.h" #include "components/spellcheck/renderer/spellcheck.h"
@ -656,7 +656,7 @@ class WebFrameRenderer final : public gin::Wrappable<WebFrameRenderer>,
std::move(completion_callback)); std::move(completion_callback));
render_frame->GetWebFrame()->RequestExecuteScript( render_frame->GetWebFrame()->RequestExecuteScript(
blink::DOMWrapperWorld::kMainWorldId, base::make_span(&source, 1u), blink::DOMWrapperWorld::kMainWorldId, base::span_from_ref(source),
has_user_gesture ? blink::mojom::UserActivationOption::kActivate has_user_gesture ? blink::mojom::UserActivationOption::kActivate
: blink::mojom::UserActivationOption::kDoNotActivate, : blink::mojom::UserActivationOption::kDoNotActivate,
blink::mojom::EvaluationTiming::kSynchronous, blink::mojom::EvaluationTiming::kSynchronous,