| 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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 { | 198 { |
| 199 return !(securityOrigin()->canRequest(completeURL(sourceURL)) || corsStatus
== SharableCrossOrigin); | 199 return !(securityOrigin()->canRequest(completeURL(sourceURL)) || corsStatus
== SharableCrossOrigin); |
| 200 } | 200 } |
| 201 | 201 |
| 202 void ScriptExecutionContext::reportException(PassRefPtr<ErrorEvent> event, PassR
efPtr<ScriptCallStack> callStack, AccessControlStatus corsStatus) | 202 void ScriptExecutionContext::reportException(PassRefPtr<ErrorEvent> event, PassR
efPtr<ScriptCallStack> callStack, AccessControlStatus corsStatus) |
| 203 { | 203 { |
| 204 RefPtr<ErrorEvent> errorEvent = event; | 204 RefPtr<ErrorEvent> errorEvent = event; |
| 205 if (m_inDispatchErrorEvent) { | 205 if (m_inDispatchErrorEvent) { |
| 206 if (!m_pendingExceptions) | 206 if (!m_pendingExceptions) |
| 207 m_pendingExceptions = adoptPtr(new Vector<OwnPtr<PendingException> >
()); | 207 m_pendingExceptions = adoptPtr(new Vector<OwnPtr<PendingException> >
()); |
| 208 m_pendingExceptions->append(adoptPtr(new PendingException(errorEvent->me
ssage(), errorEvent->lineno(), errorEvent->colno(), errorEvent->filename(), call
Stack))); | 208 m_pendingExceptions->append(adoptPtr(new PendingException(errorEvent->me
ssageForConsole(), errorEvent->lineno(), errorEvent->colno(), errorEvent->filena
me(), callStack))); |
| 209 return; | 209 return; |
| 210 } | 210 } |
| 211 | 211 |
| 212 // First report the original exception and only then all the nested ones. | 212 // First report the original exception and only then all the nested ones. |
| 213 if (!dispatchErrorEvent(errorEvent, corsStatus)) | 213 if (!dispatchErrorEvent(errorEvent, corsStatus)) |
| 214 logExceptionToConsole(errorEvent->message(), errorEvent->filename(), err
orEvent->lineno(), errorEvent->colno(), callStack); | 214 logExceptionToConsole(errorEvent->messageForConsole(), errorEvent->filen
ame(), errorEvent->lineno(), errorEvent->colno(), callStack); |
| 215 | 215 |
| 216 if (!m_pendingExceptions) | 216 if (!m_pendingExceptions) |
| 217 return; | 217 return; |
| 218 | 218 |
| 219 for (size_t i = 0; i < m_pendingExceptions->size(); i++) { | 219 for (size_t i = 0; i < m_pendingExceptions->size(); i++) { |
| 220 PendingException* e = m_pendingExceptions->at(i).get(); | 220 PendingException* e = m_pendingExceptions->at(i).get(); |
| 221 logExceptionToConsole(e->m_errorMessage, e->m_sourceURL, e->m_lineNumber
, e->m_columnNumber, e->m_callStack); | 221 logExceptionToConsole(e->m_errorMessage, e->m_sourceURL, e->m_lineNumber
, e->m_columnNumber, e->m_callStack); |
| 222 } | 222 } |
| 223 m_pendingExceptions.clear(); | 223 m_pendingExceptions.clear(); |
| 224 } | 224 } |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 ScriptExecutionContext::Task::~Task() | 308 ScriptExecutionContext::Task::~Task() |
| 309 { | 309 { |
| 310 } | 310 } |
| 311 | 311 |
| 312 void ScriptExecutionContext::setDatabaseContext(DatabaseContext* databaseContext
) | 312 void ScriptExecutionContext::setDatabaseContext(DatabaseContext* databaseContext
) |
| 313 { | 313 { |
| 314 m_databaseContext = databaseContext; | 314 m_databaseContext = databaseContext; |
| 315 } | 315 } |
| 316 | 316 |
| 317 } // namespace WebCore | 317 } // namespace WebCore |
| OLD | NEW |