Index: src/debug.cc |
=================================================================== |
--- src/debug.cc (revision 7102) |
+++ src/debug.cc (working copy) |
@@ -1875,8 +1875,8 @@ |
// Perform two GCs to get rid of all unreferenced scripts. The first GC gets |
// rid of all the cached script wrappers and the second gets rid of the |
// scripts which are no longer referenced. |
Vyacheslav Egorov (Chromium)
2011/03/15 09:20:09
Comment is outdated add more about precise sweepin
Erik Corry
2011/03/17 13:39:17
Done.
|
- Heap::CollectAllGarbage(false); |
- Heap::CollectAllGarbage(false); |
+ Heap::CollectAllGarbage(Heap::kNoGCFlags); |
+ Heap::CollectAllGarbage(Heap::kSweepPreciselyMask); |
ASSERT(script_cache_ == NULL); |
script_cache_ = new ScriptCache(); |
@@ -1884,7 +1884,7 @@ |
// Scan heap for Script objects. |
int count = 0; |
HeapIterator iterator; |
- for (HeapObject* obj = iterator.next(); obj != NULL; obj = iterator.next()) { |
+ for (HeapObject* obj = iterator.Next(); obj != NULL; obj = iterator.Next()) { |
if (obj->IsScript() && Script::cast(obj)->HasValidSource()) { |
script_cache_->Add(Handle<Script>(Script::cast(obj))); |
count++; |
@@ -1924,7 +1924,7 @@ |
// Perform GC to get unreferenced scripts evicted from the cache before |
// returning the content. |
- Heap::CollectAllGarbage(false); |
+ Heap::CollectAllGarbage(Heap::kNoGCFlags); |
// Get the scripts from the cache. |
return script_cache_->GetScripts(); |