OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
834 } | 834 } |
835 | 835 |
836 // Use recursive implementation to also traverse hidden prototypes | 836 // Use recursive implementation to also traverse hidden prototypes |
837 GetOwnPropertyImplementation(*obj, *name, &result); | 837 GetOwnPropertyImplementation(*obj, *name, &result); |
838 | 838 |
839 if (!result.IsProperty()) { | 839 if (!result.IsProperty()) { |
840 return Heap::undefined_value(); | 840 return Heap::undefined_value(); |
841 } | 841 } |
842 | 842 |
843 if (!CheckAccess(*obj, *name, &result, v8::ACCESS_HAS)) { | 843 if (!CheckAccess(*obj, *name, &result, v8::ACCESS_HAS)) { |
844 return Heap::undefined_value(); | 844 return Heap::false_value(); |
845 } | 845 } |
846 | 846 |
847 elms->set(ENUMERABLE_INDEX, Heap::ToBoolean(!result.IsDontEnum())); | 847 elms->set(ENUMERABLE_INDEX, Heap::ToBoolean(!result.IsDontEnum())); |
848 elms->set(CONFIGURABLE_INDEX, Heap::ToBoolean(!result.IsDontDelete())); | 848 elms->set(CONFIGURABLE_INDEX, Heap::ToBoolean(!result.IsDontDelete())); |
849 | 849 |
850 bool is_js_accessor = (result.type() == CALLBACKS) && | 850 bool is_js_accessor = (result.type() == CALLBACKS) && |
851 (result.GetCallbackObject()->IsFixedArray()); | 851 (result.GetCallbackObject()->IsFixedArray()); |
852 | 852 |
853 if (is_js_accessor) { | 853 if (is_js_accessor) { |
854 // __defineGetter__/__defineSetter__ callback. | 854 // __defineGetter__/__defineSetter__ callback. |
(...skipping 10175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11030 } else { | 11030 } else { |
11031 // Handle last resort GC and make sure to allow future allocations | 11031 // Handle last resort GC and make sure to allow future allocations |
11032 // to grow the heap without causing GCs (if possible). | 11032 // to grow the heap without causing GCs (if possible). |
11033 Counters::gc_last_resort_from_js.Increment(); | 11033 Counters::gc_last_resort_from_js.Increment(); |
11034 Heap::CollectAllGarbage(false); | 11034 Heap::CollectAllGarbage(false); |
11035 } | 11035 } |
11036 } | 11036 } |
11037 | 11037 |
11038 | 11038 |
11039 } } // namespace v8::internal | 11039 } } // namespace v8::internal |
OLD | NEW |