travisfw/heritrix3 — comment on commit 7a459699f340333dc78501e02c07e8ad3b7680fe
File: engine/src/main/java/org/archive/crawler/restlet/ScriptResource.java line 279
By travisfw:

No, because ScriptResource is not common between actions and rest calls.
Why is injecting fewer globals a goal? ScriptEngine.put(String, Object) should put at the ENGINE_SCOPE level not the GLOBAL_SCOPE level by the documentation, if that makes a difference. Perhaps that scope should be explicit instead of trusting the ScriptEngine implementation. The savedState binding could actually be dropped, since ScriptUtils.savedState is static and should be able to referenced that way from scripts if I make it public.
Also, Noah mentioned a memory leak so I'll add nulling out the bindings passed in to eval.