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

Unified Diff: src/cxa_demangle.cpp

Issue 102883003: Don't ship a full C++ demangler as part of libc++abi (Closed) Base URL: http://git.chromium.org/native_client/pnacl-libcxxabi.git@master
Patch Set: Copy/paste fail. Created 7 years 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/cxa_demangle.cpp
diff --git a/src/cxa_demangle.cpp b/src/cxa_demangle.cpp
index ba8225cfd2d5363ac95a06f479fe0f7b21f6a81b..671d79ca9124e3771f93f2367d06540a7d218b41 100644
--- a/src/cxa_demangle.cpp
+++ b/src/cxa_demangle.cpp
@@ -4604,6 +4604,16 @@ __cxa_demangle(const char* mangled_name, char* buf, size_t* n, int* status)
*status = invalid_args;
return nullptr;
}
+ // @LOCALMOD-START The demangler is *huge* and only used in
+ // default_terminate_handler with a fallback to printing mangled
+ // names instead. pexe size matters a lot, so PNaCl only prints out
+ // mangled names when exceptions are uncaught.
+#ifdef __pnacl__
+ if (status)
+ *status = memory_alloc_failure;
+ return nullptr;
+#else
+ // @LOCALMOD-END
size_t internal_size = buf != nullptr ? *n : 0;
arena<bs> a;
struct Db
@@ -4681,6 +4691,9 @@ __cxa_demangle(const char* mangled_name, char* buf, size_t* n, int* status)
if (status)
*status = internal_status;
return buf;
+ // @LOCALMOD-START
+#endif // __pnacl__
+ // @LOCALMOD-END
}
} // __cxxabiv1
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698