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

Unified Diff: ppapi/proxy/plugin_globals.cc

Issue 566243004: Revert of PPAPI: Fix GetBrowserInterface race conditions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « ppapi/proxy/plugin_globals.h ('k') | ppapi/proxy/ppapi_proxy_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/plugin_globals.cc
diff --git a/ppapi/proxy/plugin_globals.cc b/ppapi/proxy/plugin_globals.cc
index b372207c6f00e124ffbc250eebec3ba34b6f89ff..82e16ffe328582f2a5bade188fad7057d1e4e4be 100644
--- a/ppapi/proxy/plugin_globals.cc
+++ b/ppapi/proxy/plugin_globals.cc
@@ -192,8 +192,11 @@
}
IPC::Sender* PluginGlobals::GetBrowserSender() {
- // CAUTION: This function is called without the ProxyLock. See also
- // InterfaceList::GetInterfaceForPPB.
+ if (!browser_sender_.get()) {
+ browser_sender_.reset(
+ new BrowserSender(plugin_proxy_delegate_->GetBrowserSender()));
+ }
+
return browser_sender_.get();
}
@@ -214,12 +217,6 @@
connection, instance, desc, prefs);
}
-void PluginGlobals::SetPluginProxyDelegate(PluginProxyDelegate* delegate) {
- plugin_proxy_delegate_ = delegate;
- browser_sender_.reset(
- new BrowserSender(plugin_proxy_delegate_->GetBrowserSender()));
-}
-
MessageLoopResource* PluginGlobals::loop_for_main_thread() {
return loop_for_main_thread_.get();
}
« no previous file with comments | « ppapi/proxy/plugin_globals.h ('k') | ppapi/proxy/ppapi_proxy_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698