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

Issue 1328343002: Do not crash when out of memory at ImageData::create(). (Closed)

Created:
5 years, 3 months ago by Yuki
Modified:
5 years, 3 months ago
Reviewers:
haraken
CC:
blink-reviews, blink-reviews-html_chromium.org, sof, eae+blinkwatch, blink-reviews-dom_chromium.org, dglazkov+blink, rwlbuis
Target Ref:
refs/remotes/origin/master
Project:
blink
Visibility:
Public.

Description

Do not crash when out of memory at ImageData::create(). The old implementation was "allocate or die". It's not good for ImageData, which may try to allocate a huge memory block. This CL makes ImageData gracefully returns nullptr optionally raising an exception in case of out of memory. BUG=528898 Committed: https://crrev.com/bb2036fb19514a807ef2734b65d4b9b1df17ae6a git-svn-id: svn://svn.chromium.org/blink/trunk@201982 bbb929c8-8fbe-4397-9dbb-9b2b20218538

Patch Set 1 #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+24 lines, -11 lines) Patch
M Source/core/dom/DOMTypedArray.h View 1 chunk +6 lines, -0 lines 0 comments Download
M Source/core/html/ImageData.h View 1 chunk +0 lines, -1 line 0 comments Download
M Source/core/html/ImageData.cpp View 3 chunks +18 lines, -10 lines 3 comments Download

Messages

Total messages: 10 (2 generated)
Yuki
Could you review this CL?
5 years, 3 months ago (2015-09-09 09:14:38 UTC) #2
haraken
https://codereview.chromium.org/1328343002/diff/1/Source/core/html/ImageData.cpp File Source/core/html/ImageData.cpp (right): https://codereview.chromium.org/1328343002/diff/1/Source/core/html/ImageData.cpp#newcode90 Source/core/html/ImageData.cpp:90: exceptionState.throwDOMException(V8GeneralError, "Out of memory at ImageData creation"); What error ...
5 years, 3 months ago (2015-09-09 09:23:55 UTC) #3
Yuki
https://codereview.chromium.org/1328343002/diff/1/Source/core/html/ImageData.cpp File Source/core/html/ImageData.cpp (right): https://codereview.chromium.org/1328343002/diff/1/Source/core/html/ImageData.cpp#newcode90 Source/core/html/ImageData.cpp:90: exceptionState.throwDOMException(V8GeneralError, "Out of memory at ImageData creation"); On 2015/09/09 ...
5 years, 3 months ago (2015-09-09 09:31:30 UTC) #4
Yuki
https://codereview.chromium.org/1328343002/diff/1/Source/core/html/ImageData.cpp File Source/core/html/ImageData.cpp (right): https://codereview.chromium.org/1328343002/diff/1/Source/core/html/ImageData.cpp#newcode90 Source/core/html/ImageData.cpp:90: exceptionState.throwDOMException(V8GeneralError, "Out of memory at ImageData creation"); On 2015/09/09 ...
5 years, 3 months ago (2015-09-09 12:50:10 UTC) #5
haraken
LGTM
5 years, 3 months ago (2015-09-09 13:34:36 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1328343002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1328343002/1
5 years, 3 months ago (2015-09-09 14:47:14 UTC) #8
commit-bot: I haz the power
Committed patchset #1 (id:1) as https://src.chromium.org/viewvc/blink?view=rev&revision=201982
5 years, 3 months ago (2015-09-09 16:02:30 UTC) #9
commit-bot: I haz the power
5 years, 3 months ago (2015-09-23 12:00:18 UTC) #10
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/bb2036fb19514a807ef2734b65d4b9b1df17ae6a

Powered by Google App Engine
This is Rietveld 408576698