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

Side by Side Diff: third_party/WebKit/Source/platform/TraceEvent.h

Issue 1422773008: Fixing remaining VC++ 2015 64-bit build breaks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync to latest Created 5 years, 1 month 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 template<bool dummyMangle> class MangleBehavior { 262 template<bool dummyMangle> class MangleBehavior {
263 public: 263 public:
264 template<typename T> explicit MangleBehavior(T id) : m_data(reinterpret_ cast<unsigned long long>(id)) { } 264 template<typename T> explicit MangleBehavior(T id) : m_data(reinterpret_ cast<unsigned long long>(id)) { }
265 unsigned long long data() const { return m_data; } 265 unsigned long long data() const { return m_data; }
266 private: 266 private:
267 unsigned long long m_data; 267 unsigned long long m_data;
268 }; 268 };
269 typedef MangleBehavior<false> DontMangle; 269 typedef MangleBehavior<false> DontMangle;
270 typedef MangleBehavior<true> ForceMangle; 270 typedef MangleBehavior<true> ForceMangle;
271 271
272 TraceID(const void* id, unsigned* flags) : 272 TraceID(const void* id, unsigned* flags)
273 m_data(static_cast<unsigned long long>(reinterpret_cast<unsigned long>(i d))) 273 : m_data(reinterpret_cast<uintptr_t>(id))
Will Harris 2015/11/10 18:05:14 this looks like a behavior change, before the id w
brucedawson 2015/11/10 18:43:26 Yep, it's a behavior change because the previous c
Will Harris 2015/11/10 19:45:46 trace_event.h does data_(static_cast<unsigned lon
brucedawson 2015/11/10 19:54:33 I guess, although the whole idea of casting from u
274 { 274 {
275 *flags |= TRACE_EVENT_FLAG_MANGLE_ID; 275 *flags |= TRACE_EVENT_FLAG_MANGLE_ID;
276 } 276 }
277 TraceID(ForceMangle id, unsigned* flags) : m_data(id.data()) 277 TraceID(ForceMangle id, unsigned* flags) : m_data(id.data())
278 { 278 {
279 *flags |= TRACE_EVENT_FLAG_MANGLE_ID; 279 *flags |= TRACE_EVENT_FLAG_MANGLE_ID;
280 } 280 }
281 TraceID(DontMangle id, unsigned*) : m_data(id.data()) { } 281 TraceID(DontMangle id, unsigned*) : m_data(id.data()) { }
282 TraceID(unsigned long long id, unsigned*) : m_data(id) { } 282 TraceID(unsigned long long id, unsigned*) : m_data(id) { }
283 TraceID(unsigned long id, unsigned*) : m_data(id) { } 283 TraceID(unsigned long id, unsigned*) : m_data(id) { }
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
611 const char* m_categoryGroup; 611 const char* m_categoryGroup;
612 const char* m_name; 612 const char* m_name;
613 IDType m_id; 613 IDType m_id;
614 }; 614 };
615 615
616 } // namespace TraceEvent 616 } // namespace TraceEvent
617 617
618 } // namespace blink 618 } // namespace blink
619 619
620 #endif 620 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698