<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[170451] trunk/Source</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/170451">170451</a></dd>
<dt>Author</dt> <dd>bdakin@apple.com</dd>
<dt>Date</dt> <dd>2014-06-25 17:51:05 -0700 (Wed, 25 Jun 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Crash in ScrollingTree::isRubberBandInProgress()
https://bugs.webkit.org/show_bug.cgi?id=134316
-and corresponding-
&lt;rdar://problem/16247911&gt;

Reviewed by Geoffrey Garen.


Source/WebCore: 
This crash appears to have been caused by http://trac.webkit.org/changeset/161276 
which moved the ScrollingNode creation code from ScrollingTree over to 
ScrollingCoordinator. This creates a thread safety issue. In the crashing case, we 
believe that the ScrollingCoordinator's ScrollingTree pointer had been null-ed out
even though the ScrollingTree was kept alive by the bind call to propagate 
commitNewTreeState() over to the scrolling thread. The fix is to move node 
creation back to the ScrollingTree and to use the this pointer to create new
nodes rather than the ScrollingCoordinator's ScrollingTree pointer.

Don't allow ScrollingCoordinator to handle ScrollingTreeNode creation.
* page/scrolling/AsyncScrollingCoordinator.h:

Re-name createNode to createScrollingTreeNode(). 
* page/scrolling/ScrollingTree.cpp:
(WebCore::ScrollingTree::updateTreeFromStateNode):
* page/scrolling/ScrollingTree.h:

Remove this implementation of createNode that called into the 
ScrollingCoordinator.
* page/scrolling/ThreadedScrollingTree.cpp:
(WebCore::ThreadedScrollingTree::createNode): Deleted.
* page/scrolling/ThreadedScrollingTree.h:

Don't allow ScrollingCoordinator to handle ScrollingTreeNode creation.
* page/scrolling/ios/ScrollingCoordinatorIOS.h:
* page/scrolling/ios/ScrollingCoordinatorIOS.mm:
(WebCore::ScrollingCoordinatorIOS::createScrollingTreeNode): Deleted.

Re-name createNode to createScrollingTreeNode, and actually create the nodes here.
* page/scrolling/ios/ScrollingTreeIOS.cpp:
(WebCore::ScrollingTreeIOS::createScrollingTreeNode):
(WebCore::ScrollingTreeIOS::createNode): Deleted.
* page/scrolling/ios/ScrollingTreeIOS.h:

Don't allow ScrollingCoordinator to handle ScrollingTreeNode creation.
* page/scrolling/mac/ScrollingCoordinatorMac.h:
* page/scrolling/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingCoordinatorMac::createScrollingTreeNode): Deleted.

Add the implementation of createScrollingTreeNode() for the Mac to 
ScrollingTreeMac since it can create Mac-specific nodes.
* page/scrolling/mac/ScrollingTreeMac.cpp:
(ScrollingTreeMac::createScrollingTreeNode):
* page/scrolling/mac/ScrollingTreeMac.h:

Source/WebKit2: 
Move all ScrollingTreeNode creation from ScrollingCoordinator subclasses into 
ScrollingTree subclasses.

