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

Unified Diff: src/js/typedarray.js

Issue 2692753002: Fix error message for invalid buffer offset (Closed)
Patch Set: Add test Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/builtins/builtins-dataview.cc ('k') | src/messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/js/typedarray.js
diff --git a/src/js/typedarray.js b/src/js/typedarray.js
index 6e8f3c76712845ae73812d87811e5a25e4e05e92..3777507235ef603a74c655a6f52560d4259d510f 100644
--- a/src/js/typedarray.js
+++ b/src/js/typedarray.js
@@ -161,8 +161,7 @@ function NAMEConstructByArrayBuffer(obj, buffer, byteOffset, length) {
}
newByteLength = bufferByteLength - offset;
if (newByteLength < 0) {
- throw %make_range_error(kInvalidTypedArrayAlignment,
- "byte length", "NAME", ELEMENT_SIZE);
+ throw %make_range_error(kInvalidOffset, offset);
}
} else {
newByteLength = length * ELEMENT_SIZE;
« no previous file with comments | « src/builtins/builtins-dataview.cc ('k') | src/messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698