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

Unified Diff: content/browser/renderer_host/sandbox_ipc_linux.cc

Issue 380243002: Support null language for fallbackFontForChar's IPC wrapper (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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
« no previous file with comments | « no previous file | content/common/child_process_sandbox_support_impl_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/sandbox_ipc_linux.cc
diff --git a/content/browser/renderer_host/sandbox_ipc_linux.cc b/content/browser/renderer_host/sandbox_ipc_linux.cc
index 74a1601c5782c8e12098e1228f6cecdb09d3dfd7..8deaef9be071625415367e0b6980cf7aca9d5a79 100644
--- a/content/browser/renderer_host/sandbox_ipc_linux.cc
+++ b/content/browser/renderer_host/sandbox_ipc_linux.cc
@@ -223,12 +223,20 @@ void SandboxIPCHandler::HandleGetFallbackFontForChar(
if (!pickle.ReadInt(&iter, &c))
return;
- std::string preferred_locale;
- if (!pickle.ReadString(&iter, &preferred_locale))
+ bool hasLocale;
+ if (!pickle.ReadBool(&iter, &hasLocale))
return;
blink::WebFallbackFont fallbackFont;
- WebFontInfo::fallbackFontForChar(c, preferred_locale.c_str(), &fallbackFont);
+ if (hasLocale) {
+ std::string preferred_locale;
+ if (!pickle.ReadString(&iter, &preferred_locale))
+ return;
+ WebFontInfo::fallbackFontForChar(
+ c, preferred_locale.c_str(), &fallbackFont);
+ } else {
+ WebFontInfo::fallbackFontForChar(c, 0, &fallbackFont);
+ }
int pathIndex = FindOrAddPath(SkString(fallbackFont.filename.data()));
fallbackFont.fontconfigInterfaceId = pathIndex;
« no previous file with comments | « no previous file | content/common/child_process_sandbox_support_impl_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698