Skip to content

Commit

Permalink
Revert "Refactor JSNumber.toDart and Object.toJS" (flutter#43286)
Browse files Browse the repository at this point in the history
Reverts flutter#43149

Reason for reverting: Broke the roll into the framework.
  • Loading branch information
srujzs authored and kjlubick committed Jul 14, 2023
1 parent 2aa58f4 commit f2f23db
Show file tree
Hide file tree
Showing 10 changed files with 173 additions and 168 deletions.
144 changes: 72 additions & 72 deletions lib/web_ui/lib/src/engine/canvaskit/canvaskit_api.dart

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions lib/web_ui/lib/src/engine/canvaskit/image.dart
Original file line number Diff line number Diff line change
Expand Up @@ -205,10 +205,10 @@ Future<Uint8List> readChunked(HttpFetchPayload payload, int contentLength, WebOn
int position = 0;
int cumulativeBytesLoaded = 0;
await payload.read<JSUint8Array1>((JSUint8Array1 chunk) {
cumulativeBytesLoaded += chunk.length.toDartInt;
cumulativeBytesLoaded += chunk.length.toDart.toInt();
chunkCallback(cumulativeBytesLoaded, contentLength);
result.set(chunk, position.toJS);
position += chunk.length.toDartInt;
position += chunk.length.toDart.toInt();
});
return result.toDart;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/web_ui/lib/src/engine/configuration.dart
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ extension JsFlutterConfigurationExtension on JsFlutterConfiguration {

@JS('canvasKitMaximumSurfaces')
external JSNumber? get _canvasKitMaximumSurfaces;
double? get canvasKitMaximumSurfaces => _canvasKitMaximumSurfaces?.toDartDouble;
double? get canvasKitMaximumSurfaces => _canvasKitMaximumSurfaces?.toDart;

@JS('debugShowSemanticsNodes')
external JSBoolean? get _debugShowSemanticsNodes;
Expand Down

0 comments on commit f2f23db

Please sign in to comment.