Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 357890 - Incorrect prototype usage
Summary: Incorrect prototype usage
Status: CLOSED DUPLICATE of bug 357626
Alias: None
Product: Orion
Classification: ECD
Component: Client (show other bugs)
Version: 0.2   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-15 17:56 EDT by Simon Kaegi CLA
Modified: 2011-09-16 12:12 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Kaegi CLA 2011-09-15 17:56:13 EDT
While looking at a problem with Libing we noticed a number of coding errors in how prototype's are being used.

The coding pattern below will actually alter the parent prototype instead of creating a copy.

Instead of assigning from the prototype one should create a new instance.

In org.eclipse.orion.client.core/web/orion:
editorCommands.js
169: KB.prototype = mKeyBinding.KeyBinding.prototype; 

explorer-table.js (3 matches)
26: Model.prototype = mExplorer.ExplorerModel.prototype;  
60: FileRenderer.prototype = mExplorer.SelectionRenderer.prototype;  
156: FileExplorer.prototype = mExplorer.Explorer.prototype; 

In org.eclipse.orion.client.git/web/orion/git:
git-clones-explorer.js (3 matches)
34: GitClonesExplorer.prototype = mExplorer.Explorer.prototype; 
105: GitClonesModel.prototype = mExplorer.ExplorerModel.prototype;  
194: GitClonesRenderer.prototype = mExplorer.SelectionRenderer.prototype; 

git-commit-navigator.js
117: GitCommitRenderer.prototype = mExplorer.SelectionRenderer.prototype; 


In org.eclipse.orion.client.users.ui/web/orion/profile
UsersList.js (2 matches)
29: UsersList.prototype = mExplorer.Explorer.prototype; 
66: UsersRenderer.prototype = mExplorer.SelectionRenderer.prototype;
Comment 1 Simon Kaegi CLA 2011-09-16 12:12:20 EDT
Thanks Gosia. I made one further tweak on how we were creating the keybinding.

*** This bug has been marked as a duplicate of bug 357626 ***