Fix a bug in a corner case of direct eval detection.
authorkmillikin@chromium.org <kmillikin@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 28 Apr 2011 05:04:48 +0000 (05:04 +0000)
committerkmillikin@chromium.org <kmillikin@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 28 Apr 2011 05:04:48 +0000 (05:04 +0000)
commitdc28280a82c3b64670d3d039710da6a76dcc87bd
treea6b23d5931dc2a4b37e35017f85c1dda41745d0f
parentcfb8d1c346e42383d1f1c91bf089f1a2e567b267
Fix a bug in a corner case of direct eval detection.

The corner case is calling a function named 'eval' that is looked up at
runtime and found in a non-global context (but not an extension object).
The bug is that we used the function itself as the receiver rather than
using the global object.

R=ager@chromium.org
TEST=has been added to the eval mjsunit test

Review URL: http://codereview.chromium.org/6893057

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7696 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
src/runtime.cc
test/mjsunit/eval.js