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 4500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4511 // Allocate an array with storage for all the property names. | 4511 // Allocate an array with storage for all the property names. |
4512 Handle<FixedArray> names = | 4512 Handle<FixedArray> names = |
4513 isolate->factory()->NewFixedArray(total_property_count); | 4513 isolate->factory()->NewFixedArray(total_property_count); |
4514 | 4514 |
4515 // Get the property names. | 4515 // Get the property names. |
4516 jsproto = obj; | 4516 jsproto = obj; |
4517 int proto_with_hidden_properties = 0; | 4517 int proto_with_hidden_properties = 0; |
4518 for (int i = 0; i < length; i++) { | 4518 for (int i = 0; i < length; i++) { |
4519 jsproto->GetLocalPropertyNames(*names, | 4519 jsproto->GetLocalPropertyNames(*names, |
4520 i == 0 ? 0 : local_property_count[i - 1]); | 4520 i == 0 ? 0 : local_property_count[i - 1]); |
4521 if (!GetHiddenProperties(jsproto, false)->IsUndefined()) { | 4521 if (!GetHiddenProperties(jsproto, JSObject::OMIT_CREATION)->IsUndefined()) { |
Vitaly Repeshko
2011/07/28 13:30:07
Maybe we need HasHiddenProperties to simplify this
Michael Starzinger
2011/07/28 17:19:47
Fixed
| |
4522 proto_with_hidden_properties++; | 4522 proto_with_hidden_properties++; |
4523 } | 4523 } |
4524 if (i < length - 1) { | 4524 if (i < length - 1) { |
4525 jsproto = Handle<JSObject>(JSObject::cast(jsproto->GetPrototype())); | 4525 jsproto = Handle<JSObject>(JSObject::cast(jsproto->GetPrototype())); |
4526 } | 4526 } |
4527 } | 4527 } |
4528 | 4528 |
4529 // Filter out name of hidden propeties object. | 4529 // Filter out name of hidden propeties object. |
4530 if (proto_with_hidden_properties > 0) { | 4530 if (proto_with_hidden_properties > 0) { |
4531 Handle<FixedArray> old_names = names; | 4531 Handle<FixedArray> old_names = names; |
(...skipping 8217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
12749 } else { | 12749 } else { |
12750 // Handle last resort GC and make sure to allow future allocations | 12750 // Handle last resort GC and make sure to allow future allocations |
12751 // to grow the heap without causing GCs (if possible). | 12751 // to grow the heap without causing GCs (if possible). |
12752 isolate->counters()->gc_last_resort_from_js()->Increment(); | 12752 isolate->counters()->gc_last_resort_from_js()->Increment(); |
12753 isolate->heap()->CollectAllGarbage(false); | 12753 isolate->heap()->CollectAllGarbage(false); |
12754 } | 12754 } |
12755 } | 12755 } |
12756 | 12756 |
12757 | 12757 |
12758 } } // namespace v8::internal | 12758 } } // namespace v8::internal |
OLD | NEW |