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

Unified Diff: base/message_loop_proxy_impl.cc

Issue 5242002: Reland 66791 (change was innocent)... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 1 month 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
« no previous file with comments | « base/lazy_instance.h ('k') | base/platform_thread_posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/message_loop_proxy_impl.cc
===================================================================
--- base/message_loop_proxy_impl.cc (revision 66806)
+++ base/message_loop_proxy_impl.cc (working copy)
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "base/message_loop_proxy_impl.h"
+#include "base/thread_restrictions.h"
namespace base {
@@ -45,6 +46,11 @@
}
bool MessageLoopProxyImpl::BelongsToCurrentThread() {
+ // We shouldn't use MessageLoop::current() since it uses LazyInstance which
+ // may be deleted by ~AtExitManager when a WorkerPool thread calls this
+ // function.
+ // http://crbug.com/63678
+ base::ThreadRestrictions::ScopedAllowSingleton allow_singleton;
AutoLock lock(message_loop_lock_);
return (target_message_loop_ &&
(MessageLoop::current() == target_message_loop_));
@@ -98,4 +104,3 @@
}
} // namespace base
-
« no previous file with comments | « base/lazy_instance.h ('k') | base/platform_thread_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698