<?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>107981</bug_id>
          
          <creation_ts>2013-01-25 13:18:38 -0800</creation_ts>
          <short_desc>[skia] Check for null-device when calling createCompatibleDevice</short_desc>
          <delta_ts>2013-02-22 13:32:44 -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="Mike Reed">reed</reporter>
          <assigned_to name="Mike Reed">reed</assigned_to>
          <cc>fmalita</cc>
    
    <cc>jamesr</cc>
    
    <cc>junov</cc>
    
    <cc>senorblanco</cc>
    
    <cc>webkit.review.bot</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>816868</commentid>
    <comment_count>0</comment_count>
    <who name="Mike Reed">reed</who>
    <bug_when>2013-01-25 13:18:38 -0800</bug_when>
    <thetext>Check for null-device when calling createCompatibleDevice</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>816871</commentid>
    <comment_count>1</comment_count>
      <attachid>184802</attachid>
    <who name="Mike Reed">reed</who>
    <bug_when>2013-01-25 13:22:16 -0800</bug_when>
    <thetext>Created attachment 184802
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>816873</commentid>
    <comment_count>2</comment_count>
    <who name="Mike Reed">reed</who>
    <bug_when>2013-01-25 13:23:44 -0800</bug_when>
    <thetext>https://code.google.com/p/chromium/issues/detail?id=172052</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>816875</commentid>
    <comment_count>3</comment_count>
      <attachid>184802</attachid>
    <who name="James Robinson">jamesr</who>
    <bug_when>2013-01-25 13:29:20 -0800</bug_when>
    <thetext>Comment on attachment 184802
Patch

Can we make a test that tries to construct a really big ImageBuffer?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>817243</commentid>
    <comment_count>4</comment_count>
      <attachid>184880</attachid>
    <who name="Florin Malita">fmalita</who>
    <bug_when>2013-01-26 12:26:29 -0800</bug_when>
    <thetext>Created attachment 184880
