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

Unified Diff: third_party/WebKit/Source/core/css/StyleSheetContents.cpp

Issue 2459843002: Copy m_namespaceRules when copying StyleSheetContents to avoid crashing. (Closed)
Patch Set: Rename test, move comment Created 4 years, 1 month 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 | « third_party/WebKit/Source/core/css/StyleRuleNamespace.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/css/StyleSheetContents.cpp
diff --git a/third_party/WebKit/Source/core/css/StyleSheetContents.cpp b/third_party/WebKit/Source/core/css/StyleSheetContents.cpp
index 9eb2844a5dc381cf01e001b8939d36304f48425b..0e6397fa873fbed6093505d54431650d9a884b2d 100644
--- a/third_party/WebKit/Source/core/css/StyleSheetContents.cpp
+++ b/third_party/WebKit/Source/core/css/StyleSheetContents.cpp
@@ -92,6 +92,11 @@ StyleSheetContents::StyleSheetContents(const StyleSheetContents& o)
// FIXME: Copy import rules.
ASSERT(o.m_importRules.isEmpty());
+ for (unsigned i = 0; i < m_namespaceRules.size(); ++i) {
+ m_namespaceRules[i] =
+ static_cast<StyleRuleNamespace*>(o.m_namespaceRules[i]->copy());
+ }
+
// LazyParseCSS: Copying child rules is a strict point for lazy parsing, so
// there is no need to copy lazy parsing state here.
for (unsigned i = 0; i < m_childRules.size(); ++i)
« no previous file with comments | « third_party/WebKit/Source/core/css/StyleRuleNamespace.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698