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

Unified Diff: Source/core/html/HTMLCanvasElement.cpp

Issue 336653003: Fix crash due to null frame() pointer on Document. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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/html/HTMLCanvasElement.cpp
diff --git a/Source/core/html/HTMLCanvasElement.cpp b/Source/core/html/HTMLCanvasElement.cpp
index 529eeacdac90fc96732b1c022f1d980609b5b983..aff39ecf68c5a14be6c5f36e8f1f5e13b77defe7 100644
--- a/Source/core/html/HTMLCanvasElement.cpp
+++ b/Source/core/html/HTMLCanvasElement.cpp
@@ -437,7 +437,7 @@ bool HTMLCanvasElement::shouldAccelerate(const IntSize& size) const
// Do not use acceleration for small canvases, unless GPU rasterization is available.
// GPU raterization is a heuristic to avoid difficult content & whitelist targeted content.
- if (!document().frame()->chromeClient().usesGpuRasterization() && size.width() * size.height() < settings->minimumAccelerated2dCanvasSize())
+ if (!(document().frame() && document().frame()->chromeClient().usesGpuRasterization()) && size.width() * size.height() < settings->minimumAccelerated2dCanvasSize())
return false;
if (!blink::Platform::current()->canAccelerate2dCanvas())
« 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