Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(106)

Unified Diff: src/array.js

Issue 237253002: Fix bogus Object.isSealed check in some Array builtins. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-builtinbust-4.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/array.js
diff --git a/src/array.js b/src/array.js
index e23ecf3072e54799407cbdf2f80c25ceeeb8aeb9..2fa48b077a33c7a67f275028eb5fcbbf4726d660 100644
--- a/src/array.js
+++ b/src/array.js
@@ -463,10 +463,6 @@ function ArrayPush() {
var n = TO_UINT32(this.length);
var m = %_ArgumentsLength();
- if (m > 0 && ObjectIsSealed(this)) {
- throw MakeTypeError("array_functions_change_sealed",
- ["Array.prototype.push"]);
- }
if (%IsObserved(this))
return ObservedArrayPush.apply(this, arguments);
@@ -649,11 +645,6 @@ function ArrayUnshift(arg1) { // length == 1
var num_arguments = %_ArgumentsLength();
var is_sealed = ObjectIsSealed(this);
- if (num_arguments > 0 && is_sealed) {
- throw MakeTypeError("array_functions_change_sealed",
- ["Array.prototype.unshift"]);
- }
-
if (%IsObserved(this))
return ObservedArrayUnshift.apply(this, arguments);
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-builtinbust-4.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698