| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 605 var profileType = this._findProfileTypeByExtension(file.name); | 605 var profileType = this._findProfileTypeByExtension(file.name); |
| 606 if (!profileType) { | 606 if (!profileType) { |
| 607 var extensions = []; | 607 var extensions = []; |
| 608 var types = WebInspector.ProfileTypeRegistry.instance.profileTypes()
; | 608 var types = WebInspector.ProfileTypeRegistry.instance.profileTypes()
; |
| 609 for (var i = 0; i < types.length; i++) { | 609 for (var i = 0; i < types.length; i++) { |
| 610 var extension = types[i].fileExtension(); | 610 var extension = types[i].fileExtension(); |
| 611 if (!extension || extensions.indexOf(extension) !== -1) | 611 if (!extension || extensions.indexOf(extension) !== -1) |
| 612 continue; | 612 continue; |
| 613 extensions.push(extension); | 613 extensions.push(extension); |
| 614 } | 614 } |
| 615 WebInspector.console.addErrorMessage(WebInspector.UIString("Can't lo
ad file. Only files with extensions '%s' can be loaded.", extensions.join("', '"
))); | 615 WebInspector.console.error(WebInspector.UIString("Can't load file. O
nly files with extensions '%s' can be loaded.", extensions.join("', '"))); |
| 616 return; | 616 return; |
| 617 } | 617 } |
| 618 | 618 |
| 619 if (!!profileType.profileBeingRecorded()) { | 619 if (!!profileType.profileBeingRecorded()) { |
| 620 WebInspector.console.addErrorMessage(WebInspector.UIString("Can't lo
ad profile while another profile is recording.")); | 620 WebInspector.console.error(WebInspector.UIString("Can't load profile
while another profile is recording.")); |
| 621 return; | 621 return; |
| 622 } | 622 } |
| 623 | 623 |
| 624 profileType.loadFromFile(file); | 624 profileType.loadFromFile(file); |
| 625 }, | 625 }, |
| 626 | 626 |
| 627 /** | 627 /** |
| 628 * @return {boolean} | 628 * @return {boolean} |
| 629 */ | 629 */ |
| 630 toggleRecordButton: function() | 630 toggleRecordButton: function() |
| (...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1363 importScript("HeapSnapshotCommon.js"); | 1363 importScript("HeapSnapshotCommon.js"); |
| 1364 importScript("HeapSnapshotProxy.js"); | 1364 importScript("HeapSnapshotProxy.js"); |
| 1365 importScript("HeapSnapshotDataGrids.js"); | 1365 importScript("HeapSnapshotDataGrids.js"); |
| 1366 importScript("HeapSnapshotGridNodes.js"); | 1366 importScript("HeapSnapshotGridNodes.js"); |
| 1367 importScript("HeapSnapshotView.js"); | 1367 importScript("HeapSnapshotView.js"); |
| 1368 importScript("ProfileLauncherView.js"); | 1368 importScript("ProfileLauncherView.js"); |
| 1369 importScript("CanvasProfileView.js"); | 1369 importScript("CanvasProfileView.js"); |
| 1370 importScript("CanvasReplayStateView.js"); | 1370 importScript("CanvasReplayStateView.js"); |
| 1371 | 1371 |
| 1372 WebInspector.ProfileTypeRegistry.instance = new WebInspector.ProfileTypeRegistry
(); | 1372 WebInspector.ProfileTypeRegistry.instance = new WebInspector.ProfileTypeRegistry
(); |
| OLD | NEW |