https://bugs.webkit.org/show_bug.cgi?id=92069
Patch by Xingnan Wang <xingnan.wang@intel.com> on 2012-07-25
Reviewed by Kentaro Hara.
Source/WebCore:
Keep aligned with the W3C spec.
http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#widl-IDBTransaction-abort-void
Test: storage/indexeddb/transaction-abort.html.
* Modules/indexeddb/IDBTransaction.cpp:
(WebCore::IDBTransaction::abort):
(WebCore):
* Modules/indexeddb/IDBTransaction.h:
(IDBTransaction):
* Modules/indexeddb/IDBTransaction.idl:
LayoutTests:
Add the exception test for IDBTransaction::abort().
* storage/indexeddb/resources/transaction-abort.js:
(transactionAborted):
* storage/indexeddb/transaction-abort-expected.txt:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@123698
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2012-07-25 Xingnan Wang <xingnan.wang@intel.com>
+
+ IndexedDB: IDBTransaction::abort() should throw DOMException
+ https://bugs.webkit.org/show_bug.cgi?id=92069
+
+ Reviewed by Kentaro Hara.
+
+ Add the exception test for IDBTransaction::abort().
+
+ * storage/indexeddb/resources/transaction-abort.js:
+ (transactionAborted):
+ * storage/indexeddb/transaction-abort-expected.txt:
+
2012-07-25 Joshua Netterfield <jnetterfield@rim.com>
[BlackBerry] Update fast/canvas/webgl expectations
abortFired = true;
evalAndExpectException("store.add({x: 'value5', y: 'zzz5'}, 'key5')", "IDBDatabaseException.TRANSACTION_INACTIVE_ERR", "'TransactionInactiveError'");
+
+ evalAndExpectException("trans.abort()", "DOMException.INVALID_STATE_ERR", "'InvalidStateError'");
+
finishJSTest();
}
PASS Exception was thrown.
PASS code is IDBDatabaseException.TRANSACTION_INACTIVE_ERR
PASS ename is 'TransactionInactiveError'
+Expecting exception from trans.abort()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
PASS successfullyParsed is true
TEST COMPLETE
+2012-07-25 Xingnan Wang <xingnan.wang@intel.com>
+
+ IndexedDB: IDBTransaction::abort() should throw DOMException
+ https://bugs.webkit.org/show_bug.cgi?id=92069
+
+ Reviewed by Kentaro Hara.
+
+ Keep aligned with the W3C spec.
+ http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#widl-IDBTransaction-abort-void
+
+ Test: storage/indexeddb/transaction-abort.html.
+
+ * Modules/indexeddb/IDBTransaction.cpp:
+ (WebCore::IDBTransaction::abort):
+ (WebCore):
+ * Modules/indexeddb/IDBTransaction.h:
+ (IDBTransaction):
+ * Modules/indexeddb/IDBTransaction.idl:
+
2012-07-25 Tony Chang <tony@chromium.org>
flexitems can overflow the flexbox due to rounding
if (m_transaction) {
if (event->type() == eventNames().errorEvent && dontPreventDefault && !m_requestAborted) {
m_transaction->setError(m_error);
- m_transaction->abort();
+ ExceptionCode unused;
+ m_transaction->abort(unused);
}
if (event->type() != eventNames().blockedEvent)
{
if (m_transaction && !m_requestAborted) {
m_transaction->setError(DOMError::create(IDBDatabaseException::getErrorName(IDBDatabaseException::IDB_ABORT_ERR)));
- m_transaction->abort();
+ ExceptionCode unused;
+ m_transaction->abort(unused);
}
}
m_backend->commit();
}
-void IDBTransaction::abort()
+void IDBTransaction::abort(ExceptionCode& ec)
{
- if (m_state == Finishing || m_state == Finished)
+ if (m_state == Finishing || m_state == Finished) {
+ ec = IDBDatabaseException::IDB_INVALID_STATE_ERR;
return;
+ }
+
m_state = Finishing;
m_active = false;
ActiveDOMObject::stop();
m_contextStopped = true;
- abort();
+ ExceptionCode unused;
+ abort(unused);
}
void IDBTransaction::enqueueEvent(PassRefPtr<Event> event)
IDBDatabase* db() const { return m_database.get(); }
PassRefPtr<DOMError> error() const { return m_error; }
PassRefPtr<IDBObjectStore> objectStore(const String& name, ExceptionCode&);
- void abort();
+ void abort(ExceptionCode&);
class OpenCursorNotifier {
public:
// Methods
IDBObjectStore objectStore (in DOMString name)
raises (IDBDatabaseException);
- void abort ();
+ void abort ()
+ raises (IDBDatabaseException);
// Events
attribute EventListener onabort;