Title: [208200] trunk
Revision
208200
Author
ryanhad...@apple.com
Date
2016-10-31 17:27:28 -0700 (Mon, 31 Oct 2016)

Log Message

Unreviewed, rolling out r207967.

This change seems to be the cause of at least one LayoutTest
becoming flaky.

Reverted changeset:

"REGRESSION(r207753-207755): ASSERTION FAILED:
m_parsedStyleSheetCache->isInMemoryCache()"
https://bugs.webkit.org/show_bug.cgi?id=163905
http://trac.webkit.org/changeset/207967

Modified Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (208199 => 208200)


--- trunk/LayoutTests/ChangeLog	2016-11-01 00:23:29 UTC (rev 208199)
+++ trunk/LayoutTests/ChangeLog	2016-11-01 00:27:28 UTC (rev 208200)
@@ -1,3 +1,17 @@
+2016-10-31  Ryan Haddad  <ryanhad...@apple.com>
+
+        Unreviewed, rolling out r207967.
+
+        This change seems to be the cause of at least one LayoutTest
+        becoming flaky.
+
+        Reverted changeset:
+
+        "REGRESSION(r207753-207755): ASSERTION FAILED:
+        m_parsedStyleSheetCache->isInMemoryCache()"
+        https://bugs.webkit.org/show_bug.cgi?id=163905
+        http://trac.webkit.org/changeset/207967
+
 2016-10-31  Joseph Pecoraro  <pecor...@apple.com>
 
         Web Inspector: Shadow DOM scoped styles are missing

Deleted: trunk/LayoutTests/http/tests/security/cached-cross-origin-shared-css-stylesheet-expected.txt (208199 => 208200)


--- trunk/LayoutTests/http/tests/security/cached-cross-origin-shared-css-stylesheet-expected.txt	2016-11-01 00:23:29 UTC (rev 208199)
+++ trunk/LayoutTests/http/tests/security/cached-cross-origin-shared-css-stylesheet-expected.txt	2016-11-01 00:27:28 UTC (rev 208200)
@@ -1,2 +0,0 @@
-Test is passing if not crashing
-PASS

Deleted: trunk/LayoutTests/http/tests/security/cached-cross-origin-shared-css-stylesheet.html (208199 => 208200)


--- trunk/LayoutTests/http/tests/security/cached-cross-origin-shared-css-stylesheet.html	2016-11-01 00:23:29 UTC (rev 208199)
+++ trunk/LayoutTests/http/tests/security/cached-cross-origin-shared-css-stylesheet.html	2016-11-01 00:27:28 UTC (rev 208200)
@@ -1,34 +0,0 @@
-<!DOCTYPE html>
-<div>Test is passing if not crashing</div>
-<div id ="log"></div>
-<script>
-if (window.testRunner) {
-   testRunner.dumpAsText();
-   testRunner.waitUntilDone();
-}
-
-function createLinkElement(isCORS, handler)
-{
-    link = document.createElement('link');
-    link.href = ""
-    link.rel = "stylesheet";
-    link.type = "text/css";
-    if (isCORS)
-        link.crossOrigin = "use-credentials";
-    link._onload_ = handler;
-    link._onerror_ = () => { console.log("Unexpected error loading link"); }
-    return link;
-}
-
-document.body.appendChild(createLinkElement(false, function() {
-    setTimeout(function() {
-        document.body.appendChild(createLinkElement(true, function() {
-            if (window.internals)
-                internals.beginSimulatedMemoryPressure();
-            document.getElementById('log').innerHTML = "PASS";
-            if (window.testRunner)
-                testRunner.notifyDone();
-        }));
-    }, 1000);
-}));
-</script>

Modified: trunk/Source/WebCore/ChangeLog (208199 => 208200)


--- trunk/Source/WebCore/ChangeLog	2016-11-01 00:23:29 UTC (rev 208199)
+++ trunk/Source/WebCore/ChangeLog	2016-11-01 00:27:28 UTC (rev 208200)
@@ -1,3 +1,17 @@
+2016-10-31  Ryan Haddad  <ryanhad...@apple.com>
+
+        Unreviewed, rolling out r207967.
+
+        This change seems to be the cause of at least one LayoutTest
+        becoming flaky.
+
+        Reverted changeset:
+
+        "REGRESSION(r207753-207755): ASSERTION FAILED:
+        m_parsedStyleSheetCache->isInMemoryCache()"
+        https://bugs.webkit.org/show_bug.cgi?id=163905
+        http://trac.webkit.org/changeset/207967
+
 2016-10-31  Joseph Pecoraro  <pecor...@apple.com>
 
         Web Inspector: Shadow DOM scoped styles are missing

Modified: trunk/Source/WebCore/css/StyleSheetContents.cpp (208199 => 208200)


