Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions engine/src/flutter/ci/builders/linux_unopt.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"debug",
"--unoptimized",
"--prebuilt-dart-sdk",
"--asan",
"--dart-debug",
"--rbe",
"--no-goma"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,10 @@ std::atomic_size_t EmbedderTestTaskRunner::sEmbedderTaskRunnerIdentifiers = {};

TEST_F(EmbedderTest, CanSpecifyCustomUITaskRunner) {
auto& context = GetEmbedderContext<EmbedderTestContextSoftware>();
auto ui_task_runner = CreateNewThread("test_ui_thread");
auto platform_task_runner = CreateNewThread("test_platform_thread");
auto ui_thread = std::make_unique<fml::Thread>("test_ui_thread");
auto ui_task_runner = ui_thread->GetTaskRunner();
auto platform_thread = std::make_unique<fml::Thread>("test_platform_thread");
auto platform_task_runner = platform_thread->GetTaskRunner();
static std::mutex engine_mutex;
UniqueEngine engine;

Expand Down Expand Up @@ -267,6 +269,12 @@ TEST_F(EmbedderTest, CanSpecifyCustomUITaskRunner) {
platform_task_runner->PostTask([&kill_latch] { kill_latch.Signal(); });
});
kill_latch.Wait();

// Shut down the threads before exiting the test. There may still be
// pending tasks queued to the task runners, and they must not run
// after the engine goes out of scope.
ui_thread.reset();
platform_thread.reset();
}

TEST_F(EmbedderTest, IgnoresStaleTasks) {
Expand Down
3 changes: 3 additions & 0 deletions engine/src/flutter/testing/lsan_suppressions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,6 @@ leak:egl::*

# False positives in libfontconfig. http://crbug.com/39050
leak:libfontconfig

# False positives in D-Bus.
leak:libdbus-1.so