mozilla / rhino

Rhino is an open-source implementation of JavaScript written entirely in Java
https://rhino.github.io
Other
4.18k stars 851 forks source link

Object.setPrototypeOf only works for ScriptableObjects #1629

Open tonygermano opened 2 months ago

tonygermano commented 2 months ago

I'll try to flesh this out a little more later. I'm just opening it so I don't forget about it.

I see that while the Scriptable interface defines a setPrototype method, Object.setPrototypeOf will not actually attempt to call it unless the object is an instance of ScriptableObject.