Commit 7760315d authored by Victor Gomes's avatar Victor Gomes Committed by V8 LUCI CQ

[runtime] Unify invalid size error handling

This is a follow-up to
https://chromium-review.googlesource.com/c/v8/v8/+/2833920

Bug: chromium:1209210, chromium:1198188
Change-Id: I43f18649434b06431dac6cae7946505fc4b5b398
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2905607
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74678}
parent 916eb869
......@@ -482,7 +482,7 @@ Handle<JSObject> InnerAddElement(Isolate* isolate, Handle<JSArray> array,
// TODO(victorgomes): Temporarily forcing a fatal error here in case of
// overflow, until Intl::AddElement can handle exceptions.
if (JSObject::AddDataElement(array, index, element, NONE).IsNothing()) {
FATAL("Fatal JavaScript invalid array size when adding element");
FATAL("Fatal JavaScript invalid size error when adding element");
UNREACHABLE();
}
return element;
......
......@@ -4980,7 +4980,9 @@ void JSObject::TransitionElementsKind(Handle<JSObject> object,
// TODO(victorgomes): Temporarily forcing a fatal error here in case of
// overflow, until all users of TransitionElementsKind can handle
// exceptions.
FATAL("Fatal JavaScript invalid array size transitioning elements kind.");
FATAL(
"Fatal JavaScript invalid size error when transitioning elements "
"kind");
UNREACHABLE();
}
}
......
......@@ -33,7 +33,8 @@ RUNTIME_FUNCTION(Runtime_TransitionElementsKind) {
.IsNothing()) {
// TODO(victorgomes): EffectControlLinearizer::LowerTransitionElementsKind
// does not handle exceptions.
FATAL("Fatal JavaScript invalid array size");
FATAL(
"Fatal JavaScript invalid size error when transitioning elements kind");
UNREACHABLE();
}
return *object;
......
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