OLD | NEW |
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 Loading... |
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 } |
OLD | NEW |