Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(579)

Unified Diff: Source/core/dom/FullscreenElementStack.cpp

Issue 448143002: Fix segfault reported by ClusterFuzz. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/FullscreenElementStack.cpp
diff --git a/Source/core/dom/FullscreenElementStack.cpp b/Source/core/dom/FullscreenElementStack.cpp
index 1e90d92b3cd4f5e9ee6201d0cdcf689628398cae..8415b3d14d72d3695d038be46e3fb31c34de0a2f 100644
--- a/Source/core/dom/FullscreenElementStack.cpp
+++ b/Source/core/dom/FullscreenElementStack.cpp
@@ -61,12 +61,12 @@ static bool fullscreenIsSupported(const Document& document)
{
// Fullscreen is supported if there is no previously-established user preference,
// security risk, or platform limitation.
- return document.settings()->fullscreenSupported();
+ return !document.settings() || document.settings()->fullscreenSupported();
}
static bool fullscreenIsSupported(const Document& document, const Element& element)
{
- if (document.settings()->disallowFullscreenForNonMediaElements() && !isHTMLMediaElement(element))
+ if (!document.settings() || (document.settings()->disallowFullscreenForNonMediaElements() && !isHTMLMediaElement(element)))
return false;
return fullscreenIsSupported(document);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698