Skip to content

Commit 9474594

Browse files
committed
Fix stack-use-after-scope in EmbedderTest.PushingMutlipleFrames*
1 parent 8f08a86 commit 9474594

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

shell/platform/embedder/tests/embedder_unittests_gl.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2018,7 +2018,8 @@ TEST_F(EmbedderTest,
20182018

20192019
constexpr size_t frames_expected = 10;
20202020
fml::CountDownLatch frame_latch(frames_expected);
2021-
size_t frames_seen = 0;
2021+
static size_t frames_seen;
2022+
frames_seen = 0;
20222023
context.AddNativeCallback("SignalNativeTest",
20232024
CREATE_NATIVE_ENTRY([&](Dart_NativeArguments args) {
20242025
frames_seen++;
@@ -2056,7 +2057,8 @@ TEST_F(EmbedderTest,
20562057

20572058
constexpr size_t frames_expected = 10;
20582059
fml::CountDownLatch frame_latch(frames_expected);
2059-
size_t frames_seen = 0;
2060+
static size_t frames_seen;
2061+
frames_seen = 0;
20602062
context.AddNativeCallback("SignalNativeTest",
20612063
CREATE_NATIVE_ENTRY([&](Dart_NativeArguments args) {
20622064
frames_seen++;

0 commit comments

Comments
 (0)