* UIProcess/Scrolling/RemoteScrollingTree.cpp:
(WebKit::RemoteScrollingTree::createScrollingTreeNode):
(WebKit::RemoteScrollingTree::createNode): Deleted.
* UIProcess/Scrolling/RemoteScrollingTree.h:
* WebProcess/Scrolling/RemoteScrollingCoordinator.h:
* WebProcess/Scrolling/RemoteScrollingCoordinator.mm:
(WebKit::RemoteScrollingCoordinator::createScrollingTreeNode): Deleted.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorepagescrollingAsyncScrollingCoordinatorh">trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.h</a></li>
<li><a href="#trunkSourceWebCorepagescrollingScrollingTreecpp">trunk/Source/WebCore/page/scrolling/ScrollingTree.cpp</a></li>
<li><a href="#trunkSourceWebCorepagescrollingScrollingTreeh">trunk/Source/WebCore/page/scrolling/ScrollingTree.h</a></li>
<li><a href="#trunkSourceWebCorepagescrollingThreadedScrollingTreecpp">trunk/Source/WebCore/page/scrolling/ThreadedScrollingTree.cpp</a></li>
<li><a href="#trunkSourceWebCorepagescrollingThreadedScrollingTreeh">trunk/Source/WebCore/page/scrolling/ThreadedScrollingTree.h</a></li>
<li><a href="#trunkSourceWebCorepagescrollingiosScrollingCoordinatorIOSh">trunk/Source/WebCore/page/scrolling/ios/ScrollingCoordinatorIOS.h</a></li>
<li><a href="#trunkSourceWebCorepagescrollingiosScrollingCoordinatorIOSmm">trunk/Source/WebCore/page/scrolling/ios/ScrollingCoordinatorIOS.mm</a></li>
<li><a href="#trunkSourceWebCorepagescrollingiosScrollingTreeIOScpp">trunk/Source/WebCore/page/scrolling/ios/ScrollingTreeIOS.cpp</a></li>
<li><a href="#trunkSourceWebCorepagescrollingiosScrollingTreeIOSh">trunk/Source/WebCore/page/scrolling/ios/ScrollingTreeIOS.h</a></li>
<li><a href="#trunkSourceWebCorepagescrollingmacScrollingCoordinatorMach">trunk/Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.h</a></li>
<li><a href="#trunkSourceWebCorepagescrollingmacScrollingCoordinatorMacmm">trunk/Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.mm</a></li>
<li><a href="#trunkSourceWebCorepagescrollingmacScrollingTreeMaccpp">trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeMac.cpp</a></li>
<li><a href="#trunkSourceWebCorepagescrollingmacScrollingTreeMach">trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeMac.h</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2UIProcessScrollingRemoteScrollingTreecpp">trunk/Source/WebKit2/UIProcess/Scrolling/RemoteScrollingTree.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessScrollingRemoteScrollingTreeh">trunk/Source/WebKit2/UIProcess/Scrolling/RemoteScrollingTree.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessScrollingRemoteScrollingCoordinatorh">trunk/Source/WebKit2/WebProcess/Scrolling/RemoteScrollingCoordinator.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessScrollingRemoteScrollingCoordinatormm">trunk/Source/WebKit2/WebProcess/Scrolling/RemoteScrollingCoordinator.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (170450 => 170451)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-06-26 00:34:58 UTC (rev 170450)
+++ trunk/Source/WebCore/ChangeLog        2014-06-26 00:51:05 UTC (rev 170451)
</span><span class="lines">@@ -1,3 +1,57 @@
</span><ins>+2014-06-25  Beth Dakin  &lt;bdakin@apple.com&gt;
+
+        Crash in ScrollingTree::isRubberBandInProgress()
+        https://bugs.webkit.org/show_bug.cgi?id=134316
+        -and corresponding-
+        &lt;rdar://problem/16247911&gt;
+
+        Reviewed by Geoffrey Garen.
+
+        This crash appears to have been caused by http://trac.webkit.org/changeset/161276 
+        which moved the ScrollingNode creation code from ScrollingTree over to 
+        ScrollingCoordinator. This creates a thread safety issue. In the crashing case, we 
+        believe that the ScrollingCoordinator's ScrollingTree pointer had been null-ed out
+        even though the ScrollingTree was kept alive by the bind call to propagate 
+        commitNewTreeState() over to the scrolling thread. The fix is to move node 
+        creation back to the ScrollingTree and to use the this pointer to create new
+        nodes rather than the ScrollingCoordinator's ScrollingTree pointer.
+
+        Don't allow ScrollingCoordinator to handle ScrollingTreeNode creation.
+        * page/scrolling/AsyncScrollingCoordinator.h:
+
+        Re-name createNode to createScrollingTreeNode(). 
+        * page/scrolling/ScrollingTree.cpp:
+        (WebCore::ScrollingTree::updateTreeFromStateNode):
+        * page/scrolling/ScrollingTree.h:
+
+        Remove this implementation of createNode that called into the 
+        ScrollingCoordinator.
+        * page/scrolling/ThreadedScrollingTree.cpp:
+        (WebCore::ThreadedScrollingTree::createNode): Deleted.
+        * page/scrolling/ThreadedScrollingTree.h:
+
+        Don't allow ScrollingCoordinator to handle ScrollingTreeNode creation.
+        * page/scrolling/ios/ScrollingCoordinatorIOS.h:
+        * page/scrolling/ios/ScrollingCoordinatorIOS.mm:
+        (WebCore::ScrollingCoordinatorIOS::createScrollingTreeNode): Deleted.
+
+        Re-name createNode to createScrollingTreeNode, and actually create the nodes here.
+        * page/scrolling/ios/ScrollingTreeIOS.cpp:
+        (WebCore::ScrollingTreeIOS::createScrollingTreeNode):
+        (WebCore::ScrollingTreeIOS::createNode): Deleted.
+        * page/scrolling/ios/ScrollingTreeIOS.h:
+
+        Don't allow ScrollingCoordinator to handle ScrollingTreeNode creation.
+        * page/scrolling/mac/ScrollingCoordinatorMac.h:
+        * page/scrolling/mac/ScrollingCoordinatorMac.mm:
+        (WebCore::ScrollingCoordinatorMac::createScrollingTreeNode): Deleted.
+
+        Add the implementation of createScrollingTreeNode() for the Mac to 
+        ScrollingTreeMac since it can create Mac-specific nodes.
+        * page/scrolling/mac/ScrollingTreeMac.cpp:
+        (ScrollingTreeMac::createScrollingTreeNode):
+        * page/scrolling/mac/ScrollingTreeMac.h:
+
</ins><span class="cx"> 2014-06-25  Enrica Casucci  &lt;enrica@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         iOS build fix after http://trac.webkit.org/changeset/170447.
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingAsyncScrollingCoordinatorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.h (170450 => 170451)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.h        2014-06-26 00:34:58 UTC (rev 170450)
+++ trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.h        2014-06-26 00:51:05 UTC (rev 170451)
</span><span class="lines">@@ -53,8 +53,6 @@
</span><span class="cx"> 
</span><span class="cx">     ScrollingTree* scrollingTree() const { return m_scrollingTree.get(); }
</span><span class="cx"> 
</span><del>-    virtual PassRefPtr&lt;ScrollingTreeNode&gt; createScrollingTreeNode(ScrollingNodeType, ScrollingNodeID) = 0;
-
</del><span class="cx">     void scrollingStateTreePropertiesChanged();
</span><span class="cx"> 
</span><span class="cx">     void scheduleUpdateScrollPositionAfterAsyncScroll(ScrollingNodeID, const FloatPoint&amp;, bool programmaticScroll, SetOrSyncScrollingLayerPosition);
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingScrollingTreecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/ScrollingTree.cpp (170450 => 170451)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/ScrollingTree.cpp        2014-06-26 00:34:58 UTC (rev 170450)
+++ trunk/Source/WebCore/page/scrolling/ScrollingTree.cpp        2014-06-26 00:51:05 UTC (rev 170451)
</span><span class="lines">@@ -172,7 +172,7 @@
</span><span class="cx">     if (it != m_nodeMap.end())
</span><span class="cx">         node = it-&gt;value;
</span><span class="cx">     else {
</span><del>-        node = createNode(stateNode-&gt;nodeType(), nodeID);
</del><ins>+        node = createScrollingTreeNode(stateNode-&gt;nodeType(), nodeID);
</ins><span class="cx">         if (!parentNodeID) {
</span><span class="cx">             // This is the root node. Clear the node map.
</span><span class="cx">             ASSERT(stateNode-&gt;nodeType() == FrameScrollingNode);
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingScrollingTreeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/ScrollingTree.h (170450 => 170451)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/ScrollingTree.h        2014-06-26 00:34:58 UTC (rev 170450)
+++ trunk/Source/WebCore/page/scrolling/ScrollingTree.h        2014-06-26 00:51:05 UTC (rev 170451)
</span><span class="lines">@@ -71,6 +71,8 @@
</span><span class="cx"> 
</span><span class="cx">     void setMainFramePinState(bool pinnedToTheLeft, bool pinnedToTheRight, bool pinnedToTheTop, bool pinnedToTheBottom);
</span><span class="cx"> 
</span><ins>+    virtual PassRefPtr&lt;ScrollingTreeNode&gt; createScrollingTreeNode(ScrollingNodeType, ScrollingNodeID) = 0;
+
</ins><span class="cx">     // Called after a scrolling tree node has handled a scroll and updated its layers.
</span><span class="cx">     // Updates FrameView/RenderLayer scrolling state and GraphicsLayers.
</span><span class="cx">     virtual void scrollingTreeNodeDidScroll(ScrollingNodeID, const FloatPoint&amp; scrollPosition, SetOrSyncScrollingLayerPosition = SyncScrollingLayerPosition) = 0;
</span><span class="lines">@@ -135,8 +137,6 @@
</span><span class="cx">     typedef HashMap&lt;ScrollingNodeID, RefPtr&lt;ScrollingTreeNode&gt;&gt; OrphanScrollingNodeMap;
</span><span class="cx">     void updateTreeFromStateNode(const ScrollingStateNode*, OrphanScrollingNodeMap&amp;);
</span><span class="cx"> 
</span><del>-    virtual PassRefPtr&lt;ScrollingTreeNode&gt; createNode(ScrollingNodeType, ScrollingNodeID) = 0;
-
</del><span class="cx">     ScrollingTreeNode* nodeForID(ScrollingNodeID) const;
</span><span class="cx"> 
</span><span class="cx">     RefPtr&lt;ScrollingTreeNode&gt; m_rootNode;
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingThreadedScrollingTreecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/ThreadedScrollingTree.cpp (170450 => 170451)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/ThreadedScrollingTree.cpp        2014-06-26 00:34:58 UTC (rev 170450)
+++ trunk/Source/WebCore/page/scrolling/ThreadedScrollingTree.cpp        2014-06-26 00:51:05 UTC (rev 170451)
</span><span class="lines">@@ -116,11 +116,6 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-PassRefPtr&lt;ScrollingTreeNode&gt; ThreadedScrollingTree::createNode(ScrollingNodeType nodeType, ScrollingNodeID nodeID)
-{
-    return m_scrollingCoordinator-&gt;createScrollingTreeNode(nodeType, nodeID);
-}
-
</del><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif // ENABLE(ASYNC_SCROLLING)
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingThreadedScrollingTreeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/ThreadedScrollingTree.h (170450 => 170451)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/ThreadedScrollingTree.h        2014-06-26 00:34:58 UTC (rev 170450)
+++ trunk/Source/WebCore/page/scrolling/ThreadedScrollingTree.h        2014-06-26 00:51:05 UTC (rev 170451)
</span><span class="lines">@@ -59,8 +59,6 @@
</span><span class="cx"> protected:
</span><span class="cx">     explicit ThreadedScrollingTree(AsyncScrollingCoordinator*);
</span><span class="cx"> 
</span><del>-    virtual PassRefPtr&lt;ScrollingTreeNode&gt; createNode(ScrollingNodeType, ScrollingNodeID) override;
-
</del><span class="cx">     virtual void scrollingTreeNodeDidScroll(ScrollingNodeID, const FloatPoint&amp; scrollPosition, SetOrSyncScrollingLayerPosition = SyncScrollingLayerPosition) override;
</span><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx">     virtual void handleWheelEventPhase(PlatformWheelEventPhase) override;
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingiosScrollingCoordinatorIOSh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/ios/ScrollingCoordinatorIOS.h (170450 => 170451)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/ios/ScrollingCoordinatorIOS.h        2014-06-26 00:34:58 UTC (rev 170450)
+++ trunk/Source/WebCore/page/scrolling/ios/ScrollingCoordinatorIOS.h        2014-06-26 00:51:05 UTC (rev 170451)
</span><span class="lines">@@ -51,7 +51,6 @@
</span><span class="cx">     virtual bool handleWheelEvent(FrameView*, const PlatformWheelEvent&amp;) override { return false; }
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    virtual PassRefPtr&lt;ScrollingTreeNode&gt; createScrollingTreeNode(ScrollingNodeType, ScrollingNodeID) override;
</del><span class="cx">     virtual void scheduleTreeStateCommit() override;
</span><span class="cx"> 
</span><span class="cx">     void scrollingStateTreeCommitterTimerFired(Timer&lt;ScrollingCoordinatorIOS&gt;*);
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingiosScrollingCoordinatorIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/ios/ScrollingCoordinatorIOS.mm (170450 => 170451)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/ios/ScrollingCoordinatorIOS.mm        2014-06-26 00:34:58 UTC (rev 170450)
+++ trunk/Source/WebCore/page/scrolling/ios/ScrollingCoordinatorIOS.mm        2014-06-26 00:51:05 UTC (rev 170451)
</span><span class="lines">@@ -104,25 +104,7 @@
</span><span class="cx">     // FIXME: figure out how to commit.
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-PassRefPtr&lt;ScrollingTreeNode&gt; ScrollingCoordinatorIOS::createScrollingTreeNode(ScrollingNodeType nodeType, ScrollingNodeID nodeID)
-{
-    ASSERT(scrollingTree());
</del><span class="cx"> 
</span><del>-    switch (nodeType) {
-    case FrameScrollingNode:
-        return ScrollingTreeFrameScrollingNodeIOS::create(*scrollingTree(), nodeID);
-    case OverflowScrollingNode:
-        ASSERT_NOT_REACHED();
-        return nullptr;
-    case FixedNode:
-        return ScrollingTreeFixedNode::create(*scrollingTree(), nodeID);
-    case StickyNode:
-        return ScrollingTreeStickyNode::create(*scrollingTree(), nodeID);
-    }
-    return nullptr;
-}
-
-
</del><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif // ENABLE(ASYNC_SCROLLING)
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingiosScrollingTreeIOScpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/ios/ScrollingTreeIOS.cpp (170450 => 170451)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/ios/ScrollingTreeIOS.cpp        2014-06-26 00:34:58 UTC (rev 170450)
+++ trunk/Source/WebCore/page/scrolling/ios/ScrollingTreeIOS.cpp        2014-06-26 00:51:05 UTC (rev 170451)
</span><span class="lines">@@ -32,6 +32,7 @@
</span><span class="cx"> #include &quot;PlatformWheelEvent.h&quot;
</span><span class="cx"> #include &quot;ScrollingThread.h&quot;
</span><span class="cx"> #include &quot;ScrollingTreeFixedNode.h&quot;
</span><ins>+#include &quot;ScrollingTreeFrameScrollingNodeIOS.h&quot;
</ins><span class="cx"> #include &quot;ScrollingTreeNode.h&quot;
</span><span class="cx"> #include &quot;ScrollingTreeScrollingNode.h&quot;
</span><span class="cx"> #include &quot;ScrollingTreeStickyNode.h&quot;
</span><span class="lines">@@ -92,9 +93,20 @@
</span><span class="cx">     callOnMainThread(bind(&amp;AsyncScrollingCoordinator::scheduleUpdateScrollPositionAfterAsyncScroll, m_scrollingCoordinator.get(), nodeID, scrollPosition, isHandlingProgrammaticScroll(), scrollingLayerPositionAction));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-PassRefPtr&lt;ScrollingTreeNode&gt; ScrollingTreeIOS::createNode(ScrollingNodeType nodeType, ScrollingNodeID nodeID)
</del><ins>+PassRefPtr&lt;ScrollingTreeNode&gt; ScrollingTreeIOS::createScrollingTreeNode(ScrollingNodeType nodeType, ScrollingNodeID nodeID)
</ins><span class="cx"> {
</span><del>-    return m_scrollingCoordinator-&gt;createScrollingTreeNode(nodeType, nodeID);
</del><ins>+    switch (nodeType) {
+    case FrameScrollingNode:
+        return ScrollingTreeFrameScrollingNodeIOS::create(*this, nodeID);
+    case OverflowScrollingNode:
+        ASSERT_NOT_REACHED();
+        return nullptr;
+    case FixedNode:
+        return ScrollingTreeFixedNode::create(*this, nodeID);
+    case StickyNode:
+        return ScrollingTreeStickyNode::create(*this, nodeID);
+    }
+    return nullptr;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> FloatRect ScrollingTreeIOS::fixedPositionRect()
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingiosScrollingTreeIOSh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/ios/ScrollingTreeIOS.h (170450 => 170451)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/ios/ScrollingTreeIOS.h        2014-06-26 00:34:58 UTC (rev 170450)
+++ trunk/Source/WebCore/page/scrolling/ios/ScrollingTreeIOS.h        2014-06-26 00:51:05 UTC (rev 170451)
</span><span class="lines">@@ -54,7 +54,7 @@
</span><span class="cx">     explicit ScrollingTreeIOS(AsyncScrollingCoordinator*);
</span><span class="cx">     virtual bool isScrollingTreeIOS() const override { return true; }
</span><span class="cx"> 
</span><del>-    virtual PassRefPtr&lt;ScrollingTreeNode&gt; createNode(ScrollingNodeType, ScrollingNodeID) override;
</del><ins>+    virtual PassRefPtr&lt;ScrollingTreeNode&gt; createScrollingTreeNode(ScrollingNodeType, ScrollingNodeID) override;
</ins><span class="cx"> 
</span><span class="cx">     virtual void scrollingTreeNodeDidScroll(ScrollingNodeID, const FloatPoint&amp; scrollPosition, SetOrSyncScrollingLayerPosition = SyncScrollingLayerPosition) override;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingmacScrollingCoordinatorMach"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.h (170450 => 170451)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.h        2014-06-26 00:34:58 UTC (rev 170450)
+++ trunk/Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.h        2014-06-26 00:51:05 UTC (rev 170451)
</span><span class="lines">@@ -51,7 +51,6 @@
</span><span class="cx">     virtual bool handleWheelEvent(FrameView*, const PlatformWheelEvent&amp;) override;
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    virtual PassRefPtr&lt;ScrollingTreeNode&gt; createScrollingTreeNode(ScrollingNodeType, ScrollingNodeID) override;
</del><span class="cx">     virtual void scheduleTreeStateCommit() override;
</span><span class="cx"> 
</span><span class="cx">     void scrollingStateTreeCommitterTimerFired(Timer&lt;ScrollingCoordinatorMac&gt;*);
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingmacScrollingCoordinatorMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.mm (170450 => 170451)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.mm        2014-06-26 00:34:58 UTC (rev 170450)
+++ trunk/Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.mm        2014-06-26 00:51:05 UTC (rev 170451)
</span><span class="lines">@@ -142,24 +142,6 @@
</span><span class="cx">     tiledBacking-&gt;setScrollingModeIndication(indicatorMode);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-PassRefPtr&lt;ScrollingTreeNode&gt; ScrollingCoordinatorMac::createScrollingTreeNode(ScrollingNodeType nodeType, ScrollingNodeID nodeID)
-{
-    ASSERT(scrollingTree());
-
-    switch (nodeType) {
-    case FrameScrollingNode:
-        return ScrollingTreeFrameScrollingNodeMac::create(*scrollingTree(), nodeID);
-    case OverflowScrollingNode:
-        ASSERT_NOT_REACHED();
-        return nullptr;
-    case FixedNode:
-        return ScrollingTreeFixedNode::create(*scrollingTree(), nodeID);
-    case StickyNode:
-        return ScrollingTreeStickyNode::create(*scrollingTree(), nodeID);
-    }
-    return nullptr;
-}
-
</del><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif // ENABLE(ASYNC_SCROLLING) &amp;&amp; PLATFORM(MAC)
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingmacScrollingTreeMaccpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeMac.cpp (170450 => 170451)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeMac.cpp        2014-06-26 00:34:58 UTC (rev 170450)
+++ trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeMac.cpp        2014-06-26 00:51:05 UTC (rev 170451)
</span><span class="lines">@@ -26,6 +26,10 @@
</span><span class="cx"> #include &quot;config.h&quot;
</span><span class="cx"> #include &quot;ScrollingTreeMac.h&quot;
</span><span class="cx"> 
</span><ins>+#include &quot;ScrollingTreeFixedNode.h&quot;
+#include &quot;ScrollingTreeFrameScrollingNodeMac.h&quot;
+#include &quot;ScrollingTreeStickyNode.h&quot;
+
</ins><span class="cx"> #if ENABLE(ASYNC_SCROLLING) &amp;&amp; PLATFORM(MAC)
</span><span class="cx"> 
</span><span class="cx"> using namespace WebCore;
</span><span class="lines">@@ -40,4 +44,20 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+PassRefPtr&lt;ScrollingTreeNode&gt; ScrollingTreeMac::createScrollingTreeNode(ScrollingNodeType nodeType, ScrollingNodeID nodeID)
+{
+    switch (nodeType) {
+    case FrameScrollingNode:
+        return ScrollingTreeFrameScrollingNodeMac::create(*this, nodeID);
+    case OverflowScrollingNode:
+        ASSERT_NOT_REACHED();
+        return nullptr;
+    case FixedNode:
+        return ScrollingTreeFixedNode::create(*this, nodeID);
+    case StickyNode:
+        return ScrollingTreeStickyNode::create(*this, nodeID);
+    }
+    return nullptr;
+}
+
</ins><span class="cx"> #endif // ENABLE(ASYNC_SCROLLING) &amp;&amp; PLATFORM(MAC)
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingmacScrollingTreeMach"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeMac.h (170450 => 170451)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeMac.h        2014-06-26 00:34:58 UTC (rev 170450)
+++ trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeMac.h        2014-06-26 00:51:05 UTC (rev 170451)
</span><span class="lines">@@ -35,6 +35,9 @@
</span><span class="cx"> class ScrollingTreeMac : public ThreadedScrollingTree {
</span><span class="cx"> public:
</span><span class="cx">     static RefPtr&lt;ScrollingTreeMac&gt; create(AsyncScrollingCoordinator*);
</span><ins>+
+    virtual PassRefPtr&lt;ScrollingTreeNode&gt; createScrollingTreeNode(ScrollingNodeType, ScrollingNodeID) override;
+
</ins><span class="cx">     
</span><span class="cx"> private:
</span><span class="cx">     explicit ScrollingTreeMac(AsyncScrollingCoordinator*);
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (170450 => 170451)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-06-26 00:34:58 UTC (rev 170450)
+++ trunk/Source/WebKit2/ChangeLog        2014-06-26 00:51:05 UTC (rev 170451)
</span><span class="lines">@@ -1,3 +1,23 @@
</span><ins>+2014-06-25  Beth Dakin  &lt;bdakin@apple.com&gt;
+
+        Crash in ScrollingTree::isRubberBandInProgress()
+        https://bugs.webkit.org/show_bug.cgi?id=134316
+        -and corresponding-
+        &lt;rdar://problem/16247911&gt;
+
+        Reviewed by Geoffrey Garen.
+
+        Move all ScrollingTreeNode creation from ScrollingCoordinator subclasses into 
+        ScrollingTree subclasses.
+
+        * UIProcess/Scrolling/RemoteScrollingTree.cpp:
+        (WebKit::RemoteScrollingTree::createScrollingTreeNode):
+        (WebKit::RemoteScrollingTree::createNode): Deleted.
+        * UIProcess/Scrolling/RemoteScrollingTree.h:
+        * WebProcess/Scrolling/RemoteScrollingCoordinator.h:
+        * WebProcess/Scrolling/RemoteScrollingCoordinator.mm:
+        (WebKit::RemoteScrollingCoordinator::createScrollingTreeNode): Deleted.
+
</ins><span class="cx"> 2014-06-25  Dan Bernstein  &lt;mitz@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Web process should become active when sent a message that requires a callback
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessScrollingRemoteScrollingTreecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Scrolling/RemoteScrollingTree.cpp (170450 => 170451)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Scrolling/RemoteScrollingTree.cpp        2014-06-26 00:34:58 UTC (rev 170450)
+++ trunk/Source/WebKit2/UIProcess/Scrolling/RemoteScrollingTree.cpp        2014-06-26 00:51:05 UTC (rev 170451)
</span><span class="lines">@@ -99,7 +99,7 @@
</span><span class="cx">     m_scrollingCoordinatorProxy.scrollingTreeNodeRequestsScroll(nodeID, scrollPosition, representsProgrammaticScroll);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-PassRefPtr&lt;ScrollingTreeNode&gt; RemoteScrollingTree::createNode(ScrollingNodeType nodeType, ScrollingNodeID nodeID)
</del><ins>+PassRefPtr&lt;ScrollingTreeNode&gt; RemoteScrollingTree::createScrollingTreeNode(ScrollingNodeType nodeType, ScrollingNodeID nodeID)
</ins><span class="cx"> {
</span><span class="cx">     switch (nodeType) {
</span><span class="cx">     case FrameScrollingNode:
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessScrollingRemoteScrollingTreeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Scrolling/RemoteScrollingTree.h (170450 => 170451)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Scrolling/RemoteScrollingTree.h        2014-06-26 00:34:58 UTC (rev 170450)
+++ trunk/Source/WebKit2/UIProcess/Scrolling/RemoteScrollingTree.h        2014-06-26 00:51:05 UTC (rev 170451)
</span><span class="lines">@@ -61,7 +61,7 @@
</span><span class="cx">     virtual void scrollingTreeNodeWillStartPanGesture() override;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    virtual PassRefPtr&lt;WebCore::ScrollingTreeNode&gt; createNode(WebCore::ScrollingNodeType, WebCore::ScrollingNodeID);
</del><ins>+    virtual PassRefPtr&lt;WebCore::ScrollingTreeNode&gt; createScrollingTreeNode(WebCore::ScrollingNodeType, WebCore::ScrollingNodeID) override;
</ins><span class="cx">     
</span><span class="cx">     RemoteScrollingCoordinatorProxy&amp; m_scrollingCoordinatorProxy;
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessScrollingRemoteScrollingCoordinatorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/Scrolling/RemoteScrollingCoordinator.h (170450 => 170451)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Scrolling/RemoteScrollingCoordinator.h        2014-06-26 00:34:58 UTC (rev 170450)
+++ trunk/Source/WebKit2/WebProcess/Scrolling/RemoteScrollingCoordinator.h        2014-06-26 00:51:05 UTC (rev 170451)
</span><span class="lines">@@ -64,7 +64,6 @@
</span><span class="cx">     virtual bool coordinatesScrollingForFrameView(WebCore::FrameView*) const override;
</span><span class="cx">     virtual void scheduleTreeStateCommit() override;
</span><span class="cx"> 
</span><del>-    virtual PassRefPtr&lt;WebCore::ScrollingTreeNode&gt; createScrollingTreeNode(WebCore::ScrollingNodeType, WebCore::ScrollingNodeID) override;
</del><span class="cx">     virtual bool isRubberBandInProgress() const override;
</span><span class="cx">     virtual void setScrollPinningBehavior(WebCore::ScrollPinningBehavior) override;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessScrollingRemoteScrollingCoordinatormm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/Scrolling/RemoteScrollingCoordinator.mm (170450 => 170451)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Scrolling/RemoteScrollingCoordinator.mm        2014-06-26 00:34:58 UTC (rev 170450)
+++ trunk/Source/WebKit2/WebProcess/Scrolling/RemoteScrollingCoordinator.mm        2014-06-26 00:51:05 UTC (rev 170451)
</span><span class="lines">@@ -67,13 +67,6 @@
</span><span class="cx">     m_webPage-&gt;drawingArea()-&gt;scheduleCompositingLayerFlush();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-PassRefPtr&lt;ScrollingTreeNode&gt; RemoteScrollingCoordinator::createScrollingTreeNode(ScrollingNodeType, ScrollingNodeID)
-{
-    // We never created scrolling nodes in the WebProcess with remote scrolling.
-    ASSERT_NOT_REACHED();
-    return nullptr;
-}
-
</del><span class="cx"> bool RemoteScrollingCoordinator::coordinatesScrollingForFrameView(FrameView* frameView) const
</span><span class="cx"> {
</span><span class="cx">     RenderView* renderView = frameView-&gt;renderView();
</span></span></pre>
</div>
</div>

</body>
</html>