Index: src/inspector/v8-console-message.cc |
diff --git a/src/inspector/v8-console-message.cc b/src/inspector/v8-console-message.cc |
index 22fe18137ede9a1cb1bda927634321fc7affd259..abbab1f6ce308525aace64bd73fc12a72b32acc4 100644 |
--- a/src/inspector/v8-console-message.cc |
+++ b/src/inspector/v8-console-message.cc |
@@ -65,10 +65,13 @@ const unsigned maxStackDepthLimit = 32; |
class V8ValueStringBuilder { |
public: |
- static String16 toString(v8::Local<v8::Value> value, |
+ static String16 toString(const std::vector<v8::Local<v8::Value>>& arguments, |
v8::Local<v8::Context> context) { |
V8ValueStringBuilder builder(context); |
- if (!builder.append(value)) return String16(); |
+ for (size_t i = 0; i < arguments.size(); ++i) { |
+ if (i > 0) builder.append(" "); |
+ if (!builder.append(arguments.at(i))) return String16(); |
+ } |
return builder.toString(); |
} |
@@ -161,6 +164,11 @@ class V8ValueStringBuilder { |
return true; |
} |
+ bool append(const String16& string) { |
+ m_builder.append(string); |
+ return true; |
+ } |
+ |
String16 toString() { |
if (m_tryCatch.HasCaught()) return String16(); |
return m_builder.toString(); |
@@ -376,8 +384,7 @@ std::unique_ptr<V8ConsoleMessage> V8ConsoleMessage::createForConsoleAPI( |
v8::debug::EstimatedValueSize(isolate, arguments.at(i)); |
} |
if (arguments.size()) |
- message->m_message = |
- V8ValueStringBuilder::toString(arguments[0], v8Context); |
+ message->m_message = V8ValueStringBuilder::toString(arguments, v8Context); |
v8::Isolate::MessageErrorLevel clientLevel = v8::Isolate::kMessageInfo; |
if (type == ConsoleAPIType::kDebug || type == ConsoleAPIType::kCount || |