Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More support for wasm #178

Merged
merged 26 commits into from
Feb 10, 2025
Merged
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
68e6af1
fix: Using return values (wasm support)
koji-1009 Nov 30, 2024
e7d9517
test: Update getRandomValue test and support wasm error
koji-1009 Dec 1, 2024
2df83f9
feat: Use js_interop instead of html (wasm support)
koji-1009 Dec 1, 2024
3af9272
feat: Add wasm ci test and set timeout-minutes
koji-1009 Dec 1, 2024
e09f999
Merge branch 'master' into fix/support_wasm
koji-1009 Dec 3, 2024
88f1cc4
test: Stop separating jobs by strategy
koji-1009 Dec 3, 2024
9539b5f
fix: getRandomValues
koji-1009 Dec 3, 2024
bac32e9
feat: Unify the behavior of dart2js and dart2wasm
koji-1009 Dec 3, 2024
1a620f4
fix: Simplify
koji-1009 Dec 3, 2024
45ff7e3
feat: Create UnknownError class
koji-1009 Dec 3, 2024
b44ce75
test: fix
koji-1009 Dec 3, 2024
4e8e9de
refactor: Simplify UnknownError
koji-1009 Dec 4, 2024
7856777
refactor: Added processing branching by kIsWasm
koji-1009 Dec 4, 2024
9d36a73
fix: Show only kIsWasm
koji-1009 Dec 5, 2024
2d3497d
remove: Remove kIsWasm
koji-1009 Dec 5, 2024
e4e0e06
Update lib/src/crypto_subtle.dart
koji-1009 Dec 6, 2024
d27cadf
Apply suggestions from code review
koji-1009 Dec 6, 2024
aeeb3cc
fix: Use jsArray and dartArray
koji-1009 Dec 6, 2024
77991b6
fix: minor fix
koji-1009 Dec 6, 2024
b9f7954
test: Remove skip option
koji-1009 Dec 10, 2024
4efab3b
test: Add tests for various lists
koji-1009 Dec 10, 2024
69aa772
fix: Remove kIsWasm
koji-1009 Dec 10, 2024
bd9425a
fix: throw ArgumentError when type is not supported
koji-1009 Dec 10, 2024
d293552
chore: Check wasm coverage
koji-1009 Dec 10, 2024
4b13a9a
chore: Remove unused step
koji-1009 Dec 10, 2024
33aa079
chore: Remove wasm option from windows
koji-1009 Dec 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove: Remove kIsWasm
koji-1009 committed Dec 5, 2024
commit 2d3497d143a9dedd25da107f0a2043e69fee57cf
13 changes: 6 additions & 7 deletions lib/src/crypto_subtle.dart
Original file line number Diff line number Diff line change
@@ -19,7 +19,6 @@ library common;
import 'dart:js_interop';
import 'dart:typed_data';

import 'package:flutter/foundation.dart' show kIsWasm;
import 'package:meta/meta.dart';

import 'jsonwebkey.dart' show JsonWebKey, RsaOtherPrimesInfo;
@@ -339,37 +338,37 @@ TypedData getRandomValues(TypedData array) {
if (array is Uint8List) {
final values = array.toJS;
window.crypto.getRandomValues(values);
if (kIsWasm) {
if (array != values.toDart) {
array.setAll(0, values.toDart);
}
} else if (array is Uint16List) {
final values = array.toJS;
window.crypto.getRandomValues(values);
if (kIsWasm) {
if (array != values.toDart) {
array.setAll(0, values.toDart);
}
} else if (array is Uint32List) {
final values = array.toJS;
window.crypto.getRandomValues(values);
if (kIsWasm) {
if (array != values.toDart) {
array.setAll(0, values.toDart);
}
} else if (array is Int8List) {
final values = array.toJS;
window.crypto.getRandomValues(values);
if (kIsWasm) {
if (array != values.toDart) {
array.setAll(0, values.toDart);
}
} else if (array is Int16List) {
final values = array.toJS;
window.crypto.getRandomValues(values);
if (kIsWasm) {
if (array != values.toDart) {
array.setAll(0, values.toDart);
}
} else if (array is Int32List) {
final values = array.toJS;
window.crypto.getRandomValues(values);
if (kIsWasm) {
if (array != values.toDart) {
array.setAll(0, values.toDart);
}
} else {