PassRefPtr<TypeBuilder::HeapProfiler::ProfileHeader> InspectorHeapProfilerAgent::createSnapshotHeader(const ScriptHeapSnapshot& snapshot) { RefPtr<TypeBuilder::HeapProfiler::ProfileHeader> header = TypeBuilder::HeapProfiler::ProfileHeader::create() .setUid(snapshot.uid()) .setTitle(snapshot.title()); header->setMaxJSObjectId(snapshot.maxSnapshotJSObjectId()); return header.release(); }
PassRefPtr<InspectorObject> InspectorProfilerAgent::createSnapshotHeader(const ScriptHeapSnapshot& snapshot) { RefPtr<InspectorObject> header = InspectorObject::create(); header->setString("title", snapshot.title()); header->setNumber("uid", snapshot.uid()); header->setString("typeId", String(HeapProfileType)); header->setNumber("maxJSObjectId", snapshot.maxSnapshotJSObjectId()); return header; }