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

Issue 2361493003: Make toDataURL robust with respect to allocation failures (Closed)

Created:
4 years, 3 months ago by Justin Novosad
Modified:
4 years, 3 months ago
Reviewers:
xlai (Olivia)
CC:
chromium-reviews, dshwang, ajuma+watch-canvas_chromium.org, blink-reviews-html_chromium.org, dglazkov+blink, Rik, blink-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make toDataURL robust with respect to allocation failures It is not safe to assume that ImageData::create always returns a valid point. Internally it uses DOMUint8ClampedArray::createOrNull which returns null instead of crashing when allocation fails. This change adds the appropriate null pointer checks to take that into account. BUG=647824 NOTRY=true Committed: https://crrev.com/7049607698f748d6c8f6024557fe2a9c4362ec2e Cr-Commit-Position: refs/heads/master@{#420625}

Patch Set 1 #

Total comments: 1

Patch Set 2 : drive-by fix for toBlob #

Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -2 lines) Patch
M third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp View 1 4 chunks +11 lines, -2 lines 0 comments Download

Messages

Total messages: 28 (16 generated)
Justin Novosad
PTAL
4 years, 3 months ago (2016-09-21 21:19:48 UTC) #4
xlai (Olivia)
https://codereview.chromium.org/2361493003/diff/1/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp File third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp (right): https://codereview.chromium.org/2361493003/diff/1/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp#newcode749 third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp:749: ImageData* imageData = toImageData(BackBuffer, SnapshotReasonToBlob); toBlob is also calling ...
4 years, 3 months ago (2016-09-22 17:51:11 UTC) #7
Justin Novosad
New patch
4 years, 3 months ago (2016-09-22 20:05:10 UTC) #9
xlai (Olivia)
lgtm
4 years, 3 months ago (2016-09-22 20:06:29 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2361493003/20001
4 years, 3 months ago (2016-09-22 20:33:51 UTC) #14
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/298135)
4 years, 3 months ago (2016-09-23 00:25:22 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2361493003/20001
4 years, 3 months ago (2016-09-23 14:09:38 UTC) #18
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/298593)
4 years, 3 months ago (2016-09-23 14:41:13 UTC) #20
Justin Novosad
Commit blocked by unrelated flake. Using NOTRY...
4 years, 3 months ago (2016-09-23 15:20:51 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2361493003/20001
4 years, 3 months ago (2016-09-23 15:21:01 UTC) #24
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 3 months ago (2016-09-23 16:32:49 UTC) #26
commit-bot: I haz the power
4 years, 3 months ago (2016-09-23 16:35:21 UTC) #28
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/7049607698f748d6c8f6024557fe2a9c4362ec2e
Cr-Commit-Position: refs/heads/master@{#420625}

Powered by Google App Engine
This is Rietveld 408576698