| Index: Source/core/timing/PerformanceEntry.cpp
|
| diff --git a/Source/core/timing/PerformanceEntry.cpp b/Source/core/timing/PerformanceEntry.cpp
|
| index 83b802b935c41dc76f5c7cc2ab48a31d5d61e4c9..0bac75547c123000c0a55c3ee017de620ba2b4e3 100644
|
| --- a/Source/core/timing/PerformanceEntry.cpp
|
| +++ b/Source/core/timing/PerformanceEntry.cpp
|
| @@ -41,6 +41,7 @@ PerformanceEntry::PerformanceEntry(const String& name, const String& entryType,
|
| , m_entryType(entryType)
|
| , m_startTime(startTime)
|
| , m_duration(finishTime - startTime)
|
| + , m_entryTypeEnum(toEntryTypeEnum(entryType))
|
| {
|
| }
|
|
|
| @@ -68,6 +69,21 @@ double PerformanceEntry::duration() const
|
| return m_duration;
|
| }
|
|
|
| +PerformanceEntry::EntryType PerformanceEntry::toEntryTypeEnum(const String& entryType)
|
| +{
|
| + if (equalIgnoringCase(entryType, "composite"))
|
| + return Composite;
|
| + if (equalIgnoringCase(entryType, "mark"))
|
| + return Mark;
|
| + if (equalIgnoringCase(entryType, "measure"))
|
| + return Measure;
|
| + if (equalIgnoringCase(entryType, "render"))
|
| + return Render;
|
| + if (equalIgnoringCase(entryType, "resource"))
|
| + return Resource;
|
| + return Invalid;
|
| +}
|
| +
|
| ScriptValue PerformanceEntry::toJSONForBinding(ScriptState* scriptState) const
|
| {
|
| V8ObjectBuilder result(scriptState);
|
|
|