Commit c8bcd555 authored by Dan Elphick's avatar Dan Elphick Committed by Commit Bot

[v8] Use CreateDataProperty instead of Set for Arrays

Set on an Array can throw exceptions if for instance
Object.defineProperty is called on Array.prototype, so use
CreateDataProperty instead.

Bug: v8:7283, v8:8834
Change-Id: I144951b5c9c1cb0801aa5394bf6f7df58f4a6d54
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1561127
Auto-Submit: Dan Elphick <delphick@chromium.org>
Commit-Queue: Kentaro Hara <haraken@chromium.org>
Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#649677}
parent e6956864
......@@ -285,7 +285,8 @@ void SkiaBenchmarking::GetOpTimings(gin::Arguments* args) {
v8::Array::New(isolate, benchmarking_canvas.CommandCount());
for (size_t i = 0; i < benchmarking_canvas.CommandCount(); ++i) {
op_times
->Set(context, i,
->CreateDataProperty(
context, i,
v8::Number::New(isolate, benchmarking_canvas.GetTime(i)))
.Check();
}
......
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