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

Issue 2748933003: XMLHttpRequest: return null upon failing responseArrayBuffer allocation. (Closed)

Created:
3 years, 9 months ago by sof
Modified:
3 years, 9 months ago
Reviewers:
haraken, yhirano
CC:
chromium-reviews
Target Ref:
refs/pending/branch-heads/3029
Project:
chromium
Visibility:
Public.

Description

XMLHttpRequest: return null upon failing responseArrayBuffer allocation. The allocation of a response ArrayBuffer may fail, a large enough contiguous chunk of memory simply not being available from the underlying allocator. The spec [1] now admits allocation failure as a possibility, allowing the return of a null buffer if so. Update our implementation accordingly, returning null rather than failing hard with an OOM. 1 - https://xhr.spec.whatwg.org/#arraybuffer-response R=haraken,yhirano BUG=673211 Review-Url: https://codereview.chromium.org/2730943002 Cr-Commit-Position: refs/heads/master@{#455398} (cherry picked from commit 7c838d986a3d95e81971ef40050fecce0ea2be2c) Review-Url: https://codereview.chromium.org/2748933003 . Cr-Commit-Position: refs/branch-heads/3029@{#185} Cr-Branched-From: 939b32ee5ba05c396eef3fd992822fcca9a2e262-refs/heads/master@{#454471} Committed: https://chromium.googlesource.com/chromium/src/+/0bca295bdd893a0217dd4ac32e61eccc08c83ab2

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+45 lines, -22 lines) Patch
M third_party/WebKit/Source/core/dom/DOMArrayBuffer.h View 1 chunk +2 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/dom/DOMArrayBuffer.cpp View 1 chunk +11 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/mojo/MojoHandle.cpp View 1 chunk +3 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/testing/Internals.cpp View 1 chunk +6 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.h View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp View 3 chunks +17 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/wtf/typed_arrays/ArrayBuffer.h View 2 chunks +5 lines, -6 lines 0 comments Download

Messages

Total messages: 2 (1 generated)
sof
3 years, 9 months ago (2017-03-14 12:16:36 UTC) #2
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
0bca295bdd893a0217dd4ac32e61eccc08c83ab2.

Powered by Google App Engine
This is Rietveld 408576698