Chromium Code Reviews| Index: Source/core/rendering/RenderWidget.cpp |
| diff --git a/Source/core/rendering/RenderWidget.cpp b/Source/core/rendering/RenderWidget.cpp |
| index c4f24f2dfb41baff589d81c81a19f37d0db8240e..3f1a80056d52d87391f3282ad1118e2bcc0e0902 100644 |
| --- a/Source/core/rendering/RenderWidget.cpp |
| +++ b/Source/core/rendering/RenderWidget.cpp |
| @@ -53,8 +53,8 @@ WidgetHierarchyUpdatesSuspensionScope::WidgetToParentMap& WidgetHierarchyUpdates |
| void WidgetHierarchyUpdatesSuspensionScope::moveWidgets() |
| { |
| - WidgetToParentMap map = widgetNewParentMap(); |
| - widgetNewParentMap().clear(); |
| + WidgetToParentMap map; |
| + widgetNewParentMap().swap(map); |
|
eseidel
2013/05/23 03:12:22
This extends the lifetime of widgets in this map t
dmichael (off chromium)
2013/05/23 15:52:58
Note how the old code copies the map in line 56. T
|
| WidgetToParentMap::iterator end = map.end(); |
| for (WidgetToParentMap::iterator it = map.begin(); it != end; ++it) { |
| Widget* child = it->key.get(); |