Don't allow IndexedDB serialization of WebAssembly.Module · Issue #821 · WebAssembly/spec (original) (raw)
We discussed this in the June 12th CG meeting.
IndexedDB serialization of WebAssembly modules is implemented in some browsers, but not all, and code caching is currently only implemented in Firefox (AIUI). It's not clear that explicit caching via IDB provides the best solution. Some implementations will have compiled code using the baseline compiler, but not tiered up. Others will not have compiled any code at all.
In addition, some implementations will not be able to share the cache between origins with IDB, so the HTTP cache will be required instead. This can be made explicit using the cache API, which is a service-worker spec feature but is designed to be available everywhere.
Since the module will already be cached in the HTTP cache, this means explicit caching w/ IDB will have the module stored twice without de-duping magic.
For these reasons, it has been suggested that we remove the currently proposed support for module serialization to IDB. We still want to serialize modules for postMessage, however.
Thoughts/concerns?