summaryrefslogtreecommitdiff
path: root/Source/WebCore/dom/DocumentSharedObjectPool.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/dom/DocumentSharedObjectPool.h')
-rw-r--r--Source/WebCore/dom/DocumentSharedObjectPool.h21
1 files changed, 7 insertions, 14 deletions
diff --git a/Source/WebCore/dom/DocumentSharedObjectPool.h b/Source/WebCore/dom/DocumentSharedObjectPool.h
index 21ca8f5a6..22fccba24 100644
--- a/Source/WebCore/dom/DocumentSharedObjectPool.h
+++ b/Source/WebCore/dom/DocumentSharedObjectPool.h
@@ -10,10 +10,10 @@
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
- * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
@@ -24,11 +24,10 @@
*
*/
-#ifndef DocumentSharedObjectPool_h
-#define DocumentSharedObjectPool_h
+#pragma once
+#include <memory>
#include <wtf/HashMap.h>
-#include <wtf/PassOwnPtr.h>
#include <wtf/RefPtr.h>
#include <wtf/text/StringHash.h>
@@ -38,19 +37,13 @@ class Attribute;
class ShareableElementData;
class DocumentSharedObjectPool {
+ WTF_MAKE_FAST_ALLOCATED;
public:
- static PassOwnPtr<DocumentSharedObjectPool> create() { return adoptPtr(new DocumentSharedObjectPool); }
- ~DocumentSharedObjectPool();
-
- PassRef<ShareableElementData> cachedShareableElementDataWithAttributes(const Vector<Attribute>&);
+ Ref<ShareableElementData> cachedShareableElementDataWithAttributes(const Vector<Attribute>&);
private:
- DocumentSharedObjectPool();
-
typedef HashMap<unsigned, RefPtr<ShareableElementData>, AlreadyHashed> ShareableElementDataCache;
ShareableElementDataCache m_shareableElementDataCache;
};
-}
-
-#endif
+} // namespace WebCore