Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 361f881

Browse files
zichanggcommit-bot@chromium.org
authored andcommitted
fix nnbd websocket
This fixes web_socket_typed_data_test and web_socket_test Change-Id: I7200ba423dbe24857854ba600f9fb9b3d4757635 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135620 Commit-Queue: Zichang Guo <[email protected]> Reviewed-by: Lasse R.H. Nielsen <[email protected]>
1 parent 2225d18 commit 361f881

File tree

4 files changed

+10
-7
lines changed

4 files changed

+10
-7
lines changed

pkg/dev_compiler/tool/dart2js_nnbd_sdk_error_golden.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ ERROR|STATIC_TYPE_WARNING|UNDEFINED_OPERATOR|lib/_internal/js_runtime/lib/interc
1212
ERROR|STATIC_TYPE_WARNING|UNDEFINED_OPERATOR|lib/_internal/js_runtime/lib/interceptors.dart|1666|18|1|The operator '&' isn't defined for the type 'JSInt'.
1313
ERROR|STATIC_TYPE_WARNING|UNDEFINED_OPERATOR|lib/_internal/js_runtime/lib/interceptors.dart|1666|44|1|The operator '&' isn't defined for the type 'JSInt'.
1414
WARNING|STATIC_WARNING|DEAD_NULL_COALESCE|lib/_http/http.dart|1476|39|5|The left operand can't be null, so the right operand is never executed.
15-
WARNING|STATIC_WARNING|DEAD_NULL_COALESCE|lib/_http/http.dart|8383|60|5|The left operand can't be null, so the right operand is never executed.
16-
WARNING|STATIC_WARNING|DEAD_NULL_COALESCE|lib/_http/http.dart|9310|54|5|The left operand can't be null, so the right operand is never executed.
15+
WARNING|STATIC_WARNING|DEAD_NULL_COALESCE|lib/_http/http.dart|8384|60|5|The left operand can't be null, so the right operand is never executed.
16+
WARNING|STATIC_WARNING|DEAD_NULL_COALESCE|lib/_http/http.dart|9311|54|5|The left operand can't be null, so the right operand is never executed.
1717
WARNING|STATIC_WARNING|DEAD_NULL_COALESCE|lib/developer/developer.dart|315|25|23|The left operand can't be null, so the right operand is never executed.
1818
WARNING|STATIC_WARNING|DEAD_NULL_COALESCE|lib/html/dart2js/html_dart2js.dart|4075|25|2|The left operand can't be null, so the right operand is never executed.
1919
WARNING|STATIC_WARNING|DEAD_NULL_COALESCE|lib/io/io.dart|9167|16|1|The left operand can't be null, so the right operand is never executed.

pkg/dev_compiler/tool/dartdevc_nnbd_sdk_error_golden.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ ERROR|COMPILE_TIME_ERROR|BODY_MAY_COMPLETE_NORMALLY|lib/html/dart2js/html_dart2j
1919
ERROR|COMPILE_TIME_ERROR|BODY_MAY_COMPLETE_NORMALLY|lib/html/dart2js/html_dart2js.dart|2978|13|11|The body might complete normally, which would cause 'null' to be returned, but the return type is a potentially non-nullable type.
2020
ERROR|COMPILE_TIME_ERROR|BODY_MAY_COMPLETE_NORMALLY|lib/html/dart2js/html_dart2js.dart|41436|8|15|The body might complete normally, which would cause 'null' to be returned, but the return type is a potentially non-nullable type.
2121
WARNING|STATIC_WARNING|DEAD_NULL_COALESCE|lib/_http/http.dart|1476|39|5|The left operand can't be null, so the right operand is never executed.
22-
WARNING|STATIC_WARNING|DEAD_NULL_COALESCE|lib/_http/http.dart|8383|60|5|The left operand can't be null, so the right operand is never executed.
23-
WARNING|STATIC_WARNING|DEAD_NULL_COALESCE|lib/_http/http.dart|9310|54|5|The left operand can't be null, so the right operand is never executed.
22+
WARNING|STATIC_WARNING|DEAD_NULL_COALESCE|lib/_http/http.dart|8384|60|5|The left operand can't be null, so the right operand is never executed.
23+
WARNING|STATIC_WARNING|DEAD_NULL_COALESCE|lib/_http/http.dart|9311|54|5|The left operand can't be null, so the right operand is never executed.
2424
WARNING|STATIC_WARNING|DEAD_NULL_COALESCE|lib/collection/collection.dart|1076|46|13|The left operand can't be null, so the right operand is never executed.
2525
WARNING|STATIC_WARNING|DEAD_NULL_COALESCE|lib/developer/developer.dart|332|25|23|The left operand can't be null, so the right operand is never executed.
2626
WARNING|STATIC_WARNING|DEAD_NULL_COALESCE|lib/html/dart2js/html_dart2js.dart|4075|25|2|The left operand can't be null, so the right operand is never executed.

sdk_nnbd/lib/_http/http_headers.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -764,7 +764,8 @@ class _HeaderValue implements HeaderValue {
764764
index++;
765765
break;
766766
}
767-
sb.write(s[index]);
767+
char = s[index];
768+
sb.write(char);
768769
index++;
769770
}
770771
return sb.toString();

sdk_nnbd/lib/_http/websocket_impl.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -710,8 +710,10 @@ class _WebSocketOutgoingTransformer
710710
} else {
711711
throw new ArgumentError(message);
712712
}
713-
714-
_deflateHelper?.processOutgoingMessage(messageData);
713+
var deflateHelper = _deflateHelper;
714+
if (deflateHelper != null) {
715+
messageData = deflateHelper.processOutgoingMessage(messageData);
716+
}
715717
data = messageData;
716718
} else {
717719
opcode = _WebSocketOpcode.TEXT;

0 commit comments

Comments
 (0)