Commit 6ad781cc authored by Peter Marshall's avatar Peter Marshall Committed by Commit Bot

[cleanup] Change error message for neutered -> detached

Bug: chromium:913887
Change-Id: If533bb85675456b674f79486b06a44e447f40aee
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1739371Reviewed-by: 's avatarSimon Zünd <szuend@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63715}
parent 27df753f
......@@ -10,7 +10,6 @@
namespace v8 {
namespace internal {
// TODO(913887): fix the use of 'neuter' in these error messages.
#define MESSAGE_TEMPLATES(T) \
/* Error */ \
T(None, "") \
......@@ -78,7 +77,7 @@ namespace internal {
T(DebuggerType, "Debugger: Parameters have wrong types.") \
T(DeclarationMissingInitializer, "Missing initializer in % declaration") \
T(DefineDisallowed, "Cannot define property %, object is not extensible") \
T(DetachedOperation, "Cannot perform % on a neutered ArrayBuffer") \
T(DetachedOperation, "Cannot perform % on a detached ArrayBuffer") \
T(DuplicateTemplateProperty, "Object template has duplicate property '%'") \
T(ExtendsValueNotConstructor, \
"Class extends value % is not a constructor or null") \
......@@ -554,7 +553,7 @@ namespace internal {
T(DataCloneError, "% could not be cloned.") \
T(DataCloneErrorOutOfMemory, "Data cannot be cloned, out of memory.") \
T(DataCloneErrorDetachedArrayBuffer, \
"An ArrayBuffer is neutered and could not be cloned.") \
"An ArrayBuffer is detached and could not be cloned.") \
T(DataCloneErrorSharedArrayBufferTransferred, \
"A SharedArrayBuffer could not be cloned. SharedArrayBuffer must not be " \
"transferred.") \
......
......@@ -17,7 +17,7 @@ function Baseline() {
%NeverOptimizeFunction(Baseline);
assertThrows(Baseline, TypeError,
"Cannot perform Array Iterator.prototype.next on a neutered ArrayBuffer");
"Cannot perform Array Iterator.prototype.next on a detached ArrayBuffer");
function Turbo(count = 10000) {
let array = Array(10000);
......@@ -45,4 +45,4 @@ Turbo(10);
%OptimizeFunctionOnNextCall(Turbo);
assertThrows(Turbo, TypeError,
"Cannot perform Array Iterator.prototype.next on a neutered ArrayBuffer");
"Cannot perform Array Iterator.prototype.next on a detached ArrayBuffer");
......@@ -166,13 +166,13 @@ for (constructor of typedArrayConstructors) {
const ta = new constructor([1]);
%ArrayBufferDetach(ta.buffer);
ta.find(() => {});
}, "Cannot perform %TypedArray%.prototype.find on a neutered ArrayBuffer", TypeError);
}, "Cannot perform %TypedArray%.prototype.find on a detached ArrayBuffer", TypeError);
test(() => {
const ta = new constructor([1]);
%ArrayBufferDetach(ta.buffer);
ta.findIndex(() => {});
}, "Cannot perform %TypedArray%.prototype.findIndex on a neutered ArrayBuffer", TypeError);
}, "Cannot perform %TypedArray%.prototype.findIndex on a detached ArrayBuffer", TypeError);
}
// kFirstArgumentNotRegExp
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment