<?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>70041</bug_id>
          
          <creation_ts>2011-10-13 12:10:27 -0700</creation_ts>
          <short_desc>IndexedDB: Transactions fail to abort if all requests throw exceptions</short_desc>
          <delta_ts>2011-11-16 11:37:58 -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>WORKSFORME</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="Joshua Bell">jsbell</reporter>
          <assigned_to name="Joshua Bell">jsbell</assigned_to>
          <cc>dgrogan</cc>
    
    <cc>gregsimon</cc>
    
    <cc>hans</cc>
    
    <cc>jsbell</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>483366</commentid>
    <comment_count>0</comment_count>
    <who name="Joshua Bell">jsbell</who>
    <bug_when>2011-10-13 12:10:27 -0700</bug_when>
    <thetext>Repro:

* Start a transaction
* Make a request against the transaction that raises an exception (e.g. a put() with an invalid key)
* Make no other requests against the transaction, let it execute

Expected:

* Transaction fires abort event

Actual:

* Transaction never fires abort, error or complete events

Initial investigation:

This appears to be caused by the path taken when requests are created but aborted early due to exceptions - a request is created, registered with the transaction, then marked for &quot;early death&quot;. But the markEarlyDeath() method does not unregister it from the transaction; that doesn&apos;t happen until the request&apos;s destructor is called. Perhaps it should be unregistered immediately? Further investigation is needed, and we should understand why the transaction never completes.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>483372</commentid>
    <comment_count>1</comment_count>
      <attachid>110885</attachid>
    <who name="Joshua Bell">jsbell</who>
    <bug_when>2011-10-13 12:13:21 -0700</bug_when>
    <thetext>Created attachment 110885
Repro case for the bug

Attachment (bug70041.html) should show ABORTED (or ERROR or COMPLETE) but never does.

You can try commenting out both store.put() to see it output ABORTED, or uncomment both store.put() calls to see it COMPLETE</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>483392</commentid>
    <comment_count>2</comment_count>
    <who name="Joshua Bell">jsbell</who>
    <bug_when>2011-10-13 12:32:21 -0700</bug_when>
    <thetext>NOTE: LayoutTests/storage/indexeddb/objectstore-basics.html has an unexpected dependency on this buggy behavior - it creates a transaction that has no requests other than one which generated an exception, yet expects the transaction to not abort. So fixing this issue may cause that layout test to (erroneously) fail.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>495856</commentid>
    <comment_count>3</comment_count>
    <who name="Joshua Bell">jsbell</who>
    <bug_when>2011-11-03 16:23:58 -0700</bug_when>
    <thetext>The attached repro case no longer repros :( It reports &quot;ABORTED&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>499187</commentid>
    <comment_count>4</comment_count>
    <who name="Joshua Bell">jsbell</who>
    <bug_when>2011-11-09 11:29:40 -0800</bug_when>
    <thetext>(In reply to comment #3)
&gt; The attached repro case no longer repros :( It reports &quot;ABORTED&quot;

To clarify, it repros in M16, but not TOT Chrome.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>110885</attachid>
            <date>2011-10-13 12:13:21 -0700</date>
            <delta_ts>2011-10-13 12:13:21 -0700</delta_ts>
            <desc>Repro case for the bug</desc>
            <filename>bug70041.html</filename>
            <type>text/html</type>
            <size>1073</size>
            <attacher name="Joshua Bell">jsbell</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxzY3JpcHQ+CndpbmRvdy5pbmRleGVkREIgPSB3aW5kb3cuaW5kZXhl
ZERCIHx8IHdpbmRvdy53ZWJraXRJbmRleGVkREI7CndpbmRvdy5JREJUcmFuc2FjdGlvbiA9IHdp
bmRvdy5JREJUcmFuc2FjdGlvbiB8fCB3aW5kb3cud2Via2l0SURCVHJhbnNhY3Rpb247Cgp2YXIg
b3BlbnJlcSA9IHdlYmtpdEluZGV4ZWREQi5vcGVuKCJkYiIgKyBTdHJpbmcobmV3IERhdGUpKTsK
b3BlbnJlcS5vbmVycm9yID0gZnVuY3Rpb24oZSkgeyBjb25zb2xlLmVycm9yKGUpOyB9OwpvcGVu
cmVxLm9uc3VjY2VzcyA9IGZ1bmN0aW9uKGUpIHsKICB2YXIgZGIgPSBlLnRhcmdldC5yZXN1bHQ7
CiAgaWYgKGRiLnZlcnNpb24gIT09ICIxIikgewogICAgdmFyIHN2cmVxID0gZGIuc2V0VmVyc2lv
bigiMSIpOwogICAgc3ZyZXEub25lcnJvciA9IGZ1bmN0aW9uKGUpIHsgY29uc29sZS5lcnJvcihl
KTsgfTsKICAgIHN2cmVxLm9uc3VjY2VzcyA9IGZ1bmN0aW9uIChlKSB7IAogICAgICBkYi5jcmVh
dGVPYmplY3RTdG9yZSgic3RvcmUiKTsKICAgICAgZG9UcmFucygpOwogICAgfTsKICB9IGVsc2Ug
ewogICAgZG9UcmFucygpOwogIH0KCiAgZnVuY3Rpb24gZG9UcmFucygpIHsKICAgIHZhciB0cmFu
cyA9IGRiLnRyYW5zYWN0aW9uKFsic3RvcmUiXSwgSURCVHJhbnNhY3Rpb24uUkVBRF9XUklURSk7
CiAgICB2YXIgc3RvcmUgPSB0cmFucy5vYmplY3RTdG9yZSgnc3RvcmUnKTsKICAgIHRyeSB7IAog
ICAgICAgIHN0b3JlLnB1dCgidmFsdWUiLCBudWxsKTsgLy8gaW52YWxpZCBrZXkKICAgIH0gY2F0
Y2ggKGUpIHsKICAgIH0KICAgIC8vc3RvcmUucHV0KCJhbm90aGVyIHZhbHVlIiwgInZhbGlkIGtl
eSIpOwoKICAgIHRyYW5zLm9uYWJvcnQgPSBmdW5jdGlvbihlKSB7IGRvY3VtZW50LndyaXRlKCJB
Qk9SVEVEIik7IH07CiAgICB0cmFucy5vbmVycm9yID0gZnVuY3Rpb24oZSkgeyBkb2N1bWVudC53
cml0ZSgiRVJST1IiKTsgfTsKICAgIHRyYW5zLm9uY29tcGxldGUgPSBmdW5jdGlvbihlKSB7IGRv
Y3VtZW50LndyaXRlKCJDT01QTEVURSIpOyB9OwogIH0KCn07Cjwvc2NyaXB0Pgo=
</data>

          </attachment>
      

    </bug>

</bugzilla>