Fixed AccessorPair handling

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10372 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
svenpanne@chromium.org 2012-01-10 16:12:16 +00:00
parent 73f2f5db68
commit 6997dbe13e
3 changed files with 36 additions and 34 deletions

View File

@ -3816,7 +3816,7 @@ class Internals {
static const int kFullStringRepresentationMask = 0x07; static const int kFullStringRepresentationMask = 0x07;
static const int kExternalTwoByteRepresentationTag = 0x02; static const int kExternalTwoByteRepresentationTag = 0x02;
static const int kJSObjectType = 0xa6; static const int kJSObjectType = 0xa7;
static const int kFirstNonstringType = 0x80; static const int kFirstNonstringType = 0x80;
static const int kForeignType = 0x85; static const int kForeignType = 0x85;

View File

@ -4606,14 +4606,15 @@ MaybeObject* JSObject::DefineAccessor(String* name,
fun, attributes); fun, attributes);
} }
AccessorPair* accessors; Object* accessors;
{ MaybeObject* maybe_accessors = DefineGetterSetter(name, attributes); { MaybeObject* maybe_accessors = DefineGetterSetter(name, attributes);
if (!maybe_accessors->To<AccessorPair>(&accessors)) return maybe_accessors; if (!maybe_accessors->To<Object>(&accessors)) return maybe_accessors;
} }
if (accessors->IsUndefined()) return accessors;
if (is_getter) { if (is_getter) {
accessors->set_getter(fun); AccessorPair::cast(accessors)->set_getter(fun);
} else { } else {
accessors->set_setter(fun); AccessorPair::cast(accessors)->set_setter(fun);
} }
return this; return this;
} }

View File

@ -506,10 +506,10 @@ class MinidumpReader(object):
# List of V8 instance types. Obtained by adding the code below to any .cc file. # List of V8 instance types. Obtained by adding the code below to any .cc file.
# #
# #define DUMP_TYPE(T) printf("%d: \"%s\",\n", T, #T); # #define DUMP_TYPE(T) printf(" %d: \"%s\",\n", T, #T);
# struct P { # struct P {
# P() { # P() {
# printf("{\n"); # printf("INSTANCE_TYPES = {\n");
# INSTANCE_TYPE_LIST(DUMP_TYPE) # INSTANCE_TYPE_LIST(DUMP_TYPE)
# printf("}\n"); # printf("}\n");
# } # }
@ -556,34 +556,35 @@ INSTANCE_TYPES = {
144: "EXTERNAL_PIXEL_ARRAY_TYPE", 144: "EXTERNAL_PIXEL_ARRAY_TYPE",
146: "FILLER_TYPE", 146: "FILLER_TYPE",
147: "ACCESSOR_INFO_TYPE", 147: "ACCESSOR_INFO_TYPE",
148: "ACCESS_CHECK_INFO_TYPE", 148: "ACCESSOR_PAIR_TYPE",
149: "INTERCEPTOR_INFO_TYPE", 149: "ACCESS_CHECK_INFO_TYPE",
150: "CALL_HANDLER_INFO_TYPE", 150: "INTERCEPTOR_INFO_TYPE",
151: "FUNCTION_TEMPLATE_INFO_TYPE", 151: "CALL_HANDLER_INFO_TYPE",
152: "OBJECT_TEMPLATE_INFO_TYPE", 152: "FUNCTION_TEMPLATE_INFO_TYPE",
153: "SIGNATURE_INFO_TYPE", 153: "OBJECT_TEMPLATE_INFO_TYPE",
154: "TYPE_SWITCH_INFO_TYPE", 154: "SIGNATURE_INFO_TYPE",
155: "SCRIPT_TYPE", 155: "TYPE_SWITCH_INFO_TYPE",
156: "CODE_CACHE_TYPE", 156: "SCRIPT_TYPE",
157: "POLYMORPHIC_CODE_CACHE_TYPE", 157: "CODE_CACHE_TYPE",
160: "FIXED_ARRAY_TYPE", 158: "POLYMORPHIC_CODE_CACHE_TYPE",
161: "FIXED_ARRAY_TYPE",
145: "FIXED_DOUBLE_ARRAY_TYPE", 145: "FIXED_DOUBLE_ARRAY_TYPE",
161: "SHARED_FUNCTION_INFO_TYPE", 162: "SHARED_FUNCTION_INFO_TYPE",
162: "JS_MESSAGE_OBJECT_TYPE", 163: "JS_MESSAGE_OBJECT_TYPE",
165: "JS_VALUE_TYPE", 166: "JS_VALUE_TYPE",
166: "JS_OBJECT_TYPE", 167: "JS_OBJECT_TYPE",
167: "JS_CONTEXT_EXTENSION_OBJECT_TYPE", 168: "JS_CONTEXT_EXTENSION_OBJECT_TYPE",
168: "JS_GLOBAL_OBJECT_TYPE", 169: "JS_GLOBAL_OBJECT_TYPE",
169: "JS_BUILTINS_OBJECT_TYPE", 170: "JS_BUILTINS_OBJECT_TYPE",
170: "JS_GLOBAL_PROXY_TYPE", 171: "JS_GLOBAL_PROXY_TYPE",
171: "JS_ARRAY_TYPE", 172: "JS_ARRAY_TYPE",
164: "JS_PROXY_TYPE", 165: "JS_PROXY_TYPE",
174: "JS_WEAK_MAP_TYPE", 175: "JS_WEAK_MAP_TYPE",
175: "JS_REGEXP_TYPE", 176: "JS_REGEXP_TYPE",
176: "JS_FUNCTION_TYPE", 177: "JS_FUNCTION_TYPE",
163: "JS_FUNCTION_PROXY_TYPE", 164: "JS_FUNCTION_PROXY_TYPE",
158: "DEBUG_INFO_TYPE", 159: "DEBUG_INFO_TYPE",
159: "BREAK_POINT_INFO_TYPE", 160: "BREAK_POINT_INFO_TYPE",
} }