The method ScriptRuntime.evalSpecial takes a generic Object for thisArg. However, it then casts it to Scriptable.
We have some (rare) code paths where we end up passing Undefined.instance to that method, where we get a ClassCastException.
This simple PR allows it and adds a test.
The method
ScriptRuntime.evalSpecial
takes a genericObject
forthisArg
. However, it then casts it toScriptable
. We have some (rare) code paths where we end up passingUndefined.instance
to that method, where we get aClassCastException
. This simple PR allows it and adds a test.