Add missing initialization of a couple of variables which makes
authorager@chromium.org <ager@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 2 Jun 2010 08:58:44 +0000 (08:58 +0000)
committerager@chromium.org <ager@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 2 Jun 2010 08:58:44 +0000 (08:58 +0000)
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

src/objects.cc

index 74f3e80..3f7d92f 100644 (file)
@@ -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();