New issue
Advanced search Search tips

Issue 698342 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

IndexedDB: transaction aborted after uncaught exception in first event handler

Project Member Reported by jsb...@chromium.org, Mar 3 2017

Issue description

Repro:

* Make an IDBRequest
* Add two 'success' event listeners
* Throw an exception in the first event listener

Expected:

* Transaction is still active (has not aborted) in second listener

Actual:

* Transaction is aborted

Gecko behaves as expected.

The spec https://w3c.github.io/IndexedDB/#fire-success-event says:

"If an exception was propagated out from any event handler while dispatching the event in step 3, abort the transaction..."

... implying this happens at the end of dispatch.

 
Project Member

Comment 1 by bugdroid1@chromium.org, Mar 6 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ed3d60a6f09642595391b6678d46f548b649e832

commit ed3d60a6f09642595391b6678d46f548b649e832
Author: jsbell <jsbell@chromium.org>
Date: Mon Mar 06 20:23:27 2017

IndexedDB: Align abort behavior on uncaught exception with Gecko

Indexed DB specifies that an uncaught exception in an event handler
should abort the transaction. The spec states that this should happen
after dispatch, and Gecko agrees. Blink was aborting after the
specific handler aborted.

This change aligns Blink's behavior with Gecko and the spec, and
adds test coverage to web-platform-tests.

BUG= 698342 
R=pwnall@chromium.org

Review-Url: https://codereview.chromium.org/2734533002
Cr-Commit-Position: refs/heads/master@{#454937}

[add] https://crrev.com/ed3d60a6f09642595391b6678d46f548b649e832/third_party/WebKit/LayoutTests/external/wpt/IndexedDB/fire-error-event-exception.html
[add] https://crrev.com/ed3d60a6f09642595391b6678d46f548b649e832/third_party/WebKit/LayoutTests/external/wpt/IndexedDB/fire-success-event-exception.html
[add] https://crrev.com/ed3d60a6f09642595391b6678d46f548b649e832/third_party/WebKit/LayoutTests/external/wpt/IndexedDB/fire-upgradeneeded-event-exception.html
[modify] https://crrev.com/ed3d60a6f09642595391b6678d46f548b649e832/third_party/WebKit/LayoutTests/external/wpt/IndexedDB/support.js
[modify] https://crrev.com/ed3d60a6f09642595391b6678d46f548b649e832/third_party/WebKit/Source/modules/indexeddb/IDBRequest.cpp
[modify] https://crrev.com/ed3d60a6f09642595391b6678d46f548b649e832/third_party/WebKit/Source/modules/indexeddb/IDBRequest.h

Status: Fixed (was: Started)

Sign in to add a comment