diff options
author | Iain Merrick <husky@google.com> | 2010-09-13 16:35:48 +0100 |
---|---|---|
committer | Iain Merrick <husky@google.com> | 2010-09-16 12:10:42 +0100 |
commit | 5abb8606fa57c3ebfc8b3c3dbc3fa4a25d2ae306 (patch) | |
tree | ddce1aa5e3b6967a69691892e500897558ff8ab6 /WebCore/storage/IDBRequest.h | |
parent | 12bec63ec71e46baba27f0bd9bd9d8067683690a (diff) | |
download | external_webkit-5abb8606fa57c3ebfc8b3c3dbc3fa4a25d2ae306.zip external_webkit-5abb8606fa57c3ebfc8b3c3dbc3fa4a25d2ae306.tar.gz external_webkit-5abb8606fa57c3ebfc8b3c3dbc3fa4a25d2ae306.tar.bz2 |
Merge WebKit at r67178 : Initial merge by git.
Change-Id: I57e01163b6866cb029cdadf405a0394a3918bc18
Diffstat (limited to 'WebCore/storage/IDBRequest.h')
-rw-r--r-- | WebCore/storage/IDBRequest.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/WebCore/storage/IDBRequest.h b/WebCore/storage/IDBRequest.h index ddfdcf3..9b0ea7e 100644 --- a/WebCore/storage/IDBRequest.h +++ b/WebCore/storage/IDBRequest.h @@ -38,6 +38,7 @@ #include "IDBAny.h" #include "IDBCallbacks.h" #include "Timer.h" +#include <wtf/Vector.h> namespace WebCore { @@ -49,16 +50,15 @@ public: // Defined in the IDL void abort(); enum ReadyState { - INITIAL = 0, LOADING = 1, DONE = 2 }; unsigned short readyState() const { return m_readyState; } - PassRefPtr<IDBDatabaseError> error() const { return m_error; } - PassRefPtr<IDBAny> result() { return m_result; } DEFINE_ATTRIBUTE_EVENT_LISTENER(success); DEFINE_ATTRIBUTE_EVENT_LISTENER(error); + bool resetReadyState(); + // IDBCallbacks virtual void onError(PassRefPtr<IDBDatabaseError>); virtual void onSuccess(); // For "null". @@ -83,7 +83,7 @@ private: IDBRequest(ScriptExecutionContext*, PassRefPtr<IDBAny> source); void timerFired(Timer<IDBRequest>*); - void onEventCommon(); + void scheduleEvent(PassRefPtr<IDBAny> result, PassRefPtr<IDBDatabaseError>); // EventTarget virtual void refEventTarget() { ref(); } @@ -93,8 +93,11 @@ private: RefPtr<IDBAny> m_source; - RefPtr<IDBAny> m_result; - RefPtr<IDBDatabaseError> m_error; + struct PendingEvent { + RefPtr<IDBAny> m_result; + RefPtr<IDBDatabaseError> m_error; + }; + Vector<PendingEvent> m_pendingEvents; // Used to fire events asynchronously. Timer<IDBRequest> m_timer; |