Changeset 260435 in webkit
- Timestamp:
- Apr 21, 2020 10:14:08 AM (4 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r260432 r260435 1 2020-04-21 Chris Dumez <cdumez@apple.com> 2 3 REGRESSION (r256808): “A problem repeatedly occurred” when attempting to load https://bungalow.com/listings/bay-area 4 https://bugs.webkit.org/show_bug.cgi?id=210801 5 <rdar://problem/61658940> 6 7 Reviewed by Antti Koivisto. 8 9 Even though the page uses the 'async' attribute on the mapbox-gl.js script, deferring the execution of this 10 script gets the page into a bad state, causing it to use a lot of CPU & memory until the process crashes. 11 Since we don't have any other evidence of breakage from r256808 yet and since r256808 was a massive PLT 12 progression, I am opting to add a quirk to disable the async script optimization on bungalow.com for now. 13 14 * dom/Document.cpp: 15 (WebCore::Document::shouldDeferAsynchronousScriptsUntilParsingFinishes const): 16 * page/Quirks.cpp: 17 (WebCore::Quirks::shouldBypassAsyncScriptDeferring const): 18 * page/Quirks.h: 19 * platform/RegistrableDomain.h: 20 (WebCore::RegistrableDomain::operator== const): 21 1 22 2020-04-16 Sergio Villar Senin <svillar@igalia.com> 2 23 -
trunk/Source/WebCore/dom/Document.cpp
r260142 r260435 5558 5558 return false; 5559 5559 5560 if (quirks().shouldBypassAsyncScriptDeferring()) 5561 return false; 5562 5560 5563 return parsing() && !(view() && view()->hasEverPainted()); 5561 5564 } -
trunk/Source/WebCore/page/Quirks.cpp
r260114 r260435 679 679 } 680 680 681 bool Quirks::shouldBypassAsyncScriptDeferring() const 682 { 683 if (!needsQuirks()) 684 return false; 685 686 if (!m_shouldBypassAsyncScriptDeferring) { 687 auto domain = RegistrableDomain { m_document->topDocument().url() }; 688 // Deferring 'mapbox-gl.js' script on bungalow.com causes the script to get in a bad state (rdar://problem/61658940). 689 m_shouldBypassAsyncScriptDeferring = (domain == "bungalow.com"); 690 } 691 return *m_shouldBypassAsyncScriptDeferring; 692 } 693 681 694 bool Quirks::shouldMakeEventListenerPassive(const EventTarget& eventTarget, const AtomString& eventType, const EventListener& eventListener) 682 695 { -
trunk/Source/WebCore/page/Quirks.h
r260114 r260435 89 89 90 90 bool shouldBypassBackForwardCache() const; 91 bool shouldBypassAsyncScriptDeferring() const; 91 92 92 93 static bool shouldMakeEventListenerPassive(const EventTarget&, const AtomString& eventType, const EventListener&); … … 122 123 #endif 123 124 mutable Optional<bool> m_needsCanPlayAfterSeekedQuirk; 125 mutable Optional<bool> m_shouldBypassAsyncScriptDeferring; 124 126 }; 125 127 -
trunk/Source/WebCore/platform/RegistrableDomain.h
r256583 r260435 55 55 bool operator!=(const RegistrableDomain& other) const { return m_registrableDomain != other.m_registrableDomain; } 56 56 bool operator==(const RegistrableDomain& other) const { return m_registrableDomain == other.m_registrableDomain; } 57 bool operator==(const char* other) const { return m_registrableDomain == other; } 57 58 58 59 bool matches(const URL& url) const
Note: See TracChangeset
for help on using the changeset viewer.