<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>107868</bug_id>
          
          <creation_ts>2013-01-24 15:03:09 -0800</creation_ts>
          <short_desc>REGRESSION(140571): Crash in ScrollingCoordinator::mainThreadScrollingReasons during Frame::createView</short_desc>
          <delta_ts>2013-01-24 15:39:53 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>New Bugs</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="James Robinson">jamesr</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>andersca</cc>
    
    <cc>arv</cc>
    
    <cc>bdakin</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>wangxianzhu</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>815880</commentid>
    <comment_count>0</comment_count>
    <who name="James Robinson">jamesr</who>
    <bug_when>2013-01-24 15:03:09 -0800</bug_when>
    <thetext>Stack Trace:
  RELADDR   FUNCTION                                                                                                                                                                                                                                                                                                                                                              FILE:LINE
  009685d6  WebCore::ScrollingCoordinator::mainThreadScrollingReasons() const                                                                                                                                                                                                                                                                                                     /out/Release/../../third_party/WebKit/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp:457
  v------&gt;  WebCore::ScrollingCoordinator::shouldUpdateScrollLayerPositionOnMainThread() const                                                                                                                                                                                                                                                                                    /out/Release/../../third_party/WebKit/Source/WebCore/page/scrolling/ScrollingCoordinator.h:147
  0094a443  WebCore::FrameView::isRubberBandInProgress() const                                                                                                                                                                                                                                                                                                                    /out/Release/../../third_party/WebKit/Source/WebCore/page/FrameView.cpp:1919
  v------&gt;  WebCore::ScrollView::updateScrollbars(WebCore::IntSize const&amp;)                                                                                                                                                                                                                                                                                                        /out/Release/../../third_party/WebKit/Source/WebCore/platform/ScrollView.cpp:615
  0076c90d  WebCore::ScrollView::updateScrollbars(WebCore::IntSize const&amp;)                                                                                                                                                                                                                                                                                                        /out/Release/../../third_party/WebKit/Source/WebCore/platform/ScrollView.cpp:464
  0076cbdf  WebCore::ScrollView::setFixedLayoutSize(WebCore::IntSize const&amp;)                                                                                                                                                                                                                                                                                                      /out/Release/../../third_party/WebKit/Source/WebCore/platform/ScrollView.cpp:279
  00949053  WebCore::Frame::createView(WebCore::IntSize const&amp;, WebCore::Color const&amp;, bool, WebCore::IntSize const&amp;, WebCore::IntRect const&amp;, bool, WebCore::ScrollbarMode, bool, WebCore::ScrollbarMode, bool)                                                                                                                                                                  /out/Release/../../third_party/WebKit/Source/WebCore/page/Frame.cpp:792
  004775f9  WebKit::WebFrameImpl::createFrameView()                                                                                                                                                                                                                                                                                                                               /out/Release/../../third_party/WebKit/Source/WebKit/chromium/src/WebFrameImpl.cpp:2280
  00919e2d  WebCore::FrameLoader::transitionToCommitted(WTF::PassRefPtr&lt;WebCore::CachedPage&gt;)                                                                                                                                                                                                                                                                                     /out/Release/../../third_party/WebKit/Source/WebCore/loader/FrameLoader.cpp:1864
  0091af03  WebCore::FrameLoader::commitProvisionalLoad()                                                                                                                                                                                                                                                                                                                         /out/Release/../../third_party/WebKit/Source/WebCore/loader/FrameLoader.cpp:1701
  00910361  WebCore::DocumentLoader::commitLoad(char const*, int)                                                                                                                                                                                                                                                                                                                 /out/Release/../../third_party/WebKit/Source/WebCore/loader/DocumentLoader.cpp:310
  0091ecf9  WebCore::MainResourceLoader::dataReceived(WebCore::CachedResource*, char const*, int)                                                                                                                                                                                                                                                                                 /out/Release/../../third_party/WebKit/Source/WebCore/loader/MainResourceLoader.cpp:512
  0092af2b  WebCore::CachedRawResource::data(WTF::PassRefPtr&lt;WebCore::ResourceBuffer&gt;, bool)                                                                                                                                                                                                                                                                                      /out/Release/../../third_party/WebKit/Source/WebCore/loader/cache/CachedRawResource.cpp:70
  00924d11  WebCore::SubresourceLoader::sendDataToResource(char const*, int)                                                                                                                                                                                                                                                                                                      /out/Release/../../third_party/WebKit/Source/WebCore/loader/SubresourceLoader.cpp:255
  v------&gt;  WebCore::SubresourceLoader::didReceiveData(char const*, int, long long, bool)                                                                                                                                                                                                                                                                                         /out/Release/../../third_party/WebKit/Source/WebCore/loader/SubresourceLoader.cpp:227
  00924ee1  WebCore::SubresourceLoader::didReceiveData(char const*, int, long long, bool)                                                                                                                                                                                                                                                                                         /out/Release/../../third_party/WebKit/Source/WebCore/loader/SubresourceLoader.cpp:215
  009233c3  WebCore::ResourceLoader::didReceiveData(WebCore::ResourceHandle*, char const*, int, int)                                                                                                                                                                                                                                                                              /out/Release/../../third_party/WebKit/Source/WebCore/loader/ResourceLoader.cpp:451
  007bc41d  WebCore::ResourceHandleInternal::didReceiveData(WebKit::WebURLLoader*, char const*, int, int)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>815882</commentid>
    <comment_count>1</comment_count>
    <who name="James Robinson">jamesr</who>
    <bug_when>2013-01-24 15:05:22 -0800</bug_when>
    <thetext>WebCore::Frame::createView() does this:

    RefPtr&lt;FrameView&gt; frameView;
    if (isMainFrame) {
        frameView = FrameView::create(this, viewportSize);
        frameView-&gt;setFixedLayoutSize(fixedLayoutSize);
        frameView-&gt;setFixedVisibleContentRect(fixedVisibleContentRect);
        frameView-&gt;setUseFixedLayout(useFixedLayout);  // &lt;--- boom!
    } else
        frameView = FrameView::create(this);

    frameView-&gt;setScrollbarModes(horizontalScrollbarMode, verticalScrollbarMode, horizontalLock, verticalLock);

    setView(frameView);


