New issue
Advanced search Search tips

Issue 807432 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Feb 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 1
Type: Bug



Sign in to add a comment

Allow Image factories to fail

Project Member Reported by fmalita@chromium.org, Jan 30 2018

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.
 
Labels: -Pri-3 Pri-1
Owner: schenney@chromium.org
Status: Assigned (was: Available)
This issue is causing a lot of clusterfuzz reported issues. So just fix it.

Making P1 based on other P1 bugs it will fix.
Status: Started (was: Assigned)
Project Member

Comment 3 by bugdroid1@chromium.org, 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

Labels: OS-Android OS-Chrome OS-Linux OS-Mac OS-Windows
Status: Fixed (was: Started)
Depending on what issues show up as fixed after this, maybe request merge.

Sign in to add a comment