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

Unified Diff: src/log.cc

Issue 1221433021: Move SmartPointer to base. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove some unecessary header includes Created 5 years, 5 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
« BUILD.gn ('K') | « src/jsregexp.cc ('k') | src/messages.h » ('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 8f47e81f0eccce5316360c995e398bfb3e40a82b..b0bebe8fa8b952961a5bc28af27cf67732448f01 100644
--- a/src/log.cc
+++ b/src/log.cc
@@ -1016,10 +1016,10 @@ void Logger::ApiNamedPropertyAccess(const char* tag,
DCHECK(name->IsName());
if (!log_->IsEnabled() || !FLAG_log_api) return;
String* class_name_obj = holder->class_name();
- SmartArrayPointer<char> class_name =
+ base::SmartArrayPointer<char> class_name =
class_name_obj->ToCString(DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL);
if (name->IsString()) {
- SmartArrayPointer<char> property_name =
+ base::SmartArrayPointer<char> property_name =
String::cast(name)->ToCString(DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL);
ApiEvent("api,%s,\"%s\",\"%s\"", tag, class_name.get(),
property_name.get());
@@ -1029,8 +1029,9 @@ void Logger::ApiNamedPropertyAccess(const char* tag,
if (symbol->name()->IsUndefined()) {
ApiEvent("api,%s,\"%s\",symbol(hash %x)", tag, class_name.get(), hash);
} else {
- SmartArrayPointer<char> str = String::cast(symbol->name())->ToCString(
- DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL);
+ base::SmartArrayPointer<char> str =
+ String::cast(symbol->name())
+ ->ToCString(DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL);
ApiEvent("api,%s,\"%s\",symbol(\"%s\" hash %x)", tag, class_name.get(),
str.get(), hash);
}
@@ -1042,7 +1043,7 @@ void Logger::ApiIndexedPropertyAccess(const char* tag,
uint32_t index) {
if (!log_->IsEnabled() || !FLAG_log_api) return;
String* class_name_obj = holder->class_name();
- SmartArrayPointer<char> class_name =
+ base::SmartArrayPointer<char> class_name =
class_name_obj->ToCString(DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL);
ApiEvent("api,%s,\"%s\",%u", tag, class_name.get(), index);
}
@@ -1051,7 +1052,7 @@ void Logger::ApiIndexedPropertyAccess(const char* tag,
void Logger::ApiObjectAccess(const char* tag, JSObject* object) {
if (!log_->IsEnabled() || !FLAG_log_api) return;
String* class_name_obj = object->class_name();
- SmartArrayPointer<char> class_name =
+ base::SmartArrayPointer<char> class_name =
class_name_obj->ToCString(DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL);
ApiEvent("api,%s,\"%s\"", tag, class_name.get());
}
@@ -1089,7 +1090,7 @@ void Logger::CallbackEventInternal(const char* prefix, Name* name,
kLogEventsNames[CALLBACK_TAG]);
msg.AppendAddress(entry_point);
if (name->IsString()) {
- SmartArrayPointer<char> str =
+ base::SmartArrayPointer<char> str =
String::cast(name)->ToCString(DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL);
msg.Append(",1,\"%s%s\"", prefix, str.get());
} else {
@@ -1097,8 +1098,9 @@ void Logger::CallbackEventInternal(const char* prefix, Name* name,
if (symbol->name()->IsUndefined()) {
msg.Append(",1,symbol(hash %x)", prefix, symbol->Hash());
} else {
- SmartArrayPointer<char> str = String::cast(symbol->name())->ToCString(
- DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL);
+ base::SmartArrayPointer<char> str =
+ String::cast(symbol->name())
+ ->ToCString(DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL);
msg.Append(",1,symbol(\"%s\" hash %x)", prefix, str.get(),
symbol->Hash());
}
@@ -1192,7 +1194,7 @@ void Logger::CodeCreateEvent(LogEventsAndTags tag,
Log::MessageBuilder msg(log_);
AppendCodeCreateHeader(&msg, tag, code);
if (name->IsString()) {
- SmartArrayPointer<char> str =
+ base::SmartArrayPointer<char> str =
String::cast(name)->ToCString(DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL);
msg.Append("\"%s\"", str.get());
} else {
@@ -1222,12 +1224,12 @@ void Logger::CodeCreateEvent(LogEventsAndTags tag,
if (!FLAG_log_code || !log_->IsEnabled()) return;
Log::MessageBuilder msg(log_);
AppendCodeCreateHeader(&msg, tag, code);
- SmartArrayPointer<char> name =
+ base::SmartArrayPointer<char> name =
shared->DebugName()->ToCString(DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL);
msg.Append("\"%s ", name.get());
if (source->IsString()) {
- SmartArrayPointer<char> sourcestr =
- String::cast(source)->ToCString(DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL);
+ base::SmartArrayPointer<char> sourcestr = String::cast(source)->ToCString(
+ DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL);
msg.Append("%s", sourcestr.get());
} else {
msg.AppendSymbolName(Symbol::cast(source));
@@ -1265,7 +1267,7 @@ void Logger::CodeDisableOptEvent(Code* code,
if (!FLAG_log_code || !log_->IsEnabled()) return;
Log::MessageBuilder msg(log_);
msg.Append("%s,", kLogEventsNames[CODE_DISABLE_OPT_EVENT]);
- SmartArrayPointer<char> name =
+ base::SmartArrayPointer<char> name =
shared->DebugName()->ToCString(DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL);
msg.Append("\"%s\",", name.get());
msg.Append("\"%s\"", GetBailoutReason(shared->disable_optimization_reason()));
« BUILD.gn ('K') | « src/jsregexp.cc ('k') | src/messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698