Index: src/cxa_demangle.cpp |
diff --git a/src/cxa_demangle.cpp b/src/cxa_demangle.cpp |
index ba8225cfd2d5363ac95a06f479fe0f7b21f6a81b..f9971898d99dedfebfba4305c67f6270c2e91f6b 100644 |
--- a/src/cxa_demangle.cpp |
+++ b/src/cxa_demangle.cpp |
@@ -4598,6 +4598,16 @@ extern "C" |
char* |
__cxa_demangle(const char* mangled_name, char* buf, size_t* n, int* status) |
{ |
+ // @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__ |
+ *status = 1; |
jvoung (off chromium)
2013/12/04 01:52:00
The API says that status may be a null pointer (in
JF
2013/12/04 02:10:25
I fixed this and also moved the code down so it st
|
+ return 0; |
+#else |
+ // @LOCALMOD-END |
if (mangled_name == nullptr || (buf != nullptr && n == nullptr)) |
{ |
if (status) |
@@ -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 |