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

Side by Side Diff: Source/modules/indexeddb/IDBCursor.h

Issue 426063010: IndexedDB: Fixed threading bugs with use of AtomicStrings. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Commented names and removed bison build rule Created 6 years, 4 months 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 namespace blink { 45 namespace blink {
46 46
47 class ExceptionState; 47 class ExceptionState;
48 class IDBAny; 48 class IDBAny;
49 class IDBTransaction; 49 class IDBTransaction;
50 class ExecutionContext; 50 class ExecutionContext;
51 class SharedBuffer; 51 class SharedBuffer;
52 52
53 class IDBCursor : public GarbageCollectedFinalized<IDBCursor>, public ScriptWrap pable { 53 class IDBCursor : public GarbageCollectedFinalized<IDBCursor>, public ScriptWrap pable {
54 public: 54 public:
55 static const AtomicString& directionNext();
56 static const AtomicString& directionNextUnique();
57 static const AtomicString& directionPrev();
58 static const AtomicString& directionPrevUnique();
59
60 static blink::WebIDBCursorDirection stringToDirection(const String& modeStri ng, ExceptionState&); 55 static blink::WebIDBCursorDirection stringToDirection(const String& modeStri ng, ExceptionState&);
61 static const AtomicString& directionToString(unsigned short mode);
62 56
63 static IDBCursor* create(PassOwnPtr<blink::WebIDBCursor>, blink::WebIDBCurso rDirection, IDBRequest*, IDBAny* source, IDBTransaction*); 57 static IDBCursor* create(PassOwnPtr<blink::WebIDBCursor>, blink::WebIDBCurso rDirection, IDBRequest*, IDBAny* source, IDBTransaction*);
64 virtual ~IDBCursor(); 58 virtual ~IDBCursor();
65 void trace(Visitor*); 59 void trace(Visitor*);
66 void contextWillBeDestroyed() { m_backend.clear(); } 60 void contextWillBeDestroyed() { m_backend.clear(); }
67 61
68 // Implement the IDL 62 // Implement the IDL
69 const String& direction() const { return directionToString(m_direction); } 63 const String& direction() const;
70 ScriptValue key(ScriptState*); 64 ScriptValue key(ScriptState*);
71 ScriptValue primaryKey(ScriptState*); 65 ScriptValue primaryKey(ScriptState*);
72 ScriptValue value(ScriptState*); 66 ScriptValue value(ScriptState*);
73 ScriptValue source(ScriptState*) const; 67 ScriptValue source(ScriptState*) const;
74 68
75 IDBRequest* update(ScriptState*, ScriptValue&, ExceptionState&); 69 IDBRequest* update(ScriptState*, ScriptValue&, ExceptionState&);
76 void advance(unsigned long, ExceptionState&); 70 void advance(unsigned long, ExceptionState&);
77 void continueFunction(ScriptState*, const ScriptValue& key, ExceptionState&) ; 71 void continueFunction(ScriptState*, const ScriptValue& key, ExceptionState&) ;
78 void continuePrimaryKey(ScriptState*, const ScriptValue& key, const ScriptVa lue& primaryKey, ExceptionState&); 72 void continuePrimaryKey(ScriptState*, const ScriptValue& key, const ScriptVa lue& primaryKey, ExceptionState&);
79 IDBRequest* deleteFunction(ScriptState*, ExceptionState&); 73 IDBRequest* deleteFunction(ScriptState*, ExceptionState&);
(...skipping 30 matching lines...) Expand all
110 bool m_valueDirty; 104 bool m_valueDirty;
111 Member<IDBKey> m_key; 105 Member<IDBKey> m_key;
112 Member<IDBKey> m_primaryKey; 106 Member<IDBKey> m_primaryKey;
113 RefPtr<SharedBuffer> m_value; 107 RefPtr<SharedBuffer> m_value;
114 OwnPtr<Vector<blink::WebBlobInfo> > m_blobInfo; 108 OwnPtr<Vector<blink::WebBlobInfo> > m_blobInfo;
115 }; 109 };
116 110
117 } // namespace blink 111 } // namespace blink
118 112
119 #endif // IDBCursor_h 113 #endif // IDBCursor_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698