| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. |
| 3 * Copyright (C) 2012 Google Inc. All Rights Reserved. | 3 * Copyright (C) 2012 Google Inc. All Rights Reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 { | 146 { |
| 147 if (m_inDispatchErrorEvent) { | 147 if (m_inDispatchErrorEvent) { |
| 148 if (!m_pendingExceptions) | 148 if (!m_pendingExceptions) |
| 149 m_pendingExceptions = wrapUnique(new Vector<std::unique_ptr<PendingE
xception>>()); | 149 m_pendingExceptions = wrapUnique(new Vector<std::unique_ptr<PendingE
xception>>()); |
| 150 m_pendingExceptions->append(wrapUnique(new PendingException(errorEvent->
messageForConsole(), errorEvent->location()->clone()))); | 150 m_pendingExceptions->append(wrapUnique(new PendingException(errorEvent->
messageForConsole(), errorEvent->location()->clone()))); |
| 151 return; | 151 return; |
| 152 } | 152 } |
| 153 | 153 |
| 154 // First report the original exception and only then all the nested ones. | 154 // First report the original exception and only then all the nested ones. |
| 155 if (!dispatchErrorEvent(errorEvent, corsStatus)) | 155 if (!dispatchErrorEvent(errorEvent, corsStatus)) |
| 156 logExceptionToConsole(errorEvent->messageForConsole(), errorEvent->locat
ion()->clone()); | 156 exceptionThrown(errorEvent->messageForConsole(), errorEvent->location()-
>clone()); |
| 157 | 157 |
| 158 if (!m_pendingExceptions) | 158 if (!m_pendingExceptions) |
| 159 return; | 159 return; |
| 160 | 160 |
| 161 for (size_t i = 0; i < m_pendingExceptions->size(); i++) { | 161 for (size_t i = 0; i < m_pendingExceptions->size(); i++) { |
| 162 PendingException* e = m_pendingExceptions->at(i).get(); | 162 PendingException* e = m_pendingExceptions->at(i).get(); |
| 163 logExceptionToConsole(e->m_errorMessage, std::move(e->m_location)); | 163 exceptionThrown(e->m_errorMessage, std::move(e->m_location)); |
| 164 } | 164 } |
| 165 m_pendingExceptions.reset(); | 165 m_pendingExceptions.reset(); |
| 166 } | 166 } |
| 167 | 167 |
| 168 bool ExecutionContext::dispatchErrorEvent(ErrorEvent* errorEvent, AccessControlS
tatus corsStatus) | 168 bool ExecutionContext::dispatchErrorEvent(ErrorEvent* errorEvent, AccessControlS
tatus corsStatus) |
| 169 { | 169 { |
| 170 EventTarget* target = errorEventTarget(); | 170 EventTarget* target = errorEventTarget(); |
| 171 if (!target) | 171 if (!target) |
| 172 return false; | 172 return false; |
| 173 | 173 |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 } | 291 } |
| 292 | 292 |
| 293 DEFINE_TRACE(ExecutionContext) | 293 DEFINE_TRACE(ExecutionContext) |
| 294 { | 294 { |
| 295 visitor->trace(m_publicURLManager); | 295 visitor->trace(m_publicURLManager); |
| 296 ContextLifecycleNotifier::trace(visitor); | 296 ContextLifecycleNotifier::trace(visitor); |
| 297 Supplementable<ExecutionContext>::trace(visitor); | 297 Supplementable<ExecutionContext>::trace(visitor); |
| 298 } | 298 } |
| 299 | 299 |
| 300 } // namespace blink | 300 } // namespace blink |
| OLD | NEW |