Addressing Ivan's comments of using INVALID_TYPE in Factory::CreateApiFunction.
Review URL: http://codereview.chromium.org/7925 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@575 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
69686b1435
commit
a5ead4a421
@ -685,7 +685,7 @@ Handle<JSFunction> Factory::CreateApiFunction(
|
||||
}
|
||||
|
||||
int instance_size = kPointerSize * internal_field_count;
|
||||
InstanceType type = JS_OBJECT_TYPE; // initialize to a valid value
|
||||
InstanceType type = INVALID_TYPE;
|
||||
switch (instance_type) {
|
||||
case JavaScriptObject:
|
||||
type = JS_OBJECT_TYPE;
|
||||
@ -700,9 +700,9 @@ Handle<JSFunction> Factory::CreateApiFunction(
|
||||
instance_size += JSGlobalProxy::kSize;
|
||||
break;
|
||||
default:
|
||||
ASSERT(false);
|
||||
break;
|
||||
}
|
||||
ASSERT(type != INVALID_TYPE);
|
||||
|
||||
Handle<JSFunction> result =
|
||||
Factory::NewFunction(Factory::empty_symbol(), type, instance_size,
|
||||
|
@ -535,6 +535,7 @@ enum InstanceType {
|
||||
// Pseudo-types
|
||||
FIRST_NONSTRING_TYPE = MAP_TYPE,
|
||||
FIRST_TYPE = 0x0,
|
||||
INVALID_TYPE = FIRST_TYPE - 1,
|
||||
LAST_TYPE = JS_FUNCTION_TYPE,
|
||||
// Boundaries for testing the type is a JavaScript "object". Note that
|
||||
// function objects are not counted as objects, even though they are
|
||||
|
Loading…
Reference in New Issue
Block a user