Go back to using mach_thread_self for Mac thread IDs, sort of.
Go back to using mach_thread_self for Mac thread IDs, sort of.

r118780 (https://codereview.chromium.org/9281011) switched
base::PlatformThread::CurrentId() from using mach_port_t (from
mach_thread_self) to using pthread_t directly. Using pthread_t isn't great for
64-bit Chrome, because it's a 64-bit type (a pointer, actually) and
PlatformThreadId is a 32-bit type (pid_t, actually). There's some quiet
truncation happening, and there shouldn't be.

This switches back to mach_thread_self, but instead of the problems associated
with calling mach_thread_self, it uses the Mach port cached by the pthread
layer, by calling pthread_mach_thread_np. This doesn't do anything with the
reference count of the port itself, so there's no concern about leaking (as
when not calling mach_port_deallocate) or returning a potentially stale value
(as when calling mach_port_deallocate before returning a port).
Review URL: https://codereview.chromium.org/12039073

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@178865 0039d316-1c4b-4281-b951-d872f2087c98

zcbenz/cefode-chromium,bright-sparks/chromium-spacewalk,markYoungH/chromium.src,ChromiumWebApps/chromium,Just-D/chromium-1,Jonekee/chromium.src,axinging/chromium-crosswalk,Pluto-tv/chromium-crosswalk,bright-sparks/chromium-spacewalk,hgl888/chromium-crosswalk,hujiajie/pa-chromium,anirudhSK/chromium,jaruba/chromium.src,zcbenz/cefode-chromium,bright-sparks/chromium-spacewalk,Jonekee/chromium.src,fujunwei/chromium-crosswalk,nacl-webkit/chrome_deps,fujunwei/chromium-crosswalk,pozdnyakov/chromium-crosswalk,hgl888/chromium-crosswalk,ltilve/chromium,ltilve/chromium,littlstar/chromium.src,ChromiumWebApps/chromium,Jonekee/chromium.src,TheTypoMaster/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,markYoungH/chromium.src,Chilledheart/chromium,anirudhSK/chromium,timopulkkinen/BubbleFish,chuan9/chromium-crosswalk,axinging/chromium-crosswalk,pozdnyakov/chromium-crosswalk,M4sse/chromium.src,ltilve/chromium,dushu1203/chromium.src,hgl888/chromium-crosswalk-efl,M4sse/chromium.src,nacl-webkit/chrome_deps,jaruba/chromium.src,ondra-novak/chromium.src,mogoweb/chromium-crosswalk,M4sse/chromium.src,timopulkkinen/BubbleFish,Pluto-tv/chromium-crosswalk,M4sse/chromium.src,markYoungH/chromium.src,mogoweb/chromium-crosswalk,nacl-webkit/chrome_deps,patrickm/chromium.src,Jonekee/chromium.src,Fireblend/chromium-crosswalk,Fireblend/chromium-crosswalk,krieger-od/nwjs_chromium.src,krieger-od/nwjs_chromium.src,zcbenz/cefode-chromium,dushu1203/chromium.src,ondra-novak/chromium.src,M4sse/chromium.src,mohamed--abdel-maksoud/chromium.src,chuan9/chromium-crosswalk,dednal/chromium.src,ChromiumWebApps/chromium,patrickm/chromium.src,Just-D/chromium-1,pozdnyakov/chromium-crosswalk,pozdnyakov/chromium-crosswalk,hujiajie/pa-chromium,Jonekee/chromium.src,PeterWangIntel/chromium-crosswalk,bright-sparks/chromium-spacewalk,pozdnyakov/chromium-crosswalk,M4sse/chromium.src,hgl888/chromium-crosswalk-efl,Fireblend/chromium-crosswalk,hujiajie/pa-chromium,anirudhSK/chromium,M4sse/chromium.src,jaruba/chromium.src,TheTypoMaster/chromium-crosswalk,axinging/chromium-crosswalk,Jonekee/chromium.src,TheTypoMaster/chromium-crosswalk,markYoungH/chromium.src,Just-D/chromium-1,Pluto-tv/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,hgl888/chromium-crosswalk-efl,fujunwei/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,hgl888/chromium-crosswalk-efl,krieger-od/nwjs_chromium.src,M4sse/chromium.src,dednal/chromium.src,Jonekee/chromium.src,markYoungH/chromium.src,hgl888/chromium-crosswalk-efl,hujiajie/pa-chromium,TheTypoMaster/chromium-crosswalk,Pluto-tv/chromium-crosswalk,ondra-novak/chromium.src,dednal/chromium.src,krieger-od/nwjs_chromium.src,krieger-od/nwjs_chromium.src,zcbenz/cefode-chromium,ltilve/chromium,mohamed--abdel-maksoud/chromium.src,littlstar/chromium.src,anirudhSK/chromium,nacl-webkit/chrome_deps,zcbenz/cefode-chromium,axinging/chromium-crosswalk,littlstar/chromium.src,nacl-webkit/chrome_deps,hgl888/chromium-crosswalk-efl,ltilve/chromium,markYoungH/chromium.src,Fireblend/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,Chilledheart/chromium,axinging/chromium-crosswalk,Jonekee/chromium.src,mogoweb/chromium-crosswalk,M4sse/chromium.src,chuan9/chromium-crosswalk,hujiajie/pa-chromium,Just-D/chromium-1,hujiajie/pa-chromium,krieger-od/nwjs_chromium.src,zcbenz/cefode-chromium,crosswalk-project/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,PeterWangIntel/chromium-crosswalk,chuan9/chromium-crosswalk,nacl-webkit/chrome_deps,ChromiumWebApps/chromium,littlstar/chromium.src,crosswalk-project/chromium-crosswalk-efl,krieger-od/nwjs_chromium.src,ondra-novak/chromium.src,jaruba/chromium.src,PeterWangIntel/chromium-crosswalk,Chilledheart/chromium,nacl-webkit/chrome_deps,hgl888/chromium-crosswalk-efl,dushu1203/chromium.src,littlstar/chromium.src,timopulkkinen/BubbleFish,ChromiumWebApps/chromium,ondra-novak/chromium.src,anirudhSK/chromium,dushu1203/chromium.src,hgl888/chromium-crosswalk,anirudhSK/chromium,hgl888/chromium-crosswalk,mogoweb/chromium-crosswalk,axinging/chromium-crosswalk,timopulkkinen/BubbleFish,dednal/chromium.src,crosswalk-project/chromium-crosswalk-efl,littlstar/chromium.src,patrickm/chromium.src,dednal/chromium.src,anirudhSK/chromium,chuan9/chromium-crosswalk,dednal/chromium.src,littlstar/chromium.src,dushu1203/chromium.src,bright-sparks/chromium-spacewalk,Chilledheart/chromium,Pluto-tv/chromium-crosswalk,M4sse/chromium.src,zcbenz/cefode-chromium,krieger-od/nwjs_chromium.src,TheTypoMaster/chromium-crosswalk,jaruba/chromium.src,mogoweb/chromium-crosswalk,Chilledheart/chromium,littlstar/chromium.src,PeterWangIntel/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,Fireblend/chromium-crosswalk,Jonekee/chromium.src,Pluto-tv/chromium-crosswalk,hujiajie/pa-chromium,bright-sparks/chromium-spacewalk,pozdnyakov/chromium-crosswalk,hgl888/chromium-crosswalk,ltilve/chromium,ChromiumWebApps/chromium,krieger-od/nwjs_chromium.src,axinging/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,Fireblend/chromium-crosswalk,ChromiumWebApps/chromium,dushu1203/chromium.src,krieger-od/nwjs_chromium.src,Jonekee/chromium.src,crosswalk-project/chromium-crosswalk-efl,hgl888/chromium-crosswalk-efl,fujunwei/chromium-crosswalk,dednal/chromium.src,patrickm/chromium.src,hujiajie/pa-chromium,mogoweb/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,axinging/chromium-crosswalk,markYoungH/chromium.src,axinging/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,fujunwei/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,jaruba/chromium.src,Fireblend/chromium-crosswalk,ChromiumWebApps/chromium,nacl-webkit/chrome_deps,mogoweb/chromium-crosswalk,timopulkkinen/BubbleFish,anirudhSK/chromium,ChromiumWebApps/chromium,Chilledheart/chromium,ChromiumWebApps/chromium,TheTypoMaster/chromium-crosswalk,nacl-webkit/chrome_deps,bright-sparks/chromium-spacewalk,pozdnyakov/chromium-crosswalk,jaruba/chromium.src,ltilve/chromium,markYoungH/chromium.src,timopulkkinen/BubbleFish,dednal/chromium.src,patrickm/chromium.src,dushu1203/chromium.src,crosswalk-project/chromium-crosswalk-efl,timopulkkinen/BubbleFish,ondra-novak/chromium.src,hgl888/chromium-crosswalk,chuan9/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,mogoweb/chromium-crosswalk,timopulkkinen/BubbleFish,pozdnyakov/chromium-crosswalk,fujunwei/chromium-crosswalk,hgl888/chromium-crosswalk,ltilve/chromium,Jonekee/chromium.src,patrickm/chromium.src,fujunwei/chromium-crosswalk,Just-D/chromium-1,jaruba/chromium.src,dushu1203/chromium.src,Chilledheart/chromium,markYoungH/chromium.src,mohamed--abdel-maksoud/chromium.src,krieger-od/nwjs_chromium.src,nacl-webkit/chrome_deps,mohamed--abdel-maksoud/chromium.src,Chilledheart/chromium,crosswalk-project/chromium-crosswalk-efl,ondra-novak/chromium.src,mogoweb/chromium-crosswalk,Just-D/chromium-1,hgl888/chromium-crosswalk,dednal/chromium.src,ondra-novak/chromium.src,ChromiumWebApps/chromium,bright-sparks/chromium-spacewalk,timopulkkinen/BubbleFish,pozdnyakov/chromium-crosswalk,chuan9/chromium-crosswalk,markYoungH/chromium.src,fujunwei/chromium-crosswalk,hujiajie/pa-chromium,mogoweb/chromium-crosswalk,zcbenz/cefode-chromium,zcbenz/cefode-chromium,Fireblend/chromium-crosswalk,hujiajie/pa-chromium,zcbenz/cefode-chromium,mohamed--abdel-maksoud/chromium.src,Fireblend/chromium-crosswalk,dushu1203/chromium.src,Pluto-tv/chromium-crosswalk,chuan9/chromium-crosswalk,pozdnyakov/chromium-crosswalk,jaruba/chromium.src,axinging/chromium-crosswalk,Pluto-tv/chromium-crosswalk,anirudhSK/chromium,markYoungH/chromium.src,jaruba/chromium.src,hujiajie/pa-chromium,mohamed--abdel-maksoud/chromium.src,crosswalk-project/chromium-crosswalk-efl,anirudhSK/chromium,Just-D/chromium-1,timopulkkinen/BubbleFish,hgl888/chromium-crosswalk,dednal/chromium.src,fujunwei/chromium-crosswalk,pozdnyakov/chromium-crosswalk,M4sse/chromium.src,dushu1203/chromium.src,zcbenz/cefode-chromium,jaruba/chromium.src,Chilledheart/chromium,patrickm/chromium.src,hgl888/chromium-crosswalk-efl,hgl888/chromium-crosswalk-efl,dednal/chromium.src,ltilve/chromium,Just-D/chromium-1,nacl-webkit/chrome_deps,anirudhSK/chromium,axinging/chromium-crosswalk,patrickm/chromium.src,ondra-novak/chromium.src,anirudhSK/chromium,Just-D/chromium-1,PeterWangIntel/chromium-crosswalk,bright-sparks/chromium-spacewalk,ChromiumWebApps/chromium,timopulkkinen/BubbleFish,Pluto-tv/chromium-crosswalk,chuan9/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,dushu1203/chromium.src,patrickm/chromium.src