diff options
Diffstat (limited to 'deps/v8/src/inspector/v8-console-message.cc')
-rw-r--r-- | deps/v8/src/inspector/v8-console-message.cc | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/deps/v8/src/inspector/v8-console-message.cc b/deps/v8/src/inspector/v8-console-message.cc index 408f88bc1d0..4bb0bf904e5 100644 --- a/deps/v8/src/inspector/v8-console-message.cc +++ b/deps/v8/src/inspector/v8-console-message.cc @@ -118,13 +118,11 @@ class V8ValueStringBuilder { !value->IsNativeError() && !value->IsRegExp()) { v8::Local<v8::Object> object = v8::Local<v8::Object>::Cast(value); v8::Local<v8::String> stringValue; - if (object->ObjectProtoToString(m_isolate->GetCurrentContext()) - .ToLocal(&stringValue)) + if (object->ObjectProtoToString(m_context).ToLocal(&stringValue)) return append(stringValue); } v8::Local<v8::String> stringValue; - if (!value->ToString(m_isolate->GetCurrentContext()).ToLocal(&stringValue)) - return false; + if (!value->ToString(m_context).ToLocal(&stringValue)) return false; return append(stringValue); } @@ -160,7 +158,9 @@ class V8ValueStringBuilder { } bool append(v8::Local<v8::BigInt> bigint) { - bool result = append(bigint->ToString()); + v8::Local<v8::String> bigint_string; + if (!bigint->ToString(m_context).ToLocal(&bigint_string)) return false; + bool result = append(bigint_string); if (m_tryCatch.HasCaught()) return false; m_builder.append('n'); return result; @@ -168,7 +168,9 @@ class V8ValueStringBuilder { bool append(v8::Local<v8::String> string) { if (m_tryCatch.HasCaught()) return false; - if (!string.IsEmpty()) m_builder.append(toProtocolString(string)); + if (!string.IsEmpty()) { + m_builder.append(toProtocolString(m_isolate, string)); + } return true; } |