Commit f340073e authored by ager@chromium.org's avatar ager@chromium.org

Add missing initialization of a couple of variables which makes

some compilers complaint when compiling with -Werror.
Review URL: http://codereview.chromium.org/2492001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4780 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent c2fad9d9
......@@ -2700,7 +2700,7 @@ Object* JSObject::DefineGetterSetter(String* name,
return Heap::undefined_value();
}
uint32_t index;
uint32_t index = 0;
bool is_element = name->AsArrayIndex(&index);
if (is_element && IsJSArray()) return Heap::undefined_value();
......@@ -2958,7 +2958,7 @@ Object* JSObject::LookupAccessor(String* name, bool is_getter) {
// Make the lookup and include prototypes.
int accessor_index = is_getter ? kGetterIndex : kSetterIndex;
uint32_t index = 0; // Initialize index to make compiler happy.
uint32_t index = 0;
if (name->AsArrayIndex(&index)) {
for (Object* obj = this;
obj != Heap::null_value();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment