<?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>75593</bug_id>
          
          <creation_ts>2012-01-04 17:57:00 -0800</creation_ts>
          <short_desc>null-check variable page before using it in FrameView::notifyPageThatContentAreaWillPaint.</short_desc>
          <delta_ts>2012-01-05 18:13:49 -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>WebCore Misc.</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</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="Yongjun Zhang">yongjun_zhang</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>webkit.review.bot</cc>
    
    <cc>yongjun_zhang</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>529914</commentid>
    <comment_count>0</comment_count>
    <who name="Yongjun Zhang">yongjun_zhang</who>
    <bug_when>2012-01-04 17:57:00 -0800</bug_when>
    <thetext>In FrameView::notifyPageThatContentAreaWillPaint(), we should null-check variable page, which is common usage pattern throughout the rest of FrameView.cpp.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>529922</commentid>
    <comment_count>1</comment_count>
      <attachid>121199</attachid>
    <who name="Yongjun Zhang">yongjun_zhang</who>
    <bug_when>2012-01-04 18:03:58 -0800</bug_when>
    <thetext>Created attachment 121199
null-check variable &apos;page&apos;, to follow the usage pattern of m_frame-&gt;page() throughout the rest of FrameView.cpp.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>529926</commentid>
    <comment_count>2</comment_count>
    <who name="Yongjun Zhang">yongjun_zhang</who>
    <bug_when>2012-01-04 18:06:43 -0800</bug_when>
    <thetext>&lt;rdar://problem/10603538&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>530400</commentid>
    <comment_count>3</comment_count>
      <attachid>121199</attachid>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2012-01-05 10:30:27 -0800</bug_when>
    <thetext>Comment on attachment 121199
null-check variable &apos;page&apos;, to follow the usage pattern of m_frame-&gt;page() throughout the rest of FrameView.cpp.

There are several other places in FrameView.cpp that don&apos;t do the null check.

It would be strange if a pageless frame were to be painted! Does this fix an actual crash?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>530638</commentid>
    <comment_count>4</comment_count>
    <who name="Yongjun Zhang">yongjun_zhang</who>
    <bug_when>2012-01-05 14:36:12 -0800</bug_when>
    <thetext>(In reply to comment #3)
&gt; (From update of attachment 121199 [details])
&gt; There are several other places in FrameView.cpp that don&apos;t do the null check.
&gt; 
&gt; It would be strange if a pageless frame were to be painted! Does this fix an actual crash?

It fixed a hard-to-reproduce crash in iOS.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>530784</commentid>
    <comment_count>5</comment_count>
      <attachid>121199</attachid>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2012-01-05 16:56:01 -0800</bug_when>
    <thetext>Comment on attachment 121199
null-check variable &apos;page&apos;, to follow the usage pattern of m_frame-&gt;page() throughout the rest of FrameView.cpp.

I guess it&apos;s OK to add = another null check (there is enough confusion about when they are needed in this file already). 

It would be much better to find out why anyone would call notifyPageThatContentAreaWillPaint() when there is no page, and they are not painting, and fix that instead.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>530806</commentid>
    <comment_count>6</comment_count>
    <who name="Yongjun Zhang">yongjun_zhang</who>
    <bug_when>2012-01-05 17:13:57 -0800</bug_when>
    <thetext>(In reply to comment #5)
&gt; (From update of attachment 121199 [details])
&gt; I guess it&apos;s OK to add = another null check (there is enough confusion about when they are needed in this file already). 
&gt; 
&gt; It would be much better to find out why anyone would call notifyPageThatContentAreaWillPaint() when there is no page, and they are not painting, and fix that instead.

thanks Alexey!  Let&apos;s land this first and I will keep trying to find a reproducible case.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>530853</commentid>
    <comment_count>7</comment_count>
      <attachid>121199</attachid>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2012-01-05 18:13:44 -0800</bug_when>
    <thetext>Comment on attachment 121199
null-check variable &apos;page&apos;, to follow the usage pattern of m_frame-&gt;page() throughout the rest of FrameView.cpp.

Clearing flags on attachment: 121199

Committed r104260: &lt;http://trac.webkit.org/changeset/104260&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>530854</commentid>
    <comment_count>8</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2012-01-05 18:13:49 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>121199</attachid>
            <date>2012-01-04 18:03:58 -0800</date>
            <delta_ts>2012-01-05 18:13:44 -0800</delta_ts>
            <desc>null-check variable &apos;page&apos;, to follow the usage pattern of m_frame-&gt;page() throughout the rest of FrameView.cpp.</desc>
            <filename>nullcheck_page.patch</filename>
            <type>text/plain</type>
            <size>1289</size>
            <attacher name="Yongjun Zhang">yongjun_zhang</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBTb3VyY2UvV2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S9XZWJDb3JlL3BhZ2UvRnJhbWVWaWV3LmNwcAkod29ya2luZyBjb3B5KQpA
QCAtMjU5Niw2ICsyNTk2LDkgQEAgdm9pZCBGcmFtZVZpZXc6OnNldEFuaW1hdG9yc0FyZUFjdGl2
ZSgpCiB2b2lkIEZyYW1lVmlldzo6bm90aWZ5UGFnZVRoYXRDb250ZW50QXJlYVdpbGxQYWludCgp
IGNvbnN0CiB7CiAgICAgUGFnZSogcGFnZSA9IG1fZnJhbWUtPnBhZ2UoKTsKKyAgICBpZiAoIXBh
Z2UpCisgICAgICAgIHJldHVybjsKKwogICAgIGNvbnN0IEhhc2hTZXQ8U2Nyb2xsYWJsZUFyZWEq
Piogc2Nyb2xsYWJsZUFyZWFzID0gcGFnZS0+c2Nyb2xsYWJsZUFyZWFTZXQoKTsKICAgICBpZiAo
IXNjcm9sbGFibGVBcmVhcykKICAgICAgICAgcmV0dXJuOwo=
</data>

          </attachment>
      

    </bug>

</bugzilla>