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

Unified Diff: third_party/WebKit/Source/modules/indexeddb/IDBValue.h

Issue 2822453003: Wrap large IndexedDB values into Blobs before writing to LevelDB. (Closed)
Patch Set: Fixed compilation errors on Windows and no-DCHECKs. Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/indexeddb/IDBValue.h
diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBValue.h b/third_party/WebKit/Source/modules/indexeddb/IDBValue.h
index a0be459aaa9be7b3c69a69b5be173627d230c28e..0cc0811085b72ab1209587dd2d79c8f0b2288f08 100644
--- a/third_party/WebKit/Source/modules/indexeddb/IDBValue.h
+++ b/third_party/WebKit/Source/modules/indexeddb/IDBValue.h
@@ -10,6 +10,7 @@
#include "modules/indexeddb/IDBKey.h"
#include "modules/indexeddb/IDBKeyPath.h"
#include "platform/SharedBuffer.h"
+#include "platform/wtf/PassRefPtr.h"
#include "platform/wtf/RefPtr.h"
#include "public/platform/WebVector.h"
@@ -37,6 +38,8 @@ class MODULES_EXPORT IDBValue final : public RefCounted<IDBValue> {
const IDBKeyPath& KeyPath() const { return key_path_; }
private:
+ friend class IDBValueUnwrapper;
+
IDBValue();
IDBValue(const WebIDBValue&, v8::Isolate*);
IDBValue(PassRefPtr<SharedBuffer>,
@@ -45,6 +48,11 @@ class MODULES_EXPORT IDBValue final : public RefCounted<IDBValue> {
const IDBKeyPath&);
IDBValue(const IDBValue*, IDBKey*, const IDBKeyPath&);
+ // Used by IDBValueUnwrapper.
+ IDBValue(PassRefPtr<SharedBuffer> unwrapped_data,
+ std::unique_ptr<Vector<RefPtr<BlobDataHandle>>>,
+ std::unique_ptr<Vector<WebBlobInfo>>);
+
// Keep this private to prevent new refs because we manually bookkeep the
// memory to V8.
const RefPtr<SharedBuffer> data_;

Powered by Google App Engine
This is Rietveld 408576698