<?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>31180</bug_id>
          
          <creation_ts>2009-11-05 11:25:30 -0800</creation_ts>
          <short_desc>[v8] Do not retrieve handles in near death or empty state from the string impl cache</short_desc>
          <delta_ts>2010-01-18 11:29: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>WebCore Misc.</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="anton muhin">antonm</reporter>
          <assigned_to name="anton muhin">antonm</assigned_to>
          <cc>commit-queue</cc>
    
    <cc>eric</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>160894</commentid>
    <comment_count>0</comment_count>
    <who name="anton muhin">antonm</who>
    <bug_when>2009-11-05 11:25:30 -0800</bug_when>
    <thetext>Due to nested GCs, there is a low chance of weak reference callback for external string being invoked while this string still referenced.  Most probably that is due to StringImpl cache (it allows to &apos;revive&apos; an external string).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>160895</commentid>
    <comment_count>1</comment_count>
      <attachid>42581</attachid>
    <who name="anton muhin">antonm</who>
    <bug_when>2009-11-05 11:29:03 -0800</bug_when>
    <thetext>Created attachment 42581
First take</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>160901</commentid>
    <comment_count>2</comment_count>
      <attachid>42581</attachid>
    <who name="Adam Barth">abarth</who>
    <bug_when>2009-11-05 11:45:19 -0800</bug_when>
    <thetext>Comment on attachment 42581
First take

+ v8::Persistent&lt;v8::String&gt; handle(cachedV8String);

Why a Persistent handle?  Can we use a local handle here?

Can we test this?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>160978</commentid>
    <comment_count>3</comment_count>
    <who name="anton muhin">antonm</who>
    <bug_when>2009-11-05 15:19:56 -0800</bug_when>
    <thetext>First of all, I&apos;ve found out that my previous fix didn&apos;t make into 4.0.223.16, so I&apos;d ask you to put this one on hold (I&apos;d appreciate if you review+ it when found in good shape, but I don&apos;t want it to be committed, at least for now).

