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

Side by Side Diff: Source/devtools/front_end/timeline/TimelineFrameModel.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/devtools/front_end/timeline/TracingModel.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after
652 */ 652 */
653 loadPicture: function(callback) 653 loadPicture: function(callback)
654 { 654 {
655 var target = this._event.thread.target(); 655 var target = this._event.thread.target();
656 this._event.picture.requestObject(onGotObject); 656 this._event.picture.requestObject(onGotObject);
657 /** 657 /**
658 * @param {?Object} result 658 * @param {?Object} result
659 */ 659 */
660 function onGotObject(result) 660 function onGotObject(result)
661 { 661 {
662 if (!result || !result["skp64"]) { 662 if (!result || !result["skp64"] || !target) {
663 callback(null, null); 663 callback(null, null);
664 return; 664 return;
665 } 665 }
666 var rect = result["params"] && result["params"]["layer_rect"]; 666 var rect = result["params"] && result["params"]["layer_rect"];
667 WebInspector.PaintProfilerSnapshot.load(target, result["skp64"], cal lback.bind(null, rect)); 667 WebInspector.PaintProfilerSnapshot.load(target, result["skp64"], cal lback.bind(null, rect));
668 } 668 }
669 } 669 }
670 }; 670 };
671 671
672 /** 672 /**
673 * @constructor 673 * @constructor
674 */ 674 */
675 WebInspector.PendingFrame = function() 675 WebInspector.PendingFrame = function()
676 { 676 {
677 /** @type {!Object.<string, number>} */ 677 /** @type {!Object.<string, number>} */
678 this.timeByCategory = {}; 678 this.timeByCategory = {};
679 /** @type {!Array.<!WebInspector.LayerPaintEvent>} */ 679 /** @type {!Array.<!WebInspector.LayerPaintEvent>} */
680 this.paints = []; 680 this.paints = [];
681 } 681 }
OLDNEW
« no previous file with comments | « no previous file | Source/devtools/front_end/timeline/TracingModel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698