[dartdevc] Adding custom prototype for MemoryInfo to accommodate Chrome API changes

Chrome Canary no longer exposes window.performance.memory's constructor (it uses Object's instead). This hack lets (window.performance.memory is html.MemoryInfo) evaluate to true.

See: https://github.com/dart-lang/sdk/issues/43193
Change-Id: I3c557467c3ea029052aba71f6695f4db0ec65515
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160782
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
diff --git a/sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/runtime.dart b/sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/runtime.dart
index 4867462..f07c4d8 100644
--- a/sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/runtime.dart
+++ b/sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/runtime.dart
@@ -77,7 +77,8 @@
     }
     if (typeof $window.MemoryInfo == "undefined") {
       if (typeof $window.performance.memory != "undefined") {
-        $window.MemoryInfo = $window.performance.memory.constructor;
+        $window.MemoryInfo = function () {};
+        $window.MemoryInfo.prototype = $window.performance.memory.__proto__;
       }
     }
     if (typeof $window.Geolocation == "undefined") {