| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com> | 3 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com> |
| 4 * Copyright (C) 2009, 2010 Google Inc. All rights reserved. | 4 * Copyright (C) 2009, 2010 Google Inc. All rights reserved. |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * | 9 * |
| 10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 } | 226 } |
| 227 jsonArgs->addItem(inspectorValue); | 227 jsonArgs->addItem(inspectorValue); |
| 228 } | 228 } |
| 229 } | 229 } |
| 230 jsonObj->setParameters(jsonArgs); | 230 jsonObj->setParameters(jsonArgs); |
| 231 } | 231 } |
| 232 } | 232 } |
| 233 if (m_callStack) | 233 if (m_callStack) |
| 234 jsonObj->setStackTrace(m_callStack->buildInspectorArray()); | 234 jsonObj->setStackTrace(m_callStack->buildInspectorArray()); |
| 235 frontend->messageAdded(jsonObj); | 235 frontend->messageAdded(jsonObj); |
| 236 frontend->flush(); |
| 236 } | 237 } |
| 237 | 238 |
| 238 void ConsoleMessage::windowCleared(DOMWindow* window) | 239 void ConsoleMessage::windowCleared(DOMWindow* window) |
| 239 { | 240 { |
| 240 if (m_scriptState.get() && m_scriptState.get()->domWindow() == window) | 241 if (m_scriptState.get() && m_scriptState.get()->domWindow() == window) |
| 241 m_scriptState.clear(); | 242 m_scriptState.clear(); |
| 242 | 243 |
| 243 if (!m_arguments) | 244 if (!m_arguments) |
| 244 return; | 245 return; |
| 245 if (m_arguments->scriptState()->domWindow() != window) | 246 if (m_arguments->scriptState()->domWindow() != window) |
| 246 return; | 247 return; |
| 247 if (!m_message) | 248 if (!m_message) |
| 248 m_message = "<message collected>"; | 249 m_message = "<message collected>"; |
| 249 m_arguments.clear(); | 250 m_arguments.clear(); |
| 250 } | 251 } |
| 251 | 252 |
| 252 unsigned ConsoleMessage::argumentCount() | 253 unsigned ConsoleMessage::argumentCount() |
| 253 { | 254 { |
| 254 if (m_arguments) | 255 if (m_arguments) |
| 255 return m_arguments->argumentCount(); | 256 return m_arguments->argumentCount(); |
| 256 return 0; | 257 return 0; |
| 257 } | 258 } |
| 258 | 259 |
| 259 } // namespace WebCore | 260 } // namespace WebCore |
| 260 | 261 |
| OLD | NEW |