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

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: test cleanup Created 7 years, 5 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 78790e1568e795a45a183c65880b738934404c46..7cea83e494f18747b229c193e9a34914742bebc2 100644
--- a/content/renderer/pepper/host_globals.cc
+++ b/content/renderer/pepper/host_globals.cc
@@ -15,6 +15,7 @@
#include "content/renderer/pepper/plugin_module.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"
@@ -80,13 +81,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() {
@@ -140,11 +137,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,

Powered by Google App Engine
This is Rietveld 408576698