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

Side by Side Diff: Source/WebCore/Modules/indexeddb/IDBCursor.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 23 matching lines...) Expand all
34 #include <wtf/RefCounted.h> 34 #include <wtf/RefCounted.h>
35 #include <wtf/RefPtr.h> 35 #include <wtf/RefPtr.h>
36 36
37 namespace WebCore { 37 namespace WebCore {
38 38
39 class IDBAny; 39 class IDBAny;
40 class IDBCallbacks; 40 class IDBCallbacks;
41 class IDBCursorBackendInterface; 41 class IDBCursorBackendInterface;
42 class IDBRequest; 42 class IDBRequest;
43 class ScriptExecutionContext; 43 class ScriptExecutionContext;
44 class SerializedScriptValue;
44 45
45 typedef int ExceptionCode; 46 typedef int ExceptionCode;
46 47
47 class IDBCursor : public RefCounted<IDBCursor> { 48 class IDBCursor : public RefCounted<IDBCursor> {
48 public: 49 public:
49 enum Direction { 50 enum Direction {
50 NEXT = 0, 51 NEXT = 0,
51 NEXT_NO_DUPLICATE = 1, 52 NEXT_NO_DUPLICATE = 1,
52 PREV = 2, 53 PREV = 2,
53 PREV_NO_DUPLICATE = 3, 54 PREV_NO_DUPLICATE = 3,
(...skipping 20 matching lines...) Expand all
74 PassRefPtr<IDBAny> value(); 75 PassRefPtr<IDBAny> value();
75 IDBAny* source() const; 76 IDBAny* source() const;
76 77
77 PassRefPtr<IDBRequest> update(ScriptExecutionContext*, ScriptValue&, Excepti onCode&); 78 PassRefPtr<IDBRequest> update(ScriptExecutionContext*, ScriptValue&, Excepti onCode&);
78 void advance(long, ExceptionCode&); 79 void advance(long, ExceptionCode&);
79 void continueFunction(PassRefPtr<IDBKey>, ExceptionCode&); 80 void continueFunction(PassRefPtr<IDBKey>, ExceptionCode&);
80 PassRefPtr<IDBRequest> deleteFunction(ScriptExecutionContext*, ExceptionCode &); 81 PassRefPtr<IDBRequest> deleteFunction(ScriptExecutionContext*, ExceptionCode &);
81 82
82 void postSuccessHandlerCallback(); 83 void postSuccessHandlerCallback();
83 void close(); 84 void close();
84 void setValueReady(PassRefPtr<IDBKey>, PassRefPtr<IDBKey> primaryKey, Script Value&); 85 void setValueReady(PassRefPtr<IDBKey>, PassRefPtr<IDBKey> primaryKey, PassRe fPtr<SerializedScriptValue>);
85 86
86 // The spec requires that the script object that wraps the value 87 // The spec requires that the script object that wraps the value
87 // be unchanged until the value changes as a result of the cursor 88 // be unchanged until the value changes as a result of the cursor
88 // advancing. 89 // advancing.
89 bool valueIsDirty() { return m_valueIsDirty; } 90 bool valueIsDirty() { return m_valueIsDirty; }
90 91
91 protected: 92 protected:
92 IDBCursor(PassRefPtr<IDBCursorBackendInterface>, Direction, IDBRequest*, IDB Any* source, IDBTransaction*); 93 IDBCursor(PassRefPtr<IDBCursorBackendInterface>, Direction, IDBRequest*, IDB Any* source, IDBTransaction*);
93 virtual bool isKeyCursor() const { return true; } 94 virtual bool isKeyCursor() const { return true; }
94 95
(...skipping 13 matching lines...) Expand all
108 RefPtr<IDBKey> m_currentPrimaryKey; 109 RefPtr<IDBKey> m_currentPrimaryKey;
109 RefPtr<IDBAny> m_currentValue; 110 RefPtr<IDBAny> m_currentValue;
110 bool m_valueIsDirty; 111 bool m_valueIsDirty;
111 }; 112 };
112 113
113 } // namespace WebCore 114 } // namespace WebCore
114 115
115 #endif 116 #endif
116 117
117 #endif // IDBCursor_h 118 #endif // IDBCursor_h
OLDNEW
« no previous file with comments | « Source/WebCore/Modules/indexeddb/IDBAny.cpp ('k') | Source/WebCore/Modules/indexeddb/IDBCursor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698