Track and destroy all child objects on wire client destruction

This is needed so that:
 1. We can support multiple devices in the wire. The device will need
    to know how to destroy its child objects.
 2. The wire needs to be aware of all objects and their in-flight
    callbacks so that it can reject them if the wire is disconnnected.
    A future change will handle this.
 3. Fix leaks of objects on page teardown. When the page is torn down,
    the wire client is destroyed, and we skip calling release() for all
    objects since the object holding the proc table was also destroyed.

Bug: dawn:384, dawn:556

Change-Id: Ie23afe4e515b02e924fcfc2db92b749fd2257c9c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/31160
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
This commit is contained in:
Austin Eng
2020-11-11 19:46:18 +00:00
committed by Commit Bot service account
parent f3c8290472
commit 3120d5ea0d
16 changed files with 151 additions and 27 deletions

View File

@@ -113,6 +113,10 @@ void WireTest::DeleteServer() {
mWireServer = nullptr;
}
void WireTest::DeleteClient() {
mWireClient = nullptr;
}
void WireTest::SetupIgnoredCallExpectations() {
EXPECT_CALL(api, DeviceTick(_)).Times(AnyNumber());
}