RESOLVED FIXED 140019
Move scrolling code off of WTF::bind
https://bugs.webkit.org/show_bug.cgi?id=140019
Summary Move scrolling code off of WTF::bind
Sam Weinig
Reported 2014-12-31 13:13:22 PST
Move scolling code off of WTF::bind
Attachments
Patch (14.19 KB, patch)
2014-12-31 13:15 PST, Sam Weinig
darin: review+
Sam Weinig
Comment 1 2014-12-31 13:15:32 PST
Darin Adler
Comment 2 2014-12-31 20:52:05 PST
Comment on attachment 243852 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=243852&action=review > Source/WebCore/page/scrolling/ThreadedScrollingTree.cpp:62 > + RefPtr<ThreadedScrollingTree> threadedScrollingTree(this); Can this be Ref instead of RefPtr? > Source/WebCore/page/scrolling/ThreadedScrollingTree.cpp:106 > + RefPtr<AsyncScrollingCoordinator> scrollingCoordinator = m_scrollingCoordinator; Can this be Ref instead of RefPtr? > Source/WebCore/page/scrolling/ThreadedScrollingTree.cpp:120 > + RefPtr<AsyncScrollingCoordinator> scrollingCoordinator = m_scrollingCoordinator; Can this be Ref instead of RefPtr? > Source/WebCore/page/scrolling/ios/ScrollingTreeIOS.cpp:89 > + RefPtr<AsyncScrollingCoordinator> scrollingCoordinator = m_scrollingCoordinator; Can this be Ref instead of RefPtr? > Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.mm:74 > RefPtr<ThreadedScrollingTree> scrollingTree = static_pointer_cast<ThreadedScrollingTree>(releaseScrollingTree()); Can this be Ref instead of RefPtr? > Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.mm:97 > + RefPtr<ThreadedScrollingTree> threadedScrollingTree = downcast<ThreadedScrollingTree>(scrollingTree()); Can this be Ref instead of RefPtr? > Source/WebCore/platform/MemoryPressureHandler.cpp:146 > + ScrollingThread::dispatch([] { > + WTF::releaseFastMallocFreeMemory(); > + }); Does this work? ScrollingThread::dispatch(WTF::releaseFastMallocFreeMemory); If not, why not? > Source/WebKit2/WebProcess/WebPage/EventDispatcher.cpp:149 > + RefPtr<EventDispatcher> eventDispatcher(this); Can this be Ref instead of RefPtr? > Source/WebKit2/WebProcess/WebPage/EventDispatcher.cpp:192 > + RefPtr<EventDispatcher> eventDispatcher(this); Can this be Ref instead of RefPtr? > Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:195 > + RefPtr<ScrollingTree> scrollingTree = scrollingCoordinator->scrollingTree(); Can this be Ref instead of RefPtr?
Sam Weinig
Comment 3 2014-12-31 23:24:08 PST
I don't think they can be Refs, since Ref doesn't have a copy constructor. When we have new enough compilers, we should be able to use Refs and move them into the lambda (using the fun [std::move(refVariable)] syntax), but I don't think we can do that right now.
Sam Weinig
Comment 4 2015-01-01 13:20:20 PST
Note You need to log in before you can comment on or make changes to this bug.