From 81bc750723a18f21cd17d1b173cd2a4dda9cea6e Mon Sep 17 00:00:00 2001 From: Ben Murdoch Date: Tue, 24 May 2011 11:24:40 +0100 Subject: Merge WebKit at r80534: Intial merge by Git Change-Id: Ia7a83357124c9e1cdb1debf55d9661ec0bd09a61 --- Source/WebCore/storage/IDBRequest.h | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) (limited to 'Source/WebCore/storage/IDBRequest.h') diff --git a/Source/WebCore/storage/IDBRequest.h b/Source/WebCore/storage/IDBRequest.h index 5c31318..b6b4e5b 100644 --- a/Source/WebCore/storage/IDBRequest.h +++ b/Source/WebCore/storage/IDBRequest.h @@ -36,12 +36,12 @@ #include "EventListener.h" #include "EventNames.h" #include "EventTarget.h" +#include "ExceptionCode.h" #include "IDBAny.h" #include "IDBCallbacks.h" namespace WebCore { -class IDBEvent; class IDBTransaction; class IDBRequest : public IDBCallbacks, public EventTarget, public ActiveDOMObject { @@ -49,16 +49,28 @@ public: static PassRefPtr create(ScriptExecutionContext*, PassRefPtr source, IDBTransaction*); virtual ~IDBRequest(); + PassRefPtr result(ExceptionCode&) const; + unsigned short errorCode(ExceptionCode&) const; + String webkitErrorMessage(ExceptionCode&) const; + PassRefPtr source() const; + PassRefPtr transaction() const; + // Defined in the IDL enum ReadyState { LOADING = 1, - DONE = 2 + DONE = 2, + EarlyDeath = 3 }; - unsigned short readyState() const { return m_readyState; } + unsigned short readyState() const; + DEFINE_ATTRIBUTE_EVENT_LISTENER(success); DEFINE_ATTRIBUTE_EVENT_LISTENER(error); + void markEarlyDeath(); bool resetReadyState(IDBTransaction*); + void setCursorType(IDBCursorBackendInterface::CursorType); + IDBAny* source(); + void abort(); // IDBCallbacks virtual void onError(PassRefPtr); @@ -66,9 +78,9 @@ public: virtual void onSuccess(PassRefPtr); virtual void onSuccess(PassRefPtr); virtual void onSuccess(PassRefPtr); - virtual void onSuccess(PassRefPtr); virtual void onSuccess(PassRefPtr); virtual void onSuccess(PassRefPtr); + virtual void onBlocked(); // ActiveDOMObject virtual bool hasPendingActivity() const; @@ -78,15 +90,19 @@ public: virtual ScriptExecutionContext* scriptExecutionContext() const; virtual bool dispatchEvent(PassRefPtr); bool dispatchEvent(PassRefPtr event, ExceptionCode& ec) { return EventTarget::dispatchEvent(event, ec); } + virtual void uncaughtExceptionInEventHandler(); using ThreadSafeShared::ref; using ThreadSafeShared::deref; -private: +protected: IDBRequest(ScriptExecutionContext*, PassRefPtr source, IDBTransaction*); - void enqueueEvent(PassRefPtr); + RefPtr m_result; + unsigned short m_errorCode; + String m_errorMessage; +private: // EventTarget virtual void refEventTarget() { ref(); } virtual void derefEventTarget() { deref(); } @@ -98,6 +114,10 @@ private: ReadyState m_readyState; bool m_finished; // Is it possible that we'll fire any more events? If not, we're finished. + Vector > m_enqueuedEvents; + + // Only used if the result type will be a cursor. + IDBCursorBackendInterface::CursorType m_cursorType; EventTargetData m_eventTargetData; }; -- cgit v1.1