ModuleWidget *UpdateModule::moduleWidget() { if (!m_updateView) { m_updateView = new UpdateView; connect(m_updateView, SIGNAL(pushUpdate()), this, SLOT(onPushUpdate())); connect(m_updateView, SIGNAL(pushMirrors()), this, SLOT(onPushSettings())); } return m_updateView; }
void HeapGraphSerializer::pushUpdateIfNeeded() { static const size_t chunkSize = 10000; static const size_t averageEdgesPerNode = 5; if (m_strings->length() <= chunkSize && m_nodes->length() <= chunkSize * s_nodeFieldsCount && m_edges->length() <= chunkSize * averageEdgesPerNode * s_edgeFieldsCount && m_baseToRealNodeIdMap->length() <= chunkSize * s_idMapEntryFieldCount) return; pushUpdate(); }
PassRefPtr<InspectorObject> HeapGraphSerializer::finish() { addRootNode(); pushUpdate(); String metaString = "{" "\"node_fields\":[" "\"type\"," "\"name\"," "\"id\"," "\"self_size\"," "\"edge_count\"" "]," "\"node_types\":[" "[]," // FIXME: It is a fallback for Heap Snapshot parser. In case of Native Heap Snapshot it is a plain string id. "\"string\"," "\"number\"," "\"number\"," "\"number\"" "]," "\"edge_fields\":[" "\"type\"," "\"name_or_index\"," "\"to_node\"" "]," "\"edge_types\":[" "[]," "\"string_or_number\"," "\"node\"" "]" "}"; RefPtr<InspectorValue> metaValue = InspectorValue::parseJSON(metaString); RefPtr<InspectorObject> meta; metaValue->asObject(&meta); ASSERT(meta); meta->setObject("type_strings", m_typeStrings); return meta.release(); }
void HeapGraphSerializer::finish() { addRootNode(); pushUpdate(); }