| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 m_exception.set(m_isolate, exception); | 76 m_exception.set(m_isolate, exception); |
| 77 } | 77 } |
| 78 | 78 |
| 79 void ExceptionState::throwTypeError(const String& message) | 79 void ExceptionState::throwTypeError(const String& message) |
| 80 { | 80 { |
| 81 ASSERT(m_isolate); | 81 ASSERT(m_isolate); |
| 82 m_code = TypeError; | 82 m_code = TypeError; |
| 83 setException(V8ThrowException::createTypeError(addExceptionContext(message),
m_isolate)); | 83 setException(V8ThrowException::createTypeError(addExceptionContext(message),
m_isolate)); |
| 84 } | 84 } |
| 85 | 85 |
| 86 void NonThrowableExceptionState::throwDOMException(const ExceptionCode& ec, cons
t String& message) |
| 87 { |
| 88 ASSERT_NOT_REACHED(); |
| 89 m_code = ec; |
| 90 } |
| 91 |
| 92 void NonThrowableExceptionState::throwTypeError(const String&) |
| 93 { |
| 94 ASSERT_NOT_REACHED(); |
| 95 m_code = TypeError; |
| 96 } |
| 97 |
| 98 void NonThrowableExceptionState::throwSecurityError(const String&, const String&
) |
| 99 { |
| 100 ASSERT_NOT_REACHED(); |
| 101 m_code = SecurityError; |
| 102 } |
| 103 |
| 86 void TrackExceptionState::throwDOMException(const ExceptionCode& ec, const Strin
g& message) | 104 void TrackExceptionState::throwDOMException(const ExceptionCode& ec, const Strin
g& message) |
| 87 { | 105 { |
| 88 m_code = ec; | 106 m_code = ec; |
| 89 } | 107 } |
| 90 | 108 |
| 91 void TrackExceptionState::throwTypeError(const String&) | 109 void TrackExceptionState::throwTypeError(const String&) |
| 92 { | 110 { |
| 93 m_code = TypeError; | 111 m_code = TypeError; |
| 94 } | 112 } |
| 95 | 113 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 113 processedMessage = ExceptionMessages::failedToGet(propertyName(), in
terfaceName(), message); | 131 processedMessage = ExceptionMessages::failedToGet(propertyName(), in
terfaceName(), message); |
| 114 else if (m_context == SetterContext) | 132 else if (m_context == SetterContext) |
| 115 processedMessage = ExceptionMessages::failedToSet(propertyName(), in
terfaceName(), message); | 133 processedMessage = ExceptionMessages::failedToSet(propertyName(), in
terfaceName(), message); |
| 116 } else if (!propertyName() && interfaceName() && m_context == ConstructionCo
ntext) { | 134 } else if (!propertyName() && interfaceName() && m_context == ConstructionCo
ntext) { |
| 117 processedMessage = ExceptionMessages::failedToConstruct(interfaceName(),
message); | 135 processedMessage = ExceptionMessages::failedToConstruct(interfaceName(),
message); |
| 118 } | 136 } |
| 119 return processedMessage; | 137 return processedMessage; |
| 120 } | 138 } |
| 121 | 139 |
| 122 } // namespace WebCore | 140 } // namespace WebCore |
| OLD | NEW |