| Index: third_party/WebKit/Source/devtools/front_end/persistence/FileSystemWorkspaceBinding.js
|
| diff --git a/third_party/WebKit/Source/devtools/front_end/persistence/FileSystemWorkspaceBinding.js b/third_party/WebKit/Source/devtools/front_end/persistence/FileSystemWorkspaceBinding.js
|
| index e843dddd08fa9d2a995f0b7603a746224b48ab13..395a32fc0ab5db78811816f57a16536e9e01cee4 100644
|
| --- a/third_party/WebKit/Source/devtools/front_end/persistence/FileSystemWorkspaceBinding.js
|
| +++ b/third_party/WebKit/Source/devtools/front_end/persistence/FileSystemWorkspaceBinding.js
|
| @@ -150,12 +150,23 @@ Persistence.FileSystemWorkspaceBinding = class {
|
| * @param {!Common.Event} event
|
| */
|
| _fileSystemFilesChanged(event) {
|
| - var paths = /** @type {!Array<string>} */ (event.data);
|
| - for (var path of paths) {
|
| - for (var key of this._boundFileSystems.keys()) {
|
| - if (!path.startsWith(key))
|
| - continue;
|
| - this._boundFileSystems.get(key)._fileChanged(path);
|
| + var paths = /** @type {!Workspace.IsolatedFileSystemManager.FilesChangedData} */ (event.data);
|
| + forEachFile.call(this, paths.changed, (path, fileSystem) => fileSystem._fileChanged(path));
|
| + forEachFile.call(this, paths.added, (path, fileSystem) => fileSystem._fileChanged(path));
|
| + forEachFile.call(this, paths.removed, (path, fileSystem) => fileSystem.removeUISourceCode(path));
|
| +
|
| + /**
|
| + * @param {!Array<string>} filePaths
|
| + * @param {function(string, !Persistence.FileSystemWorkspaceBinding.FileSystem)} callback
|
| + * @this {Persistence.FileSystemWorkspaceBinding}
|
| + */
|
| + function forEachFile(filePaths, callback) {
|
| + for (var filePath of filePaths) {
|
| + for (var fileSystemPath of this._boundFileSystems.keys()) {
|
| + if (!filePath.startsWith(fileSystemPath))
|
| + continue;
|
| + callback(filePath, this._boundFileSystems.get(fileSystemPath));
|
| + }
|
| }
|
| }
|
| }
|
|
|