Index: src/inspector/v8-heap-profiler-agent-impl.cc |
diff --git a/src/inspector/v8-heap-profiler-agent-impl.cc b/src/inspector/v8-heap-profiler-agent-impl.cc |
index 41b24ac949d591653f76db85e420271a9b4ca742..0ff04e75b9be5b9f973a03e3b5e86024b154a58c 100644 |
--- a/src/inspector/v8-heap-profiler-agent-impl.cc |
+++ b/src/inspector/v8-heap-profiler-agent-impl.cc |
@@ -269,11 +269,10 @@ Response V8HeapProfilerAgentImpl::getHeapObjectId( |
v8::HandleScope handles(m_isolate); |
v8::Local<v8::Value> value; |
v8::Local<v8::Context> context; |
- protocol::ErrorString errorString; |
- if (!m_session->unwrapObject(&errorString, objectId, &value, &context, |
- nullptr) || |
- value->IsUndefined()) |
- return Response::Error(errorString); |
+ Response response = |
+ m_session->unwrapObject(objectId, &value, &context, nullptr); |
+ if (!response.isSuccess()) return response; |
+ if (value->IsUndefined()) return Response::InternalError(); |
v8::SnapshotObjectId id = m_isolate->GetHeapProfiler()->GetObjectId(value); |
*heapSnapshotObjectId = String16::fromInteger(static_cast<size_t>(id)); |