Exception message "*** is not a function" is not shown propery when the function name has non-ascii characters
Reported by
hoge...@gmail.com,
Aug 12 2016
|
||||
Issue description
UserAgent: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.57 Safari/537.36
Steps to reproduce the problem:
1. Open console
2. Type
window["あいう"]()
3. Shows:
Uncaught TypeError: window.ããã is not a function
What is the expected behavior?
Uncaught TypeError: window.あいう is not a function
What went wrong?
The code shows "TypeError: window.あいう is not a function" correctly.
bytes=function(s) {
var r="";
for(var i=0;i<s.length;i++) {
r+="%"+(s.charCodeAt(i).toString(16));
}
return decodeURIComponent(r);
}
try { window["あいう"](); } catch (e) { bytes(e+"") ; }
It seems to be solved by check encoding of the error message.
Did this work before? No
Chrome version: 53.0.2785.57 Channel: beta
OS Version: 6.3
Flash Version:
,
Aug 13 2016
I think it's related to way how V8 create Error.message. V8 team, please take a look. Feel free to assign it back.
,
Aug 18 2016
,
Aug 18 2016
This is also present on Chrome 52. I'll take a look.
Repro for d8: {}["あいう"]()
,
Aug 19 2016
The problem is in RenderCallSite. We grab a C string from CallPrinter::Print, which obviously doesn't work for unicode strings.
,
Aug 23 2016
|
||||
►
Sign in to add a comment |
||||
Comment 1 by dtapu...@chromium.org
, Aug 12 2016