| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 2208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2219 } | 2219 } |
| 2220 break; | 2220 break; |
| 2221 } | 2221 } |
| 2222 case CONSTANT_FUNCTION: | 2222 case CONSTANT_FUNCTION: |
| 2223 SetPropertyReference( | 2223 SetPropertyReference( |
| 2224 js_obj, entry, | 2224 js_obj, entry, |
| 2225 descs->GetKey(i), descs->GetConstantFunction(i)); | 2225 descs->GetKey(i), descs->GetConstantFunction(i)); |
| 2226 break; | 2226 break; |
| 2227 case CALLBACKS: { | 2227 case CALLBACKS: { |
| 2228 Object* callback_obj = descs->GetValue(i); | 2228 Object* callback_obj = descs->GetValue(i); |
| 2229 if (callback_obj->IsFixedArray()) { | 2229 if (callback_obj->IsAccessorPair()) { |
| 2230 FixedArray* accessors = FixedArray::cast(callback_obj); | 2230 AccessorPair* accessors = AccessorPair::cast(callback_obj); |
| 2231 if (Object* getter = accessors->get(JSObject::kGetterIndex)) { | 2231 if (Object* getter = accessors->getter()) { |
| 2232 SetPropertyReference(js_obj, entry, descs->GetKey(i), | 2232 SetPropertyReference(js_obj, entry, descs->GetKey(i), |
| 2233 getter, "get-%s"); | 2233 getter, "get-%s"); |
| 2234 } | 2234 } |
| 2235 if (Object* setter = accessors->get(JSObject::kSetterIndex)) { | 2235 if (Object* setter = accessors->setter()) { |
| 2236 SetPropertyReference(js_obj, entry, descs->GetKey(i), | 2236 SetPropertyReference(js_obj, entry, descs->GetKey(i), |
| 2237 setter, "set-%s"); | 2237 setter, "set-%s"); |
| 2238 } | 2238 } |
| 2239 } | 2239 } |
| 2240 break; | 2240 break; |
| 2241 } | 2241 } |
| 2242 case NORMAL: // only in slow mode | 2242 case NORMAL: // only in slow mode |
| 2243 case HANDLER: // only in lookup results, not in descriptors | 2243 case HANDLER: // only in lookup results, not in descriptors |
| 2244 case INTERCEPTOR: // only in lookup results, not in descriptors | 2244 case INTERCEPTOR: // only in lookup results, not in descriptors |
| 2245 case MAP_TRANSITION: // we do not care about transitions here... | 2245 case MAP_TRANSITION: // we do not care about transitions here... |
| (...skipping 1388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3634 | 3634 |
| 3635 | 3635 |
| 3636 void HeapSnapshotJSONSerializer::SortHashMap( | 3636 void HeapSnapshotJSONSerializer::SortHashMap( |
| 3637 HashMap* map, List<HashMap::Entry*>* sorted_entries) { | 3637 HashMap* map, List<HashMap::Entry*>* sorted_entries) { |
| 3638 for (HashMap::Entry* p = map->Start(); p != NULL; p = map->Next(p)) | 3638 for (HashMap::Entry* p = map->Start(); p != NULL; p = map->Next(p)) |
| 3639 sorted_entries->Add(p); | 3639 sorted_entries->Add(p); |
| 3640 sorted_entries->Sort(SortUsingEntryValue); | 3640 sorted_entries->Sort(SortUsingEntryValue); |
| 3641 } | 3641 } |
| 3642 | 3642 |
| 3643 } } // namespace v8::internal | 3643 } } // namespace v8::internal |
| OLD | NEW |