Fix store IC writability check in strict mode.
authormstarzinger@chromium.org <mstarzinger@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 28 Mar 2012 09:34:52 +0000 (09:34 +0000)
committermstarzinger@chromium.org <mstarzinger@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 28 Mar 2012 09:34:52 +0000 (09:34 +0000)
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

src/ic.cc

index 78694dc..b8d4b40 100644 (file)
--- a/src/ic.cc
+++ b/src/ic.cc
@@ -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);