Fix a bug in delete for lookup slots.
authorkmillikin@chromium.org <kmillikin@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 24 Jan 2011 14:03:30 +0000 (14:03 +0000)
committerkmillikin@chromium.org <kmillikin@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 24 Jan 2011 14:03:30 +0000 (14:03 +0000)
commit9c2d52eb0e30e6bcc544c577ce952c40ace89fe6
tree6e5c29ed71b6d2cf8feb36658695aa7cd0d77634
parent811e7785926486b791b6b6374d37ff962524b7f4
Fix a bug in delete for lookup slots.

The function Runtime_LookupContext searches the context chain for a
LOOKUP slot and returns the object holding the slot.  It returned the
global context if the slot was not found or if it was found in a
function's context or arguments object.  This is not the correct
object to use for 'delete'.

Since this lookup function is only ever used when deleting LOOKUP
slots (those that have to go through a with or a scope with eval), it
is simply replaced with a Runtime_DeleteContextSlot function that does
the appropriate thing for all kinds of context lookups.

This fixes Chromium bug 70066.
http://code.google.com/p/chromium/issues/detail?id=70066

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6442 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
src/arm/codegen-arm.cc
src/arm/full-codegen-arm.cc
src/ia32/codegen-ia32.cc
src/ia32/full-codegen-ia32.cc
src/runtime.cc
src/runtime.h
src/x64/codegen-x64.cc
src/x64/full-codegen-x64.cc
test/mjsunit/regress/regress-70066.js [new file with mode: 0644]