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

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

Issue 2828953002: [IndexedDB] Hold referenced to IDB::put blobs in the IDBRequest (Closed)
Patch Set: compile fix 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/IDBRequest.h
diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBRequest.h b/third_party/WebKit/Source/modules/indexeddb/IDBRequest.h
index 4f221aeb5c3a0262c6dbffbff77da747b77406fc..f0470405646b7815c7330939d0c7b16f8d8e1507 100644
--- a/third_party/WebKit/Source/modules/indexeddb/IDBRequest.h
+++ b/third_party/WebKit/Source/modules/indexeddb/IDBRequest.h
@@ -29,6 +29,8 @@
#ifndef IDBRequest_h
#define IDBRequest_h
+#include <memory>
+
#include "bindings/core/v8/ActiveScriptWrappable.h"
#include "bindings/core/v8/ScriptState.h"
#include "bindings/core/v8/ScriptValue.h"
@@ -43,10 +45,10 @@
#include "modules/indexeddb/IndexedDB.h"
#include "platform/blob/BlobData.h"
#include "platform/heap/Handle.h"
+#include "platform/wtf/HashMap.h"
#include "public/platform/WebBlobInfo.h"
#include "public/platform/modules/indexeddb/WebIDBCursor.h"
#include "public/platform/modules/indexeddb/WebIDBTypes.h"
-#include <memory>
namespace blink {
@@ -141,6 +143,11 @@ class MODULES_EXPORT IDBRequest : public EventTargetWithInlineData,
IDBCursor* GetResultCursor() const;
+ void StorePutOperationBlobs(
michaeln 2017/04/25 23:37:00 nit: consider naming the StoreXXX and ClearXXX met
dmurph 2017/04/27 22:04:12 Done.
+ HashMap<String, RefPtr<BlobDataHandle>> blob_handles) {
+ transit_blob_handles_ = std::move(blob_handles);
+ }
+
protected:
IDBRequest(ScriptState*, IDBAny* source, IDBTransaction*);
void EnqueueEvent(Event*);
@@ -168,6 +175,8 @@ class MODULES_EXPORT IDBRequest : public EventTargetWithInlineData,
void AckReceivedBlobs(const IDBValue*);
void AckReceivedBlobs(const Vector<RefPtr<IDBValue>>&);
+ void ClearTransitBlobHandles() { transit_blob_handles_.clear(); }
+
Member<IDBAny> source_;
Member<IDBAny> result_;
Member<DOMException> error_;
@@ -187,6 +196,8 @@ class MODULES_EXPORT IDBRequest : public EventTargetWithInlineData,
Member<IDBKey> cursor_primary_key_;
RefPtr<IDBValue> cursor_value_;
+ HashMap<String, RefPtr<BlobDataHandle>> transit_blob_handles_;
+
bool did_fire_upgrade_needed_event_ = false;
bool prevent_propagation_ = false;
bool result_dirty_ = true;

Powered by Google App Engine
This is Rietveld 408576698