| Index: Source/core/dom/DOMException.cpp
|
| diff --git a/Source/core/dom/DOMException.cpp b/Source/core/dom/DOMException.cpp
|
| index 7510e27dbd2655ec999759c5d87ba5fe71bc4003..348a94e98d314f4ed504503d69b774f1adbebf98 100644
|
| --- a/Source/core/dom/DOMException.cpp
|
| +++ b/Source/core/dom/DOMException.cpp
|
| @@ -86,22 +86,24 @@ static const CoreException* getErrorEntry(ExceptionCode ec)
|
| return tableIndex < tableSize ? &coreExceptions[tableIndex] : 0;
|
| }
|
|
|
| -DOMException::DOMException(unsigned short code, const String& name, const String& message)
|
| +DOMException::DOMException(unsigned short code, const String& name, const String& sanitizedMessage, const String& unsanitizedMessage)
|
| {
|
| ASSERT(name);
|
| m_code = code;
|
| m_name = name;
|
| - m_message = message;
|
| + m_sanitizedMessage = sanitizedMessage;
|
| + m_unsanitizedMessage = unsanitizedMessage;
|
| ScriptWrappable::init(this);
|
| }
|
|
|
| -PassRefPtr<DOMException> DOMException::create(ExceptionCode ec, const String& message)
|
| +PassRefPtr<DOMException> DOMException::create(ExceptionCode ec, const String& sanitizedMessage, const String& unsanitizedMessage)
|
| {
|
| const CoreException* entry = getErrorEntry(ec);
|
| ASSERT(entry);
|
| return adoptRef(new DOMException(entry->code,
|
| entry->name ? entry->name : "Error",
|
| - message.isNull() ? String(entry->message) : message));
|
| + sanitizedMessage.isNull() ? String(entry->message) : sanitizedMessage,
|
| + unsanitizedMessage));
|
| }
|
|
|
| String DOMException::toString() const
|
| @@ -109,6 +111,11 @@ String DOMException::toString() const
|
| return name() + ": " + message();
|
| }
|
|
|
| +String DOMException::toStringForConsole() const
|
| +{
|
| + return name() + ": " + messageForConsole();
|
| +}
|
| +
|
| String DOMException::getErrorName(ExceptionCode ec)
|
| {
|
| const CoreException* entry = getErrorEntry(ec);
|
|
|