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

Unified Diff: src/array.js

Issue 239033002: Fix bogus call to Object.hasOwnProperty in Array builtin. (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-5.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 2fa48b077a33c7a67f275028eb5fcbbf4726d660..ea4f3b41cb8949e666d9ede4cea1ed629f60a7af 100644
--- a/src/array.js
+++ b/src/array.js
@@ -651,17 +651,6 @@ function ArrayUnshift(arg1) { // length == 1
if (IS_ARRAY(this) && !is_sealed) {
SmartMove(this, 0, 0, len, num_arguments);
} else {
- if (num_arguments == 0 && ObjectIsFrozen(this)) {
- // In the zero argument case, values from the prototype come into the
- // object. This can't be allowed on frozen arrays.
- for (var i = 0; i < len; i++) {
- if (!this.hasOwnProperty(i) && !IS_UNDEFINED(this[i])) {
- throw MakeTypeError("array_functions_on_frozen",
- ["Array.prototype.shift"]);
- }
- }
- }
-
SimpleMove(this, 0, 0, len, num_arguments);
}
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-builtinbust-5.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698