Fix return type of native methods to match the implementation.

(These native implementations do not throw an exception, instead they
return on OSError object).

Related to the error seen in https://github.com/dart-lang/sdk/issues/48456

Change-Id: I6c98687d069073c4aa9d0344e79e777024590541
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/234662
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
This commit is contained in:
asiva 2022-03-01 01:41:18 +00:00 committed by Commit Bot
parent 7395ec9a6a
commit 373261ccca

View file

@ -307,9 +307,9 @@ class _NativeSynchronousSocket extends _NativeSynchronousSocketNativeWrapper {
@pragma("vm:external-name", "SynchronousSocket_CloseSync")
external _nativeCloseSync();
@pragma("vm:external-name", "SynchronousSocket_GetPort")
external int _nativeGetPort();
external _nativeGetPort();
@pragma("vm:external-name", "SynchronousSocket_GetRemotePeer")
external List _nativeGetRemotePeer();
external _nativeGetRemotePeer();
@pragma("vm:external-name", "SynchronousSocket_Read")
external _nativeRead(int len);
@pragma("vm:external-name", "SynchronousSocket_ReadList")