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.cpp | |
parent | a4e969f4965059196ca948db781e52f7cfebf19e (diff) | |
download | WebKitGtk-tarball-32761a6cee1d0dee366b885b7b9c777e67885688.tar.gz |
webkitgtk-2.4.11webkitgtk-2.4.11
Diffstat (limited to 'Source/JavaScriptCore/runtime/WeakMapData.cpp')
-rw-r--r-- | Source/JavaScriptCore/runtime/WeakMapData.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/Source/JavaScriptCore/runtime/WeakMapData.cpp b/Source/JavaScriptCore/runtime/WeakMapData.cpp index 1332e8e06..224be8a46 100644 --- a/Source/JavaScriptCore/runtime/WeakMapData.cpp +++ b/Source/JavaScriptCore/runtime/WeakMapData.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2013, 2015 Apple Inc. All rights reserved. + * Copyright (C) 2013 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -36,7 +36,7 @@ namespace JSC { -const ClassInfo WeakMapData::s_info = { "WeakMapData", 0, 0, CREATE_METHOD_TABLE(WeakMapData) }; +const ClassInfo WeakMapData::s_info = { "WeakMapData", 0, 0, 0, CREATE_METHOD_TABLE(WeakMapData) }; WeakMapData::WeakMapData(VM& vm) : Base(vm, vm.weakMapDataStructure.get()) @@ -54,12 +54,6 @@ void WeakMapData::destroy(JSCell* cell) static_cast<WeakMapData*>(cell)->~WeakMapData(); } -size_t WeakMapData::estimatedSize(JSCell* cell) -{ - WeakMapData* thisObj = jsCast<WeakMapData*>(cell); - return Base::estimatedSize(cell) + (thisObj->m_map.capacity() * (sizeof(JSObject*) + sizeof(WriteBarrier<Unknown>))); -} - void WeakMapData::visitChildren(JSCell* cell, SlotVisitor& visitor) { Base::visitChildren(cell, visitor); @@ -69,8 +63,8 @@ void WeakMapData::visitChildren(JSCell* cell, SlotVisitor& visitor) // Rough approximation of the external storage needed for the hashtable. // This isn't exact, but it is close enough, and proportional to the actual - // external memory usage. - visitor.reportExtraMemoryVisited(thisObj->m_map.capacity() * (sizeof(JSObject*) + sizeof(WriteBarrier<Unknown>))); + // external mermory usage. + visitor.reportExtraMemoryUsage(thisObj, thisObj->m_map.capacity() * (sizeof(JSObject*) + sizeof(WriteBarrier<Unknown>))); } void WeakMapData::set(VM& vm, JSObject* key, JSValue value) |