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

Unified Diff: third_party/WebKit/Source/core/html/parser/HTMLParserThread.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/html/parser/HTMLParserThread.cpp
diff --git a/third_party/WebKit/Source/core/html/parser/HTMLParserThread.cpp b/third_party/WebKit/Source/core/html/parser/HTMLParserThread.cpp
index 8740657804fba49e9ec11152027a30165dedc36a..de82e2937513e03cc8faaa22436b9b45b2e6276c 100644
--- a/third_party/WebKit/Source/core/html/parser/HTMLParserThread.cpp
+++ b/third_party/WebKit/Source/core/html/parser/HTMLParserThread.cpp
@@ -67,7 +67,7 @@ void HTMLParserThread::shutdown()
// currentThread will always be non-null in production, but can be null in Chromium unit tests.
if (Platform::current()->currentThread() && s_sharedThread->m_thread) {
WaitableEvent waitableEvent;
- s_sharedThread->postTask(threadSafeBind(&HTMLParserThread::cleanupHTMLParserThread, AllowCrossThreadAccess(s_sharedThread), AllowCrossThreadAccess(&waitableEvent)));
+ s_sharedThread->postTask(threadSafeBind(&HTMLParserThread::cleanupHTMLParserThread, crossThreadUnretained(s_sharedThread), crossThreadUnretained(&waitableEvent)));
SafePointScope scope(BlinkGC::HeapPointersOnStack);
waitableEvent.wait();
}
@@ -91,7 +91,7 @@ void HTMLParserThread::postTask(std::unique_ptr<CrossThreadClosure> closure)
ASSERT(isMainThread());
if (!m_thread) {
m_thread = WebThreadSupportingGC::create("HTMLParserThread");
- postTask(threadSafeBind(&HTMLParserThread::setupHTMLParserThread, AllowCrossThreadAccess(this)));
+ postTask(threadSafeBind(&HTMLParserThread::setupHTMLParserThread, crossThreadUnretained(this)));
}
m_thread->postTask(BLINK_FROM_HERE, std::move(closure));

Powered by Google App Engine
This is Rietveld 408576698