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 3878 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3889 PropertyDetails details = PropertyDetails(attr, NORMAL); | 3889 PropertyDetails details = PropertyDetails(attr, NORMAL); |
3890 Handle<NumberDictionary> extended_dictionary = | 3890 Handle<NumberDictionary> extended_dictionary = |
3891 NumberDictionarySet(dictionary, index, obj_value, details); | 3891 NumberDictionarySet(dictionary, index, obj_value, details); |
3892 if (*extended_dictionary != *dictionary) { | 3892 if (*extended_dictionary != *dictionary) { |
3893 js_object->set_elements(*extended_dictionary); | 3893 js_object->set_elements(*extended_dictionary); |
3894 } | 3894 } |
3895 return *obj_value; | 3895 return *obj_value; |
3896 } | 3896 } |
3897 | 3897 |
3898 LookupResult result; | 3898 LookupResult result; |
3899 js_object->LookupRealNamedProperty(*name, &result); | 3899 js_object->LocalLookupRealNamedProperty(*name, &result); |
3900 | 3900 |
3901 // To be compatible with safari we do not change the value on API objects | 3901 // To be compatible with safari we do not change the value on API objects |
3902 // in defineProperty. Firefox disagrees here, and actually changes the value. | 3902 // in defineProperty. Firefox disagrees here, and actually changes the value. |
3903 if (result.IsProperty() && | 3903 if (result.IsProperty() && |
3904 (result.type() == CALLBACKS) && | 3904 (result.type() == CALLBACKS) && |
3905 result.GetCallbackObject()->IsAccessorInfo()) { | 3905 result.GetCallbackObject()->IsAccessorInfo()) { |
3906 return isolate->heap()->undefined_value(); | 3906 return isolate->heap()->undefined_value(); |
3907 } | 3907 } |
3908 | 3908 |
3909 // Take special care when attributes are different and there is already | 3909 // Take special care when attributes are different and there is already |
(...skipping 8465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12375 } else { | 12375 } else { |
12376 // Handle last resort GC and make sure to allow future allocations | 12376 // Handle last resort GC and make sure to allow future allocations |
12377 // to grow the heap without causing GCs (if possible). | 12377 // to grow the heap without causing GCs (if possible). |
12378 isolate->counters()->gc_last_resort_from_js()->Increment(); | 12378 isolate->counters()->gc_last_resort_from_js()->Increment(); |
12379 isolate->heap()->CollectAllGarbage(false); | 12379 isolate->heap()->CollectAllGarbage(false); |
12380 } | 12380 } |
12381 } | 12381 } |
12382 | 12382 |
12383 | 12383 |
12384 } } // namespace v8::internal | 12384 } } // namespace v8::internal |
OLD | NEW |