Commit be729136 authored by Harley Li's avatar Harley Li Committed by Commit Bot

Fix: console message only has the 1st argument

Bug: chromium:967927
Change-Id: Id84f8ebd1ecbad1b3d1fc41ec5d35a497e1ce506
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1649174
Commit-Queue: Harley Li <hhli@chromium.org>
Reviewed-by: 's avatarAlexei Filippov <alph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62396}
parent 38863fc0
......@@ -96,6 +96,10 @@ class String16 {
inline String16 operator+(const String16& other) const {
return String16(m_impl + other.m_impl);
}
inline String16& operator+=(const String16& other) {
m_impl += other.m_impl;
return *this;
}
// Defined later, since it uses the String16Builder.
template <typename... T>
......
......@@ -427,9 +427,11 @@ std::unique_ptr<V8ConsoleMessage> V8ConsoleMessage::createForConsoleAPI(
message->m_v8Size +=
v8::debug::EstimatedValueSize(isolate, arguments.at(i));
}
if (arguments.size())
message->m_message =
V8ValueStringBuilder::toString(arguments[0], v8Context);
for (size_t i = 0, num_args = arguments.size(); i < num_args; ++i) {
if (i) message->m_message += String16(" ");
message->m_message +=
V8ValueStringBuilder::toString(arguments[i], v8Context);
}
v8::Isolate::MessageErrorLevel clientLevel = v8::Isolate::kMessageInfo;
if (type == ConsoleAPIType::kDebug || type == ConsoleAPIType::kCount ||
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment