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

Unified Diff: ppapi/proxy/ppb_message_loop_proxy.cc

Issue 12045093: PPAPI: Add locking for PPB_MessageLoop (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Just the message loop locking Created 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/ppb_message_loop_proxy.cc
diff --git a/ppapi/proxy/ppb_message_loop_proxy.cc b/ppapi/proxy/ppb_message_loop_proxy.cc
index c0e9ae174da68d63a333206b30a9e62698c864c6..0062fb7a84f937fa365eae675da6f431f5789d73 100644
--- a/ppapi/proxy/ppb_message_loop_proxy.cc
+++ b/ppapi/proxy/ppb_message_loop_proxy.cc
@@ -198,6 +198,7 @@ void MessageLoopResource::ReleaseMessageLoop(void* value) {
// -----------------------------------------------------------------------------
PP_Resource Create(PP_Instance instance) {
+ ProxyAutoLock lock;
// Validate the instance.
PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance(instance);
if (!dispatcher)
@@ -206,10 +207,12 @@ PP_Resource Create(PP_Instance instance) {
}
PP_Resource GetForMainThread() {
+ ProxyAutoLock lock;
return PluginGlobals::Get()->loop_for_main_thread()->GetReference();
}
PP_Resource GetCurrent() {
+ ProxyAutoLock lock;
Resource* resource = MessageLoopResource::GetCurrent();
if (resource)
return resource->GetReference();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698