Chromium Code Reviews| Index: third_party/WebKit/Source/devtools/front_end/bindings/NetworkMapping.js |
| diff --git a/third_party/WebKit/Source/devtools/front_end/bindings/NetworkMapping.js b/third_party/WebKit/Source/devtools/front_end/bindings/NetworkMapping.js |
| index 22182e1b208d82c96531067d83ca05e4a544ddd4..6aa4d3eec2f244c1cd4051488980b66caff8daca 100644 |
| --- a/third_party/WebKit/Source/devtools/front_end/bindings/NetworkMapping.js |
| +++ b/third_party/WebKit/Source/devtools/front_end/bindings/NetworkMapping.js |
| @@ -19,10 +19,8 @@ WebInspector.NetworkMapping = function(targetManager, workspace, fileSystemWorks |
| // For now, following block is here primarily for testing since in the real life, network manager is created early enough to capture those events. |
| var fileSystemManager = fileSystemWorkspaceBinding.fileSystemManager(); |
| - for (var path of fileSystemManager.fileSystemPaths()) { |
| - var fileSystem = fileSystemManager.fileSystem(path); |
| - this._fileSystemAdded(new WebInspector.Event(fileSystemManager, WebInspector.IsolatedFileSystemManager.Events.FileSystemAdded, fileSystem)); |
| - } |
| + for (var fileSystem of fileSystemManager.fileSystems()) |
| + this._addMappingsForFilesystem(fileSystem); |
|
dgozman
2016/08/31 00:08:35
You don't issue fileSystemMappingChanged here anym
lushnikov
2016/08/31 00:19:30
it is an event listener
|
| if (fileSystemManager.fileSystemsLoaded()) |
| this._fileSystemsLoaded(); |
| @@ -41,8 +39,17 @@ WebInspector.NetworkMapping.prototype = { |
| */ |
| _fileSystemAdded: function(event) |
| { |
| - this._addingFileSystem = true; |
| var fileSystem = /** @type {!WebInspector.IsolatedFileSystem} */ (event.data); |
| + this._addMappingsForFilesystem(fileSystem); |
| + this._fileSystemMappingChanged(); |
| + }, |
| + |
| + /** |
| + * @param {!WebInspector.IsolatedFileSystem} fileSystem |
| + */ |
| + _addMappingsForFilesystem: function(fileSystem) |
| + { |
| + this._addingFileSystem = true; |
| this._fileSystemMapping.addFileSystem(fileSystem.path()); |
| var mappings = fileSystem.projectProperty("mappings"); |
| @@ -57,7 +64,6 @@ WebInspector.NetworkMapping.prototype = { |
| this._fileSystemMapping.addNonConfigurableFileMapping(fileSystem.path(), url, folder); |
| } |
| this._addingFileSystem = false; |
| - this._fileSystemMappingChanged(); |
| }, |
| /** |