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
parent d5c7e87c
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment