https://bugs.webkit.org/show_bug.cgi?id=134117
authorbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Jun 2014 23:44:01 +0000 (23:44 +0000)
committerbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Jun 2014 23:44:01 +0000 (23:44 +0000)
commit9b445443e39ef6489eca4878b7481300738f91ac
treefdae4de67a17fbb1167429267ac84687ab058ac7
parent757ab686a4b8e4fad679300c6171692fba19002c
https://bugs.webkit.org/show_bug.cgi?id=134117
Unreproducible crashes under WebCore::ScrollingTree::updateTreeFromStateNode()
from messaging a deleted Obj-C object
-and corresponding-
<rdar://problem/17149252>

Reviewed by Simon Fraser.

This is a speculative fix. It makes LayerRepresentation retain m_platformLayer.

* WebCore.exp.in:
* page/scrolling/ScrollingStateNode.h:
(WebCore::LayerRepresentation::LayerRepresentation):
(WebCore::LayerRepresentation::~LayerRepresentation):
(WebCore::LayerRepresentation::operator=):
(WebCore::LayerRepresentation::operator==):
(WebCore::LayerRepresentation::operator ==): Deleted.

Make this ASSERT an ASSERT_WITH_SECURITY_IMPLICATION
* page/scrolling/ScrollingTree.cpp:
(WebCore::ScrollingTree::updateTreeFromStateNode):

Moved ScrollingStateNodeMac.mm, which was empty anyway, to cocoa/
ScrollingStateNode.mm so that iOS can use it too.
* page/scrolling/cocoa: Added.
* page/scrolling/cocoa/ScrollingStateNode.mm: Copied from page/scrolling/mac/ScrollingStateNodeMac.mm.

Actual implementation for retain and release.
(WebCore::LayerRepresentation::retainPlatformLayer):
(WebCore::LayerRepresentation::releasePlatformLayer):

Deleted.
* page/scrolling/mac/ScrollingStateNodeMac.mm: Removed.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170224 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/page/scrolling/ScrollingStateNode.h
Source/WebCore/page/scrolling/ScrollingTree.cpp
Source/WebCore/page/scrolling/cocoa/ScrollingStateNode.mm [moved from Source/WebCore/page/scrolling/mac/ScrollingStateNodeMac.mm with 89% similarity]