Index: src/ia32/stub-cache-ia32.cc |
diff --git a/src/ia32/stub-cache-ia32.cc b/src/ia32/stub-cache-ia32.cc |
index d799c3b4464770647c824352c88b51cc533127d9..d1be16c91b988b23e20e2d2bd58f1c01be08f36e 100644 |
--- a/src/ia32/stub-cache-ia32.cc |
+++ b/src/ia32/stub-cache-ia32.cc |
@@ -1718,10 +1718,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(); |
} |
@@ -1961,10 +1963,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(); |
} |