void InspectorTimelineAgent::willSendResourceRequest(unsigned long identifier, const ResourceRequest& request) { pushGCEventRecords(); RefPtr<InspectorObject> record = TimelineRecordFactory::createGenericRecord(WTF::currentTimeMS(), m_maxCallStackDepth); String requestId = IdentifiersFactory::requestId(identifier); record->setObject("data", TimelineRecordFactory::createResourceSendRequestData(requestId, request)); record->setString("type", TimelineRecordType::ResourceSendRequest); setHeapSizeStatistic(record.get()); m_frontend->eventRecorded(record.release()); }
void InspectorTimelineAgent::didFinishLoadingResource(unsigned long identifier, bool didFail, double finishTime) { pushGCEventRecords(); // Sometimes network stack can provide for us exact finish loading time. In the other case we will use currentTime. RefPtr<InspectorObject> record = TimelineRecordFactory::createGenericRecord(finishTime ? finishTime * 1000 : WTF::currentTimeMS()); record->setObject("data", TimelineRecordFactory::createResourceFinishData(identifier, didFail)); record->setNumber("type", ResourceFinishTimelineRecordType); setHeapSizeStatistic(record.get()); m_frontend->addRecordToTimeline(record.release()); }
void InspectorTimelineAgent::willSendResourceRequest(unsigned long identifier, bool isMainResource, const ResourceRequest& request) { pushGCEventRecords(); RefPtr<InspectorObject> record = TimelineRecordFactory::createGenericRecord(WTF::currentTimeMS()); record->setObject("data", TimelineRecordFactory::createResourceSendRequestData(identifier, isMainResource, request)); record->setNumber("type", ResourceSendRequestTimelineRecordType); setHeapSizeStatistic(record.get()); m_frontend->addRecordToTimeline(record.release()); }
void InspectorTimelineAgent::addRecordToTimeline(PassRefPtr<InspectorObject> prpRecord, const String& type) { RefPtr<InspectorObject> record(prpRecord); record->setString("type", type); setHeapSizeStatistic(record.get()); if (m_recordStack.isEmpty()) m_frontend->eventRecorded(record.release()); else { TimelineRecordEntry parent = m_recordStack.last(); parent.children->pushObject(record.release()); } }
void InspectorTimelineAgent::willSendResourceRequest(unsigned long identifier, const ResourceRequest& request) { pushGCEventRecords(); RefPtr<InspectorObject> recordRaw = TimelineRecordFactory::createGenericRecord(timestamp(), m_maxCallStackDepth); String requestId = IdentifiersFactory::requestId(identifier); recordRaw->setObject("data", TimelineRecordFactory::createResourceSendRequestData(requestId, request)); recordRaw->setString("type", TimelineRecordType::ResourceSendRequest); setHeapSizeStatistic(recordRaw.get()); // FIXME: runtimeCast is a hack. We do it because we can't build TimelineEvent directly now. RefPtr<TypeBuilder::Timeline::TimelineEvent> record = TypeBuilder::Timeline::TimelineEvent::runtimeCast(recordRaw.release()); m_frontend->eventRecorded(record.release()); }
void InspectorTimelineAgent::innerAddRecordToTimeline(PassRefPtr<InspectorObject> prpRecord, const String& type) { RefPtr<InspectorObject> record(prpRecord); record->setString("type", type); setHeapSizeStatistic(record.get()); if (m_recordStack.isEmpty()) { // FIXME: runtimeCast is a hack. We do it because we can't build TimelineEvent directly now. RefPtr<TypeBuilder::Timeline::TimelineEvent> recordChecked = TypeBuilder::Timeline::TimelineEvent::runtimeCast(record.release()); m_frontend->eventRecorded(recordChecked.release()); } else { TimelineRecordEntry parent = m_recordStack.last(); parent.children->pushObject(record.release()); } }