Fix store IC writability check in strict mode.

The store ICs should only check writability attributes for actual
properties and not for map transitions.

R=jkummerow@chromium.org,svenpanne@chromium.org
BUG=chromium:120099
TEST=mjsunit/regress/regress-120099

Review URL: https://chromiumcodereview.appspot.com/9874015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11173 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
mstarzinger@chromium.org 2012-03-28 09:34:52 +00:00
parent d5c7e87c50
commit 4389c29cce

View File

@ -1360,7 +1360,7 @@ MaybeObject* StoreIC::Store(State state,
// Strict mode doesn't allow setting non-existent global property
// or an assignment to a read only property.
if (strict_mode == kStrictMode) {
if (lookup.IsFound() && lookup.IsReadOnly()) {
if (lookup.IsProperty() && lookup.IsReadOnly()) {
return TypeError("strict_read_only_property", object, name);
} else if (IsContextual(object)) {
return ReferenceError("not_defined", name);