Reviewers: Vitaly, zarko,

Description:
Remove unnecessary Isoalte::Current() from heap.cc
Use Heap::isolate_ instead.

Please review this at http://codereview.chromium.org/2862015/show

SVN Base: [email protected]:v8isolate/v8isolates.git

Affected files:
  M src/heap.cc


Index: src/heap.cc
diff --git a/src/heap.cc b/src/heap.cc
index cf58624ed2e5e6970d1f9b2365e9b8014b50202b..859a7a770b779bbed72bac74851839288d4b220b 100644
--- a/src/heap.cc
+++ b/src/heap.cc
@@ -301,7 +301,7 @@ void Heap::ReportStatisticsAfterGC() {


 void Heap::GarbageCollectionPrologue() {
-  Isolate::Current()->transcendental_cache()->Clear();
+  isolate_->transcendental_cache()->Clear();
   ClearJSFunctionResultCaches();
   gc_count_++;
   unflattened_strings_length_ = 0;
@@ -3765,8 +3765,7 @@ void Heap::IterateStrongRoots(ObjectVisitor* v, VisitMode mode) {
   v->VisitPointer(BitCast<Object**, String**>(&hidden_symbol_));
   v->Synchronize("symbol");

-  Isolate* isolate = Isolate::Current();
-  isolate->bootstrapper()->Iterate(v);
+  isolate_->bootstrapper()->Iterate(v);
   v->Synchronize("bootstrapper");
   Top::Iterate(v);
   v->Synchronize("top");
@@ -3781,7 +3780,7 @@ void Heap::IterateStrongRoots(ObjectVisitor* v, VisitMode mode) {
   v->Synchronize("compilationcache");

   // Iterate over local handles in handle scopes.
-  isolate->handle_scope_implementer()->Iterate(v);
+  isolate_->handle_scope_implementer()->Iterate(v);
   v->Synchronize("handlescope");

   // Iterate over the builtin code objects and code stubs in the
@@ -4164,7 +4163,7 @@ class PrintHandleVisitor: public ObjectVisitor {
 void Heap::PrintHandles() {
   PrintF("Handles:\n");
   PrintHandleVisitor v;
-  Isolate::Current()->handle_scope_implementer()->Iterate(&v);
+  isolate_->handle_scope_implementer()->Iterate(&v);
 }

 #endif


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to