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 751 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
762 i::Isolate::Current(), "HandleScope::NumberOfHandles"); | 762 i::Isolate::Current(), "HandleScope::NumberOfHandles"); |
763 return i::HandleScope::NumberOfHandles(); | 763 return i::HandleScope::NumberOfHandles(); |
764 } | 764 } |
765 | 765 |
766 | 766 |
767 i::Object** HandleScope::CreateHandle(i::Object* value) { | 767 i::Object** HandleScope::CreateHandle(i::Object* value) { |
768 return i::HandleScope::CreateHandle(value, i::Isolate::Current()); | 768 return i::HandleScope::CreateHandle(value, i::Isolate::Current()); |
769 } | 769 } |
770 | 770 |
771 | 771 |
| 772 i::Object** HandleScope::CreateHandle(i::Isolate* isolate, i::Object* value) { |
| 773 ASSERT(isolate == i::Isolate::Current()); |
| 774 return i::HandleScope::CreateHandle(value, isolate); |
| 775 } |
| 776 |
| 777 |
772 i::Object** HandleScope::CreateHandle(i::HeapObject* value) { | 778 i::Object** HandleScope::CreateHandle(i::HeapObject* value) { |
773 ASSERT(value->IsHeapObject()); | 779 ASSERT(value->IsHeapObject()); |
774 return reinterpret_cast<i::Object**>( | 780 return reinterpret_cast<i::Object**>( |
775 i::HandleScope::CreateHandle(value, value->GetIsolate())); | 781 i::HandleScope::CreateHandle(value, value->GetIsolate())); |
776 } | 782 } |
777 | 783 |
778 | 784 |
779 void Context::Enter() { | 785 void Context::Enter() { |
780 i::Handle<i::Context> env = Utils::OpenHandle(this); | 786 i::Handle<i::Context> env = Utils::OpenHandle(this); |
781 i::Isolate* isolate = env->GetIsolate(); | 787 i::Isolate* isolate = env->GetIsolate(); |
(...skipping 5891 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6673 | 6679 |
6674 v->VisitPointers(blocks_.first(), first_block_limit_); | 6680 v->VisitPointers(blocks_.first(), first_block_limit_); |
6675 | 6681 |
6676 for (int i = 1; i < blocks_.length(); i++) { | 6682 for (int i = 1; i < blocks_.length(); i++) { |
6677 v->VisitPointers(blocks_[i], &blocks_[i][kHandleBlockSize]); | 6683 v->VisitPointers(blocks_[i], &blocks_[i][kHandleBlockSize]); |
6678 } | 6684 } |
6679 } | 6685 } |
6680 | 6686 |
6681 | 6687 |
6682 } } // namespace v8::internal | 6688 } } // namespace v8::internal |
OLD | NEW |