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

Unified Diff: src/string-stream.cc

Issue 12033007: Hide addresses in traced code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed review comments. Created 7 years, 11 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 | « src/flag-definitions.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/string-stream.cc
diff --git a/src/string-stream.cc b/src/string-stream.cc
index fc07d94ded237ee4ca79ebde48fe036680de6910..ea50e36b00e6f36c436d0256a939c3e157c11c17 100644
--- a/src/string-stream.cc
+++ b/src/string-stream.cc
@@ -167,10 +167,14 @@ void StringStream::Add(Vector<const char> format, Vector<FmtElm> elms) {
break;
}
case 'p': {
- void* value = current.data_.u_pointer_;
- EmbeddedVector<char, 20> formatted;
- OS::SNPrintF(formatted, temp.start(), value);
- Add(formatted.start());
+ if (!FLAG_hide_addresses_when_tracing) {
+ void* value = current.data_.u_pointer_;
+ EmbeddedVector<char, 20> formatted;
+ OS::SNPrintF(formatted, temp.start(), value);
+ Add(formatted.start());
+ } else {
+ Add("0xXXXXXXXX");
+ }
break;
}
default:
« no previous file with comments | « src/flag-definitions.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698