This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
If executeScript does not indicate how to handle an invalid return type (e.g. a function). The text should be updated to indicate WebDriver should throw.
I think this is handled by https://w3c.github.io/webdriver/webdriver-spec.html#dfn-json-clone now