summaryrefslogtreecommitdiffstats
path: root/WebCore/bindings/v8/DOMDataStore.h
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/bindings/v8/DOMDataStore.h')
-rw-r--r--WebCore/bindings/v8/DOMDataStore.h41
1 files changed, 11 insertions, 30 deletions
diff --git a/WebCore/bindings/v8/DOMDataStore.h b/WebCore/bindings/v8/DOMDataStore.h
index 54a49e7..c39a0ed 100644
--- a/WebCore/bindings/v8/DOMDataStore.h
+++ b/WebCore/bindings/v8/DOMDataStore.h
@@ -31,7 +31,7 @@
#ifndef DOMDataStore_h
#define DOMDataStore_h
-#include "DOMObjectsInclude.h"
+#include "V8DOMMap.h"
#include "V8Node.h"
#include <v8.h>
@@ -47,6 +47,7 @@
namespace WebCore {
class DOMData;
+ class DOMDataStore;
typedef WTF::Vector<DOMDataStore*> DOMDataList;
@@ -160,22 +161,6 @@ namespace WebCore {
#endif
};
- template <class KeyType>
- class InternalDOMWrapperMap : public DOMWrapperMap<KeyType> {
- public:
- InternalDOMWrapperMap(DOMData* domData, v8::WeakReferenceCallback callback)
- : DOMWrapperMap<KeyType>(callback), m_domData(domData) { }
-
- virtual void forget(KeyType* object)
- {
- DOMWrapperMap<KeyType>::forget(object);
- forgetDelayedObject(m_domData, object);
- }
-
- private:
- DOMData* m_domData;
- };
-
class IntrusiveDOMWrapperMap : public AbstractWeakReferenceMap<Node, v8::Object> {
public:
IntrusiveDOMWrapperMap(v8::WeakReferenceCallback callback)
@@ -252,25 +237,21 @@ namespace WebCore {
DOMDataStore(DOMData*);
virtual ~DOMDataStore();
- // A list of all DOMDataStore objects. Traversed during GC to find a thread-specific map that
- // contains the object - so we can schedule the object to be deleted on the thread which created it.
+ // A list of all DOMDataStore objects in the current V8 instance (thread). Normally, each World has a DOMDataStore.
static DOMDataList& allStores();
// Mutex to protect against concurrent access of DOMDataList.
static WTF::Mutex& allStoresMutex();
- // Helper function to avoid circular includes.
- static void forgetDelayedObject(DOMData*, void* object);
-
DOMData* domData() const { return m_domData; }
void* getDOMWrapperMap(DOMWrapperMapType);
DOMNodeMapping& domNodeMap() { return *m_domNodeMap; }
- InternalDOMWrapperMap<void>& domObjectMap() { return *m_domObjectMap; }
- InternalDOMWrapperMap<void>& activeDomObjectMap() { return *m_activeDomObjectMap; }
+ DOMWrapperMap<void>& domObjectMap() { return *m_domObjectMap; }
+ DOMWrapperMap<void>& activeDomObjectMap() { return *m_activeDomObjectMap; }
#if ENABLE(SVG)
- InternalDOMWrapperMap<SVGElementInstance>& domSvgElementInstanceMap() { return *m_domSvgElementInstanceMap; }
- InternalDOMWrapperMap<void>& domSvgObjectWithContextMap() { return *m_domSvgObjectWithContextMap; }
+ DOMWrapperMap<SVGElementInstance>& domSvgElementInstanceMap() { return *m_domSvgElementInstanceMap; }
+ DOMWrapperMap<void>& domSvgObjectWithContextMap() { return *m_domSvgObjectWithContextMap; }
#endif
// Need by V8GCController.
@@ -286,11 +267,11 @@ namespace WebCore {
#endif
DOMNodeMapping* m_domNodeMap;
- InternalDOMWrapperMap<void>* m_domObjectMap;
- InternalDOMWrapperMap<void>* m_activeDomObjectMap;
+ DOMWrapperMap<void>* m_domObjectMap;
+ DOMWrapperMap<void>* m_activeDomObjectMap;
#if ENABLE(SVG)
- InternalDOMWrapperMap<SVGElementInstance>* m_domSvgElementInstanceMap;
- InternalDOMWrapperMap<void>* m_domSvgObjectWithContextMap;
+ DOMWrapperMap<SVGElementInstance>* m_domSvgElementInstanceMap;
+ DOMWrapperMap<void>* m_domSvgObjectWithContextMap;
#endif
private: