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/dom/DOMError.h | |
parent | 32761a6cee1d0dee366b885b7b9c777e67885688 (diff) | |
download | WebKitGtk-tarball-master.tar.gz |
webkitgtk-2.16.5HEADwebkitgtk-2.16.5master
Diffstat (limited to 'Source/WebCore/dom/DOMError.h')
-rw-r--r-- | Source/WebCore/dom/DOMError.h | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/Source/WebCore/dom/DOMError.h b/Source/WebCore/dom/DOMError.h index e9f3d0b4a..d2495177c 100644 --- a/Source/WebCore/dom/DOMError.h +++ b/Source/WebCore/dom/DOMError.h @@ -1,5 +1,6 @@ /* * Copyright (C) 2012 Google Inc. All Rights Reserved. + * Copyright (C) 2016 Apple Inc. All Rights Reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,10 +24,8 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef DOMError_h -#define DOMError_h +#pragma once -#include <wtf/PassRefPtr.h> #include <wtf/RefCounted.h> #include <wtf/text/WTFString.h> @@ -34,21 +33,21 @@ namespace WebCore { class DOMError : public RefCounted<DOMError> { public: - static PassRefPtr<DOMError> create(const String& name) + static Ref<DOMError> create(const String& name, const String& message = { }) { - return adoptRef(new DOMError(name)); + return adoptRef(*new DOMError(name, message)); } virtual ~DOMError() { } const String& name() const { return m_name; } + const String& message() const { return m_message; } protected: - explicit DOMError(const String& name); + explicit DOMError(const String& name, const String& message); private: - const String m_name; + String m_name; + String m_message; }; } // namespace WebCore - -#endif // DOMError_h |