Commit cc9d4b14 authored by Marja Hölttä's avatar Marja Hölttä Committed by Commit Bot

[wasm] [in-place weak refs] Simplify WeakArrayList usage.

MaybeObjectHandle already has an API for making a weak pointer.

BUG=v8:7308

Change-Id: I9f8390e0dffec850a24391e7f50a455b86b217f5
Reviewed-on: https://chromium-review.googlesource.com/1125922Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54247}
parent df41fa7a
...@@ -1250,9 +1250,7 @@ Handle<WasmInstanceObject> WasmInstanceObject::New( ...@@ -1250,9 +1250,7 @@ Handle<WasmInstanceObject> WasmInstanceObject::New(
Handle<WeakArrayList> weak_instance_list(module_object->weak_instance_list(), Handle<WeakArrayList> weak_instance_list(module_object->weak_instance_list(),
isolate); isolate);
weak_instance_list = WeakArrayList::AddToEnd( weak_instance_list = WeakArrayList::AddToEnd(
weak_instance_list, weak_instance_list, MaybeObjectHandle::Weak(instance));
MaybeObjectHandle(
MaybeObject::MakeWeak(MaybeObject::FromObject(*instance)), isolate));
module_object->set_weak_instance_list(*weak_instance_list); module_object->set_weak_instance_list(*weak_instance_list);
return instance; return instance;
......
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