Emit better error message if array buffer allocation fails
Now emits `Array buffer allocation failed` instead of `Invalid array buffer length`. Review URL: https://codereview.chromium.org/1393263003 Cr-Commit-Position: refs/heads/master@{#31200}
This commit is contained in:
parent
9d66c8813a
commit
60f831749f
@ -253,6 +253,7 @@ class CallSite {
|
||||
T(DateRange, "Provided date is not in valid range.") \
|
||||
T(ExpectedLocation, "Expected Area/Location for time zone, got %") \
|
||||
T(InvalidArrayBufferLength, "Invalid array buffer length") \
|
||||
T(ArrayBufferAllocationFailed, "Array buffer allocation failed") \
|
||||
T(InvalidArrayLength, "Invalid array length") \
|
||||
T(InvalidCodePoint, "Invalid code point %") \
|
||||
T(InvalidCountValue, "Invalid count value") \
|
||||
|
@ -33,7 +33,7 @@ RUNTIME_FUNCTION(Runtime_ArrayBufferInitialize) {
|
||||
holder, isolate, allocated_length, true,
|
||||
is_shared ? SharedFlag::kShared : SharedFlag::kNotShared)) {
|
||||
THROW_NEW_ERROR_RETURN_FAILURE(
|
||||
isolate, NewRangeError(MessageTemplate::kInvalidArrayBufferLength));
|
||||
isolate, NewRangeError(MessageTemplate::kArrayBufferAllocationFailed));
|
||||
}
|
||||
return *holder;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user