Index: src/ic.cc |
diff --git a/src/ic.cc b/src/ic.cc |
index 34cfc515a66c89efc7bca99c28e77251f0d3e335..a70ac1c7760dcd2690e35fcd02ded9e5b2df62e1 100644 |
--- a/src/ic.cc |
+++ b/src/ic.cc |
@@ -1203,7 +1203,7 @@ MaybeObject* StoreIC::Store(Handle<Object> object, |
} |
// Observed objects are always modified through the runtime. |
- if (receiver->map()->is_observed()) { |
+ if (FLAG_harmony_observation && receiver->map()->is_observed()) { |
Handle<Object> result = JSReceiver::SetProperty( |
receiver, name, value, NONE, strict_mode(), store_mode); |
RETURN_IF_EMPTY_HANDLE(isolate(), result); |
@@ -1670,7 +1670,7 @@ MaybeObject* KeyedStoreIC::Store(Handle<Object> object, |
if (maybe_object->IsFailure()) return maybe_object; |
} else { |
bool use_ic = FLAG_use_ic && !object->IsAccessCheckNeeded() && |
- !(object->IsJSObject() && |
+ !(FLAG_harmony_observation && object->IsJSObject() && |
JSObject::cast(*object)->map()->is_observed()); |
if (use_ic && !object->IsSmi()) { |
// Don't use ICs for maps of the objects in Array's prototype chain. We |