Minimized test, crashes in Chromium.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>817244</commentid>
    <comment_count>5</comment_count>
    <who name="Florin Malita">fmalita</who>
    <bug_when>2013-01-26 12:36:48 -0800</bug_when>
    <thetext>(In reply to comment #3)
&gt; (From update of attachment 184802 [details])
&gt; Can we make a test that tries to construct a really big ImageBuffer?

The attached test crashes CR (hitting the same generated image tiled draw path as the original page), but unfortunately it doesn&apos;t seem to trigger the same failure in DRT.

I presume DRT runs with a different graphics context that handles surface allocations differently? Even ridiculous width/height values appear to &quot;work&quot;: DRT doesn&apos;t crash, but the gradient is not drawn either (instead the visible portion is filled with a greenish color).

Given this difference in behavior, I&apos;m not sure how to produce a DRT test that isolates the bug. Any ideas?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>817734</commentid>
    <comment_count>6</comment_count>
    <who name="Justin Novosad">junov</who>
    <bug_when>2013-01-28 07:22:38 -0800</bug_when>
    <thetext>
&gt; Given this difference in behavior, I&apos;m not sure how to produce a DRT test that isolates the bug. Any ideas?

Instead of testing in DRT, you could write a unit test (in trunk/Source/WebKit/chromium/tests/) that uses a fake PlatformContextSkia that fails allocations by design.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>839848</commentid>
    <comment_count>7</comment_count>
    <who name="Mike Reed">reed</who>
    <bug_when>2013-02-22 13:10:45 -0800</bug_when>
    <thetext>I think this patch fixes https://code.google.com/p/chromium/issues/detail?id=177759</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>839853</commentid>
    <comment_count>8</comment_count>
    <who name="Mike Reed">reed</who>
    <bug_when>2013-02-22 13:14:34 -0800</bug_when>
    <thetext>#6 -- I don&apos;t know that that would be a stable test, since this webkit code is not really mockable. Do we have other such tests that exist to exercise a specific null-check failure? If not, perhaps we can land this CL as is.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>839866</commentid>
    <comment_count>9</comment_count>
      <attachid>184802</attachid>
    <who name="James Robinson">jamesr</who>
    <bug_when>2013-02-22 13:26:29 -0800</bug_when>
    <thetext>Comment on attachment 184802
Patch

This seems reasonable.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>839875</commentid>
    <comment_count>10</comment_count>
      <attachid>184802</attachid>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2013-02-22 13:32:40 -0800</bug_when>
    <thetext>Comment on attachment 184802
Patch

Clearing flags on attachment: 184802

Committed r143784: &lt;http://trac.webkit.org/changeset/143784&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>839877</commentid>
    <comment_count>11</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2013-02-22 13:32:44 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>184802</attachid>
            <date>2013-01-25 13:22:16 -0800</date>
            <delta_ts>2013-02-22 13:32:40 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-107981-20130125161906.patch</filename>
            <type>text/plain</type>
            <size>1471</size>
            <attacher name="Mike Reed">reed</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJDb3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vZ3JhcGhpY3Mvc2tpYS9JbWFnZUJ1
ZmZlclNraWEuY3BwCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIFNvdXJjZS9XZWJDb3JlL3BsYXRmb3JtL2dyYXBo
aWNzL3NraWEvSW1hZ2VCdWZmZXJTa2lhLmNwcAkocmV2aXNpb24gMTQwODE4KQorKysgU291cmNl
L1dlYkNvcmUvcGxhdGZvcm0vZ3JhcGhpY3Mvc2tpYS9JbWFnZUJ1ZmZlclNraWEuY3BwCSh3b3Jr
aW5nIGNvcHkpCkBAIC0xMjksNiArMTI5LDExIEBAIEltYWdlQnVmZmVyOjpJbWFnZUJ1ZmZlcihj
b25zdCBJbnRTaXplJgogICAgIH0KIAogICAgIFNrQXV0b1RVbnJlZjxTa0RldmljZT4gZGV2aWNl
KGNvbXBhdGlibGVDb250ZXh0LT5wbGF0Zm9ybUNvbnRleHQoKS0+Y3JlYXRlQ29tcGF0aWJsZURl
dmljZShzaXplLCBoYXNBbHBoYSkpOworICAgIGlmICghZGV2aWNlLmdldCgpKSB7CisgICAgICAg
IHN1Y2Nlc3MgPSBmYWxzZTsKKyAgICAgICAgcmV0dXJuOworICAgIH0KKwogICAgIFNrUGl4ZWxS
ZWYqIHBpeGVsUmVmID0gZGV2aWNlLT5hY2Nlc3NCaXRtYXAoZmFsc2UpLnBpeGVsUmVmKCk7CiAg
ICAgaWYgKCFwaXhlbFJlZikgewogICAgICAgICBzdWNjZXNzID0gZmFsc2U7Cg==
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>184880</attachid>
            <date>2013-01-26 12:26:29 -0800</date>
            <delta_ts>2013-01-26 12:26:29 -0800</delta_ts>
            <desc>Minimized test, crashes in Chromium.</desc>
            <filename>large-gradient-crash.html</filename>
            <type>text/html</type>
            <size>305</size>
            <attacher name="Florin Malita">fmalita</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxodG1sPgogIDxoZWFkPgogICAgPHN0eWxlPgogICAgICBkaXYgewog
ICAgICAgIGJhY2tncm91bmQ6IC13ZWJraXQtbGluZWFyLWdyYWRpZW50KGJvdHRvbSwgYmxhY2sg
MCUsIHdoaXRlIDEwMCUpOwogICAgICAgIGJvcmRlcjogMXB4IHNvbGlkIHJlZDsKICAgICAgICB3
aWR0aDogNDAwcHg7CiAgICAgICAgaGVpZ2h0OiA0MDAwMHB4OwogICAgICB9CiAgICA8L3N0eWxl
PgogIDwvaGVhZD4KCiAgPGJvZHk+CiAgICA8ZGl2PlBBU1M6IGRpZCBub3QgY3Jhc2guPC9kaXY+
CiAgPC9ib2R5Pgo8L2h0bWw+Cgo=
</data>

          </attachment>
      

    </bug>

</bugzilla>