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 2692753002: Fix error message for invalid buffer offset (Closed)

Created:
3 years, 10 months ago by vabr (Chromium)
Modified:
3 years, 10 months ago
Reviewers:
Yang
CC:
v8-reviews_googlegroups.com
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Fix error message for invalid buffer offset The constructor for TypedArray in js/typedarray.js emitted kInvalidTypedArrayAlignment if the array offset exceeded the size of the underlying buffer. This seems like a typo introduced in https://codereview.chromium.org/2090353003. The error message to be emitted instead coincides with the already existing kInvalidDataViewOffset. The message string is independent of whether the object in question is a DataView or a typed array, so this CL: (1) renames kInvalidDataViewOffset to just kInvalidOffset, and (2) uses kInvalidOffset instead of kInvalidTypedArrayAlignment for cases when the TypedArray is constructed with an offset exceeding the buffer size. BUG=v8:5733 TEST=Run d8, execute "new Uint8Array(new ArrayBuffer(1),2)", see the error message mention the invalid offset 2. Review-Url: https://codereview.chromium.org/2692753002 Cr-Commit-Position: refs/heads/master@{#43151} Committed: https://chromium.googlesource.com/v8/v8/+/1dd803f9d384cb33ac78aa3ddcb3faa811af892c

Patch Set 1 #

Patch Set 2 : Add test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+9 lines, -8 lines) Patch
M src/builtins/builtins-dataview.cc View 2 chunks +2 lines, -4 lines 0 comments Download
M src/js/typedarray.js View 1 chunk +1 line, -2 lines 0 comments Download
M src/messages.h View 1 chunk +1 line, -2 lines 0 comments Download
M test/mjsunit/messages.js View 1 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 16 (12 generated)
vabr (Chromium)
Hi Yang, Could you please review this? Cheers, Vaclav
3 years, 10 months ago (2017-02-12 18:07:32 UTC) #10
Yang
lgtm. thanks!
3 years, 10 months ago (2017-02-13 06:00:10 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/2692753002/20001
3 years, 10 months ago (2017-02-13 10:25:41 UTC) #13
commit-bot: I haz the power
3 years, 10 months ago (2017-02-13 10:28:40 UTC) #16
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/v8/v8/+/1dd803f9d384cb33ac78aa3ddcb3faa811a...

Powered by Google App Engine
This is Rietveld 408576698