Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 404854

Summary: JSLint browser mode doesn't recognize 'window'
Product: [ECD] Orion Reporter: Manu Sridharan <m.sridharan>
Component: ClientAssignee: Project Inbox <orion.client-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: ken_walker, mamacdon
Version: unspecified   
Target Milestone: 3.0 M1   
Hardware: PC   
OS: Mac OS X   
Whiteboard:
Attachments:
Description Flags
patch none

Description Manu Sridharan CLA 2013-04-03 17:03:10 EDT
Created attachment 229304 [details]
patch

Given the following code:

/*jslint browser: true */


var x = window.location;

I get an error marker in Orion, with message "'window' is not defined."  

This is a bug in the version of JSLint included in jslintworker.js; the bug is fixed in the latest JSLint.  From bug 368207, I presume that the JSLint code in Orion won't be updated anytime soon, so a trivial patch is attached to fix this particular problem.
Comment 1 Manu Sridharan CLA 2013-04-11 14:52:00 EDT
I assert that I authored 100% of the content of this contribution and have the rights to donate the content to Eclipse under the EPL
Comment 2 Mark Macdonald CLA 2013-04-11 15:24:03 EDT
Thanks for the contribution! This looks like a good fix. Pushed:

http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=4177a617332e68725706df52