| 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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 return; | 151 return; |
| 152 | 152 |
| 153 for (size_t i = 0; i < m_pendingExceptions->size(); i++) { | 153 for (size_t i = 0; i < m_pendingExceptions->size(); i++) { |
| 154 PendingException* e = m_pendingExceptions->at(i).get(); | 154 PendingException* e = m_pendingExceptions->at(i).get(); |
| 155 if (m_client) | 155 if (m_client) |
| 156 m_client->logExceptionToConsole(e->m_errorMessage, e->m_sourceURL, e
->m_lineNumber, e->m_columnNumber, e->m_callStack); | 156 m_client->logExceptionToConsole(e->m_errorMessage, e->m_sourceURL, e
->m_lineNumber, e->m_columnNumber, e->m_callStack); |
| 157 } | 157 } |
| 158 m_pendingExceptions.clear(); | 158 m_pendingExceptions.clear(); |
| 159 } | 159 } |
| 160 | 160 |
| 161 void ExecutionContext::addConsoleMessage(MessageSource source, MessageLevel leve
l, const String& message, const String& sourceURL, unsigned lineNumber) | 161 void ExecutionContext::addConsoleMessage(PassRefPtr<ConsoleMessage> consoleMessa
ge) |
| 162 { | 162 { |
| 163 if (!m_client) | 163 if (!m_client) |
| 164 return; | 164 return; |
| 165 m_client->addMessage(source, level, message, sourceURL, lineNumber, 0); | 165 m_client->addMessage(consoleMessage); |
| 166 } | |
| 167 | |
| 168 void ExecutionContext::addConsoleMessage(MessageSource source, MessageLevel leve
l, const String& message, ScriptState* scriptState) | |
| 169 { | |
| 170 if (!m_client) | |
| 171 return; | |
| 172 m_client->addMessage(source, level, message, String(), 0, scriptState); | |
| 173 } | 166 } |
| 174 | 167 |
| 175 bool ExecutionContext::dispatchErrorEvent(PassRefPtrWillBeRawPtr<ErrorEvent> eve
nt, AccessControlStatus corsStatus) | 168 bool ExecutionContext::dispatchErrorEvent(PassRefPtrWillBeRawPtr<ErrorEvent> eve
nt, AccessControlStatus corsStatus) |
| 176 { | 169 { |
| 177 if (!m_client) | 170 if (!m_client) |
| 178 return false; | 171 return false; |
| 179 EventTarget* target = m_client->errorEventTarget(); | 172 EventTarget* target = m_client->errorEventTarget(); |
| 180 if (!target) | 173 if (!target) |
| 181 return false; | 174 return false; |
| 182 | 175 |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 | 325 |
| 333 void ExecutionContext::trace(Visitor* visitor) | 326 void ExecutionContext::trace(Visitor* visitor) |
| 334 { | 327 { |
| 335 #if ENABLE(OILPAN) | 328 #if ENABLE(OILPAN) |
| 336 visitor->trace(m_pendingExceptions); | 329 visitor->trace(m_pendingExceptions); |
| 337 #endif | 330 #endif |
| 338 WillBeHeapSupplementable<blink::ExecutionContext>::trace(visitor); | 331 WillBeHeapSupplementable<blink::ExecutionContext>::trace(visitor); |
| 339 } | 332 } |
| 340 | 333 |
| 341 } // namespace blink | 334 } // namespace blink |
| OLD | NEW |