Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(844)

Side by Side Diff: test/cctest/test-heap.cc

Issue 854493004: Remove ForceDelete (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/cctest/test-api.cc ('k') | test/cctest/test-object-observe.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 632 matching lines...) Expand 10 before | Expand all | Expand 10 after
643 CHECK(maybe.has_value); 643 CHECK(maybe.has_value);
644 CHECK(!maybe.value); 644 CHECK(!maybe.value);
645 645
646 // add first 646 // add first
647 JSReceiver::SetProperty(obj, first, one, SLOPPY).Check(); 647 JSReceiver::SetProperty(obj, first, one, SLOPPY).Check();
648 maybe = JSReceiver::HasOwnProperty(obj, first); 648 maybe = JSReceiver::HasOwnProperty(obj, first);
649 CHECK(maybe.has_value); 649 CHECK(maybe.has_value);
650 CHECK(maybe.value); 650 CHECK(maybe.value);
651 651
652 // delete first 652 // delete first
653 JSReceiver::DeleteProperty(obj, first, JSReceiver::NORMAL_DELETION).Check(); 653 JSReceiver::DeleteProperty(obj, first, SLOPPY).Check();
654 maybe = JSReceiver::HasOwnProperty(obj, first); 654 maybe = JSReceiver::HasOwnProperty(obj, first);
655 CHECK(maybe.has_value); 655 CHECK(maybe.has_value);
656 CHECK(!maybe.value); 656 CHECK(!maybe.value);
657 657
658 // add first and then second 658 // add first and then second
659 JSReceiver::SetProperty(obj, first, one, SLOPPY).Check(); 659 JSReceiver::SetProperty(obj, first, one, SLOPPY).Check();
660 JSReceiver::SetProperty(obj, second, two, SLOPPY).Check(); 660 JSReceiver::SetProperty(obj, second, two, SLOPPY).Check();
661 maybe = JSReceiver::HasOwnProperty(obj, first); 661 maybe = JSReceiver::HasOwnProperty(obj, first);
662 CHECK(maybe.has_value); 662 CHECK(maybe.has_value);
663 CHECK(maybe.value); 663 CHECK(maybe.value);
664 maybe = JSReceiver::HasOwnProperty(obj, second); 664 maybe = JSReceiver::HasOwnProperty(obj, second);
665 CHECK(maybe.has_value); 665 CHECK(maybe.has_value);
666 CHECK(maybe.value); 666 CHECK(maybe.value);
667 667
668 // delete first and then second 668 // delete first and then second
669 JSReceiver::DeleteProperty(obj, first, JSReceiver::NORMAL_DELETION).Check(); 669 JSReceiver::DeleteProperty(obj, first, SLOPPY).Check();
670 maybe = JSReceiver::HasOwnProperty(obj, second); 670 maybe = JSReceiver::HasOwnProperty(obj, second);
671 CHECK(maybe.has_value); 671 CHECK(maybe.has_value);
672 CHECK(maybe.value); 672 CHECK(maybe.value);
673 JSReceiver::DeleteProperty(obj, second, JSReceiver::NORMAL_DELETION).Check(); 673 JSReceiver::DeleteProperty(obj, second, SLOPPY).Check();
674 maybe = JSReceiver::HasOwnProperty(obj, first); 674 maybe = JSReceiver::HasOwnProperty(obj, first);
675 CHECK(maybe.has_value); 675 CHECK(maybe.has_value);
676 CHECK(!maybe.value); 676 CHECK(!maybe.value);
677 maybe = JSReceiver::HasOwnProperty(obj, second); 677 maybe = JSReceiver::HasOwnProperty(obj, second);
678 CHECK(maybe.has_value); 678 CHECK(maybe.has_value);
679 CHECK(!maybe.value); 679 CHECK(!maybe.value);
680 680
681 // add first and then second 681 // add first and then second
682 JSReceiver::SetProperty(obj, first, one, SLOPPY).Check(); 682 JSReceiver::SetProperty(obj, first, one, SLOPPY).Check();
683 JSReceiver::SetProperty(obj, second, two, SLOPPY).Check(); 683 JSReceiver::SetProperty(obj, second, two, SLOPPY).Check();
684 maybe = JSReceiver::HasOwnProperty(obj, first); 684 maybe = JSReceiver::HasOwnProperty(obj, first);
685 CHECK(maybe.has_value); 685 CHECK(maybe.has_value);
686 CHECK(maybe.value); 686 CHECK(maybe.value);
687 maybe = JSReceiver::HasOwnProperty(obj, second); 687 maybe = JSReceiver::HasOwnProperty(obj, second);
688 CHECK(maybe.has_value); 688 CHECK(maybe.has_value);
689 CHECK(maybe.value); 689 CHECK(maybe.value);
690 690
691 // delete second and then first 691 // delete second and then first
692 JSReceiver::DeleteProperty(obj, second, JSReceiver::NORMAL_DELETION).Check(); 692 JSReceiver::DeleteProperty(obj, second, SLOPPY).Check();
693 maybe = JSReceiver::HasOwnProperty(obj, first); 693 maybe = JSReceiver::HasOwnProperty(obj, first);
694 CHECK(maybe.has_value); 694 CHECK(maybe.has_value);
695 CHECK(maybe.value); 695 CHECK(maybe.value);
696 JSReceiver::DeleteProperty(obj, first, JSReceiver::NORMAL_DELETION).Check(); 696 JSReceiver::DeleteProperty(obj, first, SLOPPY).Check();
697 maybe = JSReceiver::HasOwnProperty(obj, first); 697 maybe = JSReceiver::HasOwnProperty(obj, first);
698 CHECK(maybe.has_value); 698 CHECK(maybe.has_value);
699 CHECK(!maybe.value); 699 CHECK(!maybe.value);
700 maybe = JSReceiver::HasOwnProperty(obj, second); 700 maybe = JSReceiver::HasOwnProperty(obj, second);
701 CHECK(maybe.has_value); 701 CHECK(maybe.has_value);
702 CHECK(!maybe.value); 702 CHECK(!maybe.value);
703 703
704 // check string and internalized string match 704 // check string and internalized string match
705 const char* string1 = "fisk"; 705 const char* string1 = "fisk";
706 Handle<String> s1 = factory->NewStringFromAsciiChecked(string1); 706 Handle<String> s1 = factory->NewStringFromAsciiChecked(string1);
(...skipping 4385 matching lines...) Expand 10 before | Expand all | Expand 10 after
5092 #ifdef DEBUG 5092 #ifdef DEBUG
5093 TEST(PathTracer) { 5093 TEST(PathTracer) {
5094 CcTest::InitializeVM(); 5094 CcTest::InitializeVM();
5095 v8::HandleScope scope(CcTest::isolate()); 5095 v8::HandleScope scope(CcTest::isolate());
5096 5096
5097 v8::Local<v8::Value> result = CompileRun("'abc'"); 5097 v8::Local<v8::Value> result = CompileRun("'abc'");
5098 Handle<Object> o = v8::Utils::OpenHandle(*result); 5098 Handle<Object> o = v8::Utils::OpenHandle(*result);
5099 CcTest::i_isolate()->heap()->TracePathToObject(*o); 5099 CcTest::i_isolate()->heap()->TracePathToObject(*o);
5100 } 5100 }
5101 #endif // DEBUG 5101 #endif // DEBUG
OLDNEW
« no previous file with comments | « test/cctest/test-api.cc ('k') | test/cctest/test-object-observe.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698