| 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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 ExceptionCode code() const { return m_code; } | 106 ExceptionCode code() const { return m_code; } |
| 107 const String& message() const { return m_message; } | 107 const String& message() const { return m_message; } |
| 108 | 108 |
| 109 bool throwIfNeeded() | 109 bool throwIfNeeded() |
| 110 { | 110 { |
| 111 if (!hadException()) | 111 if (!hadException()) |
| 112 return false; | 112 return false; |
| 113 throwException(); | 113 throwException(); |
| 114 return true; | 114 return true; |
| 115 } | 115 } |
| 116 void reportException(ScriptState*, v8::Local<v8::Function>); |
| 116 | 117 |
| 117 // This method clears out the exception which |this| has. | 118 // This method clears out the exception which |this| has. |
| 118 ScriptPromise reject(ScriptState*); | 119 ScriptPromise reject(ScriptState*); |
| 119 | 120 |
| 120 // This method clears out the exception which |this| has. | 121 // This method clears out the exception which |this| has. |
| 121 void reject(ScriptPromiseResolver*); | 122 void reject(ScriptPromiseResolver*); |
| 122 | 123 |
| 123 ContextType context() const { return m_context; } | 124 ContextType context() const { return m_context; } |
| 124 const char* propertyName() const { return m_propertyName; } | 125 const char* propertyName() const { return m_propertyName; } |
| 125 const char* interfaceName() const { return m_interfaceName; } | 126 const char* interfaceName() const { return m_interfaceName; } |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 TrackExceptionState(): ExceptionState(ExceptionState::UnknownContext, 0, 0,
v8::Local<v8::Object>(), v8::Isolate::GetCurrent()) { } | 175 TrackExceptionState(): ExceptionState(ExceptionState::UnknownContext, 0, 0,
v8::Local<v8::Object>(), v8::Isolate::GetCurrent()) { } |
| 175 void throwDOMException(const ExceptionCode&, const String& message) override
; | 176 void throwDOMException(const ExceptionCode&, const String& message) override
; |
| 176 void throwTypeError(const String& message = String()) override; | 177 void throwTypeError(const String& message = String()) override; |
| 177 void throwSecurityError(const String& sanitizedMessage, const String& unsani
tizedMessage = String()) override; | 178 void throwSecurityError(const String& sanitizedMessage, const String& unsani
tizedMessage = String()) override; |
| 178 void throwRangeError(const String& message) override; | 179 void throwRangeError(const String& message) override; |
| 179 }; | 180 }; |
| 180 | 181 |
| 181 } // namespace blink | 182 } // namespace blink |
| 182 | 183 |
| 183 #endif // ExceptionState_h | 184 #endif // ExceptionState_h |
| OLD | NEW |