diff options
Diffstat (limited to 'Source/WebCore/Modules/indexeddb/IDBDatabaseError.h')
-rw-r--r-- | Source/WebCore/Modules/indexeddb/IDBDatabaseError.h | 16 |
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) |