Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update MouseManagerRemote.js #919

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

teddypee
Copy link

No description provided.

Copy link

@humphd humphd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've left some feedback. @gideonthomas can you look at this too?

@@ -1,6 +1,21 @@
/*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, forin: true, maxerr: 50, regexp: true, bitwise: true */
/* global addEventListener, removeEventListener, sessionStorage */
(function(transport) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't move this line. You need to wrap the entire module in a function like this.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have fixed the code and made the indentation, can you check and get back to me please

@@ -1,6 +1,21 @@
/*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, forin: true, maxerr: 50, regexp: true, bitwise: true */
/* global addEventListener, removeEventListener, sessionStorage */
(function(transport) {

var testSessionStorage = "testSessionStorage";
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All these lines will need to be indented 4-spaces after you restore that function above.

sessionStorage = window.sessionStorage.bind(window);
} catch(e) {
console.warn("[Bramble] Session storage not accessible for MouseManager.");

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are missing a closing }. It looks like you've never tested this code, since this would never work. You need to make sure your code a) works; b) passes linting before you submit a PR.

setItem: noop
};

try {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add a comment above this that indicates that we're doing this in order to deal with security issues in browsers that don't allow third-party frames to use storage.

@gideonthomas
Copy link

The logic seems sound so I think you just need to address @humphd's comments in your PR @teddypee

@gideonthomas
Copy link

@teddypee, let us know when this is ready for a review. It looks like there are still some review comments that need to be addressed

@humphd
Copy link

humphd commented Feb 7, 2018

@teddypee this is still not right:

/home/travis/build/mozilla/brackets/src/extensions/default/bramble/lib/MouseManagerRemote.js
  135:1  error  Parsing error: Unexpected token

@teddypee
Copy link
Author

@humphd Hey Dave any suggestions on what to do no next

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants