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

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

Issue 623033002: Oilpan: Add support of pre-finalization callback to Oilpan infrastructure. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add a FIXME Created 6 years, 2 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 | Annotate | Revision Log
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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 class IDBCursor; 51 class IDBCursor;
52 struct IDBDatabaseMetadata; 52 struct IDBDatabaseMetadata;
53 class SharedBuffer; 53 class SharedBuffer;
54 54
55 class IDBRequest 55 class IDBRequest
56 : public RefCountedGarbageCollectedWillBeGarbageCollectedFinalized<IDBReques t> 56 : public RefCountedGarbageCollectedWillBeGarbageCollectedFinalized<IDBReques t>
57 , public EventTargetWithInlineData 57 , public EventTargetWithInlineData
58 , public ActiveDOMObject { 58 , public ActiveDOMObject {
59 DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(RefCountedGarbageCollected<I DBRequest>); 59 DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(RefCountedGarbageCollected<I DBRequest>);
60 DEFINE_WRAPPERTYPEINFO(); 60 DEFINE_WRAPPERTYPEINFO();
61 USING_PRE_FINALIZER(IDBRequest, dispose);
61 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(IDBRequest); 62 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(IDBRequest);
62 public: 63 public:
63 static IDBRequest* create(ScriptState*, IDBAny* source, IDBTransaction*); 64 static IDBRequest* create(ScriptState*, IDBAny* source, IDBTransaction*);
64 virtual ~IDBRequest(); 65 virtual ~IDBRequest();
65 void dispose();
66 virtual void trace(Visitor*) OVERRIDE; 66 virtual void trace(Visitor*) OVERRIDE;
67 67
68 ScriptState* scriptState() { return m_scriptState.get(); } 68 ScriptState* scriptState() { return m_scriptState.get(); }
69 ScriptValue result(ExceptionState&); 69 ScriptValue result(ExceptionState&);
70 DOMError* error(ExceptionState&) const; 70 DOMError* error(ExceptionState&) const;
71 ScriptValue source() const; 71 ScriptValue source() const;
72 IDBTransaction* transaction() const { return m_transaction.get(); } 72 IDBTransaction* transaction() const { return m_transaction.get(); }
73 73
74 bool isResultDirty() const { return m_resultDirty; } 74 bool isResultDirty() const { return m_resultDirty; }
75 IDBAny* resultAsAny() const { return m_result; } 75 IDBAny* resultAsAny() const { return m_result; }
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 virtual bool shouldEnqueueEvent() const; 135 virtual bool shouldEnqueueEvent() const;
136 void onSuccessInternal(IDBAny*); 136 void onSuccessInternal(IDBAny*);
137 void setResult(IDBAny*); 137 void setResult(IDBAny*);
138 138
139 bool m_contextStopped; 139 bool m_contextStopped;
140 Member<IDBTransaction> m_transaction; 140 Member<IDBTransaction> m_transaction;
141 ReadyState m_readyState; 141 ReadyState m_readyState;
142 bool m_requestAborted; // May be aborted by transaction then receive async o nsuccess; ignore vs. assert. 142 bool m_requestAborted; // May be aborted by transaction then receive async o nsuccess; ignore vs. assert.
143 143
144 private: 144 private:
145 void dispose();
145 void setResultCursor(IDBCursor*, IDBKey*, IDBKey* primaryKey, PassRefPtr<Sha redBuffer> value, PassOwnPtr<Vector<WebBlobInfo> >); 146 void setResultCursor(IDBCursor*, IDBKey*, IDBKey* primaryKey, PassRefPtr<Sha redBuffer> value, PassOwnPtr<Vector<WebBlobInfo> >);
146 void setBlobInfo(PassOwnPtr<Vector<WebBlobInfo>>); 147 void setBlobInfo(PassOwnPtr<Vector<WebBlobInfo>>);
147 void handleBlobAcks(); 148 void handleBlobAcks();
148 149
149 RefPtr<ScriptState> m_scriptState; 150 RefPtr<ScriptState> m_scriptState;
150 Member<IDBAny> m_source; 151 Member<IDBAny> m_source;
151 Member<IDBAny> m_result; 152 Member<IDBAny> m_result;
152 Member<DOMError> m_error; 153 Member<DOMError> m_error;
153 154
154 bool m_hasPendingActivity; 155 bool m_hasPendingActivity;
(...skipping 11 matching lines...) Expand all
166 OwnPtr<Vector<WebBlobInfo> > m_blobInfo; 167 OwnPtr<Vector<WebBlobInfo> > m_blobInfo;
167 168
168 bool m_didFireUpgradeNeededEvent; 169 bool m_didFireUpgradeNeededEvent;
169 bool m_preventPropagation; 170 bool m_preventPropagation;
170 bool m_resultDirty; 171 bool m_resultDirty;
171 }; 172 };
172 173
173 } // namespace blink 174 } // namespace blink
174 175
175 #endif // IDBRequest_h 176 #endif // IDBRequest_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698