Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(95)

Side by Side Diff: Source/WebCore/Modules/indexeddb/IDBRequest.h

Issue 11348011: Revert 128789 - IndexedDB: Use ScriptValue instead of SerializedScriptValue for get/openCursor (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1271/
Patch Set: Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 106
107 using ThreadSafeRefCounted<IDBCallbacks>::ref; 107 using ThreadSafeRefCounted<IDBCallbacks>::ref;
108 using ThreadSafeRefCounted<IDBCallbacks>::deref; 108 using ThreadSafeRefCounted<IDBCallbacks>::deref;
109 109
110 IDBTransactionBackendInterface::TaskType taskType() { return m_taskType; } 110 IDBTransactionBackendInterface::TaskType taskType() { return m_taskType; }
111 111
112 protected: 112 protected:
113 IDBRequest(ScriptExecutionContext*, PassRefPtr<IDBAny> source, IDBTransactio nBackendInterface::TaskType, IDBTransaction*); 113 IDBRequest(ScriptExecutionContext*, PassRefPtr<IDBAny> source, IDBTransactio nBackendInterface::TaskType, IDBTransaction*);
114 void enqueueEvent(PassRefPtr<Event>); 114 void enqueueEvent(PassRefPtr<Event>);
115 virtual bool shouldEnqueueEvent() const; 115 virtual bool shouldEnqueueEvent() const;
116 void onSuccessInternal(const ScriptValue&);
117 116
118 RefPtr<IDBAny> m_result; 117 RefPtr<IDBAny> m_result;
119 unsigned short m_errorCode; 118 unsigned short m_errorCode;
120 String m_errorMessage; 119 String m_errorMessage;
121 RefPtr<DOMError> m_error; 120 RefPtr<DOMError> m_error;
122 bool m_contextStopped; 121 bool m_contextStopped;
123 RefPtr<IDBTransaction> m_transaction; 122 RefPtr<IDBTransaction> m_transaction;
124 ReadyState m_readyState; 123 ReadyState m_readyState;
125 bool m_requestAborted; // May be aborted by transaction then receive async o nsuccess; ignore vs. assert. 124 bool m_requestAborted; // May be aborted by transaction then receive async o nsuccess; ignore vs. assert.
126 125
127 private: 126 private:
128 // EventTarget 127 // EventTarget
129 virtual void refEventTarget() { ref(); } 128 virtual void refEventTarget() { ref(); }
130 virtual void derefEventTarget() { deref(); } 129 virtual void derefEventTarget() { deref(); }
131 virtual EventTargetData* eventTargetData(); 130 virtual EventTargetData* eventTargetData();
132 virtual EventTargetData* ensureEventTargetData(); 131 virtual EventTargetData* ensureEventTargetData();
133 132
134 PassRefPtr<IDBCursor> getResultCursor(); 133 PassRefPtr<IDBCursor> getResultCursor();
135 void setResultCursor(PassRefPtr<IDBCursor>, PassRefPtr<IDBKey>, PassRefPtr<I DBKey> primaryKey, const ScriptValue&); 134 void setResultCursor(PassRefPtr<IDBCursor>, PassRefPtr<IDBKey>, PassRefPtr<I DBKey> primaryKey, PassRefPtr<SerializedScriptValue>);
136 135
137 RefPtr<IDBAny> m_source; 136 RefPtr<IDBAny> m_source;
138 const IDBTransactionBackendInterface::TaskType m_taskType; 137 const IDBTransactionBackendInterface::TaskType m_taskType;
139 138
140 bool m_hasPendingActivity; 139 bool m_hasPendingActivity;
141 Vector<RefPtr<Event> > m_enqueuedEvents; 140 Vector<RefPtr<Event> > m_enqueuedEvents;
142 141
143 // Only used if the result type will be a cursor. 142 // Only used if the result type will be a cursor.
144 IDBCursorBackendInterface::CursorType m_cursorType; 143 IDBCursorBackendInterface::CursorType m_cursorType;
145 IDBCursor::Direction m_cursorDirection; 144 IDBCursor::Direction m_cursorDirection;
146 bool m_cursorFinished; 145 bool m_cursorFinished;
147 RefPtr<IDBCursor> m_pendingCursor; 146 RefPtr<IDBCursor> m_pendingCursor;
148 RefPtr<IDBKey> m_cursorKey; 147 RefPtr<IDBKey> m_cursorKey;
149 RefPtr<IDBKey> m_cursorPrimaryKey; 148 RefPtr<IDBKey> m_cursorPrimaryKey;
150 ScriptValue m_cursorValue; 149 RefPtr<SerializedScriptValue> m_cursorValue;
151 bool m_didFireUpgradeNeededEvent; 150 bool m_didFireUpgradeNeededEvent;
152 151
153 EventTargetData m_eventTargetData; 152 EventTargetData m_eventTargetData;
154 }; 153 };
155 154
156 } // namespace WebCore 155 } // namespace WebCore
157 156
158 #endif // ENABLE(INDEXED_DATABASE) 157 #endif // ENABLE(INDEXED_DATABASE)
159 158
160 #endif // IDBRequest_h 159 #endif // IDBRequest_h
OLDNEW
« no previous file with comments | « Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp ('k') | Source/WebCore/Modules/indexeddb/IDBRequest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698