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

Unified Diff: third_party/WebKit/Source/core/loader/ThreadableLoaderTest.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/core/loader/ThreadableLoaderTest.cpp
diff --git a/third_party/WebKit/Source/core/loader/ThreadableLoaderTest.cpp b/third_party/WebKit/Source/core/loader/ThreadableLoaderTest.cpp
index 39e72b0fb4bbdb5382bab440a9244e0bb628f599..1ee913c9a8af0a068891da54bc8edbb04bda1d58 100644
--- a/third_party/WebKit/Source/core/loader/ThreadableLoaderTest.cpp
+++ b/third_party/WebKit/Source/core/loader/ThreadableLoaderTest.cpp
@@ -163,9 +163,9 @@ public:
std::unique_ptr<WaitableEvent> completionEvent = wrapUnique(new WaitableEvent());
postTaskToWorkerGlobalScope(createCrossThreadTask(
&WorkerThreadableLoaderTestHelper::workerCreateLoader,
- AllowCrossThreadAccess(this),
- AllowCrossThreadAccess(client),
- AllowCrossThreadAccess(completionEvent.get()),
+ crossThreadUnretained(this),
+ crossThreadUnretained(client),
+ crossThreadUnretained(completionEvent.get()),
crossOriginRequestPolicy));
completionEvent->wait();
}
@@ -175,8 +175,8 @@ public:
std::unique_ptr<WaitableEvent> completionEvent = wrapUnique(new WaitableEvent());
postTaskToWorkerGlobalScope(createCrossThreadTask(
&WorkerThreadableLoaderTestHelper::workerStartLoader,
- AllowCrossThreadAccess(this),
- AllowCrossThreadAccess(completionEvent.get()),
+ crossThreadUnretained(this),
+ crossThreadUnretained(completionEvent.get()),
request));
completionEvent->wait();
}
@@ -209,8 +209,8 @@ public:
std::unique_ptr<WaitableEvent> completionEvent = wrapUnique(new WaitableEvent());
postTaskToWorkerGlobalScope(createCrossThreadTask(
&WorkerThreadableLoaderTestHelper::workerCallCheckpoint,
- AllowCrossThreadAccess(this),
- AllowCrossThreadAccess(completionEvent.get()),
+ crossThreadUnretained(this),
+ crossThreadUnretained(completionEvent.get()),
n));
completionEvent->wait();
}
@@ -235,7 +235,7 @@ public:
void onTearDown() override
{
- postTaskToWorkerGlobalScope(createCrossThreadTask(&WorkerThreadableLoaderTestHelper::clearLoader, AllowCrossThreadAccess(this)));
+ postTaskToWorkerGlobalScope(createCrossThreadTask(&WorkerThreadableLoaderTestHelper::clearLoader, crossThreadUnretained(this)));
m_workerThread->terminateAndWait();
// Needed to clean up the things on the main thread side and

Powered by Google App Engine
This is Rietveld 408576698