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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 ASSERT(m_isolate); | 70 ASSERT(m_isolate); |
71 ASSERT(!m_creationContext.IsEmpty()); | 71 ASSERT(!m_creationContext.IsEmpty()); |
72 m_code = SecurityError; | 72 m_code = SecurityError; |
73 String finalSanitized = addExceptionContext(sanitizedMessage); | 73 String finalSanitized = addExceptionContext(sanitizedMessage); |
74 m_message = finalSanitized; | 74 m_message = finalSanitized; |
75 String finalUnsanitized = addExceptionContext(unsanitizedMessage); | 75 String finalUnsanitized = addExceptionContext(unsanitizedMessage); |
76 | 76 |
77 setException(V8ThrowException::createDOMException(m_isolate, SecurityError,
finalSanitized, finalUnsanitized, m_creationContext)); | 77 setException(V8ThrowException::createDOMException(m_isolate, SecurityError,
finalSanitized, finalUnsanitized, m_creationContext)); |
78 } | 78 } |
79 | 79 |
80 void ExceptionState::setException(v8::Handle<v8::Value> exception) | 80 void ExceptionState::setException(v8::Local<v8::Value> exception) |
81 { | 81 { |
82 // FIXME: Assert that exception is not empty? | 82 // FIXME: Assert that exception is not empty? |
83 if (exception.IsEmpty()) { | 83 if (exception.IsEmpty()) { |
84 clearException(); | 84 clearException(); |
85 return; | 85 return; |
86 } | 86 } |
87 | 87 |
88 m_exception.set(m_isolate, exception); | 88 m_exception.set(m_isolate, exception); |
89 } | 89 } |
90 | 90 |
(...skipping 95 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 |