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

Unified Diff: Source/core/css/MediaValuesCached.cpp

Issue 271613004: A speculative fix for a MediaValues related crash (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 7 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/css/MediaValuesCached.cpp
diff --git a/Source/core/css/MediaValuesCached.cpp b/Source/core/css/MediaValuesCached.cpp
index 60caa50af3008dcbc1deaafa788260fc6fd613c3..01e674230f2ae035c323c2fff9a9ff0f40efdfb1 100644
--- a/Source/core/css/MediaValuesCached.cpp
+++ b/Source/core/css/MediaValuesCached.cpp
@@ -34,7 +34,8 @@ PassRefPtr<MediaValues> MediaValuesCached::create(LocalFrame* frame)
{
// FIXME - Added an assert here so we can better understand when a frame is present without its view().
ASSERT(!frame || frame->view());
- if (!frame || !frame->view())
+ // FIXME - Because of crbug.com/371084, document()->renderView() may be null here.
+ if (!frame || !frame->view() || !frame->document() || !frame->document()->renderView())
return adoptRef(new MediaValuesCached());
return adoptRef(new MediaValuesCached(frame));
}
« 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