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

Unified Diff: Source/core/rendering/RenderMediaControls.cpp

Issue 556453007: Make slider thumb painting bail out when the node is null. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 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 | « LayoutTests/media/controls-slider-appearance-crash-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderMediaControls.cpp
diff --git a/Source/core/rendering/RenderMediaControls.cpp b/Source/core/rendering/RenderMediaControls.cpp
index 6288aa3969d8087ddf1e4f2898fa61c128ea5b9a..b08ee2e510ee3163c9c7fc9bc86fe6523a72aa0e 100644
--- a/Source/core/rendering/RenderMediaControls.cpp
+++ b/Source/core/rendering/RenderMediaControls.cpp
@@ -246,7 +246,9 @@ static bool paintMediaSlider(RenderObject* object, const PaintInfo& paintInfo, c
static bool paintMediaSliderThumb(RenderObject* object, const PaintInfo& paintInfo, const IntRect& rect)
{
- ASSERT(object->node());
+ if (!object->node())
+ return false;
+
HTMLMediaElement* mediaElement = toParentMediaElement(object->node()->shadowHost());
if (!mediaElement)
return false;
@@ -299,7 +301,9 @@ static bool paintMediaVolumeSlider(RenderObject* object, const PaintInfo& paintI
static bool paintMediaVolumeSliderThumb(RenderObject* object, const PaintInfo& paintInfo, const IntRect& rect)
{
- ASSERT(object->node());
+ if (!object->node())
+ return false;
+
HTMLMediaElement* mediaElement = toParentMediaElement(object->node()->shadowHost());
if (!mediaElement)
return false;
« no previous file with comments | « LayoutTests/media/controls-slider-appearance-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698