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

Unified Diff: src/log.cc

Issue 101763003: Replace 'operator*' with explicit 'get' method on SmartPointer (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Reupload to make rietveld happy 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 | « src/lithium-allocator.cc ('k') | src/messages.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/log.cc
diff --git a/src/log.cc b/src/log.cc
index a508e8739ea4b58de7502d06f600f177cefaa304..95362c0910d28163fb1d72d0f47c38c262fe289c 100644
--- a/src/log.cc
+++ b/src/log.cc
@@ -1041,7 +1041,7 @@ void Logger::ApiNamedSecurityCheck(Object* key) {
if (key->IsString()) {
SmartArrayPointer<char> str =
String::cast(key)->ToCString(DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL);
- ApiEvent("api,check-security,\"%s\"\n", *str);
+ ApiEvent("api,check-security,\"%s\"\n", str.get());
} else if (key->IsSymbol()) {
Symbol* symbol = Symbol::cast(key);
if (symbol->name()->IsUndefined()) {
@@ -1051,7 +1051,7 @@ void Logger::ApiNamedSecurityCheck(Object* key) {
SmartArrayPointer<char> str = String::cast(symbol->name())->ToCString(
DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL);
ApiEvent("api,check-security,symbol(\"%s\" hash %x)\n",
- *str,
+ str.get(),
Symbol::cast(key)->Hash());
}
} else if (key->IsUndefined()) {
@@ -1253,17 +1253,18 @@ void Logger::ApiNamedPropertyAccess(const char* tag,
if (name->IsString()) {
SmartArrayPointer<char> property_name =
String::cast(name)->ToCString(DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL);
- ApiEvent("api,%s,\"%s\",\"%s\"\n", tag, *class_name, *property_name);
+ ApiEvent("api,%s,\"%s\",\"%s\"\n", tag, class_name.get(),
+ property_name.get());
} else {
Symbol* symbol = Symbol::cast(name);
uint32_t hash = symbol->Hash();
if (symbol->name()->IsUndefined()) {
- ApiEvent("api,%s,\"%s\",symbol(hash %x)\n", tag, *class_name, hash);
+ ApiEvent("api,%s,\"%s\",symbol(hash %x)\n", tag, class_name.get(), hash);
} else {
SmartArrayPointer<char> str = String::cast(symbol->name())->ToCString(
DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL);
ApiEvent("api,%s,\"%s\",symbol(\"%s\" hash %x)\n",
- tag, *class_name, *str, hash);
+ tag, class_name.get(), str.get(), hash);
}
}
}
@@ -1275,7 +1276,7 @@ void Logger::ApiIndexedPropertyAccess(const char* tag,
String* class_name_obj = holder->class_name();
SmartArrayPointer<char> class_name =
class_name_obj->ToCString(DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL);
- ApiEvent("api,%s,\"%s\",%u\n", tag, *class_name, index);
+ ApiEvent("api,%s,\"%s\",%u\n", tag, class_name.get(), index);
}
@@ -1284,7 +1285,7 @@ void Logger::ApiObjectAccess(const char* tag, JSObject* object) {
String* class_name_obj = object->class_name();
SmartArrayPointer<char> class_name =
class_name_obj->ToCString(DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL);
- ApiEvent("api,%s,\"%s\"\n", tag, *class_name);
+ ApiEvent("api,%s,\"%s\"\n", tag, class_name.get());
}
@@ -1332,7 +1333,7 @@ void Logger::CallbackEventInternal(const char* prefix, Name* name,
if (name->IsString()) {
SmartArrayPointer<char> str =
String::cast(name)->ToCString(DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL);
- msg.Append(",1,\"%s%s\"", prefix, *str);
+ msg.Append(",1,\"%s%s\"", prefix, str.get());
} else {
Symbol* symbol = Symbol::cast(name);
if (symbol->name()->IsUndefined()) {
@@ -1340,7 +1341,8 @@ void Logger::CallbackEventInternal(const char* prefix, Name* name,
} else {
SmartArrayPointer<char> str = String::cast(symbol->name())->ToCString(
DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL);
- msg.Append(",1,symbol(\"%s\" hash %x)", prefix, *str, symbol->Hash());
+ msg.Append(",1,symbol(\"%s\" hash %x)", prefix, str.get(),
+ symbol->Hash());
}
}
msg.Append('\n');
@@ -1439,7 +1441,7 @@ void Logger::CodeCreateEvent(LogEventsAndTags tag,
if (name->IsString()) {
SmartArrayPointer<char> str =
String::cast(name)->ToCString(DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL);
- msg.Append("\"%s\"", *str);
+ msg.Append("\"%s\"", str.get());
} else {
msg.AppendSymbolName(Symbol::cast(name));
}
@@ -1470,11 +1472,11 @@ void Logger::CodeCreateEvent(LogEventsAndTags tag,
AppendCodeCreateHeader(&msg, tag, code);
SmartArrayPointer<char> name =
shared->DebugName()->ToCString(DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL);
- msg.Append("\"%s ", *name);
+ msg.Append("\"%s ", name.get());
if (source->IsString()) {
SmartArrayPointer<char> sourcestr =
String::cast(source)->ToCString(DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL);
- msg.Append("%s", *sourcestr);
+ msg.Append("%s", sourcestr.get());
} else {
msg.AppendSymbolName(Symbol::cast(source));
}
@@ -2064,7 +2066,7 @@ bool Logger::SetUp(Isolate* isolate) {
SmartArrayPointer<const char> log_file_name =
PrepareLogFileName(isolate, FLAG_logfile);
- log_->Initialize(*log_file_name);
+ log_->Initialize(log_file_name.get());
if (FLAG_perf_basic_prof) {
@@ -2078,7 +2080,7 @@ bool Logger::SetUp(Isolate* isolate) {
}
if (FLAG_ll_prof) {
- ll_logger_ = new LowLevelLogger(*log_file_name);
+ ll_logger_ = new LowLevelLogger(log_file_name.get());
addCodeEventListener(ll_logger_);
}
« no previous file with comments | « src/lithium-allocator.cc ('k') | src/messages.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698