Index: src/objects.cc |
=================================================================== |
--- src/objects.cc (revision 384) |
+++ src/objects.cc (working copy) |
@@ -1691,7 +1691,7 @@ |
PropertyAttributes JSObject::GetPropertyAttributeWithReceiver( |
JSObject* receiver, |
String* key) { |
- uint32_t index; |
+ uint32_t index = 0; |
bak
2008/09/26 12:21:59
Please add a comment why this assignment is necess
|
if (key->AsArrayIndex(&index)) { |
if (HasElementWithReceiver(receiver, index)) return NONE; |
return ABSENT; |
@@ -1738,7 +1738,7 @@ |
PropertyAttributes JSObject::GetLocalPropertyAttribute(String* name) { |
// Check whether the name is an array index. |
- uint32_t index; |
+ uint32_t index = 0; |
bak
2008/09/26 12:21:59
Please move the assignment into AsArrayIndex in ob
|
if (name->AsArrayIndex(&index)) { |
if (HasLocalElement(index)) return NONE; |
return ABSENT; |
@@ -2010,7 +2010,7 @@ |
// ECMA-262, 3rd, 8.6.2.5 |
ASSERT(name->IsString()); |
- uint32_t index; |
+ uint32_t index = 0; |
if (name->AsArrayIndex(&index)) { |
return DeleteElement(index); |
} else { |