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

Side by Side Diff: third_party/WebKit/Source/modules/indexeddb/IDBOpenDBRequest.cpp

Issue 2822453003: Wrap large IndexedDB values into Blobs before writing to LevelDB. (Closed)
Patch Set: Addressed last round of feedback. Created 3 years, 7 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 } 173 }
174 174
175 DispatchEventResult IDBOpenDBRequest::DispatchEventInternal(Event* event) { 175 DispatchEventResult IDBOpenDBRequest::DispatchEventInternal(Event* event) {
176 // If the connection closed between onUpgradeNeeded and the delivery of the 176 // If the connection closed between onUpgradeNeeded and the delivery of the
177 // "success" event, an "error" event should be fired instead. 177 // "success" event, an "error" event should be fired instead.
178 if (event->type() == EventTypeNames::success && 178 if (event->type() == EventTypeNames::success &&
179 ResultAsAny()->GetType() == IDBAny::kIDBDatabaseType && 179 ResultAsAny()->GetType() == IDBAny::kIDBDatabaseType &&
180 ResultAsAny()->IdbDatabase()->IsClosePending()) { 180 ResultAsAny()->IdbDatabase()->IsClosePending()) {
181 DequeueEvent(event); 181 DequeueEvent(event);
182 SetResult(nullptr); 182 SetResult(nullptr);
183 EnqueueResponse( 183 HandleResponse(
184 DOMException::Create(kAbortError, "The connection was closed.")); 184 DOMException::Create(kAbortError, "The connection was closed."));
185 return DispatchEventResult::kCanceledBeforeDispatch; 185 return DispatchEventResult::kCanceledBeforeDispatch;
186 } 186 }
187 187
188 return IDBRequest::DispatchEventInternal(event); 188 return IDBRequest::DispatchEventInternal(event);
189 } 189 }
190 190
191 } // namespace blink 191 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698