Get counterSets and counters using Objective-C style

Bug=dawn:1102

Change-Id: I656938f180ac3436a40ba8720e54618c8921504b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/72760
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
diff --git a/src/dawn_native/metal/BackendMTL.mm b/src/dawn_native/metal/BackendMTL.mm
index f4166f0..632aa8a 100644
--- a/src/dawn_native/metal/BackendMTL.mm
+++ b/src/dawn_native/metal/BackendMTL.mm
@@ -194,7 +194,7 @@
             // MTLDevice’s counterSets property declares which counter sets it supports. Check
             // whether it's available on the device before requesting a counter set.
             id<MTLCounterSet> counterSet = nil;
-            for (id<MTLCounterSet> set in device.counterSets) {
+            for (id<MTLCounterSet> set in [device counterSets]) {
                 if ([set.name caseInsensitiveCompare:counterSetName] == NSOrderedSame) {
                     counterSet = set;
                     break;
@@ -211,7 +211,7 @@
             // if there is a counter unsupported.
             for (MTLCommonCounter counterName : counterNames) {
                 bool found = false;
-                for (id<MTLCounter> counter in counterSet.counters) {
+                for (id<MTLCounter> counter in [counterSet counters]) {
                     if ([counter.name caseInsensitiveCompare:counterName] == NSOrderedSame) {
                         found = true;
                         break;