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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 { | 92 { |
93 ASSERT(!m_exception.isEmpty()); | 93 ASSERT(!m_exception.isEmpty()); |
94 V8ThrowException::throwException(m_exception.newLocal(m_isolate), m_isolate)
; | 94 V8ThrowException::throwException(m_exception.newLocal(m_isolate), m_isolate)
; |
95 } | 95 } |
96 | 96 |
97 void ExceptionState::throwTypeError(const String& message) | 97 void ExceptionState::throwTypeError(const String& message) |
98 { | 98 { |
99 ASSERT(m_isolate); | 99 ASSERT(m_isolate); |
100 m_code = V8TypeError; | 100 m_code = V8TypeError; |
101 m_message = message; | 101 m_message = message; |
102 setException(V8ThrowException::createTypeError(addExceptionContext(message),
m_isolate)); | 102 setException(V8ThrowException::createTypeError(m_isolate, addExceptionContex
t(message))); |
103 } | 103 } |
104 | 104 |
105 void ExceptionState::throwRangeError(const String& message) | 105 void ExceptionState::throwRangeError(const String& message) |
106 { | 106 { |
107 ASSERT(m_isolate); | 107 ASSERT(m_isolate); |
108 m_code = V8RangeError; | 108 m_code = V8RangeError; |
109 m_message = message; | 109 m_message = message; |
110 setException(V8ThrowException::createRangeError(addExceptionContext(message)
, m_isolate)); | 110 setException(V8ThrowException::createRangeError(m_isolate, addExceptionConte
xt(message))); |
111 } | 111 } |
112 | 112 |
113 void NonThrowableExceptionState::throwDOMException(const ExceptionCode& ec, cons
t String& message) | 113 void NonThrowableExceptionState::throwDOMException(const ExceptionCode& ec, cons
t String& message) |
114 { | 114 { |
115 ASSERT_NOT_REACHED(); | 115 ASSERT_NOT_REACHED(); |
116 m_code = ec; | 116 m_code = ec; |
117 m_message = message; | 117 m_message = message; |
118 } | 118 } |
119 | 119 |
120 void NonThrowableExceptionState::throwTypeError(const String& message) | 120 void NonThrowableExceptionState::throwTypeError(const String& message) |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 processedMessage = ExceptionMessages::failedToDeleteIndexed(interfac
eName(), message); | 186 processedMessage = ExceptionMessages::failedToDeleteIndexed(interfac
eName(), message); |
187 else if (m_context == IndexedGetterContext) | 187 else if (m_context == IndexedGetterContext) |
188 processedMessage = ExceptionMessages::failedToGetIndexed(interfaceNa
me(), message); | 188 processedMessage = ExceptionMessages::failedToGetIndexed(interfaceNa
me(), message); |
189 else if (m_context == IndexedSetterContext) | 189 else if (m_context == IndexedSetterContext) |
190 processedMessage = ExceptionMessages::failedToSetIndexed(interfaceNa
me(), message); | 190 processedMessage = ExceptionMessages::failedToSetIndexed(interfaceNa
me(), message); |
191 } | 191 } |
192 return processedMessage; | 192 return processedMessage; |
193 } | 193 } |
194 | 194 |
195 } // namespace blink | 195 } // namespace blink |
OLD | NEW |