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

Bug 436189

Summary: Need a way to flag web-worker-unsafe globals
Product: [ECD] Orion Reporter: Mark Macdonald <mamacdon>
Component: JS ToolsAssignee: Michael Rennie <Michael_Rennie>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: curtis.windatt.public, Michael_Rennie
Version: 5.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Mark Macdonald CLA 2014-05-29 11:58:41 EDT
I just noticed that the web-workerified version of javascriptPlugin was broken since one of its dependencies was trying to access the global variable 'document'.

Perhaps we could add a worker:true environment, which only defines the subset of global variables available to workers (navigator, importScripts, postMessage, etc)

That stanza could be added to the top of javascriptPlugin and its dependencies to remind us.
Comment 1 John Arthorne CLA 2015-05-05 16:18:18 EDT
Closing as part of a mass clean up of inactive bugs. Please reopen if this problem still occurs or is relevant to you. For more details see:


https://dev.eclipse.org/mhonarc/lists/orion-dev/msg03444.html
Comment 2 Michael Rennie CLA 2015-05-05 22:43:04 EDT
reopen
Comment 3 Michael Rennie CLA 2016-03-22 09:30:15 EDT
With the latest update to ESLint they have a worker environment defined.

To use it you simply have to use the eslint-env directive, like:

/* eslint-env worker */