| 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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 DCHECK(!m_exception.isEmpty()); | 120 DCHECK(!m_exception.isEmpty()); |
| 121 return m_exception.newLocal(m_isolate); | 121 return m_exception.newLocal(m_isolate); |
| 122 } | 122 } |
| 123 | 123 |
| 124 // This method clears out the exception which |this| has. | 124 // This method clears out the exception which |this| has. |
| 125 ScriptPromise reject(ScriptState*); | 125 ScriptPromise reject(ScriptState*); |
| 126 | 126 |
| 127 // This method clears out the exception which |this| has. | 127 // This method clears out the exception which |this| has. |
| 128 void reject(ScriptPromiseResolver*); | 128 void reject(ScriptPromiseResolver*); |
| 129 | 129 |
| 130 ContextType context() const { return m_context; } |
| 130 const char* propertyName() const { return m_propertyName; } | 131 const char* propertyName() const { return m_propertyName; } |
| 131 const char* interfaceName() const { return m_interfaceName; } | 132 const char* interfaceName() const { return m_interfaceName; } |
| 132 | 133 |
| 133 String addExceptionContext(const String&) const; | 134 String addExceptionContext(const String&) const; |
| 134 | 135 |
| 135 protected: | 136 protected: |
| 136 // An ExceptionCode for the case that an exception is rethrown. In that | 137 // An ExceptionCode for the case that an exception is rethrown. In that |
| 137 // case, we cannot determine an exception code. | 138 // case, we cannot determine an exception code. |
| 138 static const int kRethrownException = UnknownError; | 139 static const int kRethrownException = UnknownError; |
| 139 | 140 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 void throwDOMException(const ExceptionCode&, const String& message) override
; | 183 void throwDOMException(const ExceptionCode&, const String& message) override
; |
| 183 void throwTypeError(const String& message) override; | 184 void throwTypeError(const String& message) override; |
| 184 void throwSecurityError(const String& sanitizedMessage, const String& unsani
tizedMessage) override; | 185 void throwSecurityError(const String& sanitizedMessage, const String& unsani
tizedMessage) override; |
| 185 void throwRangeError(const String& message) override; | 186 void throwRangeError(const String& message) override; |
| 186 void rethrowV8Exception(v8::Local<v8::Value>) override; | 187 void rethrowV8Exception(v8::Local<v8::Value>) override; |
| 187 }; | 188 }; |
| 188 | 189 |
| 189 } // namespace blink | 190 } // namespace blink |
| 190 | 191 |
| 191 #endif // ExceptionState_h | 192 #endif // ExceptionState_h |
| OLD | NEW |