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

Unified Diff: Source/devtools/front_end/timeline/TracingModel.js

Issue 658363002: Fix null pointer exception when attempting to load an image without the target (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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
« no previous file with comments | « Source/devtools/front_end/timeline/TimelineFrameModel.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/timeline/TracingModel.js
diff --git a/Source/devtools/front_end/timeline/TracingModel.js b/Source/devtools/front_end/timeline/TracingModel.js
index c8dfa87f42527b680406d016c542000cd90a2ae2..915bd9076b4a15d3051518357fc4394627a2bb22 100644
--- a/Source/devtools/front_end/timeline/TracingModel.js
+++ b/Source/devtools/front_end/timeline/TracingModel.js
@@ -321,16 +321,21 @@ WebInspector.TracingModel.Loader.prototype = {
* @constructor
* @param {string} category
* @param {string} name
- * @param {string} phase
+ * @param {!WebInspector.TracingModel.Phase} phase
* @param {number} startTime
- * @param {?WebInspector.TracingModel.Thread} thread
+ * @param {!WebInspector.TracingModel.Thread} thread
*/
WebInspector.TracingModel.Event = function(category, name, phase, startTime, thread)
{
+ /** @type {string} */
this.category = category;
+ /** @type {string} */
this.name = name;
+ /** @type {!WebInspector.TracingModel.Phase} */
this.phase = phase;
+ /** @type {number} */
this.startTime = startTime;
+ /** @type {!WebInspector.TracingModel.Thread} */
this.thread = thread;
this.args = {};
@@ -353,12 +358,12 @@ WebInspector.TracingModel.Event = function(category, name, phase, startTime, thr
/**
* @param {!WebInspector.TracingManager.EventPayload} payload
- * @param {?WebInspector.TracingModel.Thread} thread
+ * @param {!WebInspector.TracingModel.Thread} thread
* @return {!WebInspector.TracingModel.Event}
*/
WebInspector.TracingModel.Event.fromPayload = function(payload, thread)
{
- var event = new WebInspector.TracingModel.Event(payload.cat, payload.name, payload.ph, payload.ts / 1000, thread);
+ var event = new WebInspector.TracingModel.Event(payload.cat, payload.name, /** @type {!WebInspector.TracingModel.Phase} */ (payload.ph), payload.ts / 1000, thread);
if (payload.args)
event.addArgs(payload.args);
else
@@ -448,7 +453,7 @@ WebInspector.TracingModel.Event.orderedCompareStartTime = function (a, b)
* @param {string} category
* @param {string} name
* @param {number} startTime
- * @param {?WebInspector.TracingModel.Thread} thread
+ * @param {!WebInspector.TracingModel.Thread} thread
*/
WebInspector.TracingModel.ObjectSnapshot = function(category, name, startTime, thread)
{
@@ -457,7 +462,7 @@ WebInspector.TracingModel.ObjectSnapshot = function(category, name, startTime, t
/**
* @param {!WebInspector.TracingManager.EventPayload} payload
- * @param {?WebInspector.TracingModel.Thread} thread
+ * @param {!WebInspector.TracingModel.Thread} thread
* @return {!WebInspector.TracingModel.ObjectSnapshot}
*/
WebInspector.TracingModel.ObjectSnapshot.fromPayload = function(payload, thread)
« no previous file with comments | « Source/devtools/front_end/timeline/TimelineFrameModel.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698