Index: src/x64/stub-cache-x64.cc |
diff --git a/src/x64/stub-cache-x64.cc b/src/x64/stub-cache-x64.cc |
index 192f7bad79cbea7d0e7599e99ee0be8580ea1fc2..709c5a54b9c90ab69c476990a1ad9759dc91a3c3 100644 |
--- a/src/x64/stub-cache-x64.cc |
+++ b/src/x64/stub-cache-x64.cc |
@@ -1648,18 +1648,12 @@ Handle<Code> CallStubCompiler::CompileArrayPushCall( |
Handle<JSFunction> function, |
Handle<String> name, |
Code::StubType type) { |
- // ----------- S t a t e ------------- |
- // -- rcx : name |
- // -- rsp[0] : return address |
- // -- rsp[(argc - n) * 8] : arg[n] (zero-based) |
- // -- ... |
- // -- rsp[(argc + 1) * 8] : receiver |
- // ----------------------------------- |
- |
- // 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(); |
} |
@@ -1895,10 +1889,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(); |
} |