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

Unified Diff: third_party/WebKit/Source/web/CompositorProxyClientImpl.cpp

Issue 2774223002: CompositorWorkerProxyClientImpl to CompositorProxy cross thread reference is using WeakMember (Closed)
Patch Set: fix Created 3 years, 9 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: third_party/WebKit/Source/web/CompositorProxyClientImpl.cpp
diff --git a/third_party/WebKit/Source/web/CompositorProxyClientImpl.cpp b/third_party/WebKit/Source/web/CompositorProxyClientImpl.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..6a47bc784f0a49f6ba9e3f60abacd49762bc5fe8
--- /dev/null
+++ b/third_party/WebKit/Source/web/CompositorProxyClientImpl.cpp
@@ -0,0 +1,28 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "web/CompositorProxyClientImpl.h"
+
+#include "core/dom/CompositorProxy.h"
+
+namespace blink {
+
+DEFINE_TRACE(CompositorProxyClientImpl) {
+ visitor->trace(m_proxies);
+ CompositorProxyClient::trace(visitor);
+}
+
+void CompositorProxyClientImpl::registerCompositorProxy(
+ CompositorProxy* proxy) {
+ DCHECK(!isMainThread());
+ m_proxies.insert(proxy);
+}
+
+void CompositorProxyClientImpl::unregisterCompositorProxy(
+ CompositorProxy* proxy) {
+ DCHECK(!isMainThread());
+ m_proxies.erase(proxy);
+}
+
+} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698