| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 | 45 |
| 46 ScriptPromise ExceptionState::reject(ScriptState* scriptState) | 46 ScriptPromise ExceptionState::reject(ScriptState* scriptState) |
| 47 { | 47 { |
| 48 ScriptPromise promise = ScriptPromise::reject(scriptState, m_exception.newLo
cal(scriptState->isolate())); | 48 ScriptPromise promise = ScriptPromise::reject(scriptState, m_exception.newLo
cal(scriptState->isolate())); |
| 49 clearException(); | 49 clearException(); |
| 50 return promise; | 50 return promise; |
| 51 } | 51 } |
| 52 | 52 |
| 53 void ExceptionState::reject(ScriptPromiseResolver* resolver) | 53 void ExceptionState::reject(ScriptPromiseResolver* resolver) |
| 54 { | 54 { |
| 55 resolver->reject(m_exception.newLocal(resolver->scriptState()->isolate())); | 55 resolver->reject(m_exception.newLocal(resolver->getScriptState()->isolate())
); |
| 56 clearException(); | 56 clearException(); |
| 57 } | 57 } |
| 58 | 58 |
| 59 void ExceptionState::throwDOMException(const ExceptionCode& ec, const String& me
ssage) | 59 void ExceptionState::throwDOMException(const ExceptionCode& ec, const String& me
ssage) |
| 60 { | 60 { |
| 61 ASSERT(ec); | 61 ASSERT(ec); |
| 62 ASSERT(m_isolate); | 62 ASSERT(m_isolate); |
| 63 ASSERT(!m_creationContext.IsEmpty()); | 63 ASSERT(!m_creationContext.IsEmpty()); |
| 64 | 64 |
| 65 // SecurityError is thrown via ::throwSecurityError, and _careful_ considera
tion must be given to the data exposed to JavaScript via the 'sanitizedMessage'. | 65 // SecurityError is thrown via ::throwSecurityError, and _careful_ considera
tion must be given to the data exposed to JavaScript via the 'sanitizedMessage'. |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 processedMessage = ExceptionMessages::failedToDeleteIndexed(interfac
eName(), message); | 192 processedMessage = ExceptionMessages::failedToDeleteIndexed(interfac
eName(), message); |
| 193 else if (m_context == IndexedGetterContext) | 193 else if (m_context == IndexedGetterContext) |
| 194 processedMessage = ExceptionMessages::failedToGetIndexed(interfaceNa
me(), message); | 194 processedMessage = ExceptionMessages::failedToGetIndexed(interfaceNa
me(), message); |
| 195 else if (m_context == IndexedSetterContext) | 195 else if (m_context == IndexedSetterContext) |
| 196 processedMessage = ExceptionMessages::failedToSetIndexed(interfaceNa
me(), message); | 196 processedMessage = ExceptionMessages::failedToSetIndexed(interfaceNa
me(), message); |
| 197 } | 197 } |
| 198 return processedMessage; | 198 return processedMessage; |
| 199 } | 199 } |
| 200 | 200 |
| 201 } // namespace blink | 201 } // namespace blink |
| OLD | NEW |