Index: src/arm/stub-cache-arm.cc |
diff --git a/src/arm/stub-cache-arm.cc b/src/arm/stub-cache-arm.cc |
index a7ddc8e5326c57aec534ee51d64b8d26d60fd111..23fe0930a34c745e7ee4e042f96bb6cc40b69786 100644 |
--- a/src/arm/stub-cache-arm.cc |
+++ b/src/arm/stub-cache-arm.cc |
@@ -1718,8 +1718,12 @@ Handle<Code> CallStubCompiler::CompileArrayPushCall( |
// -- sp[argc * 4] : receiver |
// ----------------------------------- |
- // If object is not an array, bail out to regular call. |
- if (!object->IsJSArray() || !cell.is_null()) return Handle<Code>::null(); |
+ // If object is not an array or is observed, bail out to regular call. |
+ if (!object->IsJSArray() || |
+ !cell.is_null() || |
+ Handle<JSArray>::cast(object)->map()->is_observed()) { |
+ return Handle<Code>::null(); |
+ } |
Label miss; |
GenerateNameCheck(name, &miss); |
@@ -1972,8 +1976,12 @@ Handle<Code> CallStubCompiler::CompileArrayPopCall( |
// -- sp[argc * 4] : receiver |
// ----------------------------------- |
- // If object is not an array, bail out to regular call. |
- if (!object->IsJSArray() || !cell.is_null()) return Handle<Code>::null(); |
+ // If object is not an array or is observed, bail out to regular call. |
+ if (!object->IsJSArray() || |
+ !cell.is_null() || |
+ Handle<JSArray>::cast(object)->map()->is_observed()) { |
+ return Handle<Code>::null(); |
+ } |
Label miss, return_undefined, call_builtin; |
Register receiver = r1; |