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

Unified Diff: runtime/vm/gc_marker.cc

Issue 148263011: Revert r32064, r32064 to fix Windows build. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/gc_marker.cc
===================================================================
--- runtime/vm/gc_marker.cc (revision 32064)
+++ runtime/vm/gc_marker.cc (working copy)
@@ -6,7 +6,6 @@
#include <map>
#include <utility>
-#include <vector>
#include "vm/allocation.h"
#include "vm/dart_api_state.h"
@@ -160,7 +159,7 @@
ASSERT(!raw_key->IsWatched());
raw_key->SetWatchedBit();
}
- delay_set_.insert(DelaySet::value_type(raw_key, raw_weak));
+ delay_set_.insert(std::make_pair(raw_key, raw_weak));
}
void Finalize() {
@@ -194,14 +193,10 @@
std::pair<DelaySet::iterator, DelaySet::iterator> ret;
// Visit all elements with a key equal to raw_obj.
ret = delay_set_.equal_range(raw_obj);
- // Create a copy of the range in a temporary vector to iterate over it
- // while delay_set_ may be modified.
- std::vector<DelaySet::value_type> temp_copy(ret.first, ret.second);
- delay_set_.erase(ret.first, ret.second);
- for (std::vector<DelaySet::value_type>::iterator it = temp_copy.begin();
- it != temp_copy.end(); ++it) {
+ for (DelaySet::iterator it = ret.first; it != ret.second; ++it) {
it->second->VisitPointers(this);
}
+ delay_set_.erase(ret.first, ret.second);
raw_obj->ClearWatchedBit();
}
marking_stack_->Push(raw_obj);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698