diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
commit | 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch) | |
tree | 46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/testing/MemoryInfo.h | |
parent | 32761a6cee1d0dee366b885b7b9c777e67885688 (diff) | |
download | WebKitGtk-tarball-master.tar.gz |
webkitgtk-2.16.5HEADwebkitgtk-2.16.5master
Diffstat (limited to 'Source/WebCore/testing/MemoryInfo.h')
-rw-r--r-- | Source/WebCore/testing/MemoryInfo.h | 13 |
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 |