Commit 81725bab authored by Dave Tapuska's avatar Dave Tapuska Committed by Commit Bot

[inspector] Don't call prototype's toString on objects.

Just rely on calling toString. This matches other vendor's implementations.

BUG=chromium:948257
R=dgozman@chromium.org

Change-Id: I325a12dd47712263a1ef4deee0bb2de9c4a1c656
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1545124Reviewed-by: 's avatarPavel Feldman <pfeldman@chromium.org>
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60617}
parent bb24140c
......@@ -125,14 +125,8 @@ class ConsoleHelper {
}
v8::Local<v8::String> titleValue;
v8::TryCatch tryCatch(m_context->GetIsolate());
if (m_info[0]->IsObject()) {
if (!m_info[0].As<v8::Object>()->ObjectProtoToString(m_context).ToLocal(
&titleValue))
return defaultValue;
} else {
if (!m_info[0]->ToString(m_context).ToLocal(&titleValue))
return defaultValue;
}
if (!m_info[0]->ToString(m_context).ToLocal(&titleValue))
return defaultValue;
return toProtocolString(m_context->GetIsolate(), titleValue);
}
......
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