summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/runtime/WeakMapData.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/JavaScriptCore/runtime/WeakMapData.cpp')
-rw-r--r--Source/JavaScriptCore/runtime/WeakMapData.cpp14
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)