OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
460 // Allocate the new array. We cannot use the CALL_HEAP_FUNCTION macro here, | 460 // Allocate the new array. We cannot use the CALL_HEAP_FUNCTION macro here, |
461 // because the stack-allocated CallbacksDescriptor instance is not GC safe. | 461 // because the stack-allocated CallbacksDescriptor instance is not GC safe. |
462 Handle<DescriptorArray> Factory::CopyAppendProxyDescriptor( | 462 Handle<DescriptorArray> Factory::CopyAppendProxyDescriptor( |
463 Handle<DescriptorArray> array, | 463 Handle<DescriptorArray> array, |
464 Handle<String> key, | 464 Handle<String> key, |
465 Handle<Object> value, | 465 Handle<Object> value, |
466 PropertyAttributes attributes) { | 466 PropertyAttributes attributes) { |
467 GC_GREEDY_CHECK(); | 467 GC_GREEDY_CHECK(); |
468 CallbacksDescriptor desc(*key, *value, attributes); | 468 CallbacksDescriptor desc(*key, *value, attributes); |
469 Object* obj = array->CopyInsert(&desc, REMOVE_TRANSITIONS); | 469 Object* obj = array->CopyInsert(&desc, REMOVE_TRANSITIONS); |
470 if (obj->IsRetryAfterGC()) { | 470 if (obj->IsFailure()) { |
471 CALL_GC(obj); | 471 if (obj->IsRetryAfterGC()) { |
472 CallbacksDescriptor desc(*key, *value, attributes); | 472 CALL_GC(obj); |
473 obj = array->CopyInsert(&desc, REMOVE_TRANSITIONS); | 473 CallbacksDescriptor desc(*key, *value, attributes); |
| 474 obj = array->CopyInsert(&desc, REMOVE_TRANSITIONS); |
| 475 } |
474 if (obj->IsFailure()) { | 476 if (obj->IsFailure()) { |
475 // TODO(1181417): Fix this. | 477 // TODO(1181417): Fix this. |
476 V8::FatalProcessOutOfMemory("CopyAppendProxyDescriptor"); | 478 V8::FatalProcessOutOfMemory("CopyAppendProxyDescriptor"); |
477 } | 479 } |
478 } | 480 } |
479 return Handle<DescriptorArray>(DescriptorArray::cast(obj)); | 481 return Handle<DescriptorArray>(DescriptorArray::cast(obj)); |
480 } | 482 } |
481 | 483 |
482 #undef CALL_GC | 484 #undef CALL_GC |
483 | 485 |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
802 Execution::ConfigureInstance(instance, | 804 Execution::ConfigureInstance(instance, |
803 instance_template, | 805 instance_template, |
804 pending_exception); | 806 pending_exception); |
805 } else { | 807 } else { |
806 *pending_exception = false; | 808 *pending_exception = false; |
807 } | 809 } |
808 } | 810 } |
809 | 811 |
810 | 812 |
811 } } // namespace v8::internal | 813 } } // namespace v8::internal |
OLD | NEW |