Bad error behavior when using a function proxy

NEW
Unassigned

Status

()

Core
JavaScript Engine
2 years ago
2 years ago

People

(Reporter: evilpie, Unassigned)

Tracking

(Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

2 years ago
Consider this code `new (new Proxy(Math.sin, {}))`. This should throw, because the function (and thus the proxy) is not constructable. However in certain cases we invoke ValueToSource on the proxy, which yields a different error: Function.prototype.toString called on incompatible object.
You need to log in before you can comment on or make changes to this bug.