Initialize the variable to a valid value.
authorfeng@chromium.org <feng@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 21 Oct 2008 19:14:22 +0000 (19:14 +0000)
committerfeng@chromium.org <feng@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 21 Oct 2008 19:14:22 +0000 (19:14 +0000)
Review URL: http://codereview.chromium.org/7826

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@541 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/factory.cc

index c6610d6..7c850e9 100644 (file)
@@ -683,7 +683,7 @@ Handle<JSFunction> Factory::CreateApiFunction(
   }
 
   int instance_size = kPointerSize * internal_field_count;
-  InstanceType type;
+  InstanceType type = JS_OBJECT_TYPE;  // initialize to a valid value
   switch (instance_type) {
     case JavaScriptObject:
       type = JS_OBJECT_TYPE;