the view isn&apos;t set up</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>815883</commentid>
    <comment_count>2</comment_count>
    <who name="James Robinson">jamesr</who>
    <bug_when>2013-01-24 15:07:57 -0800</bug_when>
    <thetext>What &apos;bout this?

diff --git a/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp b/Source/WebCore/page/scrolling/ScrollingCoordinat
index c17cc36..f12c280 100644
--- a/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp
+++ b/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp
@@ -449,6 +449,8 @@ bool ScrollingCoordinator::hasVisibleSlowRepaintViewportConstrainedObjects(Frame
 MainThreadScrollingReasons ScrollingCoordinator::mainThreadScrollingReasons() const
 {
     FrameView* frameView = m_page-&gt;mainFrame()-&gt;view();
+    if (!frameView)
+        return static_cast&lt;MainThreadScrollingReasons&gt;(0);
 
     MainThreadScrollingReasons mainThreadScrollingReasons = (MainThreadScrollingReasons)0;


?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>815884</commentid>
    <comment_count>3</comment_count>
    <who name="Beth Dakin">bdakin</who>
    <bug_when>2013-01-24 15:09:42 -0800</bug_when>
    <thetext>(In reply to comment #2)
&gt; What &apos;bout this?
&gt; 
&gt; diff --git a/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp b/Source/WebCore/page/scrolling/ScrollingCoordinat
&gt; index c17cc36..f12c280 100644
&gt; --- a/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp
&gt; +++ b/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp
&gt; @@ -449,6 +449,8 @@ bool ScrollingCoordinator::hasVisibleSlowRepaintViewportConstrainedObjects(Frame
&gt;  MainThreadScrollingReasons ScrollingCoordinator::mainThreadScrollingReasons() const
&gt;  {
&gt;      FrameView* frameView = m_page-&gt;mainFrame()-&gt;view();
&gt; +    if (!frameView)
&gt; +        return static_cast&lt;MainThreadScrollingReasons&gt;(0);
&gt; 
&gt;      MainThreadScrollingReasons mainThreadScrollingReasons = (MainThreadScrollingReasons)0;
&gt; 
&gt; 
&gt; ?

I still think it&apos;s cray-zay that we can end up calling updateScrollbars() this early on in the construction of a FrameView, but I think this change is okay.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>815890</commentid>
    <comment_count>4</comment_count>
    <who name="James Robinson">jamesr</who>
    <bug_when>2013-01-24 15:16:05 -0800</bug_when>
    <thetext>Committed r140732: &lt;http://trac.webkit.org/changeset/140732&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>815911</commentid>
    <comment_count>5</comment_count>
    <who name="James Robinson">jamesr</who>
    <bug_when>2013-01-24 15:39:53 -0800</bug_when>
    <thetext>(In reply to comment #3)
&gt; 
&gt; I still think it&apos;s cray-zay that we can end up calling updateScrollbars() this early on in the construction of a FrameView, but I think this change is okay.

I definitely agree.  I don&apos;t think there is any reason to call updateScrollbars() unless we&apos;re about to do a layout, but perhaps I&apos;m not very creative.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>