2011-02-17 Jeremy Orlow <jorlow@chromium.org>
authorjorlow@chromium.org <jorlow@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 Feb 2011 21:06:12 +0000 (21:06 +0000)
committerjorlow@chromium.org <jorlow@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 Feb 2011 21:06:12 +0000 (21:06 +0000)
commit82663c549f1fe6781fd92e67549c31e3103d4bb3
tree6d1aaf2301fe0a7c9a857877d8257f7ddee5b737
parent8c567c90c5ed22cfc1312c448eef6d84416d9162
2011-02-17  Jeremy Orlow  <jorlow@chromium.org>

        Reviewed by Nate Chapin.

        Throwing in an IndexedDB error or success event should lead to the transaction aborting
        https://bugs.webkit.org/show_bug.cgi?id=54249

        * storage/indexeddb/exception-in-event-aborts-expected.txt: Added.
        * storage/indexeddb/exception-in-event-aborts.html: Added.
        * storage/indexeddb/queued-commands-expected.txt:
        * storage/indexeddb/queued-commands.html:
        * storage/indexeddb/request-event-propagation-expected.txt:
        * storage/indexeddb/request-event-propagation.html:
        * storage/indexeddb/resources/shared.js:
        (unexpectedErrorCallback):
        * storage/indexeddb/transaction-event-propagation-expected.txt:
        * storage/indexeddb/transaction-event-propagation.html:
2011-02-17  Jeremy Orlow  <jorlow@chromium.org>

        Reviewed by Nate Chapin.

        Throwing in an IndexedDB error or success event should lead to the transaction aborting
        https://bugs.webkit.org/show_bug.cgi?id=54249

        When an exception is thrown but not handled  within an IDBRequests success/error event,
        we should abort the transaction.

        Test: storage/indexeddb/exception-in-event-aborts.html

        * bindings/js/JSEventListener.cpp:
        (WebCore::JSEventListener::handleEvent):
        * bindings/js/JSEventTarget.cpp:
        (WebCore::toJS):
        * bindings/v8/V8AbstractEventListener.cpp:
        (WebCore::V8AbstractEventListener::invokeEventHandler):
        * dom/EventTarget.cpp:
        (WebCore::EventTarget::uncaughtExceptionInEventHandler):
        * dom/EventTarget.h:
        * storage/IDBRequest.cpp:
        (WebCore::IDBRequest::uncaughtExceptionInEventHandler):
        * storage/IDBRequest.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@78908 268f45cc-cd09-0410-ab3c-d52691b4dbfc
18 files changed:
LayoutTests/ChangeLog
LayoutTests/storage/indexeddb/exception-in-event-aborts-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/exception-in-event-aborts.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/queued-commands-expected.txt
LayoutTests/storage/indexeddb/queued-commands.html
LayoutTests/storage/indexeddb/request-event-propagation-expected.txt
LayoutTests/storage/indexeddb/request-event-propagation.html
LayoutTests/storage/indexeddb/resources/shared.js
LayoutTests/storage/indexeddb/transaction-event-propagation-expected.txt
LayoutTests/storage/indexeddb/transaction-event-propagation.html
Source/WebCore/ChangeLog
Source/WebCore/bindings/js/JSEventListener.cpp
Source/WebCore/bindings/js/JSEventTarget.cpp
Source/WebCore/bindings/v8/V8AbstractEventListener.cpp
Source/WebCore/dom/EventTarget.cpp
Source/WebCore/dom/EventTarget.h
Source/WebCore/storage/IDBRequest.cpp
Source/WebCore/storage/IDBRequest.h