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

Unified Diff: third_party/WebKit/Source/wtf/ThreadSpecific.h

Issue 2309153002: Remove RenderThreadImpl::Shutdown (Closed)
Patch Set: temp Created 3 years, 11 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/wtf/ThreadSpecific.h
diff --git a/third_party/WebKit/Source/wtf/ThreadSpecific.h b/third_party/WebKit/Source/wtf/ThreadSpecific.h
index 82f2144132138057f3ca924f9c1d4a1ae370fb75..5d7f6d26a9eba250c76907a791b1e34b80de2c5d 100644
--- a/third_party/WebKit/Source/wtf/ThreadSpecific.h
+++ b/third_party/WebKit/Source/wtf/ThreadSpecific.h
@@ -224,7 +224,9 @@ inline void ThreadSpecific<T>::set(T* ptr) {
template <typename T>
inline void ThreadSpecific<T>::destroy(void* ptr) {
- if (isShutdown())
+ // Never call destructors on the main thread.
+ // This is fine because Blink no longer has a graceful shutdown sequence.
+ if (isMainThread())
return;
Data* data = static_cast<Data*>(ptr);
« content/renderer/render_thread_impl.cc ('K') | « content/renderer/render_thread_impl_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698