<?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>174106</bug_id>
          
          <creation_ts>2017-07-03 15:40:47 -0700</creation_ts>
          <short_desc>Null RenderLayer* deref in FrameView::adjustTiledBackingCoverage()</short_desc>
          <delta_ts>2017-07-03 16:44:43 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Layout and Rendering</component>
          <version>WebKit 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>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Andreas Kling">kling</reporter>
          <assigned_to name="Andreas Kling">kling</assigned_to>
          <cc>bfulgham</cc>
    
    <cc>commit-queue</cc>
    
    <cc>kling</cc>
    
    <cc>koivisto</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>thorton</cc>
    
    <cc>zalan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1325294</commentid>
    <comment_count>0</comment_count>
    <who name="Andreas Kling">kling</who>
    <bug_when>2017-07-03 15:40:47 -0700</bug_when>
    <thetext>&lt;rdar://problem/33085838&gt;

Here&apos;s a crash:

0   WebCore                       	0x000000018d5c9ac0 WebCore::FrameView::adjustTiledBackingCoverage() + 56 (/BuildRoot/Applications/Xcode.app/Contents/Developer/Toolchains/iOS11.0.xctoolchain/usr/include/c++/v1/memory:2582)
1   WebCore                       	0x000000018d5c9ab8 WebCore::FrameView::adjustTiledBackingCoverage() + 48 (/BuildRoot/Library/Caches/com.apple.xbs/Sources/WebCore/WebCore-7604.1.28.1/page/FrameView.cpp:5248)
2   WebCore                       	0x000000018e23f6fc WebCore::Page::setIsVisibleInternal(bool) + 132 (/BuildRoot/Library/Caches/com.apple.xbs/Sources/WebCore/WebCore-7604.1.28.1/page/Page.cpp:1683)
3   WebCore                       	0x000000018e23e5e0 WebCore::Page::setActivityState(unsigned int) + 72 (/BuildRoot/Library/Caches/com.apple.xbs/Sources/WebCore/WebCore-7604.1.28.1/page/Page.cpp:1610)
4   CoreFoundation                	0x00000001851e4130 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 20

Pretty weird that we&apos;re called from the event loop with a layer-less RenderView.
I am unable to reproduce this locally, but it looks like we just need to null check the RenderView::layer().</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1325295</commentid>
    <comment_count>1</comment_count>
      <attachid>314528</attachid>
    <who name="Andreas Kling">kling</who>
    <bug_when>2017-07-03 15:42:02 -0700</bug_when>
    <thetext>Created attachment 314528
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1325314</commentid>
    <comment_count>2</comment_count>
      <attachid>314528</attachid>
    <who name="alan">zalan</who>
    <bug_when>2017-07-03 16:21:02 -0700</bug_when>
    <thetext>Comment on attachment 314528
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=314528&amp;action=review

&gt; Source/WebCore/ChangeLog:12
&gt; +        I haven&apos;t been able to reproduce this crash locally, but I have seen
&gt; +        video of someone who can, so here&apos;s a null check for the RenderView::layer()
&gt; +        which could be null if we&apos;re called between RenderView construction
&gt; +        and the first callback to RenderLayerModelObject::styleDidChange().

or if we somehow managed to call destroyLayer() on the RenderView (and now we are bringing the FrameView to foreground)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1325328</commentid>
    <comment_count>3</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2017-07-03 16:44:14 -0700</bug_when>
    <thetext>The commit-queue encountered the following flaky tests while processing attachment 314528:

editing/spelling/spellcheck-async.html bug 160571 (authors: g.czajkowski@samsung.com and mark.lam@apple.com)
The commit-queue is continuing to process your patch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1325329</commentid>
    <comment_count>4</comment_count>
      <attachid>314528</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2017-07-03 16:44:42 -0700</bug_when>
    <thetext>Comment on attachment 314528
Patch

Clearing flags on attachment: 314528

Committed r219108: &lt;http://trac.webkit.org/changeset/219108&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1325330</commentid>
    <comment_count>5</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2017-07-03 16:44:43 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>314528</attachid>
            <date>2017-07-03 15:42:02 -0700</date>
            <delta_ts>2017-07-03 16:44:42 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-174106.diff</filename>
            <type>text/plain</type>
            <size>1664</size>
            <attacher name="Andreas Kling">kling</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1NvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZyBiL1NvdXJjZS9XZWJDb3JlL0No
YW5nZUxvZwppbmRleCA2YWI0NzY3NDQ0Ni4uZGJhM2M0NDM1YjYgMTAwNjQ0Ci0tLSBhL1NvdXJj
ZS9XZWJDb3JlL0NoYW5nZUxvZworKysgYi9Tb3VyY2UvV2ViQ29yZS9DaGFuZ2VMb2cKQEAgLTEs
MyArMSwxOSBAQAorMjAxNy0wNy0wMyAgQW5kcmVhcyBLbGluZyAgPGFrbGluZ0BhcHBsZS5jb20+
CisKKyAgICAgICAgTnVsbCBS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