Title: [260435] trunk/Source/WebCore
- Revision
- 260435
- Author
- [email protected]
- Date
- 2020-04-21 10:14:08 -0700 (Tue, 21 Apr 2020)
Log Message
REGRESSION (r256808): “A problem repeatedly occurred” when attempting to load https://bungalow.com/listings/bay-area
https://bugs.webkit.org/show_bug.cgi?id=210801
<rdar://problem/61658940>
Reviewed by Antti Koivisto.
Even though the page uses the 'async' attribute on the mapbox-gl.js script, deferring the execution of this
script gets the page into a bad state, causing it to use a lot of CPU & memory until the process crashes.
Since we don't have any other evidence of breakage from r256808 yet and since r256808 was a massive PLT
progression, I am opting to add a quirk to disable the async script optimization on bungalow.com for now.
* dom/Document.cpp:
(WebCore::Document::shouldDeferAsynchronousScriptsUntilParsingFinishes const):
* page/Quirks.cpp:
(WebCore::Quirks::shouldBypassAsyncScriptDeferring const):
* page/Quirks.h:
* platform/RegistrableDomain.h:
(WebCore::RegistrableDomain::operator== const):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (260434 => 260435)
--- trunk/Source/WebCore/ChangeLog 2020-04-21 17:10:47 UTC (rev 260434)
+++ trunk/Source/WebCore/ChangeLog 2020-04-21 17:14:08 UTC (rev 260435)
@@ -1,3 +1,24 @@
+2020-04-21 Chris Dumez <[email protected]>
+
+ REGRESSION (r256808): “A problem repeatedly occurred” when attempting to load https://bungalow.com/listings/bay-area
+ https://bugs.webkit.org/show_bug.cgi?id=210801
+ <rdar://problem/61658940>
+
+ Reviewed by Antti Koivisto.
+
+ Even though the page uses the 'async' attribute on the mapbox-gl.js script, deferring the execution of this
+ script gets the page into a bad state, causing it to use a lot of CPU & memory until the process crashes.
+ Since we don't have any other evidence of breakage from r256808 yet and since r256808 was a massive PLT
+ progression, I am opting to add a quirk to disable the async script optimization on bungalow.com for now.
+
+ * dom/Document.cpp:
+ (WebCore::Document::shouldDeferAsynchronousScriptsUntilParsingFinishes const):
+ * page/Quirks.cpp:
+ (WebCore::Quirks::shouldBypassAsyncScriptDeferring const):
+ * page/Quirks.h:
+ * platform/RegistrableDomain.h:
+ (WebCore::RegistrableDomain::operator== const):
+
2020-04-16 Sergio Villar Senin <[email protected]>
[WebXR] Test IDLs and stubs
Modified: trunk/Source/WebCore/dom/Document.cpp (260434 => 260435)
--- trunk/Source/WebCore/dom/Document.cpp 2020-04-21 17:10:47 UTC (rev 260434)
+++ trunk/Source/WebCore/dom/Document.cpp 2020-04-21 17:14:08 UTC (rev 260435)
@@ -5557,6 +5557,9 @@
if (!settings().shouldDeferAsynchronousScriptsUntilAfterDocumentLoadOrFirstPaint())
return false;
+ if (quirks().shouldBypassAsyncScriptDeferring())
+ return false;
+
return parsing() && !(view() && view()->hasEverPainted());
}
Modified: trunk/Source/WebCore/page/Quirks.cpp (260434 => 260435)
--- trunk/Source/WebCore/page/Quirks.cpp 2020-04-21 17:10:47 UTC (rev 260434)
+++ trunk/Source/WebCore/page/Quirks.cpp 2020-04-21 17:14:08 UTC (rev 260435)
@@ -678,6 +678,19 @@
return false;
}
+bool Quirks::shouldBypassAsyncScriptDeferring() const
+{
+ if (!needsQuirks())
+ return false;
+
+ if (!m_shouldBypassAsyncScriptDeferring) {
+ auto domain = RegistrableDomain { m_document->topDocument().url() };
+ // Deferring 'mapbox-gl.js' script on bungalow.com causes the script to get in a bad state (rdar://problem/61658940).
+ m_shouldBypassAsyncScriptDeferring = (domain == "bungalow.com");
+ }
+ return *m_shouldBypassAsyncScriptDeferring;
+}
+
bool Quirks::shouldMakeEventListenerPassive(const EventTarget& eventTarget, const AtomString& eventType, const EventListener& eventListener)
{
if (eventNames().isTouchScrollBlockingEventType(eventType)) {
Modified: trunk/Source/WebCore/page/Quirks.h (260434 => 260435)
--- trunk/Source/WebCore/page/Quirks.h 2020-04-21 17:10:47 UTC (rev 260434)
+++ trunk/Source/WebCore/page/Quirks.h 2020-04-21 17:14:08 UTC (rev 260435)
@@ -88,6 +88,7 @@
bool needsPreloadAutoQuirk() const;
bool shouldBypassBackForwardCache() const;
+ bool shouldBypassAsyncScriptDeferring() const;
static bool shouldMakeEventListenerPassive(const EventTarget&, const AtomString& eventType, const EventListener&);
@@ -121,6 +122,7 @@
mutable Optional<bool> m_shouldDispatchSimulatedMouseEventsQuirk;
#endif
mutable Optional<bool> m_needsCanPlayAfterSeekedQuirk;
+ mutable Optional<bool> m_shouldBypassAsyncScriptDeferring;
};
}
Modified: trunk/Source/WebCore/platform/RegistrableDomain.h (260434 => 260435)
--- trunk/Source/WebCore/platform/RegistrableDomain.h 2020-04-21 17:10:47 UTC (rev 260434)
+++ trunk/Source/WebCore/platform/RegistrableDomain.h 2020-04-21 17:14:08 UTC (rev 260435)
@@ -54,6 +54,7 @@
bool operator!=(const RegistrableDomain& other) const { return m_registrableDomain != other.m_registrableDomain; }
bool operator==(const RegistrableDomain& other) const { return m_registrableDomain == other.m_registrableDomain; }
+ bool operator==(const char* other) const { return m_registrableDomain == other; }
bool matches(const URL& url) const
{
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes