@gorhill gorhill released this Dec 1, 2018

Assets 4


I will keep bringing in WebAssembly ("wasm") versions of key portions of code where it is found to be beneficial. In this release, a wasm version of the algorithm used to lookup a hostname from a set of hostnames has been created (related benchmark page).

However, only the Firefox version of uBO benefits from this at this point, as it's is not possible to use wasm in the Chromium version without adding 'unsafe-eval' to the extension's own Content Security Policy in its manifest -- which is not something I am willing to do (my view is that any extension using 'unsafe-eval' should be assumed malicious by default). It works in Firefox because the wasm module is loaded using a same-origin fetch, meaning the module can only be loaded from uBO's own package, which is probably what Chromium ought to implement.

Also, on Firefox/Linux, the WebAssembly module may fail to load due to a missing MIME type entry in the OS, see https://bugzilla.mozilla.org/show_bug.cgi?id=1500710 (solution is in comment 11).

Closed as fixed