| OLD | NEW |
| 1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 6774 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6785 // The property was not found. It needs to be stored in the global context. | 6785 // The property was not found. It needs to be stored in the global context. |
| 6786 ASSERT(attributes == ABSENT); | 6786 ASSERT(attributes == ABSENT); |
| 6787 attributes = NONE; | 6787 attributes = NONE; |
| 6788 context_ext = Handle<JSObject>(Top::context()->global()); | 6788 context_ext = Handle<JSObject>(Top::context()->global()); |
| 6789 } | 6789 } |
| 6790 | 6790 |
| 6791 // Set the property, but ignore if read_only variable on the context | 6791 // Set the property, but ignore if read_only variable on the context |
| 6792 // extension object itself. | 6792 // extension object itself. |
| 6793 if ((attributes & READ_ONLY) == 0 || | 6793 if ((attributes & READ_ONLY) == 0 || |
| 6794 (context_ext->GetLocalPropertyAttribute(*name) == ABSENT)) { | 6794 (context_ext->GetLocalPropertyAttribute(*name) == ABSENT)) { |
| 6795 Handle<Object> set = SetProperty(context_ext, name, value, attributes); | 6795 Handle<Object> set = SetProperty(context_ext, name, value, NONE); |
| 6796 if (set.is_null()) { | 6796 if (set.is_null()) { |
| 6797 // Failure::Exception is converted to a null handle in the | 6797 // Failure::Exception is converted to a null handle in the |
| 6798 // handle-based methods such as SetProperty. We therefore need | 6798 // handle-based methods such as SetProperty. We therefore need |
| 6799 // to convert null handles back to exceptions. | 6799 // to convert null handles back to exceptions. |
| 6800 ASSERT(Top::has_pending_exception()); | 6800 ASSERT(Top::has_pending_exception()); |
| 6801 return Failure::Exception(); | 6801 return Failure::Exception(); |
| 6802 } | 6802 } |
| 6803 } | 6803 } |
| 6804 return *value; | 6804 return *value; |
| 6805 } | 6805 } |
| (...skipping 3519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10325 } else { | 10325 } else { |
| 10326 // Handle last resort GC and make sure to allow future allocations | 10326 // Handle last resort GC and make sure to allow future allocations |
| 10327 // to grow the heap without causing GCs (if possible). | 10327 // to grow the heap without causing GCs (if possible). |
| 10328 Counters::gc_last_resort_from_js.Increment(); | 10328 Counters::gc_last_resort_from_js.Increment(); |
| 10329 Heap::CollectAllGarbage(false); | 10329 Heap::CollectAllGarbage(false); |
| 10330 } | 10330 } |
| 10331 } | 10331 } |
| 10332 | 10332 |
| 10333 | 10333 |
| 10334 } } // namespace v8::internal | 10334 } } // namespace v8::internal |
| OLD | NEW |