Title: [259367] trunk/Source/WebCore
- Revision
- 259367
- Author
- cdu...@apple.com
- Date
- 2020-04-01 15:32:39 -0700 (Wed, 01 Apr 2020)
Log Message
http/tests/navigation/page-cache-fontfaceset.html is flaky crashing
https://bugs.webkit.org/show_bug.cgi?id=209881
<rdar://problem/61114827>
Reviewed by Darin Adler.
Make sure CSSFontSelector::m_beginLoadingTimer uses a SuspendableTimer instead of a regular
timer so that it cannot fire while in the back/forward cache and start a load.
No new tests, covered by existing test.
* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::CSSFontSelector):
(WebCore::CSSFontSelector::clearDocument):
* css/CSSFontSelector.h:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (259366 => 259367)
--- trunk/Source/WebCore/ChangeLog 2020-04-01 22:29:21 UTC (rev 259366)
+++ trunk/Source/WebCore/ChangeLog 2020-04-01 22:32:39 UTC (rev 259367)
@@ -1,5 +1,23 @@
2020-04-01 Chris Dumez <cdu...@apple.com>
+ http/tests/navigation/page-cache-fontfaceset.html is flaky crashing
+ https://bugs.webkit.org/show_bug.cgi?id=209881
+ <rdar://problem/61114827>
+
+ Reviewed by Darin Adler.
+
+ Make sure CSSFontSelector::m_beginLoadingTimer uses a SuspendableTimer instead of a regular
+ timer so that it cannot fire while in the back/forward cache and start a load.
+
+ No new tests, covered by existing test.
+
+ * css/CSSFontSelector.cpp:
+ (WebCore::CSSFontSelector::CSSFontSelector):
+ (WebCore::CSSFontSelector::clearDocument):
+ * css/CSSFontSelector.h:
+
+2020-04-01 Chris Dumez <cdu...@apple.com>
+
ASSERTION FAILED: m_wrapper on webgl/max-active-contexts-webglcontextlost-prevent-default.html
https://bugs.webkit.org/show_bug.cgi?id=209863
<rdar://problem/61164936>
Modified: trunk/Source/WebCore/css/CSSFontSelector.cpp (259366 => 259367)
--- trunk/Source/WebCore/css/CSSFontSelector.cpp 2020-04-01 22:29:21 UTC (rev 259366)
+++ trunk/Source/WebCore/css/CSSFontSelector.cpp 2020-04-01 22:32:39 UTC (rev 259367)
@@ -64,7 +64,7 @@
CSSFontSelector::CSSFontSelector(Document& document)
: m_document(makeWeakPtr(document))
, m_cssFontFaceSet(CSSFontFaceSet::create(this))
- , m_beginLoadingTimer(*this, &CSSFontSelector::beginLoadTimerFired)
+ , m_beginLoadingTimer(&document, *this, &CSSFontSelector::beginLoadTimerFired)
, m_uniqueId(++fontSelectorId)
, m_version(0)
{
@@ -72,6 +72,8 @@
FontCache::singleton().addClient(*this);
m_cssFontFaceSet->addClient(*this);
LOG(Fonts, "CSSFontSelector %p ctor", this);
+
+ m_beginLoadingTimer.suspendIfNeeded();
}
CSSFontSelector::~CSSFontSelector()
@@ -336,7 +338,7 @@
return;
}
- m_beginLoadingTimer.stop();
+ m_beginLoadingTimer.cancel();
CachedResourceLoader& cachedResourceLoader = m_document->cachedResourceLoader();
for (auto& fontHandle : m_fontsToBeginLoading) {
Modified: trunk/Source/WebCore/css/CSSFontSelector.h (259366 => 259367)
--- trunk/Source/WebCore/css/CSSFontSelector.h 2020-04-01 22:29:21 UTC (rev 259366)
+++ trunk/Source/WebCore/css/CSSFontSelector.h 2020-04-01 22:32:39 UTC (rev 259367)
@@ -30,7 +30,7 @@
#include "CachedResourceHandle.h"
#include "Font.h"
#include "FontSelector.h"
-#include "Timer.h"
+#include "SuspendableTimer.h"
#include <memory>
#include <wtf/Forward.h>
#include <wtf/HashSet.h>
@@ -112,7 +112,7 @@
Vector<CachedResourceHandle<CachedFont>> m_fontsToBeginLoading;
HashSet<RefPtr<CSSFontFace>> m_cssConnectionsPossiblyToRemove;
HashSet<RefPtr<StyleRuleFontFace>> m_cssConnectionsEncounteredDuringBuild;
- Timer m_beginLoadingTimer;
+ SuspendableTimer m_beginLoadingTimer;
unsigned m_uniqueId;
unsigned m_version;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes