Changeset 248445 in webkit
- Timestamp:
- Aug 8, 2019, 3:10:36 PM (7 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
-
ChangeLog (modified) (1 diff)
-
page/scrolling/ScrollingStateNode.cpp (modified) (1 diff)
-
page/scrolling/ScrollingStateNode.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r248444 r248445 1 2019-08-08 Chris Dumez <cdumez@apple.com> 2 3 ScrollingStateNode is not ThreadSafeRefCounted but is ref'd / deref'd from several threads 4 https://bugs.webkit.org/show_bug.cgi?id=200545 5 6 Reviewed by Antti Koivisto. 7 8 The ScrollingStateTree and its ScrollingStateNodes are being passed to the scrolling thread. 9 ScrollingStateNode is not ThreadSafeRefCounted, which is potentially unsafe. Make it 10 ThreadSafeRefCounted for safety in this patch given that using RefCounted here is either 11 wrong or fragile. 12 13 * page/scrolling/ScrollingStateNode.h: 14 1 15 2019-08-08 Brent Fulgham <bfulgham@apple.com> 2 16 -
trunk/Source/WebCore/page/scrolling/ScrollingStateNode.cpp
r247734 r248445 55 55 setLayer(stateNode.layer().toRepresentation(adoptiveTree.preferredLayerRepresentation())); 56 56 57 relaxAdoptionRequirement();58 57 scrollingStateTree().addNode(*this); 59 58 } -
trunk/Source/WebCore/page/scrolling/ScrollingStateNode.h
r246723 r248445 31 31 #include "ScrollingCoordinator.h" 32 32 #include <stdint.h> 33 #include <wtf/ RefCounted.h>33 #include <wtf/ThreadSafeRefCounted.h> 34 34 #include <wtf/TypeCasts.h> 35 35 #include <wtf/Vector.h> … … 181 181 }; 182 182 183 class ScrollingStateNode : public RefCounted<ScrollingStateNode> {183 class ScrollingStateNode : public ThreadSafeRefCounted<ScrollingStateNode> { 184 184 WTF_MAKE_FAST_ALLOCATED; 185 185 public: 186 ScrollingStateNode(ScrollingNodeType, ScrollingStateTree&, ScrollingNodeID);187 186 virtual ~ScrollingStateNode(); 188 187 … … 249 248 protected: 250 249 ScrollingStateNode(const ScrollingStateNode&, ScrollingStateTree&); 250 ScrollingStateNode(ScrollingNodeType, ScrollingStateTree&, ScrollingNodeID); 251 251 252 252 virtual void dumpProperties(WTF::TextStream&, ScrollingStateTreeAsTextBehavior) const;
Note:
See TracChangeset
for help on using the changeset viewer.