summaryrefslogtreecommitdiff
path: root/Source/WebCore/testing/MemoryInfo.h
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
commit1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch)
tree46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/testing/MemoryInfo.h
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/WebCore/testing/MemoryInfo.h')
-rw-r--r--Source/WebCore/testing/MemoryInfo.h13
1 files changed, 5 insertions, 8 deletions
diff --git a/Source/WebCore/testing/MemoryInfo.h b/Source/WebCore/testing/MemoryInfo.h
index d4d298443..06084a83f 100644
--- a/Source/WebCore/testing/MemoryInfo.h
+++ b/Source/WebCore/testing/MemoryInfo.h
@@ -28,26 +28,25 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef MemoryInfo_h
-#define MemoryInfo_h
+#pragma once
+#include "CommonVM.h"
#include "JSDOMWindow.h"
-#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
namespace WebCore {
class MemoryInfo : public RefCounted<MemoryInfo> {
public:
- static PassRefPtr<MemoryInfo> create() { return adoptRef(new MemoryInfo); }
+ static Ref<MemoryInfo> create() { return adoptRef(*new MemoryInfo); }
size_t usedJSHeapSize() const { return m_usedJSHeapSize; }
size_t totalJSHeapSize() const { return m_totalJSHeapSize; }
private:
MemoryInfo()
- : m_usedJSHeapSize(JSDOMWindow::commonVM()->heap.size())
- , m_totalJSHeapSize(JSDOMWindow::commonVM()->heap.capacity())
+ : m_usedJSHeapSize(commonVM().heap.size())
+ , m_totalJSHeapSize(commonVM().heap.capacity())
{
}
@@ -56,5 +55,3 @@ private:
};
} // namespace WebCore
-
-#endif // MemoryInfo_h