Index: base/observer_list.h |
diff --git a/base/observer_list.h b/base/observer_list.h |
index b44e33f56c73f4e2a749436a13be8241518a307d..bd1dc64055b4df3af4eeb9441e35afd02e109e39 100644 |
--- a/base/observer_list.h |
+++ b/base/observer_list.h |
@@ -203,14 +203,15 @@ class ObserverList : public ObserverListBase<ObserverType> { |
} |
}; |
-#define FOR_EACH_OBSERVER(ObserverType, observer_list, func) \ |
- do { \ |
- if ((observer_list).might_have_observers()) { \ |
- ObserverListBase<ObserverType>::Iterator it(observer_list); \ |
- ObserverType* obs; \ |
- while ((obs = it.GetNext()) != NULL) \ |
- obs->func; \ |
- } \ |
+#define FOR_EACH_OBSERVER(ObserverType, observer_list, func) \ |
+ do { \ |
+ if ((observer_list).might_have_observers()) { \ |
+ ObserverListBase<ObserverType>::Iterator \ |
+ it_inside_observer_macro(observer_list); \ |
+ ObserverType* obs; \ |
+ while ((obs = it_inside_observer_macro.GetNext()) != NULL) \ |
+ obs->func; \ |
+ } \ |
} while (0) |
#endif // BASE_OBSERVER_LIST_H__ |