brackets-archive / bracketsIssues

Archive of issues in brackets.
0 stars 0 forks source link

[CLOSED] FileReader.readAsText() creates global window.error, window.result objects #176

Open core-ai-bot opened 3 years ago

core-ai-bot commented 3 years ago

Issue by peterflynn Tuesday Jan 31, 2012 at 04:22 GMT Originally opened as https://github.com/adobe/brackets/issues/172


  1. Open any file in Brackets
  2. In Developer Tools, look at window.error or window.result

These two globals are created, I think accidentally, by readAsText() line ~610. I believe the desire was to store those fields on the FileReader instance itself, so it should be assigning to self.error and self.result. I didn't see where else these fields are used, though (shouldn't the error code be passed to the error callback somehow?), so I wasn't sure enough of this to just go change it on my own.

There are a few other places in this function that look like a similar mistake:

core-ai-bot commented 3 years ago

Comment by tvoliter Tuesday Jan 31, 2012 at 18:59 GMT


Jason, can I pass this on to you since you worked on the FileReader functions?

core-ai-bot commented 3 years ago

Comment by jasonsanjose Tuesday Jan 31, 2012 at 19:04 GMT


Yep

core-ai-bot commented 3 years ago

Comment by tvoliter Tuesday Jan 31, 2012 at 22:40 GMT


merged pull request and marked as fixed. Back to Peter to close

core-ai-bot commented 3 years ago

Comment by peterflynn Saturday Feb 04, 2012 at 01:11 GMT


Looks good to me too; closing...