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

Unified Diff: content/common/mac/font_loader.mm

Issue 2025133002: mac: Remove a workaround that's no longer needed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | « chrome/app/framework.order ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/mac/font_loader.mm
diff --git a/content/common/mac/font_loader.mm b/content/common/mac/font_loader.mm
index 4ce635973b0a37ffb11f96233b46dc097a050381..ae0360753387c7c8f2aeae4864173abf4510e7ff 100644
--- a/content/common/mac/font_loader.mm
+++ b/content/common/mac/font_loader.mm
@@ -20,42 +20,6 @@
#include <map>
-extern "C" {
-
-// Work around http://crbug.com/93191, a really nasty memory smasher bug.
-// On Mac OS X 10.7 ("Lion"), ATS writes to memory it doesn't own.
-// SendDeactivateFontsInContainerMessage, called by ATSFontDeactivate,
-// may trash memory whenever dlsym(RTLD_DEFAULT,
-// "_CTFontManagerUnregisterFontForData") returns NULL. In that case, it tries
-// to locate that symbol in the CoreText framework, doing some extremely
-// sloppy string handling resulting in a likelihood that the string
-// "Text.framework/Versions/A/CoreText" will be written over memory that it
-// doesn't own. The kicker here is that Apple dlsym always inserts its own
-// leading underscore, so ATS actually winds up looking up a
-// __CTFontManagerUnregisterFontForData symbol, which doesn't even exist in
-// CoreText. It's only got the single-underscore variant corresponding to an
-// underscoreless extern "C" name.
-//
-// Providing a single-underscored extern "C" function by this name results in
-// a __CTFontManagerUnregisterFontForData symbol that, as long as it's public
-// (not private extern) and unstripped, ATS will find. If it finds it, it
-// avoids making amateur string mistakes that ruin everyone else's good time.
-//
-// Since ATS wouldn't normally be able to call this function anyway, it's just
-// left as a no-op here.
-//
-// This file seems as good as any other to place this function. It was chosen
-// because it already interfaces with ATS for other reasons.
-//
-// SendDeactivateFontsInContainerMessage on 10.6 ("Snow Leopard") appears to
-// share this bug but this sort of memory corruption wasn't detected until
-// 10.7. The implementation in 10.5 ("Leopard") does not have this problem.
-__attribute__((visibility("default")))
-void _CTFontManagerUnregisterFontForData(NSUInteger, int) {
-}
-
-} // extern "C"
-
namespace {
uint32_t GetFontIDForFont(const base::FilePath& font_path) {
« no previous file with comments | « chrome/app/framework.order ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698