Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(432)

Side by Side Diff: Source/core/inspector/ConsoleMessage.cpp

Issue 268443004: DevTools: console messages should not be delayed to post-task. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698