Index: src/x64/stub-cache-x64.cc |
diff --git a/src/x64/stub-cache-x64.cc b/src/x64/stub-cache-x64.cc |
index 499ccdf24caeadb9b648cf5a846633241de815e6..03c4e73ff89a64933ba2896fd339bfe72d87c3fd 100644 |
--- a/src/x64/stub-cache-x64.cc |
+++ b/src/x64/stub-cache-x64.cc |
@@ -1661,8 +1661,12 @@ Handle<Code> CallStubCompiler::CompileArrayPushCall( |
// -- rsp[(argc + 1) * 8] : 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); |
@@ -1912,8 +1916,12 @@ Handle<Code> CallStubCompiler::CompileArrayPopCall( |
// -- rsp[(argc + 1) * 8] : 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; |
GenerateNameCheck(name, &miss); |