summaryrefslogtreecommitdiff
path: root/Source/WebCore/dom/DOMError.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/dom/DOMError.h')
-rw-r--r--Source/WebCore/dom/DOMError.h17
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