This repository was archived by the owner on Feb 25, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +3
-17
lines changed Expand file tree Collapse file tree 2 files changed +3
-17
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,6 @@ class CompileTestsStep implements PipelineStep {
46
46
await environment.webUiBuildDir.create ();
47
47
if (isWasm) {
48
48
await copyDart2WasmTestScript ();
49
- await copyDart2WasmRuntime ();
50
49
}
51
50
await copyCanvasKitFiles (useLocalCanvasKit: useLocalCanvasKit);
52
51
await buildHostPage ();
@@ -129,20 +128,6 @@ Future<void> copySkiaTestImages() async {
129
128
}
130
129
}
131
130
132
- Future <void > copyDart2WasmRuntime () async {
133
- final io.File sourceFile = io.File (pathlib.join (
134
- environment.dartSdkDir.path,
135
- 'bin' ,
136
- 'dart2wasm_runtime.mjs' ,
137
- ));
138
- final io.Directory targetDir = io.Directory (pathlib.join (
139
- environment.webUiBuildDir.path,
140
- 'dart2wasm_runtime.mjs' ,
141
- ));
142
-
143
- await sourceFile.copy (targetDir.path);
144
- }
145
-
146
131
Future <void > copyDart2WasmTestScript () async {
147
132
final io.File sourceFile = io.File (pathlib.join (
148
133
environment.webUiDevDir.path,
Original file line number Diff line number Diff line change @@ -54,8 +54,9 @@ window.onload = async function () {
54
54
let dart2wasm_runtime ;
55
55
let moduleInstance ;
56
56
try {
57
- dart2wasm_runtime = await import ( './dart2wasm_runtime.mjs' ) ;
58
- const dartModulePromise = WebAssembly . compileStreaming ( fetch ( link . href + ".browser_test.dart.wasm" ) ) ;
57
+ let baseName = link . href + '.browser_test.dart' ;
58
+ dart2wasm_runtime = await import ( baseName + '.mjs' ) ;
59
+ const dartModulePromise = WebAssembly . compileStreaming ( fetch ( baseName + '.wasm' ) ) ;
59
60
moduleInstance = await dart2wasm_runtime . instantiate ( dartModulePromise , { } ) ;
60
61
} catch ( exception ) {
61
62
const message = `Failed to fetch and instantiate wasm module: ${ exception } ` ;
You can’t perform that action at this time.
0 commit comments