Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(590)

Unified Diff: third_party/WebKit/Source/modules/fetch/DataConsumerTeeTest.cpp

Issue 1925583003: Replace AllowCrossThreadAccess() + non-GCed pointers with crossThreadUnretained() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Kuroneko_4
Patch Set: Rebase. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/fetch/DataConsumerTeeTest.cpp
diff --git a/third_party/WebKit/Source/modules/fetch/DataConsumerTeeTest.cpp b/third_party/WebKit/Source/modules/fetch/DataConsumerTeeTest.cpp
index dfa3d1cba25c3e316fda3f7d8a84c74773944b05..b4ad821ae56db0de9f715fb0d1af4fe953abba1c 100644
--- a/third_party/WebKit/Source/modules/fetch/DataConsumerTeeTest.cpp
+++ b/third_party/WebKit/Source/modules/fetch/DataConsumerTeeTest.cpp
@@ -59,7 +59,7 @@ public:
{
m_thread = wrapUnique(new Thread("src thread", Thread::WithExecutionContext));
m_waitableEvent = wrapUnique(new WaitableEvent());
- m_thread->thread()->postTask(BLINK_FROM_HERE, threadSafeBind(&TeeCreationThread<Handle>::runInternal, AllowCrossThreadAccess(this), passed(std::move(src)), AllowCrossThreadAccess(dest1), AllowCrossThreadAccess(dest2)));
+ m_thread->thread()->postTask(BLINK_FROM_HERE, threadSafeBind(&TeeCreationThread<Handle>::runInternal, crossThreadUnretained(this), passed(std::move(src)), crossThreadUnretained(dest1), crossThreadUnretained(dest2)));
m_waitableEvent->wait();
}
@@ -214,7 +214,7 @@ TEST(DataConsumerTeeTest, StopSource)
// We can pass a raw pointer because the subsequent |wait| calls ensure
// t->thread() is alive.
- t->getThread()->thread()->postTask(BLINK_FROM_HERE, threadSafeBind(postStop, AllowCrossThreadAccess(t->getThread())));
+ t->getThread()->thread()->postTask(BLINK_FROM_HERE, threadSafeBind(postStop, crossThreadUnretained(t->getThread())));
std::unique_ptr<HandleReadResult> res1 = r1.wait();
std::unique_ptr<HandleReadResult> res2 = r2.wait();

Powered by Google App Engine
This is Rietveld 408576698