Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(388)

Unified Diff: src/inspector/v8-heap-profiler-agent-impl.cc

Issue 2467853003: [inspector] migrate Runtime to new style (Closed)
Patch Set: addressed comments Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/inspector/v8-debugger-agent-impl.cc ('k') | src/inspector/v8-inspector-session-impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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));
« no previous file with comments | « src/inspector/v8-debugger-agent-impl.cc ('k') | src/inspector/v8-inspector-session-impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698