Include MessagePort in convertions for workers

Address 2 of the 3 issues mentioned in https://github.com/dart-lang/sdk/issues/35730

Change-Id: I4ad67eddf266cdfb8847a277a6d19243dce23184
Reviewed-on: https://dart-review.googlesource.com/c/91106
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
diff --git a/sdk/lib/html/html_common/conversions_dart2js.dart b/sdk/lib/html/html_common/conversions_dart2js.dart
index f99b357..36153cf 100644
--- a/sdk/lib/html/html_common/conversions_dart2js.dart
+++ b/sdk/lib/html/html_common/conversions_dart2js.dart
@@ -56,7 +56,8 @@
   newJsMap() => JS('var', '{}');
   putIntoMap(map, key, value) => JS('void', '#[#] = #', map, key, value);
   newJsList(length) => JS('JSExtendableArray', 'new Array(#)', length);
-  cloneNotRequired(e) => (e is NativeByteBuffer || e is NativeTypedData);
+  cloneNotRequired(e) =>
+      (e is NativeByteBuffer || e is NativeTypedData || e is MessagePort);
 }
 
 class _AcceptStructuredCloneDart2Js extends _AcceptStructuredClone {
@@ -96,7 +97,7 @@
 
 const String _serializedScriptValue = 'num|String|bool|'
     'JSExtendableArray|=Object|'
-    'Blob|File|NativeByteBuffer|NativeTypedData'
+    'Blob|File|NativeByteBuffer|NativeTypedData|MessagePort'
     // TODO(sra): Add Date, RegExp.
     ;
 const annotation_Creates_SerializedScriptValue =