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

Unified Diff: content/common/dwrite_font_platform_win.cc

Issue 1320783002: Make SharedMemoryHandle a class on windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ipc_global
Patch Set: Fix DCHECK. Created 5 years, 3 months 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 side-by-side diff with in-line comments
Download patch
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);

Powered by Google App Engine
This is Rietveld 408576698