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

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

Issue 59793003: Emit CommitFrame and BeginFrame for impl-side frames (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebased on top of TraceEventDispatcher refactoring Created 7 years 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 | « Source/core/inspector/InspectorTimelineAgent.cpp ('k') | Source/platform/TraceEvent.h » ('j') | 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) 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 25 matching lines...) Expand all
36 #include "wtf/Functional.h" 36 #include "wtf/Functional.h"
37 #include "wtf/MainThread.h" 37 #include "wtf/MainThread.h"
38 #include "wtf/text/StringHash.h" 38 #include "wtf/text/StringHash.h"
39 39
40 namespace WebCore { 40 namespace WebCore {
41 41
42 void TraceEventDispatcher::dispatchEventOnAnyThread(char phase, const unsigned c har*, const char* name, unsigned long long id, 42 void TraceEventDispatcher::dispatchEventOnAnyThread(char phase, const unsigned c har*, const char* name, unsigned long long id,
43 int numArgs, const char* const* argNames, const unsigned char* argTypes, con st unsigned long long* argValues, 43 int numArgs, const char* const* argNames, const unsigned char* argTypes, con st unsigned long long* argValues,
44 unsigned char flags, double timestamp) 44 unsigned char flags, double timestamp)
45 { 45 {
46 if (phase == TRACE_EVENT_PHASE_INSTANT_WITH_SCOPE)
47 phase = TRACE_EVENT_PHASE_INSTANT;
46 TraceEventDispatcher* self = instance(); 48 TraceEventDispatcher* self = instance();
47 { 49 {
48 MutexLocker locker(self->m_mutex); 50 MutexLocker locker(self->m_mutex);
49 if (self->m_handlers.find(std::make_pair(name, phase)) == self->m_handle rs.end()) 51 if (self->m_handlers.find(std::make_pair(name, phase)) == self->m_handle rs.end())
50 return; 52 return;
51 } 53 }
52 self->enqueueEvent(TraceEvent(timestamp, phase, name, id, currentThread(), n umArgs, argNames, argTypes, argValues)); 54 self->enqueueEvent(TraceEvent(timestamp, phase, name, id, currentThread(), n umArgs, argNames, argTypes, argValues));
53 if (isMainThread()) 55 if (isMainThread())
54 self->processBackgroundEvents(); 56 self->processBackgroundEvents();
55 } 57 }
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 size_t index = findParameter(name); 150 size_t index = findParameter(name);
149 if (index == kNotFound || m_argumentTypes[index] != expectedType) { 151 if (index == kNotFound || m_argumentTypes[index] != expectedType) {
150 ASSERT_NOT_REACHED(); 152 ASSERT_NOT_REACHED();
151 return missingValue; 153 return missingValue;
152 } 154 }
153 return *reinterpret_cast<const WebCore::TraceEvent::TraceValueUnion*>(m_argu mentValues + index); 155 return *reinterpret_cast<const WebCore::TraceEvent::TraceValueUnion*>(m_argu mentValues + index);
154 } 156 }
155 157
156 } // namespace WebCore 158 } // namespace WebCore
157 159
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorTimelineAgent.cpp ('k') | Source/platform/TraceEvent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698