Index: src/messages.cc |
diff --git a/src/messages.cc b/src/messages.cc |
index 4cbf0af74711adfcf54f5636524aca5f718c087a..b6ad5ac352ebcfb3201a7c9ec723372cda26d2ad 100644 |
--- a/src/messages.cc |
+++ b/src/messages.cc |
@@ -41,13 +41,13 @@ namespace internal { |
// by default. |
void MessageHandler::DefaultMessageReport(const MessageLocation* loc, |
Handle<Object> message_obj) { |
- SmartPointer<char> str = GetLocalizedMessage(message_obj); |
+ SmartArrayPointer<char> str = GetLocalizedMessage(message_obj); |
if (loc == NULL) { |
PrintF("%s\n", *str); |
} else { |
HandleScope scope; |
Handle<Object> data(loc->script()->name()); |
- SmartPointer<char> data_str; |
+ SmartArrayPointer<char> data_str; |
if (data->IsString()) |
data_str = Handle<String>::cast(data)->ToCString(DISALLOW_NULLS); |
PrintF("%s:%i: %s\n", *data_str ? *data_str : "<unknown>", |
@@ -170,7 +170,8 @@ Handle<String> MessageHandler::GetMessage(Handle<Object> data) { |
} |
-SmartPointer<char> MessageHandler::GetLocalizedMessage(Handle<Object> data) { |
+SmartArrayPointer<char> MessageHandler::GetLocalizedMessage( |
+ Handle<Object> data) { |
HandleScope scope; |
return GetMessage(data)->ToCString(DISALLOW_NULLS); |
} |