Reviewers: Igor Sheludko,
Message:
ptal
Description:
Don't roundtrip to JS to update the length. This is 1) faster (although we
don't
care) and 2) avoids stackchecks that otherwise make the .Assert fail on
stack
overflow.
BUG=chromium:502147
LOG=n
Please review this at https://codereview.chromium.org/1189423002/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+3, -3 lines):
M src/objects.cc
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index
d63c9e08882ecda10952962aa53881db676f472f..000423212f5ec5866d2d578214210112c5cccd2a
100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -12018,9 +12018,9 @@ MaybeHandle<Object> JSArray::SetElementsLength(
.Assert();
}
- SetProperty(deleted, isolate->factory()->length_string(),
- isolate->factory()->NewNumberFromUint(delete_count),
- STRICT).Assert();
+ ElementsAccessor* accessor = deleted->GetElementsAccessor();
+ accessor->SetLength(deleted, isolate->factory()->NewNumberFromUint(
+ delete_count)).Check();
}
RETURN_ON_EXCEPTION(
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.