GoogleChromeLabs / chromeos_smart_card_connector

Smart Card Connector App for Chrome OS
https://chrome.google.com/webstore/detail/smart-card-connector/khpfeaanjngmcnplbdlpegiifgpfgdco
Apache License 2.0
133 stars 50 forks source link

[mv3] Put Wasm module into Offscreen Document #1141

Closed emaxx-google closed 2 months ago

emaxx-google commented 3 months ago

When built in the Emscripten+Extension mode, run the Emscripten module in the Offscreen Document instead of the Service Worker.

This is needed because multi-threaded Emscripten modules require creating Workers, which Chrome doesn't currently support from Service Workers - see https://crbug.com/40772041. Hence this commit moves the module into a separate Offscreen Document which doesn't have this limitation. The rest of the background logic remains in the Service Worker because Offscreen Documents have their own strict limitations (most importantly, only chrome.runtime APIs are exposed to them).

github-actions[bot] commented 3 months ago

Continuous Integration: All tests passed. C/C++ test coverage: 73.35% lines.

github-actions[bot] commented 3 months ago

Continuous Integration: All tests passed. C/C++ test coverage: 73.35% lines.

github-actions[bot] commented 3 months ago

Continuous Integration: All tests passed. C/C++ test coverage: 73.33% lines.

github-actions[bot] commented 3 months ago

Continuous Integration: All tests passed. C/C++ test coverage: 73.35% lines.

emaxx-google commented 2 months ago

All fair points! Let me rewrite some of the code to awaits and split it up.

emaxx-google commented 2 months ago

Ready for the next review iteration. This PR depends now on a few other ones, but as dependencies are horrible in GitHub I'm not trying to form a chain; hence tests fail here now, but rebasing will fix that later.

github-actions[bot] commented 2 months ago

Continuous Integration: All tests passed. C/C++ test coverage: 73.30% lines.

github-actions[bot] commented 2 months ago

Continuous Integration: All tests passed. C/C++ test coverage: 73.31% lines.

emaxx-google commented 2 months ago

Thanks for the reviews!