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

Unified Diff: src/runtime.cc

Issue 651025: Removed asserts on attributes when setting elements. Will file a bug on not h... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 10 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime.cc
===================================================================
--- src/runtime.cc (revision 3912)
+++ src/runtime.cc (working copy)
@@ -2960,8 +2960,6 @@
// Check if the given key is an array index.
uint32_t index;
if (Array::IndexFromObject(*key, &index)) {
- ASSERT(attr == NONE);
-
// In Firefox/SpiderMonkey, Safari and Opera you can access the characters
// of a string using [] notation. We need to support this too in
// JavaScript.
@@ -2981,7 +2979,6 @@
if (key->IsString()) {
Handle<Object> result;
if (Handle<String>::cast(key)->AsArrayIndex(&index)) {
- ASSERT(attr == NONE);
result = SetElement(js_object, index, value);
} else {
Handle<String> key_string = Handle<String>::cast(key);
@@ -2999,7 +2996,6 @@
Handle<String> name = Handle<String>::cast(converted);
if (name->AsArrayIndex(&index)) {
- ASSERT(attr == NONE);
return js_object->SetElement(index, *value);
} else {
return js_object->SetProperty(*name, *value, attr);
@@ -3016,8 +3012,6 @@
// Check if the given key is an array index.
uint32_t index;
if (Array::IndexFromObject(*key, &index)) {
- ASSERT(attr == NONE);
-
// In Firefox/SpiderMonkey, Safari and Opera you can access the characters
// of a string using [] notation. We need to support this too in
// JavaScript.
@@ -3034,7 +3028,6 @@
if (key->IsString()) {
if (Handle<String>::cast(key)->AsArrayIndex(&index)) {
- ASSERT(attr == NONE);
return js_object->SetElement(index, *value);
} else {
Handle<String> key_string = Handle<String>::cast(key);
@@ -3052,7 +3045,6 @@
Handle<String> name = Handle<String>::cast(converted);
if (name->AsArrayIndex(&index)) {
- ASSERT(attr == NONE);
return js_object->SetElement(index, *value);
} else {
return js_object->IgnoreAttributesAndSetLocalProperty(*name, *value, attr);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698