summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/runtime/WeakMapData.h
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2016-04-10 09:28:39 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2016-04-10 09:28:39 +0000
commit32761a6cee1d0dee366b885b7b9c777e67885688 (patch)
treed6bec92bebfb216f4126356e55518842c2f476a1 /Source/JavaScriptCore/runtime/WeakMapData.h
parenta4e969f4965059196ca948db781e52f7cfebf19e (diff)
downloadWebKitGtk-tarball-32761a6cee1d0dee366b885b7b9c777e67885688.tar.gz
webkitgtk-2.4.11webkitgtk-2.4.11
Diffstat (limited to 'Source/JavaScriptCore/runtime/WeakMapData.h')
-rw-r--r--Source/JavaScriptCore/runtime/WeakMapData.h16
1 files changed, 6 insertions, 10 deletions
diff --git a/Source/JavaScriptCore/runtime/WeakMapData.h b/Source/JavaScriptCore/runtime/WeakMapData.h
index e048a43b8..0cb7b735a 100644
--- a/Source/JavaScriptCore/runtime/WeakMapData.h
+++ b/Source/JavaScriptCore/runtime/WeakMapData.h
@@ -34,10 +34,9 @@
namespace JSC {
-class WeakMapData final : public JSCell {
+class WeakMapData : public JSCell {
public:
typedef JSCell Base;
- static const unsigned StructureFlags = Base::StructureFlags | StructureIsImmortal;
static WeakMapData* create(VM& vm)
{
@@ -48,10 +47,11 @@ public:
static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype)
{
- return Structure::create(vm, globalObject, prototype, TypeInfo(CellType, StructureFlags), info());
+ return Structure::create(vm, globalObject, prototype, TypeInfo(CompoundType, StructureFlags), info());
}
static const bool needsDestruction = true;
+ static const bool hasImmortalStructure = true;
void set(VM&, JSObject*, JSValue);
JSValue get(JSObject*);
@@ -61,16 +61,11 @@ public:
DECLARE_INFO;
- typedef HashMap<JSObject*, WriteBarrier<Unknown>> MapType;
- MapType::const_iterator begin() const { return m_map.begin(); }
- MapType::const_iterator end() const { return m_map.end(); }
-
- int size() const { return m_map.size(); }
+ static const unsigned StructureFlags = OverridesVisitChildren | Base::StructureFlags;
private:
WeakMapData(VM&);
static void destroy(JSCell*);
- static size_t estimatedSize(JSCell*);
static void visitChildren(JSCell*, SlotVisitor&);
void finishCreation(VM&);
@@ -83,10 +78,11 @@ private:
private:
virtual void visitWeakReferences(SlotVisitor&) override;
virtual void finalizeUnconditionally() override;
- unsigned m_liveKeyCount;
+ int m_liveKeyCount;
WeakMapData* m_target;
};
DeadKeyCleaner m_deadKeyCleaner;
+ typedef HashMap<JSObject*, WriteBarrier<Unknown>> MapType;
MapType m_map;
};