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

Unified Diff: content/renderer/pepper/host_globals.cc

Issue 19492014: PPAPI: Purposely leak ProxyLock, fix shutdown race (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove static initializer Created 7 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
Index: content/renderer/pepper/host_globals.cc
diff --git a/content/renderer/pepper/host_globals.cc b/content/renderer/pepper/host_globals.cc
index 64a989ca616f0c6a39fe788c4d26af964e7fdf7b..e35ea320791e69d22e1c562896e1be44261028ec 100644
--- a/content/renderer/pepper/host_globals.cc
+++ b/content/renderer/pepper/host_globals.cc
@@ -17,6 +17,7 @@
#include "content/renderer/render_thread_impl.h"
#include "ppapi/shared_impl/api_id.h"
#include "ppapi/shared_impl/id_assignment.h"
+#include "ppapi/shared_impl/proxy_lock.h"
#include "third_party/WebKit/public/platform/WebString.h"
#include "third_party/WebKit/public/web/WebConsoleMessage.h"
#include "third_party/WebKit/public/web/WebDocument.h"
@@ -81,13 +82,9 @@ HostGlobals::HostGlobals()
resource_tracker_(ResourceTracker::SINGLE_THREADED) {
DCHECK(!host_globals_);
host_globals_ = this;
-}
-
-HostGlobals::HostGlobals(
- ppapi::PpapiGlobals::PerThreadForTest per_thread_for_test)
- : ppapi::PpapiGlobals(per_thread_for_test),
- resource_tracker_(ResourceTracker::SINGLE_THREADED) {
- DCHECK(!host_globals_);
+ // We do not support calls off of the main thread on the host side, and thus
+ // do not lock.
+ ppapi::ProxyLock::DisableLocking();
}
HostGlobals::~HostGlobals() {
@@ -141,11 +138,6 @@ void HostGlobals::PreCacheFontForFlash(const void* logfontw) {
// Not implemented in-process.
}
-base::Lock* HostGlobals::GetProxyLock() {
- // We do not lock on the host side.
- return NULL;
-}
-
void HostGlobals::LogWithSource(PP_Instance instance,
PP_LogLevel level,
const std::string& source,
« no previous file with comments | « content/renderer/pepper/host_globals.h ('k') | content/renderer/pepper/pepper_file_chooser_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698