Index: src/arm/stub-cache-arm.cc |
diff --git a/src/arm/stub-cache-arm.cc b/src/arm/stub-cache-arm.cc |
index b93d67ba2501cc35d8a770d31c07774387a7ed56..7bf3705a627d63206d51a735c87bf348a8e17a22 100644 |
--- a/src/arm/stub-cache-arm.cc |
+++ b/src/arm/stub-cache-arm.cc |
@@ -1640,10 +1640,12 @@ Handle<Code> CallStubCompiler::CompileArrayPushCall( |
Handle<JSFunction> function, |
Handle<String> name, |
Code::StubType type) { |
- // If object is not an array or is observed, bail out to regular call. |
+ // If object is not an array or is observed or sealed, bail out to regular |
+ // call. |
if (!object->IsJSArray() || |
!cell.is_null() || |
- Handle<JSArray>::cast(object)->map()->is_observed()) { |
+ Handle<JSArray>::cast(object)->map()->is_observed() || |
+ !Handle<JSArray>::cast(object)->map()->is_extensible()) { |
return Handle<Code>::null(); |
} |
@@ -1883,10 +1885,12 @@ Handle<Code> CallStubCompiler::CompileArrayPopCall( |
Handle<JSFunction> function, |
Handle<String> name, |
Code::StubType type) { |
- // If object is not an array or is observed, bail out to regular call. |
+ // If object is not an array or is observed or sealed, bail out to regular |
+ // call. |
if (!object->IsJSArray() || |
!cell.is_null() || |
- Handle<JSArray>::cast(object)->map()->is_observed()) { |
+ Handle<JSArray>::cast(object)->map()->is_observed() || |
+ !Handle<JSArray>::cast(object)->map()->is_extensible()) { |
return Handle<Code>::null(); |
} |