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

Unified Diff: third_party/WebKit/Source/core/css/StyleRuleNamespace.h

Issue 2459843002: Copy m_namespaceRules when copying StyleSheetContents to avoid crashing. (Closed)
Patch Set: Created 4 years, 2 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
Index: third_party/WebKit/Source/core/css/StyleRuleNamespace.h
diff --git a/third_party/WebKit/Source/core/css/StyleRuleNamespace.h b/third_party/WebKit/Source/core/css/StyleRuleNamespace.h
index dd3d031c60c4a80ed5e1b9c3ed2e936d286ba46a..ada5d52c4c1f5516f3b0a21b29037873a1428d05 100644
--- a/third_party/WebKit/Source/core/css/StyleRuleNamespace.h
+++ b/third_party/WebKit/Source/core/css/StyleRuleNamespace.h
@@ -17,8 +17,15 @@ class StyleRuleNamespace final : public StyleRuleBase {
return new StyleRuleNamespace(prefix, uri);
}
+ StyleRuleNamespace* copy() const {
+ return new StyleRuleNamespace(m_prefix, m_uri);
+ }
+
AtomicString prefix() const { return m_prefix; }
- AtomicString uri() const { return m_uri; }
+ AtomicString uri() const {
+ DCHECK(!m_uri.isHashTableDeletedValue());
+ return m_uri;
+ }
DEFINE_INLINE_TRACE_AFTER_DISPATCH() {
StyleRuleBase::traceAfterDispatch(visitor);

Powered by Google App Engine
This is Rietveld 408576698