| 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 3695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3706 js_object = Handle<JSObject>(JSObject::cast(js_object->GetPrototype())); | 3706 js_object = Handle<JSObject>(JSObject::cast(js_object->GetPrototype())); |
| 3707 } | 3707 } |
| 3708 NormalizeProperties(js_object, CLEAR_INOBJECT_PROPERTIES, 0); | 3708 NormalizeProperties(js_object, CLEAR_INOBJECT_PROPERTIES, 0); |
| 3709 // Use IgnoreAttributes version since a readonly property may be | 3709 // Use IgnoreAttributes version since a readonly property may be |
| 3710 // overridden and SetProperty does not allow this. | 3710 // overridden and SetProperty does not allow this. |
| 3711 return js_object->SetLocalPropertyIgnoreAttributes(*name, | 3711 return js_object->SetLocalPropertyIgnoreAttributes(*name, |
| 3712 *obj_value, | 3712 *obj_value, |
| 3713 attr); | 3713 attr); |
| 3714 } | 3714 } |
| 3715 | 3715 |
| 3716 return Runtime::SetObjectProperty(js_object, name, obj_value, attr); | 3716 return Runtime::ForceSetObjectProperty(js_object, name, obj_value, attr); |
| 3717 } | 3717 } |
| 3718 | 3718 |
| 3719 | 3719 |
| 3720 MaybeObject* Runtime::SetObjectProperty(Handle<Object> object, | 3720 MaybeObject* Runtime::SetObjectProperty(Handle<Object> object, |
| 3721 Handle<Object> key, | 3721 Handle<Object> key, |
| 3722 Handle<Object> value, | 3722 Handle<Object> value, |
| 3723 PropertyAttributes attr) { | 3723 PropertyAttributes attr) { |
| 3724 HandleScope scope; | 3724 HandleScope scope; |
| 3725 | 3725 |
| 3726 if (object->IsUndefined() || object->IsNull()) { | 3726 if (object->IsUndefined() || object->IsNull()) { |
| (...skipping 7371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11098 } else { | 11098 } else { |
| 11099 // Handle last resort GC and make sure to allow future allocations | 11099 // Handle last resort GC and make sure to allow future allocations |
| 11100 // to grow the heap without causing GCs (if possible). | 11100 // to grow the heap without causing GCs (if possible). |
| 11101 Counters::gc_last_resort_from_js.Increment(); | 11101 Counters::gc_last_resort_from_js.Increment(); |
| 11102 Heap::CollectAllGarbage(false); | 11102 Heap::CollectAllGarbage(false); |
| 11103 } | 11103 } |
| 11104 } | 11104 } |
| 11105 | 11105 |
| 11106 | 11106 |
| 11107 } } // namespace v8::internal | 11107 } } // namespace v8::internal |
| OLD | NEW |