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

Side by Side Diff: src/heap.cc

Issue 174141: Do not finish GlobalHandles::PostGarbageCollectionProcessing if weak callback... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 4 months 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 if (collector == MARK_COMPACTOR && global_gc_epilogue_callback_) { 478 if (collector == MARK_COMPACTOR && global_gc_epilogue_callback_) {
479 ASSERT(!allocation_allowed_); 479 ASSERT(!allocation_allowed_);
480 global_gc_epilogue_callback_(); 480 global_gc_epilogue_callback_();
481 } 481 }
482 VerifySymbolTable(); 482 VerifySymbolTable();
483 } 483 }
484 484
485 485
486 void Heap::PostGarbageCollectionProcessing() { 486 void Heap::PostGarbageCollectionProcessing() {
487 // Process weak handles post gc. 487 // Process weak handles post gc.
488 bool old_value = allow_allocation(true);
488 GlobalHandles::PostGarbageCollectionProcessing(); 489 GlobalHandles::PostGarbageCollectionProcessing();
490 if (!old_value) allow_allocation(false);
Mads Ager (chromium) 2009/08/21 05:58:16 Just call allow_allocation with old_value?
489 // Update flat string readers. 491 // Update flat string readers.
490 FlatStringReader::PostGarbageCollectionProcessing(); 492 FlatStringReader::PostGarbageCollectionProcessing();
491 } 493 }
492 494
493 495
494 void Heap::MarkCompact(GCTracer* tracer) { 496 void Heap::MarkCompact(GCTracer* tracer) {
495 gc_state_ = MARK_COMPACT; 497 gc_state_ = MARK_COMPACT;
496 mc_count_++; 498 mc_count_++;
497 tracer->set_full_gc_count(mc_count_); 499 tracer->set_full_gc_count(mc_count_);
498 LOG(ResourceEvent("markcompact", "begin")); 500 LOG(ResourceEvent("markcompact", "begin"));
(...skipping 3416 matching lines...) Expand 10 before | Expand all | Expand 10 after
3915 #ifdef DEBUG 3917 #ifdef DEBUG
3916 bool Heap::GarbageCollectionGreedyCheck() { 3918 bool Heap::GarbageCollectionGreedyCheck() {
3917 ASSERT(FLAG_gc_greedy); 3919 ASSERT(FLAG_gc_greedy);
3918 if (Bootstrapper::IsActive()) return true; 3920 if (Bootstrapper::IsActive()) return true;
3919 if (disallow_allocation_failure()) return true; 3921 if (disallow_allocation_failure()) return true;
3920 return CollectGarbage(0, NEW_SPACE); 3922 return CollectGarbage(0, NEW_SPACE);
3921 } 3923 }
3922 #endif 3924 #endif
3923 3925
3924 } } // namespace v8::internal 3926 } } // namespace v8::internal
OLDNEW
« src/global-handles.cc ('K') | « src/global-handles.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698