Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(886)

Unified Diff: Source/devtools/front_end/TimelineModel.js

Issue 212953003: TimelinePanel: provide scriptId in FunctionCall event. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: minor change Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/devtools/front_end/TimelineModel.js
diff --git a/Source/devtools/front_end/TimelineModel.js b/Source/devtools/front_end/TimelineModel.js
index f0655a2eb8c09e05f65c710207c9fae44fd50400..779f4fe91e449fde2761e4dd51efa48fb7f1dcc3 100644
--- a/Source/devtools/front_end/TimelineModel.js
+++ b/Source/devtools/front_end/TimelineModel.js
@@ -150,6 +150,14 @@ WebInspector.TimelineModel.forAllRecords = function(recordsArray, preOrderCallba
WebInspector.TimelineModel.prototype = {
/**
+ * @return {boolean}
+ */
+ loadedFromFile: function()
+ {
+ return this._loadedFromFile;
+ },
+
+ /**
* @param {?function(!WebInspector.TimelineModel.Record)|?function(!WebInspector.TimelineModel.Record,number)} preOrderCallback
* @param {function(!WebInspector.TimelineModel.Record)|function(!WebInspector.TimelineModel.Record,number)=} postOrderCallback
*/
@@ -423,6 +431,7 @@ WebInspector.TimelineModel.prototype = {
reset: function()
{
+ this._loadedFromFile = false;
this._records = [];
this._payloads = [];
this._stringPool = {};
@@ -566,7 +575,8 @@ WebInspector.TimelineModel.Record = function(model, record, parentRecord)
this._relatedBackendNodeId = record.data["rootNode"];
else if (record.data["elementId"])
this._relatedBackendNodeId = record.data["elementId"];
- if (record.data["scriptName"]) {
+ if (record.data["scriptName"] || record.data["scriptId"]) {
+ this.scriptId = record.data["scriptId"];
this.scriptName = record.data["scriptName"];
this.scriptLine = record.data["scriptLine"];
}
@@ -692,6 +702,14 @@ WebInspector.TimelineModel.Record = function(model, record, parentRecord)
}
WebInspector.TimelineModel.Record.prototype = {
+ /**
+ * @return {!WebInspector.TimelineModel}
+ */
+ model: function()
+ {
+ return this._model;
+ },
+
get lastChildEndTime()
{
return this._lastChildEndTime;
@@ -1025,7 +1043,10 @@ WebInspector.TimelineModelLoader.prototype = {
this._model._addRecord(items[i]);
},
- close: function() { }
+ close: function()
+ {
+ this._model._loadedFromFile = true;
+ }
}
/**

Powered by Google App Engine
This is Rietveld 408576698