Index: content/common/sandbox_win.cc |
diff --git a/content/common/sandbox_win.cc b/content/common/sandbox_win.cc |
index 9833544cbd141004c297b3a8a6099676449fded0..794b4322c9f04d937d3ed8386e7778f7d3c356ee 100644 |
--- a/content/common/sandbox_win.cc |
+++ b/content/common/sandbox_win.cc |
@@ -735,21 +735,23 @@ base::Process StartSandboxedProcess( |
sandbox::TargetPolicy::FILES_ALLOW_READONLY, |
policy); |
- // If DirectWrite is enabled for font rendering then open the font cache |
- // section which is created by the browser and pass the handle to the |
- // renderer process. This is needed because renderer processes on |
- // Windows 8+ may be running in an AppContainer sandbox and hence their |
- // kernel object namespace may be partitioned. |
- std::string name(content::kFontCacheSharedSectionName); |
- name.append(base::UintToString(base::GetCurrentProcId())); |
- |
- base::SharedMemory direct_write_font_cache_section; |
- if (direct_write_font_cache_section.Open(name, true)) { |
- void* shared_handle = policy->AddHandleToShare( |
- direct_write_font_cache_section.handle().GetHandle()); |
- cmd_line->AppendSwitchASCII( |
- switches::kFontCacheSharedHandle, |
- base::UintToString(base::win::HandleToUint32(shared_handle))); |
+ if (content::ShouldUseDirectWriteFontProxyFieldTrial()) { |
fdoray
2015/12/30 01:15:08
if (!...)
Ilya Kulshin
2015/12/30 01:59:46
Done.
|
+ // If DirectWrite is enabled for font rendering then open the font |
+ // cache section which is created by the browser and pass the handle to |
+ // the renderer process. This is needed because renderer processes on |
+ // Windows 8+ may be running in an AppContainer sandbox and hence their |
+ // kernel object namespace may be partitioned. |
+ std::string name(content::kFontCacheSharedSectionName); |
+ name.append(base::UintToString(base::GetCurrentProcId())); |
+ |
+ base::SharedMemory direct_write_font_cache_section; |
+ if (direct_write_font_cache_section.Open(name, true)) { |
+ void* shared_handle = policy->AddHandleToShare( |
+ direct_write_font_cache_section.handle().GetHandle()); |
+ cmd_line->AppendSwitchASCII( |
+ switches::kFontCacheSharedHandle, |
+ base::UintToString(base::win::HandleToUint32(shared_handle))); |
+ } |
} |
} |
} |