Calling toString on a Proxy object returns wrong result
Reported by
ali.baha...@gmail.com,
Nov 21
|
|||||
Issue description
UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/70.0.3538.77 Chrome/70.0.3538.77 Safari/537.36
Steps to reproduce the problem:
Run the following code in the Console:
const f = () => {}
const p = new Proxy(f, {})
console.log(f.toString())
console.log(p.toString())
What is the expected behavior?
It should print:
() => {}
() => {}
What went wrong?
It prints:
() => {}
function () { [native code] }
Did this work before? N/A
Chrome version: 70.0.3538.77 Channel: n/a
OS Version:
Flash Version:
p.toString() raises a TypeError in FF.
,
Nov 21
,
Nov 21
,
Nov 21
The Firefox folks say that the current behavior of Chrome is the right behavior, see https://bugzilla.mozilla.org/show_bug.cgi?id=1508968#c1 I personally find this awkward.
,
Nov 22
ali.baharev@ Thanks for the issue. Able to reproduce this issue on Mac OS 10.13.6,Windows 10 and Ubuntu 17.10 on the reported version 70.0.3538.77 and latest Canary 72.0.3617.0. This is a Non-Regression issue as this behavior is observed from M-66(66.0.3354.0) chrome build as per comment #1. Hence marking this as Untriaged for further updates from Dev. Thanks..
,
Dec 4
working as intended. |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by woxxom@gmail.com
, Nov 21