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

Unified Diff: third_party/WebKit/Source/devtools/front_end/bindings/FileSystemWorkspaceBinding.js

Issue 2450663004: DevTools: do not allow using 'this' before call into super. (Closed)
Patch Set: rebaselined Created 4 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/bindings/FileSystemWorkspaceBinding.js
diff --git a/third_party/WebKit/Source/devtools/front_end/bindings/FileSystemWorkspaceBinding.js b/third_party/WebKit/Source/devtools/front_end/bindings/FileSystemWorkspaceBinding.js
index d519b1a48154f028ed0a777ee04dc33bba5addc8..e827132b4ad9754666fd3e310557735f2cdb7ecd 100644
--- a/third_party/WebKit/Source/devtools/front_end/bindings/FileSystemWorkspaceBinding.js
+++ b/third_party/WebKit/Source/devtools/front_end/bindings/FileSystemWorkspaceBinding.js
@@ -192,17 +192,18 @@ WebInspector.FileSystemWorkspaceBinding.fileSystemPath = function(projectId)
*/
WebInspector.FileSystemWorkspaceBinding.FileSystem = function(fileSystemWorkspaceBinding, isolatedFileSystem, workspace)
{
- this._fileSystemWorkspaceBinding = fileSystemWorkspaceBinding;
- this._fileSystem = isolatedFileSystem;
- this._fileSystemBaseURL = this._fileSystem.path() + "/";
- this._fileSystemPath = this._fileSystem.path();
-
- var id = WebInspector.FileSystemWorkspaceBinding.projectId(this._fileSystemPath);
+ var fileSystemPath = isolatedFileSystem.path();
+ var id = WebInspector.FileSystemWorkspaceBinding.projectId(fileSystemPath);
console.assert(!workspace.project(id));
+ var displayName = fileSystemPath.substr(fileSystemPath.lastIndexOf("/") + 1);
- var displayName = this._fileSystemPath.substr(this._fileSystemPath.lastIndexOf("/") + 1);
WebInspector.ProjectStore.call(this, workspace, id, WebInspector.projectTypes.FileSystem, displayName);
+ this._fileSystem = isolatedFileSystem;
+ this._fileSystemBaseURL = this._fileSystem.path() + "/";
+ this._fileSystemWorkspaceBinding = fileSystemWorkspaceBinding;
+ this._fileSystemPath = fileSystemPath;
+
workspace.addProject(this);
this.populate();
};

Powered by Google App Engine
This is Rietveld 408576698