Closed
Bug 1508968
Opened 6 years ago
Closed 6 years ago
Calling toString on a Proxy object raises TypeError: Function.prototype.toString called on incompatible object
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 1440468
People
(Reporter: ali.baharev, Unassigned)
Details
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:63.0) Gecko/20100101 Firefox/63.0 Steps to reproduce: I ran the following code in the Console: const f = () => {} const p = new Proxy(f, {}) console.log(f.toString()) console.log(p.toString()) Actual results: Running the above code prints: () => {} TypeError: Function.prototype.toString called on incompatible object[Learn More] Expected results: It should have printed: () => {} () => {}
Updated•6 years ago
|
Component: Untriaged → JavaScript Engine
Product: Firefox → Core
Comment 1•6 years ago
|
||
Btw, per https://tc39.github.io/Function-prototype-toString-revision/#proposal-sec-function.prototype.tostring the second must return something like "function() { [native code] }"
Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Resolution: --- → DUPLICATE
Reporter | ||
Comment 2•6 years ago
|
||
Interesting, thanks for the info.
You need to log in
before you can comment on or make changes to this bug.
Description
•