mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-11 14:41:50 +00:00
Metal: Wrap NS classes and protocols in NSRef.
This makes refcounting of these objects more automatic to try and prevent leaks or use-after-frees in the future. Also removes operator* from RefBase (and Ref) because it is never used and cannot work in a normal way for ObjectiveC protocols that cannot be dereferenced. Bug: dawn:89 Change-Id: I2e3fbfd638e2ba76d8c563f30bc489a384152552 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/32161 Reviewed-by: Austin Eng <enga@chromium.org> Reviewed-by: Stephen White <senorblanco@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
1805e46a15
commit
0055d95fa7
@@ -118,7 +118,6 @@ TEST(Ref, Gets) {
|
||||
test->Release();
|
||||
|
||||
EXPECT_EQ(test.Get(), original);
|
||||
EXPECT_EQ(&*test, original);
|
||||
EXPECT_EQ(test->GetThis(), original);
|
||||
}
|
||||
|
||||
@@ -127,7 +126,6 @@ TEST(Ref, DefaultsToNull) {
|
||||
Ref<RCTest> test;
|
||||
|
||||
EXPECT_EQ(test.Get(), nullptr);
|
||||
EXPECT_EQ(&*test, nullptr);
|
||||
EXPECT_EQ(test->GetThis(), nullptr);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user