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

Unified Diff: third_party/WebKit/Source/core/loader/resource/CSSStyleSheetResource.cpp

Issue 2616093003: Make CSSParserContext be garbage collected. (Closed)
Patch Set: fix fuzzer compile Created 3 years, 11 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/loader/resource/CSSStyleSheetResource.cpp
diff --git a/third_party/WebKit/Source/core/loader/resource/CSSStyleSheetResource.cpp b/third_party/WebKit/Source/core/loader/resource/CSSStyleSheetResource.cpp
index 41dea66b4356d384e1a6e69a1ae06e87d179a913..d5e893084504e69714e6e356109dc0f5ff630027 100644
--- a/third_party/WebKit/Source/core/loader/resource/CSSStyleSheetResource.cpp
+++ b/third_party/WebKit/Source/core/loader/resource/CSSStyleSheetResource.cpp
@@ -186,7 +186,7 @@ bool CSSStyleSheetResource::canUseSheet(MIMETypeCheck mimeTypeCheck) const {
}
StyleSheetContents* CSSStyleSheetResource::restoreParsedStyleSheet(
- const CSSParserContext& context) {
+ const CSSParserContext* context) {
if (!m_parsedStyleSheetCache)
return nullptr;
if (m_parsedStyleSheetCache->hasFailedOrCanceledSubresources()) {
@@ -199,7 +199,7 @@ StyleSheetContents* CSSStyleSheetResource::restoreParsedStyleSheet(
// Contexts must be identical so we know we would get the same exact result if
// we parsed again.
- if (m_parsedStyleSheetCache->parserContext() != context)
+ if (*(m_parsedStyleSheetCache->parserContext()) != *context)
rune 2017/01/11 12:59:26 I don't think you need parentheses here. *a->b() i
Bret 2017/01/11 23:05:15 Done.
return nullptr;
return m_parsedStyleSheetCache;

Powered by Google App Engine
This is Rietveld 408576698