--- trunk/Source/WebCore/css/StyleSheetContents.cpp	2016-11-01 00:23:29 UTC (rev 208199)
+++ trunk/Source/WebCore/css/StyleSheetContents.cpp	2016-11-01 00:27:28 UTC (rev 208200)
@@ -63,7 +63,13 @@
     : m_ownerRule(ownerRule)
     , m_originalURL(originalURL)
     , m_defaultNamespace(starAtom)
+    , m_loadCompleted(false)
     , m_isUserStyleSheet(ownerRule && ownerRule->parentStyleSheet() && ownerRule->parentStyleSheet()->isUserStyleSheet())
+    , m_hasSyntacticallyValidCSSHeader(true)
+    , m_didLoadErrorOccur(false)
+    , m_usesStyleBasedEditability(false)
+    , m_isMutable(false)
+    , m_isInMemoryCache(false)
     , m_parserContext(context)
 {
 }
@@ -78,10 +84,13 @@
     , m_childRules(o.m_childRules.size())
     , m_namespaces(o.m_namespaces)
     , m_defaultNamespace(o.m_defaultNamespace)
+    , m_loadCompleted(true)
     , m_isUserStyleSheet(o.m_isUserStyleSheet)
-    , m_loadCompleted(true)
     , m_hasSyntacticallyValidCSSHeader(o.m_hasSyntacticallyValidCSSHeader)
+    , m_didLoadErrorOccur(false)
     , m_usesStyleBasedEditability(o.m_usesStyleBasedEditability)
+    , m_isMutable(false)
+    , m_isInMemoryCache(false)
     , m_parserContext(o.m_parserContext)
 {
     ASSERT(o.isCacheable());
@@ -523,15 +532,16 @@
 
 void StyleSheetContents::addedToMemoryCache()
 {
+    ASSERT(!m_isInMemoryCache);
     ASSERT(isCacheable());
-    ++m_inMemoryCacheCount;
+    m_isInMemoryCache = true;
 }
 
 void StyleSheetContents::removedFromMemoryCache()
 {
-    ASSERT(m_inMemoryCacheCount);
+    ASSERT(m_isInMemoryCache);
     ASSERT(isCacheable());
-    --m_inMemoryCacheCount;
+    m_isInMemoryCache = false;
 }
 
 void StyleSheetContents::shrinkToFit()

Modified: trunk/Source/WebCore/css/StyleSheetContents.h (208199 => 208200)


--- trunk/Source/WebCore/css/StyleSheetContents.h	2016-11-01 00:23:29 UTC (rev 208199)
+++ trunk/Source/WebCore/css/StyleSheetContents.h	2016-11-01 00:27:28 UTC (rev 208200)
@@ -138,7 +138,7 @@
     bool isMutable() const { return m_isMutable; }
     void setMutable() { m_isMutable = true; }
 
-    bool isInMemoryCache() const { return m_inMemoryCacheCount; }
+    bool isInMemoryCache() const { return m_isInMemoryCache; }
     void addedToMemoryCache();
     void removedFromMemoryCache();
 
@@ -162,14 +162,14 @@
     PrefixNamespaceURIMap m_namespaces;
     AtomicString m_defaultNamespace;
 
-    bool m_isUserStyleSheet;
-    bool m_loadCompleted { false };
-    bool m_hasSyntacticallyValidCSSHeader { true };
-    bool m_didLoadErrorOccur { false };
-    bool m_usesStyleBasedEditability { false };
-    bool m_isMutable { false };
-    unsigned m_inMemoryCacheCount { 0 };
-
+    bool m_loadCompleted : 1;
+    bool m_isUserStyleSheet : 1;
+    bool m_hasSyntacticallyValidCSSHeader : 1;
+    bool m_didLoadErrorOccur : 1;
+    bool m_usesStyleBasedEditability : 1;
+    bool m_isMutable : 1;
+    bool m_isInMemoryCache : 1;
+    
     CSSParserContext m_parserContext;
 
     Vector<CSSStyleSheet*> m_clients;

Modified: trunk/Source/WebCore/loader/cache/CachedCSSStyleSheet.cpp (208199 => 208200)


--- trunk/Source/WebCore/loader/cache/CachedCSSStyleSheet.cpp	2016-11-01 00:23:29 UTC (rev 208199)
+++ trunk/Source/WebCore/loader/cache/CachedCSSStyleSheet.cpp	2016-11-01 00:27:28 UTC (rev 208200)
@@ -96,8 +96,7 @@
 
     m_decoder = sheet.m_decoder;
     m_decodedSheetText = sheet.m_decodedSheetText;
-    if (sheet.m_parsedStyleSheetCache)
-        saveParsedStyleSheet(*sheet.m_parsedStyleSheetCache);
+    m_parsedStyleSheetCache = sheet.m_parsedStyleSheetCache;
 }
 
 void CachedCSSStyleSheet::finishLoading(SharedBuffer* data)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to