OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 5617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5628 isolate->StackOverflow(); | 5628 isolate->StackOverflow(); |
5629 return Handle<JSObject>::null(); | 5629 return Handle<JSObject>::null(); |
5630 } | 5630 } |
5631 | 5631 |
5632 if (object->map()->is_deprecated()) { | 5632 if (object->map()->is_deprecated()) { |
5633 MigrateInstance(object); | 5633 MigrateInstance(object); |
5634 } | 5634 } |
5635 | 5635 |
5636 Handle<JSObject> copy = Copy(object); | 5636 Handle<JSObject> copy = Copy(object); |
5637 | 5637 |
| 5638 HandleScope scope(isolate); |
| 5639 |
5638 // Deep copy local properties. | 5640 // Deep copy local properties. |
5639 if (copy->HasFastProperties()) { | 5641 if (copy->HasFastProperties()) { |
5640 Handle<DescriptorArray> descriptors(copy->map()->instance_descriptors()); | 5642 Handle<DescriptorArray> descriptors(copy->map()->instance_descriptors()); |
5641 int limit = copy->map()->NumberOfOwnDescriptors(); | 5643 int limit = copy->map()->NumberOfOwnDescriptors(); |
5642 for (int i = 0; i < limit; i++) { | 5644 for (int i = 0; i < limit; i++) { |
5643 PropertyDetails details = descriptors->GetDetails(i); | 5645 PropertyDetails details = descriptors->GetDetails(i); |
5644 if (details.type() != FIELD) continue; | 5646 if (details.type() != FIELD) continue; |
5645 int index = descriptors->GetFieldIndex(i); | 5647 int index = descriptors->GetFieldIndex(i); |
5646 Handle<Object> value(object->RawFastPropertyAt(index), isolate); | 5648 Handle<Object> value(object->RawFastPropertyAt(index), isolate); |
5647 if (value->IsJSObject()) { | 5649 if (value->IsJSObject()) { |
(...skipping 10494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
16142 #define ERROR_MESSAGES_TEXTS(C, T) T, | 16144 #define ERROR_MESSAGES_TEXTS(C, T) T, |
16143 static const char* error_messages_[] = { | 16145 static const char* error_messages_[] = { |
16144 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) | 16146 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) |
16145 }; | 16147 }; |
16146 #undef ERROR_MESSAGES_TEXTS | 16148 #undef ERROR_MESSAGES_TEXTS |
16147 return error_messages_[reason]; | 16149 return error_messages_[reason]; |
16148 } | 16150 } |
16149 | 16151 |
16150 | 16152 |
16151 } } // namespace v8::internal | 16153 } } // namespace v8::internal |
OLD | NEW |