Commit 877ad411 authored by Andreas Haas's avatar Andreas Haas Committed by V8 LUCI CQ

[wasm][debug] Fix GCMole issue in AddWasmTableObjectInternalProperties/2

An object got allocated as part of a parameter expression, which may
have caused GC issues.

R=bmeurer@chromium.org

Bug: chromium:1230041
Change-Id: I94537db7d0be5200049fbc6bd3eda0d49b6d7c17
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3038525Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75801}
parent 1213ee5c
...@@ -1135,7 +1135,8 @@ Handle<ArrayList> AddWasmTableObjectInternalProperties( ...@@ -1135,7 +1135,8 @@ Handle<ArrayList> AddWasmTableObjectInternalProperties(
int length = table->current_length(); int length = table->current_length();
Handle<FixedArray> entries = isolate->factory()->NewFixedArray(length); Handle<FixedArray> entries = isolate->factory()->NewFixedArray(length);
for (int i = 0; i < length; ++i) { for (int i = 0; i < length; ++i) {
entries->set(i, *WasmTableObject::Get(isolate, table, i)); auto entry = WasmTableObject::Get(isolate, table, i);
entries->set(i, *entry);
} }
Handle<JSArray> final_entries = isolate->factory()->NewJSArrayWithElements( Handle<JSArray> final_entries = isolate->factory()->NewJSArrayWithElements(
entries, i::PACKED_ELEMENTS, length); entries, i::PACKED_ELEMENTS, length);
......
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