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

Unified Diff: src/objects.cc

Issue 5959009: Allow getters and setters on JSArray elements. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 12 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/indexed-accessors.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
===================================================================
--- src/objects.cc (revision 6157)
+++ src/objects.cc (working copy)
@@ -2932,7 +2932,6 @@
uint32_t index = 0;
bool is_element = name->AsArrayIndex(&index);
- if (is_element && IsJSArray()) return Heap::undefined_value();
if (is_element) {
switch (GetElementsKind()) {
@@ -6945,7 +6944,7 @@
FixedArray* elms = FixedArray::cast(elms_obj);
uint32_t elms_length = static_cast<uint32_t>(elms->length());
- if (check_prototype && !IsJSArray() &&
+ if (check_prototype &&
(index >= elms_length || elms->get(index)->IsTheHole())) {
if (SetElementWithCallbackSetterInPrototypes(index, value)) {
Lasse Reichstein 2011/01/04 13:34:34 For the heck of it, combine the two ifs into one.
Rico 2011/01/04 13:57:50 Done.
return value;
@@ -7080,7 +7079,7 @@
}
} else {
// Index not already used. Look for an accessor in the prototype chain.
- if (check_prototype && !IsJSArray() &&
+ if (check_prototype &&
SetElementWithCallbackSetterInPrototypes(index, value)) {
return value;
}
« no previous file with comments | « no previous file | test/mjsunit/indexed-accessors.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698