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

Side by Side Diff: src/api.cc

Issue 11316331: Pass Isolate to Local<T>::New() (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: Isolate argument first Created 8 years 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 751 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
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