Currently the worklets load their script as a "classic" script, and only fetch from "same-origin". Before we expose this worklets we want to switch to a "module" loaded script.
The work to be done here is:
- Make blink::WorkerOrWorkletScriptController be able to evaluate script source as a module instead of a regular v8::Script.
- Switch blink::Worklet to use this new evaluation, + change the fetching of the script source to "cors" instead of "same-origin".
This work is blocked by v8 support of modules, see tracking bug here:
https://bugs.chromium.org/p/v8/issues/detail?id=1569
Once v8 supports this we'll be able to switch over. :)
(We might be able to switch once v8 can support eval'ing modules, and not the full "import" support, but will need to coordinate w/ adamk@).
kinuko@ cc'ing you as FYI.
Comment 1 by kinuko@chromium.org
, Jul 14 2016