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

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

Issue 243523003: Fire window.onerror for uncaught IndexedDB errors (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased and linkage fix Created 5 years, 3 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
« no previous file with comments | « Source/core/events/ErrorEvent.h ('k') | Source/modules/indexeddb/IDBRequest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 #include "public/platform/WebBlobInfo.h" 46 #include "public/platform/WebBlobInfo.h"
47 #include "public/platform/modules/indexeddb/WebIDBCursor.h" 47 #include "public/platform/modules/indexeddb/WebIDBCursor.h"
48 #include "public/platform/modules/indexeddb/WebIDBTypes.h" 48 #include "public/platform/modules/indexeddb/WebIDBTypes.h"
49 49
50 namespace blink { 50 namespace blink {
51 51
52 class ExceptionState; 52 class ExceptionState;
53 class IDBCursor; 53 class IDBCursor;
54 struct IDBDatabaseMetadata; 54 struct IDBDatabaseMetadata;
55 class IDBValue; 55 class IDBValue;
56 class ScriptCallStack;
56 57
57 class MODULES_EXPORT IDBRequest 58 class MODULES_EXPORT IDBRequest
58 : public RefCountedGarbageCollectedEventTargetWithInlineData<IDBRequest> 59 : public RefCountedGarbageCollectedEventTargetWithInlineData<IDBRequest>
59 , public ActiveDOMObject { 60 , public ActiveDOMObject {
60 REFCOUNTED_GARBAGE_COLLECTED_EVENT_TARGET(IDBRequest); 61 REFCOUNTED_GARBAGE_COLLECTED_EVENT_TARGET(IDBRequest);
61 DEFINE_WRAPPERTYPEINFO(); 62 DEFINE_WRAPPERTYPEINFO();
62 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(IDBRequest); 63 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(IDBRequest);
63 public: 64 public:
64 static IDBRequest* create(ScriptState*, IDBAny* source, IDBTransaction*); 65 static IDBRequest* create(ScriptState*, IDBAny* source, IDBTransaction*);
65 ~IDBRequest() override; 66 ~IDBRequest() override;
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 void onSuccessInternal(IDBAny*); 134 void onSuccessInternal(IDBAny*);
134 void setResult(IDBAny*); 135 void setResult(IDBAny*);
135 136
136 // EventTarget 137 // EventTarget
137 bool dispatchEventInternal(PassRefPtrWillBeRawPtr<Event>) override; 138 bool dispatchEventInternal(PassRefPtrWillBeRawPtr<Event>) override;
138 139
139 bool m_contextStopped = false; 140 bool m_contextStopped = false;
140 Member<IDBTransaction> m_transaction; 141 Member<IDBTransaction> m_transaction;
141 ReadyState m_readyState = PENDING; 142 ReadyState m_readyState = PENDING;
142 bool m_requestAborted = false; // May be aborted by transaction then receive async onsuccess; ignore vs. assert. 143 bool m_requestAborted = false; // May be aborted by transaction then receive async onsuccess; ignore vs. assert.
144 RefPtrWillBeMember<ScriptCallStack> m_creationStack;
143 145
144 private: 146 private:
145 void setResultCursor(IDBCursor*, IDBKey*, IDBKey* primaryKey, PassRefPtr<IDB Value>); 147 void setResultCursor(IDBCursor*, IDBKey*, IDBKey* primaryKey, PassRefPtr<IDB Value>);
146 void ackReceivedBlobs(const IDBValue*); 148 void ackReceivedBlobs(const IDBValue*);
147 void ackReceivedBlobs(const Vector<RefPtr<IDBValue>>&); 149 void ackReceivedBlobs(const Vector<RefPtr<IDBValue>>&);
148 150
149 RefPtr<ScriptState> m_scriptState; 151 RefPtr<ScriptState> m_scriptState;
150 Member<IDBAny> m_source; 152 Member<IDBAny> m_source;
151 Member<IDBAny> m_result; 153 Member<IDBAny> m_result;
152 Member<DOMError> m_error; 154 Member<DOMError> m_error;
(...skipping 12 matching lines...) Expand all
165 RefPtr<IDBValue> m_cursorValue; 167 RefPtr<IDBValue> m_cursorValue;
166 168
167 bool m_didFireUpgradeNeededEvent = false; 169 bool m_didFireUpgradeNeededEvent = false;
168 bool m_preventPropagation = false; 170 bool m_preventPropagation = false;
169 bool m_resultDirty = true; 171 bool m_resultDirty = true;
170 }; 172 };
171 173
172 } // namespace blink 174 } // namespace blink
173 175
174 #endif // IDBRequest_h 176 #endif // IDBRequest_h
OLDNEW
« no previous file with comments | « Source/core/events/ErrorEvent.h ('k') | Source/modules/indexeddb/IDBRequest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698