(In reply to comment #2)
&gt; (From update of attachment 42581 [details])
&gt; + v8::Persistent&lt;v8::String&gt; handle(cachedV8String);
&gt; 
&gt; Why a Persistent handle?  Can we use a local handle here?

::IsNearDeath is only present on Persistent handles (Locals are always alive).  If you&apos;re afraid of performance applications, AFAIK Persistent ctor (but not ::New) is roughly free.

&gt; Can we test this?

I am lacking knowledge of our testing infrastructure.  The easiest way to check it would be to write some notable amount of C++ code (to create an object with a special weak reference callback, etc.) and expose it into JS.

Have we got something like that?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>161056</commentid>
    <comment_count>4</comment_count>
      <attachid>42581</attachid>
    <who name="Adam Barth">abarth</who>
    <bug_when>2009-11-05 20:17:28 -0800</bug_when>
    <thetext>Comment on attachment 42581
First take

No, we don&apos;t have any testing infrastructure like that.  I don&apos;t see how we could test this change.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>165370</commentid>
    <comment_count>5</comment_count>
      <attachid>42581</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2009-11-20 11:14:01 -0800</bug_when>
    <thetext>Comment on attachment 42581
First take

Rejecting patch 42581 from commit-queue.

Failed to run &quot;[&apos;git&apos;, &apos;svn&apos;, &apos;dcommit&apos;]&quot; exit_code: 1
Committing to http://svn.webkit.org/repository/webkit/trunk ...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>165380</commentid>
    <comment_count>6</comment_count>
      <attachid>42581</attachid>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-11-20 11:32:18 -0800</bug_when>
    <thetext>Comment on attachment 42581
First take

This rejection makes no sense.  I&apos;ll investigate.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>165386</commentid>
    <comment_count>7</comment_count>
      <attachid>42581</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2009-11-20 11:49:34 -0800</bug_when>
    <thetext>Comment on attachment 42581
First take

Rejecting patch 42581 from commit-queue.

Failed to run &quot;[&apos;WebKitTools/Scripts/run-webkit-tests&apos;, &apos;--no-launch-safari&apos;, &apos;--quiet&apos;, &apos;--exit-after-n-failures=1&apos;]&quot; exit_code: 1
Running build-dumprendertree
Running tests from /Users/eseidel/Projects/CommitQueue/LayoutTests
Testing 11649 test cases.
inspector/console-format.html -&gt; crashed

Exiting early after 1 failures. 9345 tests run.
490.34s total testing time

9344 test cases (99%) succeeded
1 test case (&lt;1%) crashed
5 test cases (&lt;1%) had stderr output</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>165391</commentid>
    <comment_count>8</comment_count>
    <who name="anton muhin">antonm</who>
    <bug_when>2009-11-20 12:15:14 -0800</bug_when>
    <thetext>(In reply to comment #7)
&gt; (From update of attachment 42581 [details])
&gt; Rejecting patch 42581 from commit-queue.
&gt; 
&gt; Failed to run &quot;[&apos;WebKitTools/Scripts/run-webkit-tests&apos;, &apos;--no-launch-safari&apos;,
&gt; &apos;--quiet&apos;, &apos;--exit-after-n-failures=1&apos;]&quot; exit_code: 1
&gt; Running build-dumprendertree
&gt; Running tests from /Users/eseidel/Projects/CommitQueue/LayoutTests
&gt; Testing 11649 test cases.
&gt; inspector/console-format.html -&gt; crashed
&gt; 
&gt; Exiting early after 1 failures. 9345 tests run.
&gt; 490.34s total testing time
&gt; 
&gt; 9344 test cases (99%) succeeded
&gt; 1 test case (&lt;1%) crashed
&gt; 5 test cases (&lt;1%) had stderr output

Wow, thanks a lot, but that&apos;s something new.  Probably patch just rotted.  I&apos;ll double check if I can reproduce it locally.  Thanks again.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>175411</commentid>
    <comment_count>9</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-12-28 22:40:09 -0800</bug_when>
    <thetext>Attachment 42581 was posted by a committer and has review+, assigning to Anton Muhin for commit.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>178030</commentid>
    <comment_count>10</comment_count>
      <attachid>42581</attachid>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2010-01-06 23:37:18 -0800</bug_when>
    <thetext>Comment on attachment 42581
First take

I think that rejection was bogus.  Marking cq+ again.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>178050</commentid>
    <comment_count>11</comment_count>
      <attachid>42581</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2010-01-07 00:22:11 -0800</bug_when>
    <thetext>Comment on attachment 42581
First take

Clearing flags on attachment: 42581

Committed r52905: &lt;http://trac.webkit.org/changeset/52905&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>178051</commentid>
    <comment_count>12</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2010-01-07 00:22:16 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>179376</commentid>
    <comment_count>13</comment_count>
    <who name="anton muhin">antonm</who>
    <bug_when>2010-01-11 08:38:52 -0800</bug_when>
    <thetext>Oops.  I intentionally didn&apos;t commit it as I wasn&apos;t 100% sure it&apos;s necessary to fix the bug (and that bug never reappeared since then), but it slowed us down.  Let me double check and probably I would need to revert it back.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>179467</commentid>
    <comment_count>14</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2010-01-11 12:06:05 -0800</bug_when>
    <thetext>Please do not leave patches up for review, or even worse, r+&apos;d that you do not want committed. :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>181909</commentid>
    <comment_count>15</comment_count>
    <who name="anton muhin">antonm</who>
    <bug_when>2010-01-18 09:59:03 -0800</bug_when>
    <thetext>(In reply to comment #14)
&gt; Please do not leave patches up for review, or even worse, r+&apos;d that you do not
&gt; want committed. :)

I see, sorry.  I wanted that to be submittable on instant, but as I can see now I abused the system.

The case is probably too rare to have any guidelines for it, but if there is something immediate you or any other remembers, I&apos;d be glad to learn that :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>181935</commentid>
    <comment_count>16</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2010-01-18 11:29:27 -0800</bug_when>
    <thetext>Oh, it&apos;s not a big deal at all.  And no, sadly we don&apos;t really have guidelines for this sort of thing.  We don&apos;t really have a &quot;ready to commit, but commit blocked&quot; state, but we should probably eventually create one just for this kind of patch (as it&apos;s rather common).  :)  Thanks again for the patch!</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>42581</attachid>
            <date>2009-11-05 11:29:03 -0800</date>
            <delta_ts>2010-01-07 00:22:11 -0800</delta_ts>
            <desc>First take</desc>
            <filename>WebCore.patch</filename>
            <type>text/plain</type>
            <size>1363</size>
            <attacher name="anton muhin">antonm</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYkNvcmUvQ2hhbmdlTG9nCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIFdlYkNvcmUvQ2hhbmdlTG9n
CShyZXZpc2lvbiA1MDU2OCkKKysrIFdlYkNvcmUvQ2hhbmdlTG9nCSh3b3JraW5nIGNvcHkpCkBA
IC0xLDMgKzEsMTQgQEAKKzIwMDktMT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NhbDx2ODo6U3Ry
aW5nPjo6TmV3KHY4OjpIYW5kbGU8djg6OlN0cmluZz4oY2FjaGVkVjhTdHJpbmcpKTsKKyAgICB7
CisgICAgICAgIHY4OjpQZXJzaXN0ZW50PHY4OjpTdHJpbmc+IGhhbmRsZShjYWNoZWRWOFN0cmlu
Zyk7CisgICAgICAgIGlmICghaGFuZGxlLklzTmVhckRlYXRoKCkgJiYgIWhhbmRsZS5Jc0VtcHR5
KCkpCisgICAgICAgICAgICByZXR1cm4gdjg6OkxvY2FsPHY4OjpTdHJpbmc+OjpOZXcoaGFuZGxl
KTsKKyAgICB9CiAKICAgICB2ODo6TG9jYWw8djg6OlN0cmluZz4gbmV3U3RyaW5nID0gbWFrZUV4
dGVybmFsU3RyaW5nKHN0cmluZyk7CiAgICAgaWYgKG5ld1N0cmluZy5Jc0VtcHR5KCkpCg==
</data>

          </attachment>
      

    </bug>

</bugzilla>