| Index: third_party/WebKit/Source/core/inspector/InspectorTraceEvents.cpp
|
| diff --git a/third_party/WebKit/Source/core/inspector/InspectorTraceEvents.cpp b/third_party/WebKit/Source/core/inspector/InspectorTraceEvents.cpp
|
| index 978f3ba70da7ddc74c62000c5f3b9a65243d2af6..294f93ca994abd3eb71aa3148adcdaee84f79b6f 100644
|
| --- a/third_party/WebKit/Source/core/inspector/InspectorTraceEvents.cpp
|
| +++ b/third_party/WebKit/Source/core/inspector/InspectorTraceEvents.cpp
|
| @@ -51,6 +51,22 @@ void* asyncId(unsigned long identifier) {
|
| return reinterpret_cast<void*>((identifier << 1) | 1);
|
| }
|
|
|
| +std::unique_ptr<TracedValue> inspectorParseHtmlBeginData(Document* document,
|
| + unsigned startLine) {
|
| + std::unique_ptr<TracedValue> value = TracedValue::create();
|
| + value->setInteger("startLine", startLine);
|
| + value->setString("frame", toHexString(document->frame()));
|
| + value->setString("url", document->url().getString());
|
| + setCallStack(value.get());
|
| + return value;
|
| +}
|
| +
|
| +std::unique_ptr<TracedValue> inspectorParseHtmlEndData(unsigned endLine) {
|
| + std::unique_ptr<TracedValue> value = TracedValue::create();
|
| + value->setInteger("endLine", endLine);
|
| + return value;
|
| +}
|
| +
|
| } // namespace
|
|
|
| String toHexString(const void* p) {
|
| @@ -159,14 +175,14 @@ void InspectorTraceEvents::will(const probe::ParseHTML& probe) {
|
| // FIXME: Pass in current input length.
|
| TRACE_EVENT_BEGIN1(
|
| "devtools.timeline", "ParseHTML", "beginData",
|
| - InspectorParseHtmlEvent::beginData(
|
| - probe.parser->document(), probe.parser->lineNumber().zeroBasedInt()));
|
| + inspectorParseHtmlBeginData(probe.parser->document(),
|
| + probe.parser->lineNumber().zeroBasedInt()));
|
| }
|
|
|
| void InspectorTraceEvents::did(const probe::ParseHTML& probe) {
|
| - TRACE_EVENT_END1("devtools.timeline", "ParseHTML", "endData",
|
| - InspectorParseHtmlEvent::endData(
|
| - probe.parser->lineNumber().zeroBasedInt() - 1));
|
| + TRACE_EVENT_END1(
|
| + "devtools.timeline", "ParseHTML", "endData",
|
| + inspectorParseHtmlEndData(probe.parser->lineNumber().zeroBasedInt() - 1));
|
| TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"),
|
| "UpdateCounters", TRACE_EVENT_SCOPE_THREAD, "data",
|
| InspectorUpdateCountersEvent::data());
|
| @@ -829,24 +845,6 @@ std::unique_ptr<TracedValue> InspectorIdleCallbackFireEvent::data(
|
| return value;
|
| }
|
|
|
| -std::unique_ptr<TracedValue> InspectorParseHtmlEvent::beginData(
|
| - Document* document,
|
| - unsigned startLine) {
|
| - std::unique_ptr<TracedValue> value = TracedValue::create();
|
| - value->setInteger("startLine", startLine);
|
| - value->setString("frame", toHexString(document->frame()));
|
| - value->setString("url", document->url().getString());
|
| - setCallStack(value.get());
|
| - return value;
|
| -}
|
| -
|
| -std::unique_ptr<TracedValue> InspectorParseHtmlEvent::endData(
|
| - unsigned endLine) {
|
| - std::unique_ptr<TracedValue> value = TracedValue::create();
|
| - value->setInteger("endLine", endLine);
|
| - return value;
|
| -}
|
| -
|
| std::unique_ptr<TracedValue> InspectorParseAuthorStyleSheetEvent::data(
|
| const CSSStyleSheetResource* cachedStyleSheet) {
|
| std::unique_ptr<TracedValue> value = TracedValue::create();
|
|
|