Make the MessageLoop PostTask ID more unique.

When looking at chrome://tracing we were seeing duplicate IDs linking PostTask
flow events. This CL is an attempt to fix that issue.

Currently we take the sequence_num and shift it 32 bits to the left in a uint64.
When then OR the intptr_t of this into that number. On x86_64 the
sizeof(intptr_t) is 8bytes. This means, we'll be ORing the top 32 bits of the
this address with the sequence_num.

This CL takes the this pointer and removes the top 32bits before ORing with the
sequence_num. So, we get the sequence_num followed by the bottom 32bits of the
this pointer.

BUG=
TBR=darin@chromium.org

Review URL: https://chromiumcodereview.appspot.com/23095002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@218403 0039d316-1c4b-4281-b951-d872f2087c98


CrOS-Libchrome-Original-Commit: 8437a412a33cefcb2c43e06e97c3c931efea7dce
diff --git a/base/message_loop/message_loop.cc b/base/message_loop/message_loop.cc
index 826c757..92039e2 100644
--- a/base/message_loop/message_loop.cc
+++ b/base/message_loop/message_loop.cc
@@ -539,7 +539,7 @@
 
 uint64 MessageLoop::GetTaskTraceID(const PendingTask& task) {
   return (static_cast<uint64>(task.sequence_num) << 32) |
-         static_cast<uint64>(reinterpret_cast<intptr_t>(this));
+         ((static_cast<uint64>(reinterpret_cast<intptr_t>(this)) << 32) >> 32);
 }
 
 void MessageLoop::ReloadWorkQueue() {