diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2016-04-10 09:28:39 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2016-04-10 09:28:39 +0000 |
commit | 32761a6cee1d0dee366b885b7b9c777e67885688 (patch) | |
tree | d6bec92bebfb216f4126356e55518842c2f476a1 /Source/JavaScriptCore/runtime/WeakMapData.h | |
parent | a4e969f4965059196ca948db781e52f7cfebf19e (diff) | |
download | WebKitGtk-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.h | 16 |
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; }; |