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

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

Issue 399043002: DevTools: switch Timeline frontend into buffered mode and remove the corresponding experiment. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: timeline-websocket-event rebaselined Created 6 years, 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 809 matching lines...) Expand 10 before | Expand all | Expand 10 after
820 void InspectorTimelineAgent::consoleTimeline(ExecutionContext* context, const St ring& title, ScriptState* scriptState) 820 void InspectorTimelineAgent::consoleTimeline(ExecutionContext* context, const St ring& title, ScriptState* scriptState)
821 { 821 {
822 if (!m_state->getBoolean(TimelineAgentState::enabled)) 822 if (!m_state->getBoolean(TimelineAgentState::enabled))
823 return; 823 return;
824 824
825 String message = String::format("Timeline '%s' started.", title.utf8().data( )); 825 String message = String::format("Timeline '%s' started.", title.utf8().data( ));
826 826
827 mainFrame()->console().addMessage(JSMessageSource, DebugMessageLevel, messag e, String(), 0, 0, nullptr, scriptState); 827 mainFrame()->console().addMessage(JSMessageSource, DebugMessageLevel, messag e, String(), 0, 0, nullptr, scriptState);
828 m_consoleTimelines.append(title); 828 m_consoleTimelines.append(title);
829 if (!isStarted()) { 829 if (!isStarted()) {
830 m_state->setBoolean(TimelineAgentState::bufferEvents, true);
831 m_bufferedEvents = TypeBuilder::Array<TimelineEvent>::create();
832
830 innerStart(); 833 innerStart();
831 bool fromConsole = true; 834 bool fromConsole = true;
832 m_frontend->started(&fromConsole); 835 m_frontend->started(&fromConsole);
833 } 836 }
834 appendRecord(TimelineRecordFactory::createTimeStampData(message), TimelineRe cordType::TimeStamp, true, frameForExecutionContext(context)); 837 appendRecord(TimelineRecordFactory::createTimeStampData(message), TimelineRe cordType::TimeStamp, true, frameForExecutionContext(context));
835 } 838 }
836 839
837 void InspectorTimelineAgent::consoleTimelineEnd(ExecutionContext* context, const String& title, ScriptState* scriptState) 840 void InspectorTimelineAgent::consoleTimelineEnd(ExecutionContext* context, const String& title, ScriptState* scriptState)
838 { 841 {
839 if (!m_state->getBoolean(TimelineAgentState::enabled)) 842 if (!m_state->getBoolean(TimelineAgentState::enabled))
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after
1361 visitor->trace(m_timelineAgent); 1364 visitor->trace(m_timelineAgent);
1362 } 1365 }
1363 1366
1364 void TimelineThreadState::trace(Visitor* visitor) 1367 void TimelineThreadState::trace(Visitor* visitor)
1365 { 1368 {
1366 visitor->trace(recordStack); 1369 visitor->trace(recordStack);
1367 } 1370 }
1368 1371
1369 } // namespace blink 1372 } // namespace blink
1370 1373
OLDNEW
« no previous file with comments | « LayoutTests/inspector/timeline/timeline-window-filter.html ('k') | Source/devtools/front_end/common/Settings.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698