OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 800 matching lines...) Loading... |
811 Handle<Smi> two(Smi::FromInt(2), isolate); | 811 Handle<Smi> two(Smi::FromInt(2), isolate); |
812 | 812 |
813 JSReceiver::SetProperty(obj, first, one, NONE, SLOPPY).Check(); | 813 JSReceiver::SetProperty(obj, first, one, NONE, SLOPPY).Check(); |
814 JSReceiver::SetProperty(obj, second, two, NONE, SLOPPY).Check(); | 814 JSReceiver::SetProperty(obj, second, two, NONE, SLOPPY).Check(); |
815 | 815 |
816 JSReceiver::SetElement(obj, 0, first, NONE, SLOPPY).Check(); | 816 JSReceiver::SetElement(obj, 0, first, NONE, SLOPPY).Check(); |
817 JSReceiver::SetElement(obj, 1, second, NONE, SLOPPY).Check(); | 817 JSReceiver::SetElement(obj, 1, second, NONE, SLOPPY).Check(); |
818 | 818 |
819 // Make the clone. | 819 // Make the clone. |
820 Handle<Object> value1, value2; | 820 Handle<Object> value1, value2; |
821 Handle<JSObject> clone = JSObject::Copy(obj); | 821 Handle<JSObject> clone = factory->CopyJSObject(obj); |
822 CHECK(!clone.is_identical_to(obj)); | 822 CHECK(!clone.is_identical_to(obj)); |
823 | 823 |
824 value1 = Object::GetElement(isolate, obj, 0).ToHandleChecked(); | 824 value1 = Object::GetElement(isolate, obj, 0).ToHandleChecked(); |
825 value2 = Object::GetElement(isolate, clone, 0).ToHandleChecked(); | 825 value2 = Object::GetElement(isolate, clone, 0).ToHandleChecked(); |
826 CHECK_EQ(*value1, *value2); | 826 CHECK_EQ(*value1, *value2); |
827 value1 = Object::GetElement(isolate, obj, 1).ToHandleChecked(); | 827 value1 = Object::GetElement(isolate, obj, 1).ToHandleChecked(); |
828 value2 = Object::GetElement(isolate, clone, 1).ToHandleChecked(); | 828 value2 = Object::GetElement(isolate, clone, 1).ToHandleChecked(); |
829 CHECK_EQ(*value1, *value2); | 829 CHECK_EQ(*value1, *value2); |
830 | 830 |
831 value1 = Object::GetProperty(obj, first).ToHandleChecked(); | 831 value1 = Object::GetProperty(obj, first).ToHandleChecked(); |
(...skipping 3382 matching lines...) Loading... |
4214 "array;"); | 4214 "array;"); |
4215 | 4215 |
4216 Handle<JSObject> o = | 4216 Handle<JSObject> o = |
4217 v8::Utils::OpenHandle(*v8::Handle<v8::Object>::Cast(result)); | 4217 v8::Utils::OpenHandle(*v8::Handle<v8::Object>::Cast(result)); |
4218 CHECK(heap->InOldPointerSpace(o->elements())); | 4218 CHECK(heap->InOldPointerSpace(o->elements())); |
4219 CHECK(heap->InOldPointerSpace(*o)); | 4219 CHECK(heap->InOldPointerSpace(*o)); |
4220 Page* page = Page::FromAddress(o->elements()->address()); | 4220 Page* page = Page::FromAddress(o->elements()->address()); |
4221 CHECK(page->WasSwept() || | 4221 CHECK(page->WasSwept() || |
4222 Marking::IsBlack(Marking::MarkBitFrom(o->elements()))); | 4222 Marking::IsBlack(Marking::MarkBitFrom(o->elements()))); |
4223 } | 4223 } |
OLD | NEW |