summaryrefslogtreecommitdiff
path: root/Source/WebCore/Modules/indexeddb/IDBDatabaseError.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/Modules/indexeddb/IDBDatabaseError.h
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/WebCore/Modules/indexeddb/IDBDatabaseError.h')
-rw-r--r--Source/WebCore/Modules/indexeddb/IDBDatabaseError.h16
1 files changed, 6 insertions, 10 deletions
diff --git a/Source/WebCore/Modules/indexeddb/IDBDatabaseError.h b/Source/WebCore/Modules/indexeddb/IDBDatabaseError.h
index 7a939b5b6..a27cda681 100644
--- a/Source/WebCore/Modules/indexeddb/IDBDatabaseError.h
+++ b/Source/WebCore/Modules/indexeddb/IDBDatabaseError.h
@@ -23,11 +23,9 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef IDBDatabaseError_h
-#define IDBDatabaseError_h
+#pragma once
#include "IDBDatabaseException.h"
-#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
#include <wtf/text/WTFString.h>
@@ -37,18 +35,18 @@ namespace WebCore {
class IDBDatabaseError : public RefCounted<IDBDatabaseError> {
public:
- static PassRefPtr<IDBDatabaseError> create(unsigned short code)
+ static Ref<IDBDatabaseError> create(unsigned short code)
{
ASSERT(code >= IDBDatabaseException::IDBDatabaseExceptionOffset);
ASSERT(code < IDBDatabaseException::IDBDatabaseExceptionMax);
- return adoptRef(new IDBDatabaseError(code));
+ return adoptRef(*new IDBDatabaseError(code));
}
- static PassRefPtr<IDBDatabaseError> create(unsigned short code, const String& message)
+ static Ref<IDBDatabaseError> create(unsigned short code, const String& message)
{
ASSERT_WITH_MESSAGE(code >= IDBDatabaseException::IDBDatabaseExceptionOffset, "%d >= %d", code, IDBDatabaseException::IDBDatabaseExceptionOffset);
ASSERT(code < IDBDatabaseException::IDBDatabaseExceptionMax);
- return adoptRef(new IDBDatabaseError(code, message));
+ return adoptRef(*new IDBDatabaseError(code, message));
}
~IDBDatabaseError() { }
@@ -70,6 +68,4 @@ private:
} // namespace WebCore
-#endif
-
-#endif // IDBDatabaseError_h
+#endif // ENABLE(INDEXED_DATABASE)