Seemingly it is very difficult to switch between two Javascript files without crapping yourself... Eclipse runs already at -Xm1024m. If you make this bigger it will keep running in loops longer before running out of memory.
A new one, Workbench Auto-Save Job runs out of memory (java heap space):
!ENTRY org.eclipse.core.jobs 4 2 2015-03-31 11:00:31.037
!MESSAGE An internal error occurred during: "Compacting resource model".
!STACK 0
java.lang.OutOfMemoryError: Java heap space
Here is a link to a bug report that seems to describe the phenomenon.
For now I won't be using Eclipse for editing javascript files...
April 20, 2015
!ENTRY org.eclipse.core.jobs 4 2 2015-04-20 16:02:02.828
!MESSAGE An internal error occurred during: "Decoration Calculation".
!STACK 0
java.lang.OutOfMemoryError: Java heap space
at org.eclipse.wst.jsdt.internal.compiler.parser.Parser.consumeMemberExp
ressionWithSimpleName(Parser.java:2343)
at org.eclipse.wst.jsdt.internal.compiler.parser.Parser.consumeRule(Pars
er.java:3217)