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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/CompositorMutatorClient.h

Issue 2702243003: Disallow cross-thread Persistent<> read access. (Closed)
Patch Set: rebased upto r451733 Created 3 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CompositorMutatorClient_h 5 #ifndef CompositorMutatorClient_h
6 #define CompositorMutatorClient_h 6 #define CompositorMutatorClient_h
7 7
8 #include "platform/PlatformExport.h" 8 #include "platform/PlatformExport.h"
9 #include "platform/heap/Handle.h" 9 #include "platform/heap/Handle.h"
10 #include "public/platform/WebCompositorMutatorClient.h" 10 #include "public/platform/WebCompositorMutatorClient.h"
(...skipping 18 matching lines...) Expand all
29 void SetClient(cc::LayerTreeMutatorClient*) override; 29 void SetClient(cc::LayerTreeMutatorClient*) override;
30 base::Closure TakeMutations() override; 30 base::Closure TakeMutations() override;
31 31
32 CompositorMutator* mutator() { return m_mutator.get(); } 32 CompositorMutator* mutator() { return m_mutator.get(); }
33 33
34 void setMutationsForTesting(std::unique_ptr<CompositorMutations>); 34 void setMutationsForTesting(std::unique_ptr<CompositorMutations>);
35 35
36 private: 36 private:
37 cc::LayerTreeMutatorClient* m_client; 37 cc::LayerTreeMutatorClient* m_client;
38 CompositorMutationsTarget* m_mutationsTarget; 38 CompositorMutationsTarget* m_mutationsTarget;
39 Persistent<CompositorMutator> m_mutator; 39 // Accessed by main and compositor threads.
40 CrossThreadPersistent<CompositorMutator> m_mutator;
40 std::unique_ptr<CompositorMutations> m_mutations; 41 std::unique_ptr<CompositorMutations> m_mutations;
41 }; 42 };
42 43
43 } // namespace blink 44 } // namespace blink
44 45
45 #endif // CompositorMutatorClient_h 46 #endif // CompositorMutatorClient_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/exported/WebScrollbarImpl.h ('k') | third_party/WebKit/Source/platform/heap/Persistent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698