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

Unified Diff: Source/core/inspector/InspectorCSSAgent.cpp

Issue 339133002: DevTools: Fix test inspector-protocol/stylesheet-tracking-restart.html flakiness (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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 | « LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InspectorCSSAgent.cpp
diff --git a/Source/core/inspector/InspectorCSSAgent.cpp b/Source/core/inspector/InspectorCSSAgent.cpp
index 79dfb2bbd64157ebe6d8f340a0f77bdd27a98186..ae6ebd82298d9e159a55f95a230fbda1bdebd1cb 100644
--- a/Source/core/inspector/InspectorCSSAgent.cpp
+++ b/Source/core/inspector/InspectorCSSAgent.cpp
@@ -517,16 +517,15 @@ void InspectorCSSAgent::setActiveStyleSheets(Document* document, const Vector<CS
}
HashSet<CSSStyleSheet*> removedSheets(*documentCSSStyleSheets);
-
- HashSet<CSSStyleSheet*> addedSheets;
+ Vector<CSSStyleSheet*> addedSheets;
for (Vector<CSSStyleSheet*>::const_iterator it = allSheetsVector.begin(); it != allSheetsVector.end(); ++it) {
CSSStyleSheet* cssStyleSheet = *it;
if (removedSheets.contains(cssStyleSheet)) {
removedSheets.remove(cssStyleSheet);
if (isInitialFrontendLoad)
- addedSheets.add(cssStyleSheet);
+ addedSheets.append(cssStyleSheet);
} else {
- addedSheets.add(cssStyleSheet);
+ addedSheets.append(cssStyleSheet);
}
}
@@ -543,7 +542,7 @@ void InspectorCSSAgent::setActiveStyleSheets(Document* document, const Vector<CS
}
}
- for (HashSet<CSSStyleSheet*>::iterator it = addedSheets.begin(); it != addedSheets.end(); ++it) {
+ for (Vector<CSSStyleSheet*>::iterator it = addedSheets.begin(); it != addedSheets.end(); ++it) {
CSSStyleSheet* cssStyleSheet = *it;
bool isNew = isInitialFrontendLoad || !m_cssStyleSheetToInspectorStyleSheet.contains(cssStyleSheet);
if (isNew) {
« no previous file with comments | « LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698