| 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 | 91 |
| 92 m_exception.set(m_isolate, exception); | 92 m_exception.set(m_isolate, exception); |
| 93 } | 93 } |
| 94 | 94 |
| 95 void ExceptionState::throwException() | 95 void ExceptionState::throwException() |
| 96 { | 96 { |
| 97 ASSERT(!m_exception.isEmpty()); | 97 ASSERT(!m_exception.isEmpty()); |
| 98 V8ThrowException::throwException(m_isolate, m_exception.newLocal(m_isolate))
; | 98 V8ThrowException::throwException(m_isolate, m_exception.newLocal(m_isolate))
; |
| 99 } | 99 } |
| 100 | 100 |
| 101 void ExceptionState::reportException(ScriptState* scriptState, |
| 102 v8::Local<v8::Function> function) |
| 103 { |
| 104 DCHECK(scriptState->isolate() == m_isolate); |
| 105 DCHECK(!m_exception.isEmpty()); |
| 106 V8ThrowException::reportException(scriptState, |
| 107 m_exception.newLocal(m_isolate), m_message, function); |
| 108 } |
| 109 |
| 101 void ExceptionState::throwTypeError(const String& message) | 110 void ExceptionState::throwTypeError(const String& message) |
| 102 { | 111 { |
| 103 ASSERT(m_isolate); | 112 ASSERT(m_isolate); |
| 104 m_code = V8TypeError; | 113 m_code = V8TypeError; |
| 105 m_message = message; | 114 m_message = message; |
| 106 setException(V8ThrowException::createTypeError(m_isolate, addExceptionContex
t(message))); | 115 setException(V8ThrowException::createTypeError(m_isolate, addExceptionContex
t(message))); |
| 107 } | 116 } |
| 108 | 117 |
| 109 void ExceptionState::throwRangeError(const String& message) | 118 void ExceptionState::throwRangeError(const String& message) |
| 110 { | 119 { |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 processedMessage = ExceptionMessages::failedToDeleteIndexed(interfac
eName(), message); | 199 processedMessage = ExceptionMessages::failedToDeleteIndexed(interfac
eName(), message); |
| 191 else if (m_context == IndexedGetterContext) | 200 else if (m_context == IndexedGetterContext) |
| 192 processedMessage = ExceptionMessages::failedToGetIndexed(interfaceNa
me(), message); | 201 processedMessage = ExceptionMessages::failedToGetIndexed(interfaceNa
me(), message); |
| 193 else if (m_context == IndexedSetterContext) | 202 else if (m_context == IndexedSetterContext) |
| 194 processedMessage = ExceptionMessages::failedToSetIndexed(interfaceNa
me(), message); | 203 processedMessage = ExceptionMessages::failedToSetIndexed(interfaceNa
me(), message); |
| 195 } | 204 } |
| 196 return processedMessage; | 205 return processedMessage; |
| 197 } | 206 } |
| 198 | 207 |
| 199 } // namespace blink | 208 } // namespace blink |
| OLD | NEW |