summaryrefslogtreecommitdiffstats
path: root/WebCore/inspector/TimelineRecordFactory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/inspector/TimelineRecordFactory.cpp')
-rw-r--r--WebCore/inspector/TimelineRecordFactory.cpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/WebCore/inspector/TimelineRecordFactory.cpp b/WebCore/inspector/TimelineRecordFactory.cpp
index 525e61d..c08fc0f 100644
--- a/WebCore/inspector/TimelineRecordFactory.cpp
+++ b/WebCore/inspector/TimelineRecordFactory.cpp
@@ -39,6 +39,7 @@
#include "ResourceRequest.h"
#include "ResourceResponse.h"
#include "ScriptArray.h"
+#include "ScriptCallStack.h"
#include "ScriptObject.h"
namespace WebCore {
@@ -47,9 +48,33 @@ ScriptObject TimelineRecordFactory::createGenericRecord(InspectorFrontend* front
{
ScriptObject record = frontend->newScriptObject();
record.set("startTime", startTime);
+
+ String sourceName;
+ int sourceLineNumber;
+ String functionName;
+ if (ScriptCallStack::callLocation(&sourceName, &sourceLineNumber, &functionName) && sourceName != "undefined") {
+ record.set("callerScriptName", sourceName);
+ record.set("callerScriptLine", sourceLineNumber);
+ record.set("callerFunctionName", functionName);
+ }
return record;
}
+ScriptObject TimelineRecordFactory::createGCEventData(InspectorFrontend* frontend, const size_t usedHeapSizeDelta)
+{
+ ScriptObject data = frontend->newScriptObject();
+ data.set("usedHeapSizeDelta", usedHeapSizeDelta);
+ return data;
+}
+
+ScriptObject TimelineRecordFactory::createFunctionCallData(InspectorFrontend* frontend, const String& scriptName, int scriptLine)
+{
+ ScriptObject data = frontend->newScriptObject();
+ data.set("scriptName", scriptName);
+ data.set("scriptLine", scriptLine);
+ return data;
+}
+
ScriptObject TimelineRecordFactory::createEventDispatchData(InspectorFrontend* frontend, const Event& event)
{
ScriptObject data = frontend->newScriptObject();
@@ -132,6 +157,13 @@ ScriptObject TimelineRecordFactory::createResourceFinishData(InspectorFrontend*
return data;
}
+ScriptObject TimelineRecordFactory::createReceiveResourceData(InspectorFrontend* frontend, unsigned long identifier)
+{
+ ScriptObject data = frontend->newScriptObject();
+ data.set("identifier", identifier);
+ return data;
+}
+
ScriptObject TimelineRecordFactory::createPaintData(InspectorFrontend* frontend, const IntRect& rect)
{
ScriptObject data = frontend->newScriptObject();