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

Unified Diff: content/child/blink_platform_impl.cc

Issue 1354453002: Repurposed a now-redundant BlinkPlatformImpl::addTraceEvent override to be able to support bind_id (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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 | « content/child/blink_platform_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/blink_platform_impl.cc
diff --git a/content/child/blink_platform_impl.cc b/content/child/blink_platform_impl.cc
index 57e38bdf315fa26c64bb35712837c92b433ef5e4..6c3207b28b67e9abd06dd814da1be9c856692168 100644
--- a/content/child/blink_platform_impl.cc
+++ b/content/child/blink_platform_impl.cc
@@ -625,19 +625,33 @@ blink::Platform::TraceEventHandle BlinkPlatformImpl::addTraceEvent(
const unsigned char* category_group_enabled,
const char* name,
unsigned long long id,
+ unsigned long long bind_id,
double timestamp,
int num_args,
const char** arg_names,
const unsigned char* arg_types,
const unsigned long long* arg_values,
- unsigned char flags) {
+ blink::WebConvertableToTraceFormat* convertable_values,
+ unsigned int flags) {
+ scoped_refptr<base::trace_event::ConvertableToTraceFormat>
+ convertable_wrappers[2];
+ if (convertable_values) {
+ size_t size = std::min(static_cast<size_t>(num_args),
+ arraysize(convertable_wrappers));
+ for (size_t i = 0; i < size; ++i) {
+ if (arg_types[i] == TRACE_VALUE_TYPE_CONVERTABLE) {
+ convertable_wrappers[i] =
+ new ConvertableToTraceFormatWrapper(convertable_values[i]);
+ }
+ }
+ }
base::TraceTicks timestamp_tt =
base::TraceTicks() + base::TimeDelta::FromSecondsD(timestamp);
base::trace_event::TraceEventHandle handle =
TRACE_EVENT_API_ADD_TRACE_EVENT_WITH_THREAD_ID_AND_TIMESTAMP(
phase, category_group_enabled, name, id, trace_event_internal::kNoId,
- base::PlatformThread::CurrentId(), timestamp_tt, num_args, arg_names,
- arg_types, arg_values, NULL, flags);
+ base::PlatformThread::CurrentId(), bind_id, timestamp_tt, num_args,
+ arg_names, arg_types, arg_values, convertable_wrappers, flags);
blink::Platform::TraceEventHandle result;
memcpy(&result, &handle, sizeof(result));
return result;
« no previous file with comments | « content/child/blink_platform_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698