Title: [211613] trunk/Source/WebCore
- Revision
- 211613
- Author
- wenson_hs...@apple.com
- Date
- 2017-02-02 17:01:32 -0800 (Thu, 02 Feb 2017)
Log Message
CrashTracer: [USER] com.apple.WebKit.WebContent at com.apple.WebCore: WebCore::URL::host const + 9
https://bugs.webkit.org/show_bug.cgi?id=167766
<rdar://problem/30132707>
Reviewed by Chris Dumez.
The mainframe's document pointer may be null when tearing down a page upon navigation to a page that is in the
page cache. If this triggers a GC sweep, we will attempt to reload touch bar media controls, which (as a part of
the media controller heuristic) checks the mainframe's document URL to see if quirks should be enabled. This
assumes that the mainframe's document exists, which is not a safe assumption if page navigation is occurring. As
such, we need a null check for the mainframe's document in needsPlaybackControlsManagerQuirk().
No test, as we were unable to reproduce this crash.
* html/HTMLMediaElement.cpp:
(WebCore::needsPlaybackControlsManagerQuirk):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (211612 => 211613)
--- trunk/Source/WebCore/ChangeLog 2017-02-03 01:00:30 UTC (rev 211612)
+++ trunk/Source/WebCore/ChangeLog 2017-02-03 01:01:32 UTC (rev 211613)
@@ -1,3 +1,22 @@
+2017-02-02 Wenson Hsieh <wenson_hs...@apple.com>
+
+ CrashTracer: [USER] com.apple.WebKit.WebContent at com.apple.WebCore: WebCore::URL::host const + 9
+ https://bugs.webkit.org/show_bug.cgi?id=167766
+ <rdar://problem/30132707>
+
+ Reviewed by Chris Dumez.
+
+ The mainframe's document pointer may be null when tearing down a page upon navigation to a page that is in the
+ page cache. If this triggers a GC sweep, we will attempt to reload touch bar media controls, which (as a part of
+ the media controller heuristic) checks the mainframe's document URL to see if quirks should be enabled. This
+ assumes that the mainframe's document exists, which is not a safe assumption if page navigation is occurring. As
+ such, we need a null check for the mainframe's document in needsPlaybackControlsManagerQuirk().
+
+ No test, as we were unable to reproduce this crash.
+
+ * html/HTMLMediaElement.cpp:
+ (WebCore::needsPlaybackControlsManagerQuirk):
+
2017-02-02 Chris Dumez <cdu...@apple.com>
Suspend SVG animations in hidden pages
Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (211612 => 211613)
--- trunk/Source/WebCore/html/HTMLMediaElement.cpp 2017-02-03 01:00:30 UTC (rev 211612)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp 2017-02-03 01:01:32 UTC (rev 211613)
@@ -583,7 +583,11 @@
if (!page.settings().needsSiteSpecificQuirks())
return false;
- String host = page.mainFrame().document()->url().host();
+ auto* document = page.mainFrame().document();
+ if (!document)
+ return false;
+
+ String host = document->url().host();
return equalLettersIgnoringASCIICase(host, "netflix.com") || host.endsWithIgnoringASCIICase(".netflix.com");
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes