| Index: third_party/WebKit/Source/modules/indexeddb/IDBDatabaseCallbacks.h
|
| diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBDatabaseCallbacks.h b/third_party/WebKit/Source/modules/indexeddb/IDBDatabaseCallbacks.h
|
| index 58cfde86e844803eae21e0efd4fffec112430f81..7a6efd1998e7e68fdcd575ae6ffaa4d081b783ea 100644
|
| --- a/third_party/WebKit/Source/modules/indexeddb/IDBDatabaseCallbacks.h
|
| +++ b/third_party/WebKit/Source/modules/indexeddb/IDBDatabaseCallbacks.h
|
| @@ -34,6 +34,7 @@ namespace blink {
|
|
|
| class DOMException;
|
| class IDBDatabase;
|
| +class WebIDBDatabaseCallbacks;
|
|
|
| class MODULES_EXPORT IDBDatabaseCallbacks : public GarbageCollectedFinalized<IDBDatabaseCallbacks> {
|
| public:
|
| @@ -50,6 +51,12 @@ public:
|
|
|
| void connect(IDBDatabase*);
|
|
|
| + // Returns a new WebIDBDatabaseCallbacks for this object. Must only be
|
| + // called once.
|
| + std::unique_ptr<WebIDBDatabaseCallbacks> createWebCallbacks();
|
| + void detachWebCallbacks();
|
| + void webCallbacksDestroyed();
|
| +
|
| protected:
|
| // Exposed to subclasses for unit tests.
|
| IDBDatabaseCallbacks();
|
| @@ -63,6 +70,10 @@ private:
|
| // can survive too. m_database should be a weak reference to avoid that an
|
| // IDBDatabase survives the GC with the IDBDatabaseCallbacks.
|
| WeakMember<IDBDatabase> m_database;
|
| +
|
| + // Pointer back to the WebIDBDatabaseCallbacks that holds a persistent
|
| + // reference to this object.
|
| + WebIDBDatabaseCallbacks* m_webCallbacks = nullptr;
|
| };
|
|
|
| } // namespace blink
|
|
|