Allow Image factories to fail |
|||
Issue description(per comments in https://chromium-review.googlesource.com/c/chromium/src/+/887678#message-e772425a444aaacf973cb5ffce22a38bed24bbbe) Some Image-derived classes call functions which may fail in their factories. They currently always return an Image - but in some invalid/inconsistent state. To simplify state management, we could allow these factories to fail (return nullptr), and update all call sites to handle failures.
,
Feb 13 2018
,
Feb 15 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/9a0108d9aacc3b77f6b3639fe2f17f7b6a36ab24 commit 9a0108d9aacc3b77f6b3639fe2f17f7b6a36ab24 Author: Stephen Chenney <schenney@chromium.org> Date: Thu Feb 15 16:31:49 2018 [PE] Handle null return from all SkImage creation methods SkImage creation will, rightfully, return null if the parameters for image creation are invalid (size, bit format, etc). Blink does not allow for null images in numerous situations. This patch changes things such that Skia returning null will no longer crash the render process. BUG= 807432 R=fmalita@chromium.org,junov@chromium.org Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Change-Id: I3b7815b0b8ed03b232bcd3ccb9c396edf92f1136 Reviewed-on: https://chromium-review.googlesource.com/919222 Reviewed-by: Jeremy Roman <jbroman@chromium.org> Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Stephen Chenney <schenney@chromium.org> Cr-Commit-Position: refs/heads/master@{#537042} [modify] https://crrev.com/9a0108d9aacc3b77f6b3639fe2f17f7b6a36ab24/third_party/WebKit/Source/bindings/core/v8/serialization/V8ScriptValueSerializerTest.cpp [modify] https://crrev.com/9a0108d9aacc3b77f6b3639fe2f17f7b6a36ab24/third_party/WebKit/Source/core/imagebitmap/ImageBitmapTest.cpp [modify] https://crrev.com/9a0108d9aacc3b77f6b3639fe2f17f7b6a36ab24/third_party/WebKit/Source/modules/canvas/canvas2d/CanvasRenderingContext2DTest.cpp [modify] https://crrev.com/9a0108d9aacc3b77f6b3639fe2f17f7b6a36ab24/third_party/WebKit/Source/modules/canvas/offscreencanvas2d/OffscreenCanvasRenderingContext2D.cpp [modify] https://crrev.com/9a0108d9aacc3b77f6b3639fe2f17f7b6a36ab24/third_party/WebKit/Source/platform/graphics/StaticBitmapImage.cpp
,
Feb 15 2018
Depending on what issues show up as fixed after this, maybe request merge. |
|||
►
Sign in to add a comment |
|||
Comment 1 by schenney@chromium.org
, Feb 13 2018Owner: schenney@chromium.org
Status: Assigned (was: Available)