void InspectorScriptProfilerAgent::trackingComplete()
{
    RefPtr<Inspector::Protocol::Array<InspectorValue>> profiles = Inspector::Protocol::Array<InspectorValue>::create();
    for (auto& profile : m_profiles) {
        Ref<InspectorValue> value = buildProfileInspectorObject(profile.get());
        profiles->addItem(WTFMove(value));
    }

    m_frontendDispatcher->trackingComplete(profiles);

    m_profiles.clear();
}
void TimelineRecordFactory::appendProfile(InspectorObject* data, PassRefPtr<JSC::Profile> profile)
{
    data->setValue(ASCIILiteral("profile"), buildProfileInspectorObject(profile.get()));
}