1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
5 * You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef mozilla_dom_indexeddb_idbwrappercache_h__
8 #define mozilla_dom_indexeddb_idbwrappercache_h__
10 #include "mozilla/DOMEventTargetHelper.h"
11 #include "mozilla/dom/indexedDB/IndexedDatabase.h"
13 BEGIN_INDEXEDDB_NAMESPACE
15 class IDBWrapperCache
: public DOMEventTargetHelper
18 NS_DECL_ISUPPORTS_INHERITED
19 NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_INHERITED(
23 JSObject
* GetScriptOwner() const
27 void SetScriptOwner(JSObject
* aScriptOwner
);
30 void AssertIsRooted() const;
32 inline void AssertIsRooted() const
38 explicit IDBWrapperCache(DOMEventTargetHelper
* aOwner
)
39 : DOMEventTargetHelper(aOwner
), mScriptOwner(nullptr)
41 explicit IDBWrapperCache(nsPIDOMWindow
* aOwner
)
42 : DOMEventTargetHelper(aOwner
), mScriptOwner(nullptr)
45 virtual ~IDBWrapperCache();
48 JS::Heap
<JSObject
*> mScriptOwner
;
51 END_INDEXEDDB_NAMESPACE
53 #endif // mozilla_dom_indexeddb_idbwrappercache_h__