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

Side by Side 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, 1 month 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 unified diff | Download patch
OLDNEW
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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 /** 185 /**
186 * @constructor 186 * @constructor
187 * @extends {WebInspector.ProjectStore} 187 * @extends {WebInspector.ProjectStore}
188 * @implements {WebInspector.Project} 188 * @implements {WebInspector.Project}
189 * @param {!WebInspector.FileSystemWorkspaceBinding} fileSystemWorkspaceBinding 189 * @param {!WebInspector.FileSystemWorkspaceBinding} fileSystemWorkspaceBinding
190 * @param {!WebInspector.IsolatedFileSystem} isolatedFileSystem 190 * @param {!WebInspector.IsolatedFileSystem} isolatedFileSystem
191 * @param {!WebInspector.Workspace} workspace 191 * @param {!WebInspector.Workspace} workspace
192 */ 192 */
193 WebInspector.FileSystemWorkspaceBinding.FileSystem = function(fileSystemWorkspac eBinding, isolatedFileSystem, workspace) 193 WebInspector.FileSystemWorkspaceBinding.FileSystem = function(fileSystemWorkspac eBinding, isolatedFileSystem, workspace)
194 { 194 {
195 this._fileSystemWorkspaceBinding = fileSystemWorkspaceBinding; 195 var fileSystemPath = isolatedFileSystem.path();
196 var id = WebInspector.FileSystemWorkspaceBinding.projectId(fileSystemPath);
197 console.assert(!workspace.project(id));
198 var displayName = fileSystemPath.substr(fileSystemPath.lastIndexOf("/") + 1) ;
199
200 WebInspector.ProjectStore.call(this, workspace, id, WebInspector.projectType s.FileSystem, displayName);
201
196 this._fileSystem = isolatedFileSystem; 202 this._fileSystem = isolatedFileSystem;
197 this._fileSystemBaseURL = this._fileSystem.path() + "/"; 203 this._fileSystemBaseURL = this._fileSystem.path() + "/";
198 this._fileSystemPath = this._fileSystem.path(); 204 this._fileSystemWorkspaceBinding = fileSystemWorkspaceBinding;
199 205 this._fileSystemPath = fileSystemPath;
200 var id = WebInspector.FileSystemWorkspaceBinding.projectId(this._fileSystemP ath);
201 console.assert(!workspace.project(id));
202
203 var displayName = this._fileSystemPath.substr(this._fileSystemPath.lastIndex Of("/") + 1);
204 WebInspector.ProjectStore.call(this, workspace, id, WebInspector.projectType s.FileSystem, displayName);
205 206
206 workspace.addProject(this); 207 workspace.addProject(this);
207 this.populate(); 208 this.populate();
208 }; 209 };
209 210
210 WebInspector.FileSystemWorkspaceBinding._metadata = Symbol("FileSystemWorkspaceB inding.Metadata"); 211 WebInspector.FileSystemWorkspaceBinding._metadata = Symbol("FileSystemWorkspaceB inding.Metadata");
211 212
212 WebInspector.FileSystemWorkspaceBinding.FileSystem.prototype = { 213 WebInspector.FileSystemWorkspaceBinding.FileSystem.prototype = {
213 /** 214 /**
214 * @return {string} 215 * @return {string}
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
573 uiSourceCode.checkContentUpdated(); 574 uiSourceCode.checkContentUpdated();
574 }, 575 },
575 576
576 dispose: function() 577 dispose: function()
577 { 578 {
578 this.removeProject(); 579 this.removeProject();
579 }, 580 },
580 581
581 __proto__: WebInspector.ProjectStore.prototype 582 __proto__: WebInspector.ProjectStore.prototype
582 }; 583 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698