Changeset 208279 in webkit
- Timestamp:
- Nov 2, 2016 6:18:46 AM (7 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r208277 r208279 1 2016-11-02 Youenn Fablet <youenn@apple.com> 2 3 REGRESSION(r207753-207755): ASSERTION FAILED: m_parsedStyleSheetCache->isInMemoryCache() 4 https://bugs.webkit.org/show_bug.cgi?id=163905 5 6 Reviewed by Antti Koivisto. 7 8 * http/tests/security/cached-cross-origin-shared-css-stylesheet-expected.txt: Added. 9 * http/tests/security/cached-cross-origin-shared-css-stylesheet.html: Added. 10 1 11 2016-11-02 Manuel Rego Casasnovas <rego@igalia.com> 2 12 -
trunk/Source/WebCore/ChangeLog
r208278 r208279 1 2016-11-02 Youenn Fablet <youenn@apple.com> 2 3 REGRESSION(r207753-207755): ASSERTION FAILED: m_parsedStyleSheetCache->isInMemoryCache() 4 https://bugs.webkit.org/show_bug.cgi?id=163905 5 6 Reviewed by Antti Koivisto. 7 8 Covered by existing tests and http/tests/security/cached-cross-origin-shared-css-stylesheet.html 9 10 Small refactoring to do more member fields initialization in StyleSheetContents header. 11 Refactored StyleSheetContents::m_isInMemoryCache to be a counter instead of a boolean. 12 This allows StyleSheetContents to be linked to several CachedCSSStyleSheets. 13 14 * css/StyleSheetContents.cpp: 15 (WebCore::StyleSheetContents::StyleSheetContents): 16 (WebCore::StyleSheetContents::addedToMemoryCache): 17 (WebCore::StyleSheetContents::removedFromMemoryCache): 18 * css/StyleSheetContents.h: 19 * loader/cache/CachedCSSStyleSheet.cpp: 20 (WebCore::CachedCSSStyleSheet::setBodyDataFrom): Making reuse of saveParsedStyleSheet to handle update of StyleSheetContents cache count. 21 1 22 2016-11-02 Carlos Garcia Campos <cgarcia@igalia.com> 2 23 -
trunk/Source/WebCore/css/StyleSheetContents.cpp
r208200 r208279 64 64 , m_originalURL(originalURL) 65 65 , m_defaultNamespace(starAtom) 66 , m_loadCompleted(false)67 66 , m_isUserStyleSheet(ownerRule && ownerRule->parentStyleSheet() && ownerRule->parentStyleSheet()->isUserStyleSheet()) 68 , m_hasSyntacticallyValidCSSHeader(true)69 , m_didLoadErrorOccur(false)70 , m_usesStyleBasedEditability(false)71 , m_isMutable(false)72 , m_isInMemoryCache(false)73 67 , m_parserContext(context) 74 68 { … … 85 79 , m_namespaces(o.m_namespaces) 86 80 , m_defaultNamespace(o.m_defaultNamespace) 81 , m_isUserStyleSheet(o.m_isUserStyleSheet) 87 82 , m_loadCompleted(true) 88 , m_isUserStyleSheet(o.m_isUserStyleSheet)89 83 , m_hasSyntacticallyValidCSSHeader(o.m_hasSyntacticallyValidCSSHeader) 90 , m_didLoadErrorOccur(false)91 84 , m_usesStyleBasedEditability(o.m_usesStyleBasedEditability) 92 , m_isMutable(false)93 , m_isInMemoryCache(false)94 85 , m_parserContext(o.m_parserContext) 95 86 { … … 533 524 void StyleSheetContents::addedToMemoryCache() 534 525 { 535 ASSERT(!m_isInMemoryCache);536 526 ASSERT(isCacheable()); 537 m_isInMemoryCache = true;527 ++m_inMemoryCacheCount; 538 528 } 539 529 540 530 void StyleSheetContents::removedFromMemoryCache() 541 531 { 542 ASSERT(m_i sInMemoryCache);532 ASSERT(m_inMemoryCacheCount); 543 533 ASSERT(isCacheable()); 544 m_isInMemoryCache = false;534 --m_inMemoryCacheCount; 545 535 } 546 536 -
trunk/Source/WebCore/css/StyleSheetContents.h
r208200 r208279 139 139 void setMutable() { m_isMutable = true; } 140 140 141 bool isInMemoryCache() const { return m_i sInMemoryCache; }141 bool isInMemoryCache() const { return m_inMemoryCacheCount; } 142 142 void addedToMemoryCache(); 143 143 void removedFromMemoryCache(); … … 163 163 AtomicString m_defaultNamespace; 164 164 165 bool m_ loadCompleted : 1;166 bool m_ isUserStyleSheet : 1;167 bool m_hasSyntacticallyValidCSSHeader : 1;168 bool m_didLoadErrorOccur : 1;169 bool m_usesStyleBasedEditability : 1;170 bool m_isMutable : 1;171 bool m_isInMemoryCache : 1;172 165 bool m_isUserStyleSheet; 166 bool m_loadCompleted { false }; 167 bool m_hasSyntacticallyValidCSSHeader { true }; 168 bool m_didLoadErrorOccur { false }; 169 bool m_usesStyleBasedEditability { false }; 170 bool m_isMutable { false }; 171 unsigned m_inMemoryCacheCount { 0 }; 172 173 173 CSSParserContext m_parserContext; 174 174 -
trunk/Source/WebCore/loader/cache/CachedCSSStyleSheet.cpp
r208200 r208279 97 97 m_decoder = sheet.m_decoder; 98 98 m_decodedSheetText = sheet.m_decodedSheetText; 99 m_parsedStyleSheetCache = sheet.m_parsedStyleSheetCache; 99 if (sheet.m_parsedStyleSheetCache) 100 saveParsedStyleSheet(*sheet.m_parsedStyleSheetCache); 100 101 } 101 102
Note: See TracChangeset
for help on using the changeset viewer.