Menu

Tree [r15560] / trunk / js /
 History

HTTPS access


File Date Author Commit
 src 2017-05-03 asashour [r14327] js: fix build
 LICENSE.txt 2016-06-07 asashour [r12770] LICENSE.txt
 README.txt 2016-12-20 asashour [r13269] js3: function.caller
 checkstyle.xml 2017-04-01 asashour [r13958] js: update year
 pom.xml 2017-04-27 asashour [r14243] js: asm 2.1, seems to be a bug with Eclipse

Read Me

This project is a Nashorn fork to suit HtmlUnit need.

It is currently based on Nashorn code from http://hg.openjdk.java.net/jdk8u/jdk8u-dev/nashorn/
as of 28 November 2016

jdk9 code depends on Java 9

- Global is the mandatory 'this' or 'top level' object in Nashorn, and it is with a one-to-one relation with Window.
HtmlUnit uses window, and Nashorn calls Global.
- ScriptConext is one per WebWindow.
- The entry point of dynamic linking is DynamicLinker (specially .relink()).


Main customizations:
- Function.arguments should always exist (can be detected by arguments.callee.arguments):
  fixed in Global.allocateArguments() and FunctionNode.needsArguments()
- Function.caller:
  fixed in CodeGenerator.scopeCall() to set CALLEE, and in ScriptFunction.findCallMethod()
- Handle return statements outside function:
  fixed in Parser.returnStatement()
- When setting property of another Global, don't use the current one
  fixed in SetMethodCreator.createGlobalPropertySetter
- ScriptObject.avoidObjectDetection() 
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.