<?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>50631</bug_id>
          
          <creation_ts>2010-12-07 08:20:38 -0800</creation_ts>
          <short_desc>GeneratedImage::drawPattern() crashes when it fails to create ImageBuffer</short_desc>
          <delta_ts>2010-12-09 11:05:27 -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>Images</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</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="Yong Li">yong.li.webkit</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>abarth</cc>
    
    <cc>commit-queue</cc>
    
    <cc>eric</cc>
    
    <cc>staikos</cc>
    
    <cc>webkit.review.bot</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>318195</commentid>
    <comment_count>0</comment_count>
    <who name="Yong Li">yong.li.webkit</who>
    <bug_when>2010-12-07 08:20:38 -0800</bug_when>
    <thetext>void GeneratedImage::drawPattern(GraphicsContext* context, const FloatRect&amp; srcRect, const AffineTransform&amp; patternTransform,
                                 const FloatPoint&amp; phase, ColorSpace styleColorSpace, CompositeOperator compositeOp, const FloatRect&amp; destRect)
{
    ...
    OwnPtr&lt;ImageBuffer&gt; imageBuffer = ImageBuffer::create(adjustedSize);
    ASSERT(imageBuffer.get());

Why do we assert here? ImageBuffer::create() is allowed to return 0:

        static PassOwnPtr&lt;ImageBuffer&gt; create(const IntSize&amp; size, ImageColorSpace colorSpace = DeviceRGB)
        {
            bool success = false;
            OwnPtr&lt;ImageBuffer&gt; buf(new ImageBuffer(size, colorSpace, success));
            if (success)
                return buf.release();
            return 0;
        }</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>318243</commentid>
    <comment_count>1</comment_count>
      <attachid>75822</attachid>
    <who name="Yong Li">yong.li.webkit</who>
    <bug_when>2010-12-07 09:23:15 -0800</bug_when>
    <thetext>Created attachment 75822
the patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>318260</commentid>
    <comment_count>2</comment_count>
      <attachid>75822</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2010-12-07 09:42:22 -0800</bug_when>
    <thetext>Comment on attachment 75822
the patch

I silently drawing nothing the most useful behavior? Do callers need to know nothing was drawn?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>318277</commentid>
    <comment_count>3</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2010-12-07 10:00:48 -0800</bug_when>
    <thetext>Attachment 75822 did not pass style-queue:

Failed to run &quot;[u&apos;git&apos;, u&apos;reset&apos;, u&apos;--hard&apos;, u&apos;refs/remotes/trunk&apos;]&quot; exit_code: 128
error: Could not write new index file.
fatal: Could not reset index file to revision &apos;refs/remotes/trunk&apos;.


If any of these errors are false positives, please file a bug against check-webkit-style.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>318322</commentid>
    <comment_count>4</comment_count>
    <who name="Yong Li">yong.li.webkit</who>
    <bug_when>2010-12-07 10:59:03 -0800</bug_when>
    <thetext>(In reply to comment #2)
&gt; (From update of attachment 75822 [details])
&gt; I silently drawing nothing the most useful behavior? Do callers need to know nothing was drawn?

ImageBuffer::create() rarely fails currently. Probably the best solution is never let ImageBuffer::create() fail, and let it do some alternative job when it cannot create platform resource.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>318324</commentid>
    <comment_count>5</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2010-12-07 11:01:55 -0800</bug_when>
    <thetext>Attachment 75822 did not pass style-queue:

Failed to run &quot;[u&apos;git&apos;, u&apos;reset&apos;, u&apos;--hard&apos;, u&apos;refs/remotes/trunk&apos;]&quot; exit_code: 128
error: Could not write new index file.
fatal: Could not reset index file to revision &apos;refs/remotes/trunk&apos;.


If any of these errors are false positives, please file a bug against check-webkit-style.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>318376</commentid>
    <comment_count>6</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2010-12-07 12:03:15 -0800</bug_when>
    <thetext>Attachment 75822 did not pass style-queue:

Failed to run &quot;[u&apos;git&apos;, u&apos;reset&apos;, u&apos;--hard&apos;, u&apos;refs/remotes/trunk&apos;]&quot; exit_code: 128
error: Could not write new index file.
fatal: Could not reset index file to revision &apos;refs/remotes/trunk&apos;.


If any of these errors are false positives, please file a bug against check-webkit-style.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>318609</commentid>
    <comment_count>7</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2010-12-07 21:41:13 -0800</bug_when>
    <thetext>Attachment 75822 did not pass style-queue:

Failed to run &quot;[&apos;WebKitTools/Scripts/update-webkit&apos;]&quot; exit_code: 2
Updating OpenSource
Incomplete data: Delta source ended unexpectedly at /usr/lib/git-core/git-svn line 5061

Died at WebKitTools/Scripts/update-webkit line 132.


If any of these errors are false positives, please file a bug against check-webkit-style.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>318685</commentid>
    <comment_count>8</comment_count>
      <attachid>75822</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2010-12-08 00:18:17 -0800</bug_when>
    <thetext>Comment on attachment 75822
the patch

Rejecting patch 75822 from commit-queue.

Failed to run &quot;[&apos;./WebKitTools/Scripts/webkit-patch&apos;, &apos;--status-host=queues.webkit.org&apos;, &apos;--bot-id=eseidel-cq-sl&apos;, &apos;build&apos;, &apos;--no-clean&apos;, &apos;--no-update&apos;, &apos;--build-style=both&apos;]&quot; exit_code: 1
ERROR: Working directory has local commits, pass --force-clean to continue.

Full output: http://queues.webkit.org/results/6730115</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>319512</commentid>
    <comment_count>9</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2010-12-09 09:32:39 -0800</bug_when>
    <thetext>The commit-queue encountered the following flaky tests while processing attachment 75822:

webarchive/test-link-rel-icon.html
http/tests/loading/basic-credentials-sent-automatically.html

Please file bugs against the tests.  These tests were authored by beidson@apple.com and ddkilzer@webkit.org.  The commit-queue is continuing to process your patch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>319555</commentid>
    <comment_count>10</comment_count>
      <attachid>75822</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2010-12-09 10:27:05 -0800</bug_when>
    <thetext>Comment on attachment 75822
the patch

Clearing flags on attachment: 75822

Committed r73622: &lt;http://trac.webkit.org/changeset/73622&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>319556</commentid>
    <comment_count>11</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2010-12-09 10:27:10 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>319602</commentid>
    <comment_count>12</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2010-12-09 11:05:27 -0800</bug_when>
    <thetext>http://trac.webkit.org/changeset/73622 might have broken GTK Linux 64-bit Debug</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>75822</attachid>
            <date>2010-12-07 09:23:15 -0800</date>
            <delta_ts>2010-12-09 10:27:04 -0800</delta_ts>
            <desc>the patch</desc>
            <filename>50631.patch</filename>
            <type>text/plain</type>
            <size>1392</size>
            <attacher name="Yong Li">yong.li.webkit</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1dlYkNvcmUvQ2hhbmdlTG9nIGIvV2ViQ29yZS9DaGFuZ2VMb2cKaW5kZXgg
YTUyZmUxZi4uZWQ3Y2E1ZSAxMDA2NDQKLS0tIGEvV2ViQ29yZS9DaGFuZ2VMb2cKKysrIGIvV2Vi
Q29yZS9DaGFuZ2VMb2cKQEAgLTEsMyArMSwxOCBAQAorMjAxMC0xMi0wNyAgWW9uZyBMaSAgPHlv
bGlAcmltLmNvbT4KKworICAgICAgICBSZXZpZXdlZCBieSBOT0JPRFkgKE9PUFMhKS4KKworICAg
ICAgICBDaGVjayB0aGUgcmV0dXJuIHZhbHVlIG9mIEltYWdlQnVmZmVyOjpjcmVhdGUoKQorICAg
ICAgICB0byBhdm9pZCBjcmFzaCB3aGVuIEltYWdlQnVmZmVyOjpjcmVhdGUoKSBmYWlscy4KKyAg
ICAgICAgaHR0cHM6Ly9idWdzLndlYmtpdC5vcmcvc2hvd19idWcuY2dpP2lkPTUwNjMxCisKKyAg
ICAgICAgTm8gbmV3IHRlc3QgYmVjYXVzZSBpdCByZWxpZXMgb24gdGhlIHBsYXRmb3JtIGltcGxl
bWVudGF0aW9uCisgICAgICAgIG9mIEltYWdlQnVmZmVyLiBJdCBpcyBoYXJkIHRvIG1ha2UgSW1h
Z2VCdWZmZXI6OmNyZWF0ZSgpIGZhaWwKKyAgICAgICAgaW4gbW9zdCBwb3J0cy4KKworICAgICAg
ICAqIHBsYXRmb3JtL2dyYXBoaWNzL0dlbmVyYXRlZEltYWdlLmNwcDoKKyAgICAgICAgKFdlYkNv
cmU6OkdlbmVyYXRlZEltYWdlOjpkcmF3UGF0dGVybik6CisKIDIwMTAtMTItMDcgIFl1cnkgU2Vt
aWtoYXRza3kgIDx5dXJ5c0BjaHJvbWl1bS5vcmc+CiAKICAg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