Fix VS 2015 warning by adding an additional cast

The OwningThread member of CRITICAL_SECTION is declared as having type
HANDLE but it is actually the thread's Thread ID which is a DWORD. When
doing 64-bit builds of Chromium with VS 2015 this triggers a warning
because of the suspicious conversion from 32-bit integer to 64-bit

This change adds a cast (and some comments) to make the conversion
explicit and avoid the warning.

Review URL:

Cr-Commit-Position: refs/heads/master@{#10190}
diff --git a/webrtc/base/ b/webrtc/base/
index 851635d..1f50c23 100644
--- a/webrtc/base/
+++ b/webrtc/base/
@@ -88,7 +88,12 @@
 bool CriticalSection::CurrentThreadIsOwner() const {
 #if defined(WEBRTC_WIN)
-  return crit_.OwningThread == reinterpret_cast<HANDLE>(GetCurrentThreadId());
+  // OwningThread has type HANDLE but actually contains the Thread ID:
+  //
+  // Converting through size_t avoids the VS 2015 warning C4312: conversion from
+  // 'type1' to 'type2' of greater size
+  return crit_.OwningThread ==
+         reinterpret_cast<HANDLE>(static_cast<size_t>(GetCurrentThreadId()));
   return pthread_equal(thread_, pthread_self());