[ddc] Remove `__proto__` use from records.dart

Issue: https://github.com/dart-lang/sdk/issues/52372
Change-Id: I05806656ac9ce2c1ddee233ec836b0a8d0aed464
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303143
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
diff --git a/sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/records.dart b/sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/records.dart
index 6cc4078..f31cd6f 100644
--- a/sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/records.dart
+++ b/sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/records.dart
@@ -152,7 +152,7 @@
       '!',
       '''
     #.new = function (shape, values) {
-      #.__proto__.new.call(this, shape, values);
+      Object.getPrototypeOf(#).new.call(this, shape, values);
     }
   ''',
       recordClass,