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

Side by Side Diff: src/api.cc

Issue 11369131: Implement MarkIndependent(Isolate*) and MarkPartiallyDependent(Isolate*) (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: Created 8 years, 1 month 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 | « include/v8.h ('k') | test/cctest/test-api.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 633 matching lines...) Expand 10 before | Expand all | Expand 10 after
644 } 644 }
645 645
646 646
647 void V8::MarkIndependent(i::Object** object) { 647 void V8::MarkIndependent(i::Object** object) {
648 i::Isolate* isolate = i::Isolate::Current(); 648 i::Isolate* isolate = i::Isolate::Current();
649 LOG_API(isolate, "MarkIndependent"); 649 LOG_API(isolate, "MarkIndependent");
650 isolate->global_handles()->MarkIndependent(object); 650 isolate->global_handles()->MarkIndependent(object);
651 } 651 }
652 652
653 653
654 void V8::MarkIndependent(i::Isolate* isolate, i::Object** object) {
655 ASSERT(isolate == i::Isolate::Current());
656 LOG_API(isolate, "MarkIndependent");
657 isolate->global_handles()->MarkIndependent(object);
658 }
659
660
654 void V8::MarkPartiallyDependent(i::Object** object) { 661 void V8::MarkPartiallyDependent(i::Object** object) {
655 i::Isolate* isolate = i::Isolate::Current(); 662 i::Isolate* isolate = i::Isolate::Current();
656 LOG_API(isolate, "MarkPartiallyDependent"); 663 LOG_API(isolate, "MarkPartiallyDependent");
657 isolate->global_handles()->MarkPartiallyDependent(object); 664 isolate->global_handles()->MarkPartiallyDependent(object);
658 } 665 }
659 666
660 667
668 void V8::MarkPartiallyDependent(i::Isolate* isolate, i::Object** object) {
669 ASSERT(isolate == i::Isolate::Current());
670 LOG_API(isolate, "MarkPartiallyDependent");
671 isolate->global_handles()->MarkPartiallyDependent(object);
672 }
673
674
661 bool V8::IsGlobalIndependent(i::Object** obj) { 675 bool V8::IsGlobalIndependent(i::Object** obj) {
662 i::Isolate* isolate = i::Isolate::Current(); 676 i::Isolate* isolate = i::Isolate::Current();
663 LOG_API(isolate, "IsGlobalIndependent"); 677 LOG_API(isolate, "IsGlobalIndependent");
664 if (!isolate->IsInitialized()) return false; 678 if (!isolate->IsInitialized()) return false;
665 return i::GlobalHandles::IsIndependent(obj); 679 return i::GlobalHandles::IsIndependent(obj);
666 } 680 }
667 681
668 682
669 bool V8::IsGlobalIndependent(i::Isolate* isolate, i::Object** obj) { 683 bool V8::IsGlobalIndependent(i::Isolate* isolate, i::Object** obj) {
670 ASSERT(isolate == i::Isolate::Current()); 684 ASSERT(isolate == i::Isolate::Current());
(...skipping 5974 matching lines...) Expand 10 before | Expand all | Expand 10 after
6645 6659
6646 v->VisitPointers(blocks_.first(), first_block_limit_); 6660 v->VisitPointers(blocks_.first(), first_block_limit_);
6647 6661
6648 for (int i = 1; i < blocks_.length(); i++) { 6662 for (int i = 1; i < blocks_.length(); i++) {
6649 v->VisitPointers(blocks_[i], &blocks_[i][kHandleBlockSize]); 6663 v->VisitPointers(blocks_[i], &blocks_[i][kHandleBlockSize]);
6650 } 6664 }
6651 } 6665 }
6652 6666
6653 6667
6654 } } // namespace v8::internal 6668 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « include/v8.h ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698