Chromium Code Reviews| Index: content/common/dwrite_font_platform_win.cc |
| diff --git a/content/common/dwrite_font_platform_win.cc b/content/common/dwrite_font_platform_win.cc |
| index f2b4bd93b6043f4e0dadd5db27c8b9cc3e4b4540..e9611a675c7b6d6e5ff41f529b96836629b72245 100644 |
| --- a/content/common/dwrite_font_platform_win.cc |
| +++ b/content/common/dwrite_font_platform_win.cc |
| @@ -937,10 +937,12 @@ bool FontCollectionLoader::LoadCacheFile() { |
| if (font_cache_handle_string.empty()) |
| return false; |
| - base::SharedMemoryHandle font_cache_handle = NULL; |
| + unsigned int handle_int; |
| base::StringToUint(font_cache_handle_string, |
| - reinterpret_cast<unsigned int*>(&font_cache_handle)); |
| - DCHECK(font_cache_handle); |
| + reinterpret_cast<unsigned int*>(&handle_int)); |
|
Tom Sepez
2015/09/23 22:06:13
note: technically wrong, this needs to be the addr
erikchen
2015/09/24 00:44:18
handle_int was a poorly named variable - it was ac
|
| + DCHECK(handle_int); |
| + base::SharedMemoryHandle font_cache_handle(LongToHandle(handle_int), |
| + base::GetCurrentProcId()); |
| base::SharedMemory* shared_mem = new base::SharedMemory( |
| font_cache_handle, true); |