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

Unified Diff: Source/core/inspector/TraceEventDispatcher.h

Issue 184303002: DevTools: support TRACE_VALUE_TYPE_COPY_STRING (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/core/inspector/TraceEventDispatcher.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/TraceEventDispatcher.h
diff --git a/Source/core/inspector/TraceEventDispatcher.h b/Source/core/inspector/TraceEventDispatcher.h
index 22e14e750eed72048fbf8ca5dd6d66acfa6f5941..5fae9a8602d79902d33546dd62a85d73b7d39268 100644
--- a/Source/core/inspector/TraceEventDispatcher.h
+++ b/Source/core/inspector/TraceEventDispatcher.h
@@ -74,8 +74,14 @@ public:
}
for (int i = 0; i < m_argumentCount; ++i) {
m_argumentNames[i] = argumentNames[i];
- m_argumentTypes[i] = argumentTypes[i];
- m_argumentValues[i] = argumentValues[i];
+ if (argumentTypes[i] == TRACE_VALUE_TYPE_COPY_STRING) {
+ m_stringArguments[i] = reinterpret_cast<const char*>(argumentValues[i]);
+ m_argumentValues[i].m_string = reinterpret_cast<const char*>(m_stringArguments[i].characters8());
+ m_argumentTypes[i] = TRACE_VALUE_TYPE_STRING;
+ } else {
+ m_argumentValues[i].m_int = argumentValues[i];
+ m_argumentTypes[i] = argumentTypes[i];
+ }
}
}
@@ -127,7 +133,11 @@ public:
int m_argumentCount;
const char* m_argumentNames[MaxArguments];
unsigned char m_argumentTypes[MaxArguments];
- unsigned long long m_argumentValues[MaxArguments];
+ WebCore::TraceEvent::TraceValueUnion m_argumentValues[MaxArguments];
+ // These are only used as buffers for TRACE_VALUE_TYPE_COPY_STRING.
+ // Consider allocating the entire vector of buffered trace events and their copied arguments out of a special arena
+ // to make things more compact.
+ String m_stringArguments[MaxArguments];
};
typedef void (TraceEventTargetBase::*TraceEventHandlerMethod)(const TraceEvent&);
« no previous file with comments | « no previous file | Source/core/inspector/TraceEventDispatcher.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698