Issue 2396 in v8: eval messes up function name resolution

32 views
Skip to first unread message

codesite...@google.com

unread,
Nov 6, 2012, 6:19:45 AM11/6/12
to v8-...@googlegroups.com
Status: New
Owner: ----

New issue 2396 by bjouh...@gmail.com: eval messes up function name
resolution
http://code.google.com/p/v8/issues/detail?id=2396

Load the following HTML page in Chrome:

<html><head><title>eval test</title></head>
<body><script>
(function a() {
function a() {}
eval("true");
alert(a.toString())
})();
</script></body></html>

The alert box displays the outer a() function!!! Without the eval call, it
displays the inner a() function. Same behavior in node.js

On other browsers, the alert box always displays the inner a() function.







codesite...@google.com

unread,
Nov 12, 2012, 5:35:49 PM11/12/12
to v8-...@googlegroups.com

Comment #1 on issue 2396 by s...@google.com: eval messes up function name
resolution
http://code.google.com/p/v8/issues/detail?id=2396

The given code does the right thing in strict mode with or without the eval.

codesite...@google.com

unread,
Nov 4, 2014, 10:17:54 AM11/4/14
to v8-...@googlegroups.com
Updates:
Status: Fixed

Comment #2 on issue 2396 by dsl...@chromium.org: eval messes up function
name resolution
https://code.google.com/p/v8/issues/detail?id=2396

(No comment was entered for this change.)

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
Reply all
Reply to author
Forward
0 new messages